Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/portal/src/app/dotnet/contracts/extensions/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ var balance = await contract.ERC20_BalanceOf("0xOwnerAddress");

## Available Contract Extensions

Please refer to the `ThirdwebExtensions` [full reference](https://thirdweb-dev.github.io/thirdweb-dotnet/docs/Thirdweb.ThirdwebExtensions.html) for a complete list of available contract extensions.
Please refer to the `ThirdwebExtensions` [full reference](https://thirdweb-dev.github.io/dotnet/index.html) for a complete list of available contract extensions.


20 changes: 12 additions & 8 deletions apps/portal/src/app/dotnet/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,27 @@ const walletActions: SidebarLink = (() => {
name: "ExecuteTransaction",
href: `${parentSlug}/executetransaction`,
},
{
name: "Transfer",
href: `${parentSlug}/transfer`,
},
],
},
{
name: "InAppWallet & EcosystemWallet",
isCollapsible: false,
links: [
{
name: "GetEmail",
href: `${parentSlug}/getemail`,
name: "GetUserDetails",
href: `${parentSlug}/getuserdetails`,
},
{
name: "GetEcosystemDetails",
href: `${parentSlug}/getecosystemdetails`,
},
{
name: "GetPhoneNumber",
href: `${parentSlug}/getphonenumber`,
name: "GenerateExternalLoginLink",
href: `${parentSlug}/generateexternalloginlink`,
},
],
},
Expand Down Expand Up @@ -124,10 +132,6 @@ const walletActions: SidebarLink = (() => {
name: "GetTransactionCount",
href: `${parentSlug}/gettransactioncount`,
},
{
name: "Transfer",
href: `${parentSlug}/transfer`,
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Details, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "EcosystemWallet.GenerateExternalLoginLink | Thirdweb .NET SDK",
description: "Method to forward the logged-in session of In-App or Ecosystem Wallets from .NET to React apps built using thirdweb.",
});

# EcosystemWallet.GenerateExternalLoginLink

This method returns a URL that can be used to forward the logged-in session of In-App or Ecosystem Wallets from .NET to React apps built using thirdweb.

Configure your React website to use thirdweb Connect, open the link generated by this method and your users will be autoconnected.
If using Ecosystem Wallets, make sure to create the ecosystem wallet with the same ecosystem id and partner id (if any) and include it as one of your wallets in, for example, your ConnectButton's wallets prop.
Make sure you're using the same api key on both ends.

## Usage

```csharp
var url = await ecosystemWallet.GenerateExternalLoginLink();
```

<Details summary="Return Value">

### string

The URL that can be used to forward the logged-in session of In-App or Ecosystem Wallets from .NET to React apps built using thirdweb.

</Details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Details, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "EcosystemWallet.GetEcosystemDetails | Thirdweb .NET SDK",
description: "Retrieve information about the Ecosystem the wallet is part of.",
});

# EcosystemWallet.GetEcosystemDetails

This method returns information about the Ecosystem the wallet is part of.

## Usage

```csharp
var result = await ecosystemWallet.GetEcosystemDetails();
```

<Details summary="Return Value">

### EcosystemDetails

The Ecosystem details, such as the Ecosystem name, slug, image URL and more.

</Details>
24 changes: 0 additions & 24 deletions apps/portal/src/app/dotnet/wallets/actions/getemail/page.mdx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Details, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "EcosystemWallet.GetUserDetails | Thirdweb .NET SDK",
description: "Retrieve information about the connected user wallet and its linked accounts.",
});

# EcosystemWallet.GetUserDetails

This method returns information about the connected user wallet and its linked accounts.

## Usage

```csharp
var result = await ecosystemWallet.GetUserDetails();
```

<Details summary="Return Value">

### UserStatusResponse

The user and linked accounts information, such as the user's address, email and more.

</Details>
12 changes: 9 additions & 3 deletions apps/portal/src/app/dotnet/wallets/actions/transfer/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ import { Details, createMetadata } from "@doc";

export const metadata = createMetadata({
title: "IThirdwebWallet.Transfer | Thirdweb .NET SDK",
description: "Method to transfer the specified amount of Wei to a given address.",
description: "Method to transfer the specified amount of native tokens or ERC20 tokens to a given address.",
});

# IThirdwebWallet.Transfer

This method transfers a specified amount of Wei (smallest denomination of Ether) to a specified wallet address on a given chain.
This method transfers a specified amount of Wei (smallest denomination of Ether) or ERC20s to a specified wallet address on a given chain.

## Usage

```csharp
// Transfer Wei
ThirdwebTransactionReceipt receipt = await wallet.Transfer(chainId, toAddress, weiAmount);
var receipt = await wallet.Transfer(chainId, toAddress, weiAmount);
// Transfer ERC20
var receipt = await wallet.Transfer(chainId, toAddress, weiAmount, erc20ContractAddress);
```

