WalletsModule class

Module for managing user wallets and wallet operations.

This module provides access to user wallets, wallet operations such as signing messages, getting balances, switching networks, and managing the primary wallet. It also provides access to embedded wallets functionality.

Constructors

WalletsModule(MessageTransport messageTransport)
Creates a new WalletsModule instance.

Properties

delegatedAccessChanges Stream<DelegatedAccessState>
A stream that emits the delegated access state whenever it changes.
no setter
delegatedAccessState DelegatedAccessState
Returns the current delegated access state.
no setter
embedded → EmbeddedWalletsModule
Returns the embedded wallets module for managing embedded wallet operations.
no setter
hashCode int
The hash code for this object.
no setterinherited
primary BaseWallet?
Returns the primary wallet, or null if no primary wallet is set.
no setter
primaryChanges Stream<BaseWallet?>
A stream that emits the primary wallet whenever it changes.
no setter
requestChannel RequestChannel
Request channel for sending wallet-related requests to WebView.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userWallets List<BaseWallet>
Returns the list of all user wallets.
no setter
userWalletsChanges Stream<List<BaseWallet>>
A stream that emits the list of user wallets whenever it changes.
no setter
waas WaasModule
Returns the WaaS module for password management operations on embedded wallets.
no setter

Methods

clearDelegationSessionState() Future<void>
Clears all session dismissal state for delegation prompts.
delegateKeyShares({List<DelegationWalletIdentifier>? wallets}) Future<void>
Delegates specific wallets programmatically without UI.
denyWalletDelegation({required String walletId}) Future<void>
Permanently denies delegation for a specific wallet.
dismissDelegationPrompt({String? walletId}) Future<void>
Dismisses the delegation prompt for the current session.
getBalance({required BaseWallet wallet}) Future<String>
Gets the balance of the specified wallet.
getDelegationStatusForWallet(String walletId) WalletDelegatedStatus?
Gets the delegation status for a specific wallet.
getMultichainBalances({required MultichainBalanceRequest balanceRequest}) Future<MultichainBalancesResponse>
Gets multichain balances for the specified balance requests.
getNetwork({required BaseWallet wallet}) Future<Network>
Gets the network that the specified wallet is currently connected to.
getWalletsDelegatedStatus() Future<List<WalletDelegatedStatus>>
Gets the current delegation status of all wallets.
initDelegationProcess({List<String>? walletIds}) Future<void>
Opens the delegation modal UI.
isWalletEligibleForDelegation(BaseWallet wallet) bool
Checks if a wallet is eligible for delegation (embedded/WaaS wallet).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pollWalletsState() → void
Polls getWalletsState every second for up to 10 seconds to force-populate the wallet list if it's empty. Should be called after the user logs in.
revokeDelegation({required List<DelegationWalletIdentifier> wallets}) Future<void>
Revokes delegation for specific wallets.
setPrimary({required String walletId}) Future<void>
Sets the primary wallet for the user.
shouldPromptWalletDelegation() Future<bool>
Checks if the user should be prompted for wallet delegation.
signMessage({required BaseWallet wallet, required String message}) Future<String>
Signs a message using the specified wallet.
signRawMessage({required String walletId, required String accountAddress, required String message, String? password}) Future<String>
Signs a raw (pre-hashed) message using the specified embedded wallet.
switchNetwork({required BaseWallet wallet, required Network network}) Future<void>
Switches the network for the specified wallet.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited