createWalletAccount
Create a new wallet account for an authenticated user.Parameters
- client (DynamicClient) - Initialized Dynamic client with authenticated user
 
Returns
- String - The wallet address of the created wallet
 
Example
EthereumWallet
Ethereum wallet instance for managing wallet operations and transactions.Initialization
Parameters
- address (String) - Ethereum wallet address
 - client (DynamicClient) - Initialized Dynamic client
 
Example
Properties
- address (EthereumAddress) - Ethereum address object
 - accountAddress (BlockchainAddress) - Blockchain address for cross-chain compatibility
 
Methods
getBalance
Get the current balance of the wallet.Parameters
- block (BlockParameter) - Block parameter (e.g., .Latest)
 
Returns
- BigUInt - Balance in Wei
 
Example
signMessage
Sign a message with the wallet’s private key.Parameters
- message (String) - Message to sign
 
Returns
- String - Signature in hex format
 
Example
sendTransaction
Send a transaction from the wallet.Parameters
- transaction (EthereumTransaction) - Transaction to send
 
Returns
- String - Transaction hash
 
Example
switchNetwork
Switch the wallet to a different network.Parameters
- network (ChainConfig) - Network configuration to switch to
 
Example
getNetworkClient
Get a network client for a specific chain ID.Parameters
- chainId (BigUInt) - Chain ID of the network
 
Returns
- BaseEthereumClient - Network client for the specified chain
 
Example
exportPrivateKey
Export the wallet’s private key.Returns
- String - Private key in hex format
 
Example
loadKeyShares
Load wallet key shares for an account address.Parameters
- client (DynamicClient) - Initialized Dynamic client
 - accountAddress (String) - Wallet account address
 
Returns
- KeyShares? - Key shares if available, nil otherwise
 
Example
verifySignature
Verify a message signature.Parameters
- message (String) - Original message that was signed
 - signature (String) - Signature to verify
 - walletAddress (String) - Wallet address that signed the message
 
Returns
- Bool - True if signature is valid, false otherwise
 
Example
recoverEncryptedBackupByWallet
Recover encrypted backup for a wallet using key share IDs.Parameters
- client (DynamicClient) - Initialized Dynamic client
 - walletId (String) - Wallet ID
 - keyShareIds ([Uuid]) - Array of key share IDs
 - address (String) - Wallet address
 
Returns
- String - Recovery result