sdk.wallets
Wallet management module for accessing and managing user wallets.userWallets
Get the current user’s wallets.Example
userWalletsChanges
Combine publisher that emits when wallets change.Example
getBalance
Get the balance of a wallet.Parameters
- wallet (BaseWallet) - The wallet to get balance for
Returns
- String - The wallet balance
Example
getNetwork
Get the current network of a wallet.Parameters
- wallet (BaseWallet) - The wallet to get network for
Returns
- NetworkResult - The current network information
Example
switchNetwork
Switch a wallet to a different network.Parameters
- wallet (BaseWallet) - The wallet to switch network for
- network (GenericNetwork) - The target network
Example
setPrimary
Set a wallet as the user’s primary wallet.Parameters
- walletId (String) - The ID of the wallet to set as primary
Example
signMessage
Sign a message with a wallet.Parameters
- wallet (BaseWallet) - The wallet to sign with
- message (String) - The message to sign
Returns
- String - The signature
Example
signTypedData
Sign EIP-712 typed data with a wallet.Parameters
- wallet (BaseWallet) - The wallet to sign with
- typedDataJson (String) - The typed data as a JSON string
Returns
- String - The signature