Table of Contents

Interface IThirdwebWallet

Namespace
Thirdweb
Assembly
Thirdweb.dll

Interface for a Thirdweb wallet.

public interface IThirdwebWallet
Extension Methods

Properties

AccountType

Gets the account type of the wallet.

ThirdwebAccountType AccountType { get; }

Property Value

ThirdwebAccountType

Client

Gets the Thirdweb client associated with the wallet.

ThirdwebClient Client { get; }

Property Value

ThirdwebClient

Methods

Disconnect()

Disconnects the wallet (if using InAppWallet, clears session)

Task Disconnect()

Returns

Task

EthSign(byte[])

Signs a raw message using Ethereum's signing method.

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.

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.

Task<ThirdwebTransactionReceipt> ExecuteTransaction(ThirdwebTransactionInput transaction)

Parameters

transaction ThirdwebTransactionInput

The transaction to execute.

Returns

Task<ThirdwebTransactionReceipt>

The transaction receipt.

GetAddress()

Gets the address of the wallet.

Task<string> GetAddress()

Returns

Task<string>

The wallet address.

IsConnected()

Checks if the wallet is connected.

Task<bool> IsConnected()

Returns

Task<bool>

True if connected, otherwise false.

PersonalSign(byte[])

Signs a raw message using personal signing.

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.

Task<string> PersonalSign(string message)

Parameters

message string

The message to sign.

Returns

Task<string>

The signed message.

RecoverAddressFromEthSign(string, string)

Recovers the address from a signed message using Ethereum's signing method.

Task<string> RecoverAddressFromEthSign(string message, string signature)

Parameters

message string

The UTF-8 encoded message.

signature string

The signature.

Returns

Task<string>

The recovered address.

RecoverAddressFromPersonalSign(string, string)

Recovers the address from a signed message using personal signing.

Task<string> RecoverAddressFromPersonalSign(string message, string signature)

Parameters

message string

The UTF-8 encoded and prefixed message.

signature string

The signature.

Returns

Task<string>

The recovered address.

RecoverAddressFromTypedDataV4<T, TDomain>(T, TypedData<TDomain>, string)

Recovers the address from a signed message using typed data (version 4).

Task<string> RecoverAddressFromTypedDataV4<T, TDomain>(T data, TypedData<TDomain> typedData, string signature) where TDomain : IDomain

Parameters

data T

The data to sign.

typedData TypedData<TDomain>

The typed data.

signature string

The signature.

Returns

Task<string>

The recovered address.

Type Parameters

T
TDomain

SendTransaction(ThirdwebTransactionInput)

Sends a transaction.

Task<string> SendTransaction(ThirdwebTransactionInput transaction)

Parameters

transaction ThirdwebTransactionInput

The transaction to send.

Returns

Task<string>

The transaction hash.

SignTransaction(ThirdwebTransactionInput)

Signs a transaction.

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).

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).

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.