<Details summary="Parameters">
Expand All @@ -35,6 +37,10 @@ The address to which the Wei will be transferred.

The amount of Wei to transfer. It must be 0 or greater.

### erc20ContractAddress (optional)

The contract address of the ERC20 token to transfer. If not provided, the transfer will be in native tokens.

</Details>

<Details summary="Return Value">
Expand Down
62 changes: 29 additions & 33 deletions apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,83 +85,79 @@ var result = await contract.Read<string>("name");

Returns a [ThirdwebContract](/dotnet/contracts/create) instance that can be used to interact with a smart contract.

### GetActiveWallet
### ConnectWallet

```csharp
var wallet = ThirdwebManager.Instance.GetActiveWallet();
var walletOptions = new WalletOptions(WalletProvider.PrivateKeyWallet, 421614);
var wallet = await ThirdwebManager.Instance.ConnectWallet(walletOptions);
var address = await wallet.GetAddress();
```

Returns the currently active wallet as an `IThirdwebWallet`.
Connects a wallet based on the specified `WalletOptions` and returns an `IThirdwebWallet` instance that can be used to interact with the blockchain.

### SetActiveWallet
### UpgradeToSmartWallet

```csharp
ThirdwebManager.Instance.SetActiveWallet(wallet);
var smartWallet = await ThirdwebManager.Instance.UpgradeToSmartWallet(wallet, chainId, smartWalletOptions);
```

Sets the specified wallet as the active wallet.
Upgrades the specified wallet to a `SmartWallet`, returning a `SmartWallet` instance.

### GetWallet
### LinkAccount

```csharp
var wallet = ThirdwebManager.Instance.GetWallet("wallet-address");
var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainWallet, walletToLink, otp, chainId, jwtOrPayload);
```

Returns a wallet from the manager's wallet mapping by its address.
Links another `InAppWallet` or `EcosystemWallet` account to the main wallet and returns a list of linked accounts, allowing you to login with either authentication method later.

### AddWallet
### GetActiveWallet

```csharp
var wallet = await ThirdwebManager.Instance.AddWallet(wallet);
var wallet = ThirdwebManager.Instance.GetActiveWallet();
```

Adds a wallet to the manager's wallet mapping and returns the added wallet.
Returns the currently active wallet as an `IThirdwebWallet`.

### RemoveWallet
### SetActiveWallet

```csharp
ThirdwebManager.Instance.RemoveWallet("wallet-address");
ThirdwebManager.Instance.SetActiveWallet(wallet);
```

Removes a wallet from the manager's wallet mapping by its address.
Sets the specified wallet as the active wallet.

### ConnectWallet
### GetWallet

```csharp
var walletOptions = new WalletOptions(WalletProvider.PrivateKeyWallet, 421614);
var wallet = await ThirdwebManager.Instance.ConnectWallet(walletOptions);
var address = await wallet.GetAddress();
var wallet = ThirdwebManager.Instance.GetWallet("wallet-address");
```

Connects a wallet based on the specified `WalletOptions` and returns an `IThirdwebWallet` instance that can be used to interact with the blockchain.
Returns a wallet from the manager's wallet mapping by its address.

### UpgradeToSmartWallet
### AddWallet

```csharp
var smartWallet = await ThirdwebManager.Instance.UpgradeToSmartWallet(wallet, chainId, smartWalletOptions);
var wallet = await ThirdwebManager.Instance.AddWallet(wallet);
```

Upgrades the specified wallet to a `SmartWallet`, returning a `SmartWallet` instance.
Adds a wallet to the manager's wallet mapping and returns the added wallet.

### LinkAccount
### RemoveWallet

```csharp
var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainWallet, walletToLink, otp, chainId, jwtOrPayload);
ThirdwebManager.Instance.RemoveWallet("wallet-address");
```

Links another `InAppWallet` account to the main wallet and returns a list of linked accounts, allowing you to login with either authentication method later.
Removes a wallet from the manager's wallet mapping by its address.

## Child Prefabs

### InAppWalletModal

The `InAppWalletModal` prefab is a simple and customizable OTP verification modal for `InAppWallet` providers. It is used to verify and finalize the user's wallet connection.

It will be automatically activated when connecting to an `InAppWallet` provider.
### DefaultOTPModal

### EcosystemWalletModal
The helper modal that is displayed when using the `ThirdwebManager`'s `ConnectWallet` function with an auth method that requires an OTP, such as Email or Phone login.

Similar use case as `InAppWalletModal`, but for `EcosystemWallet` providers.
It can be replaced with a custom modal that extends `AbstractOTPVerifyModal` to customize the OTP verification process.

### WalletConnectModal

Expand Down
Loading