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
ThirdwebClientecosystemId
stringecosystemPartnerId
stringemail
stringphoneNumber
stringauthProvider
AuthProviderstorageDirectoryPath
stringsiweSigner
IThirdwebWallet
Returns
Disconnect()
Disconnects the wallet (if using InAppWallet, clears session)
public override Task Disconnect()
Returns
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
EthSign(string)
Signs a message using Ethereum's signing method.
public override Task<string> EthSign(string message)
Parameters
message
stringThe message to sign.
Returns
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
GetEmail()
public string GetEmail()
Returns
GetLinkedAccounts()
public Task<List<LinkedAccount>> GetLinkedAccounts()
Returns
GetPhoneNumber()
public string GetPhoneNumber()
Returns
IsConnected()
Checks if the wallet is connected.
public override Task<bool> IsConnected()
Returns
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
EcosystemWalletotp
stringisMobile
bool?browserOpenAction
Action<string>mobileRedirectScheme
stringbrowser
IThirdwebBrowserchainId
BigInteger?jwt
stringpayload
string
Returns
LoginWithAuthEndpoint(string)
public Task<string> LoginWithAuthEndpoint(string payload)
Parameters
payload
string
Returns
LoginWithGuest()
public Task<string> LoginWithGuest()
Returns
LoginWithJWT(string)
public Task<string> LoginWithJWT(string jwt)
Parameters
jwt
string
Returns
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
boolbrowserOpenAction
Action<string>mobileRedirectScheme
stringbrowser
IThirdwebBrowsercancellationToken
CancellationToken
Returns
LoginWithOtp(string)
public Task<string> LoginWithOtp(string otp)
Parameters
otp
string
Returns
LoginWithSiwe(BigInteger)
public Task<string> LoginWithSiwe(BigInteger chainId)
Parameters
chainId
BigInteger
Returns
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
PersonalSign(string)
Signs a message using personal signing.
public override Task<string> PersonalSign(string message)
Parameters
message
stringThe message to sign.
Returns
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
ThirdwebTransactionInputThe transaction to send.
Returns
SignTransaction(ThirdwebTransactionInput)
Signs a transaction.
public override Task<string> SignTransaction(ThirdwebTransactionInput transaction)
Parameters
transaction
ThirdwebTransactionInputThe transaction to sign.
Returns
SignTypedDataV4(string)
Signs typed data (version 4).
public override Task<string> SignTypedDataV4(string json)
Parameters
json
stringThe JSON representation of the typed data.
Returns
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
TThe data to sign.
typedData
TypedData<TDomain>The typed data.
Returns
Type Parameters
T
The type of the data.
TDomain
The type of the domain.