Table of Contents

Class EcosystemWallet

Namespace
Thirdweb
Assembly
Thirdweb.dll

Enclave based secure cross ecosystem wallet.

public class EcosystemWallet : PrivateKeyWallet, IThirdwebWallet
Inheritance
EcosystemWallet
Implements
Inherited Members
Extension Methods

Methods

Create(ThirdwebClient, string, string, string, string, AuthProvider, string, IThirdwebWallet)

public static Task<EcosystemWallet> Create(ThirdwebClient client, string ecosystemId, string ecosystemPartnerId = null, string email = null, string phoneNumber = null, AuthProvider authProvider = AuthProvider.Default, string storageDirectoryPath = null, IThirdwebWallet siweSigner = null)

Parameters

client ThirdwebClient
ecosystemId string
ecosystemPartnerId string
email string
phoneNumber string
authProvider AuthProvider
storageDirectoryPath string
siweSigner IThirdwebWallet

Returns

Task<EcosystemWallet>

Disconnect()

Disconnects the wallet (if using InAppWallet, clears session)

public override Task Disconnect()

Returns

Task

EthSign(byte[])

Signs a raw message using Ethereum's signing method.

public override Task<string> EthSign(byte[] rawMessage)

Parameters

rawMessage byte[]

The raw message to sign.

Returns

Task<string>

The signed message.

EthSign(string)

Signs a message using Ethereum's signing method.

public override Task<string> EthSign(string message)

Parameters

message string

The message to sign.

Returns

Task<string>

The signed message.

ExecuteTransaction(ThirdwebTransactionInput)

Sends a transaction and waits for its receipt.

public override Task<ThirdwebTransactionReceipt> ExecuteTransaction(ThirdwebTransactionInput transactionInput)

Parameters

transactionInput ThirdwebTransactionInput

Returns

Task<ThirdwebTransactionReceipt>

The transaction receipt.

GetAddress()

Gets the address of the wallet.

public override Task<string> GetAddress()

Returns

Task<string>

The wallet address.

GetEmail()

public string GetEmail()

Returns

string

GetLinkedAccounts()

public Task<List<LinkedAccount>> GetLinkedAccounts()

Returns

Task<List<LinkedAccount>>

GetPhoneNumber()

public string GetPhoneNumber()

Returns

string

IsConnected()

Checks if the wallet is connected.

public override Task<bool> IsConnected()

Returns

Task<bool>

True if connected, otherwise false.

LinkAccount(EcosystemWallet, string, bool?, Action<string>, string, IThirdwebBrowser, BigInteger?, string, string)

public Task<List<LinkedAccount>> LinkAccount(EcosystemWallet walletToLink, string otp = null, bool? isMobile = null, Action<string> browserOpenAction = null, string mobileRedirectScheme = "thirdweb://", IThirdwebBrowser browser = null, BigInteger? chainId = null, string jwt = null, string payload = null)

Parameters

walletToLink EcosystemWallet
otp string
isMobile bool?
browserOpenAction Action<string>
mobileRedirectScheme string
browser IThirdwebBrowser
chainId BigInteger?
jwt string
payload string

Returns

Task<List<LinkedAccount>>

LoginWithAuthEndpoint(string)

public Task<string> LoginWithAuthEndpoint(string payload)

Parameters

payload string

Returns

Task<string>

LoginWithGuest()

public Task<string> LoginWithGuest()

Returns

Task<string>

LoginWithJWT(string)

public Task<string> LoginWithJWT(string jwt)

Parameters

jwt string

Returns

Task<string>

LoginWithOauth(bool, Action<string>, string, IThirdwebBrowser, CancellationToken)

public Task<string> LoginWithOauth(bool isMobile, Action<string> browserOpenAction, string mobileRedirectScheme = "thirdweb://", IThirdwebBrowser browser = null, CancellationToken cancellationToken = default)

Parameters

isMobile bool
browserOpenAction Action<string>
mobileRedirectScheme string
browser IThirdwebBrowser
cancellationToken CancellationToken

Returns

Task<string>

LoginWithOtp(string)

public Task<string> LoginWithOtp(string otp)

Parameters

otp string

Returns

Task<string>

LoginWithSiwe(BigInteger)

public Task<string> LoginWithSiwe(BigInteger chainId)

Parameters

chainId BigInteger

Returns

Task<string>

PersonalSign(byte[])

Signs a raw message using personal signing.

public override Task<string> PersonalSign(byte[] rawMessage)

Parameters

rawMessage byte[]

The raw message to sign.

Returns

Task<string>

The signed message.

PersonalSign(string)

Signs a message using personal signing.

public override Task<string> PersonalSign(string message)

Parameters

message string

The message to sign.

Returns

Task<string>

The signed message.

SendOTP()

public Task<(bool isNewUser, bool isNewDevice)> SendOTP()

Returns

Task<(bool isNewUser, bool isNewDevice)>

SendTransaction(ThirdwebTransactionInput)

Sends a transaction.

public override Task<string> SendTransaction(ThirdwebTransactionInput transaction)

Parameters

transaction ThirdwebTransactionInput

The transaction to send.

Returns

Task<string>

The transaction hash.

SignTransaction(ThirdwebTransactionInput)

Signs a transaction.

public override Task<string> SignTransaction(ThirdwebTransactionInput transaction)

Parameters

transaction ThirdwebTransactionInput

The transaction to sign.

Returns

Task<string>

The signed transaction.

SignTypedDataV4(string)

Signs typed data (version 4).

public override Task<string> SignTypedDataV4(string json)

Parameters

json string

The JSON representation of the typed data.

Returns

Task<string>

The signed data.

SignTypedDataV4<T, TDomain>(T, TypedData<TDomain>)

Signs typed data (version 4).

public override Task<string> SignTypedDataV4<T, TDomain>(T data, TypedData<TDomain> typedData) where TDomain : IDomain

Parameters

data T

The data to sign.

typedData TypedData<TDomain>

The typed data.

Returns

Task<string>

The signed data.

Type Parameters

T

The type of the data.

TDomain

The type of the domain.