pub enum WalletError {
Show 46 variants
ChannelError,
JsError {
name: String,
message: String,
stack: String,
},
InternalError(String),
ValueNotFound,
ExpectedValueNotFound(String),
MissingAccessToBrowserWindow,
MissingAccessToBrowserDocument,
UnsupportedCommitment(String),
InvalidWalletVersion(String),
InvalidSemVerNumber(String),
Expected32ByteLength,
Expected64ByteLength,
VersionNotFound,
UnsupportedWalletFeature(String),
UnsupportedTransactionVersion,
LegacyTransactionSupportRequired,
UnsupportedChain(String),
MissingConnectFunction,
WalletNotFound,
AccountNotFound,
WalletConnectError(String),
ConnectHasNoAccounts,
MissingDisconnectFunction,
MissingGetAccountsFunction(String),
WalletDisconnectError(String),
StandardEventsError(String),
MissingStandardEventsFunction,
MissingSignInFunction,
ExpiryTimeEarlierThanIssuedTime,
NotBeforeTimeEarlierThanIssuedTime,
NotBeforeTimeLaterThanExpirationTime,
ExpirationTimeIsInThePast,
NotBeforeTimeIsInThePast,
InvalidBase58Address,
NonceMustBeAtLeast8Characters,
InvalidISO8601Timestamp(String),
MessageResponseMismatch,
InvalidSignature,
InvalidEd25519SignatureBytes,
InvalidEd25519PublicKeyBytes,
MissingSignMessageFunction,
SignedMessageMismatch,
ReceivedAnEmptySignedMessagesArray,
MissingSignTransactionFunction,
SendAndSignTransactionSignatureEmpty,
Op(String),
}
Expand description
Error handling enum
Variants§
ChannelError
Unable to send the a WalletEvent via the crate::WalletEventSender
JsError
An JavaScript Error corresponding to a JsValue .
It contains the error type represented by name
,
the error message message
and the stack
message which offers a trace of which functions were called.
Learn about this error type from Error - Mozilla Developer Network
Fields
InternalError(String)
An internal error that occurs when casting a JavaScript types or DOM types to a Rust type using web_sys::wasm_bindgen::JsCast trait
and foo.dyn_ref::<T>()
or foo.dyn_into::<T>()
where foo
is a variable of type JsValue. These error can also occur when trying to parse a browser error from JavaScript value
into a WalletError::JsError
. Open an issue describing this error at -
https://github.com/JamiiDao/SolanaWalletAdapter/issues
ValueNotFound
A value of undefined
or null
was encountered
ExpectedValueNotFound(String)
A value was expected but it does not exist in the JsValue
MissingAccessToBrowserWindow
Unable to access browser window
MissingAccessToBrowserDocument
Unable to access browser document
UnsupportedCommitment(String)
Only processed
, confirmed
and finalized
commitments are supported by Solana clusters
InvalidWalletVersion(String)
The wallet version is invalid, expected SemVer version
InvalidSemVerNumber(String)
Unexpected SemVer number to parse to a u8
Expected32ByteLength
The byte length should be equal to 32 bytes in length
Expected64ByteLength
The byte length should be equal to 64 bytes in length
VersionNotFound
The version was not found
UnsupportedWalletFeature(String)
This feature is not supported as a standard or solana namespace feature
UnsupportedTransactionVersion
Encountered an unsupported transaction version.
Only legacy
and version zero
transactions are supported.
LegacyTransactionSupportRequired
Legacy transaction versions need to be supported yet the encountered wallet does not do this.
UnsupportedChain(String)
The blockchain encountered is not supported.
MissingConnectFunction
The connect
function of the standard:connect
namespace was not found while parsing a wallet
WalletNotFound
Attempted to connect to a wallet that does not exist or is yet to be registered
AccountNotFound
Attempted to connect to an account that does not exist or might have been disconnected
WalletConnectError(String)
Unable to connect to a wallet. The user may have rejected the request
ConnectHasNoAccounts
The connect method did not return any accounts
MissingDisconnectFunction
The wallet standard:disconnect
feature is missing
MissingGetAccountsFunction(String)
The accounts
method to get the accounts connected to a wallet is missing from wallet
WalletDisconnectError(String)
Unable to disconnect wallet.
StandardEventsError(String)
Encountered an error while calling standard:events
function
MissingStandardEventsFunction
Called The Function for standard:events
yet the wallet does not provide it
MissingSignInFunction
The wallet did not register a signIn function for solana:signIn
namespece
ExpiryTimeEarlierThanIssuedTime
This token expires earlier than it was issued. Make sure to set the expiry time to be a later date than the issued time
NotBeforeTimeEarlierThanIssuedTime
This token becomes valid earlier than it was issued. Make sure to set the not_before time to be equal to or a later date than the issued time
NotBeforeTimeLaterThanExpirationTime
This token becomes valid after it has already expired. Make sure to set the not_before time to be equal to or a date before expiry time
ExpirationTimeIsInThePast
The expiration time is set to expire in the past
NotBeforeTimeIsInThePast
NotBefore time is set in the past
InvalidBase58Address
Invalid Base58 Address
NonceMustBeAtLeast8Characters
The nonce is required to be at least 8 characters long
InvalidISO8601Timestamp(String)
Expected a timestamp in the format specified by ISO8601
MessageResponseMismatch
The message signed by the wallet is not the same as the message sent to the wallet for signing
InvalidSignature
The Ed25519 Signature is invalid for the signed message and public key“)]
InvalidEd25519SignatureBytes
The bytes provided for the Ed25519 Signature are invalid
InvalidEd25519PublicKeyBytes
The bytes provided for the Ed25519 Public Key are invalid
MissingSignMessageFunction
The function call to Sign A Message Is Missing
SignedMessageMismatch
The message sent to the wallet to be signed is different from the message the wallet responded with
ReceivedAnEmptySignedMessagesArray
The Wallet returned an empty array of signed messages
MissingSignTransactionFunction
The solana:signTransaction
function is missing in the provided wallet
SendAndSignTransactionSignatureEmpty
The sendAndSignTransaction
method did not return any signature
Op(String)
An operation resulted in an error. This is a convenience error that you can use to return any error that was not caused by the wallet adapter, example, parsing a recipient address or the result of parsing the body of a HTTP response using serde resulted in an error. Remember, this error is not from the crate::WalletAdapter but instead an external error.
Trait Implementations§
Source§impl Clone for WalletError
impl Clone for WalletError
Source§fn clone(&self) -> WalletError
fn clone(&self) -> WalletError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more