wallet_adapter library

Classes

BaseWalletAdapter
BraveWalletAdapter
DartWalletAdapterPlugin
ExodusWalletAdapter
GlowWalletAdapter
NightlyWalletAdapter
PhantomWalletAdapter
SolflareWalletAdapter
TrustWalletAdapter
WalletAccountError
This error is thrown when there is an issue with the account in the wallet. Verify that the account is properly set up and has the necessary funds or permissions.
WalletConfigError
This error is thrown when there is a configuration issue with the wallet. Ensure that the wallet is properly configured, with valid keys and network settings.
WalletConnectionError
This error is thrown when there is an issue connecting to the wallet. Check the wallet's connection status and ensure it's available and reachable.
WalletDisconnectedError
This error is thrown when the wallet gets disconnected. Check the wallet's connection status and ensure it's available and reachable.
WalletDisconnectionError
This error is thrown when there is an issue disconnecting the wallet. Check the wallet's connection status and ensure it's not already disconnected.
WalletError
WalletKeypairError
This error is thrown when there is an issue with the keypair in the wallet. Verify that the keypair is valid and correctly imported into the wallet.
WalletLoadError
This error is thrown when there is an issue loading the wallet. Make sure the wallet library is properly imported and instantiated.
WalletNotConnectedError
This error is thrown when a wallet operation is attempted without a connection. Ensure that the wallet is connected before calling its methods.
WalletNotReadyError
This error is thrown when an operation is attempted on a wallet that is not ready. Ensure that the wallet is properly initialized and ready before calling its methods.
WalletPublicKeyError
This error is thrown when there is an issue with the public key in the wallet. Verify that the public key is valid and corresponds to a valid account.
WalletSendTransactionError
This error is thrown when there is an issue sending a transaction from the wallet. Ensure that the transaction is properly formatted and that the wallet has enough funds.
WalletSignMessageError
This error is thrown when there is an issue signing a message with the wallet. Ensure that the message is properly formatted and that the wallet is ready to sign.
WalletSignTransactionError
This error is thrown when there is an issue signing a transaction with the wallet. Ensure that the transaction is properly formatted and that the wallet is ready to sign.
WalletTimeoutError
This error is thrown when a wallet operation times out. Check the network connection and ensure that the wallet server is responding timely.
WalletWindowBlockedError
This error is thrown when a wallet popup window is blocked or fails to open. Check the browser settings to ensure that popups are allowed from your website.
WalletWindowClosedError
This error is thrown when a wallet popup window is closed without completing the operation. Advise the user to keep the popup window open until the operation completes.

Functions

loadDartWalletAdapter() Future<void>
removeWalletOnConnectEvent(BaseWalletAdapter walletAdapter, void onConnect(PublicKey publicKey)) → void
Unsubscribes the onConnect event. Call this when you no longer want to listen for wallet connections.
removeWalletOnDisconnectEvent(BaseWalletAdapter walletAdapter, void onDisconnect()) → void
Unsubscribes the onDisconnect event. Call this when you no longer want to listen for wallet disconnections.
removeWalletOnErrorEvent(BaseWalletAdapter walletAdapter, void onError(dynamic error)) → void
Unsubscribes the onError event. Call this when you no longer want to listen for wallet errors.
setupWalletOnConnectEvent(BaseWalletAdapter walletAdapter, void onConnect(PublicKey publicKey)) → void
The onConnect event is emitted after the wallet has successfully connected. This event is typically used to update the application state to reflect that the wallet is connected.
setupWalletOnDisconnectEvent(BaseWalletAdapter walletAdapter, void onDisconnect()) → void
The onDisconnect event is emitted after the wallet has been disconnected. This event is typically used to update the application state to reflect that the wallet is disconnected.
setupWalletOnErrorEvent(BaseWalletAdapter walletAdapter, void onError(dynamic error)) → void
The onError event is emitted when an error occurs while interacting with the wallet. This could be due to a user rejecting a transaction, a network problem, or many other reasons.