class Wallet
class Wallet
: public Thirdweb.Routable
Connect and Interact with a Wallet.
Summary
Members | Type | Descriptions |
---|---|---|
Wallet | function | |
Connect | function | Connect a user's wallet via a given wallet provider |
Disconnect | function | Disconnect the user's wallet |
Authenticate | function | Authenticate the user by signing a payload that can be used to securely identify users. See https://portal.thirdweb.com/auth |
GetBalance | function | Get the balance of the connected wallet |
GetAddress | function | Get the connected wallet address |
IsConnected | function | Check if a wallet is connected |
GetChainId | function | Get the connected chainId |
SwitchNetwork | function | Prompt the connected wallet to switch to the giiven chainId |
Transfer | function | Transfer currency to a given address |
Sign | function | Prompt the connected wallet to sign the given message |
RecoverAddress | function | Recover the original wallet address that signed a message |
SendRawTransaction | function | Send a raw transaction from the connected wallet |
FundWallet | function | Prompt the user to fund their wallet using one of the thirdweb pay providers (defaults to Coinbase Pay). |
Members
public inline
Wallet
()
public inline Task< string >
Connect
(
WalletConnection
? walletConnection)
Connect a user's wallet via a given wallet provider
Parameters
walletConnection
The wallet provider and chainId to connect to. Defaults to the injected browser extension.
public inline Task
Disconnect
()
Disconnect the user's wallet
public inline async Task<
LoginPayload
>
Authenticate
(string domain)
Authenticate the user by signing a payload that can be used to securely identify users. See https://portal.thirdweb.com/auth
Parameters
domain
The domain to authenticate to
public inline async Task<
CurrencyValue
>
GetBalance
(string currencyAddress)
Get the balance of the connected wallet
Parameters
currencyAddress
Optional address of the currency to check balance of
public inline async Task< string >
GetAddress
()
Get the connected wallet address
public inline async Task< bool >
IsConnected
()
Check if a wallet is connected
public inline async Task< int >
GetChainId
()
Get the connected chainId
public inline async Task
SwitchNetwork
(int chainId)
Prompt the connected wallet to switch to the giiven chainId
public inline async Task<
TransactionResult
>
Transfer
(string to,string amount,string currencyAddress)
Transfer currency to a given address
public inline async Task< string >
Sign
(string message)
Prompt the connected wallet to sign the given message
public inline async Task< string >
RecoverAddress
(string message,string signature)
Recover the original wallet address that signed a message
public inline async Task<
TransactionResult
>
SendRawTransaction
(
TransactionRequest
transactionRequest)
Send a raw transaction from the connected wallet
public inline async Task
FundWallet
(
FundWalletOptions
options)
Prompt the user to fund their wallet using one of the thirdweb pay providers (defaults to Coinbase Pay).
Parameters
options
The options like wallet address to fund, on which chain, etc