pub struct WalletData { /* private fields */ }Expand description
Wallet information without any browser function calls for wallet-adapter standard operations
Implementations§
Source§impl WalletData
impl WalletData
Sourcepub fn new() -> Self
pub fn new() -> Self
Instantiate a new WalletData
Sourcepub fn set_version(self, version: SemverVersion) -> Self
pub fn set_version(self, version: SemverVersion) -> Self
Set the Semver version of the wallet
Sourcepub fn set_icon(self, icon: Option<impl ToString>) -> Self
pub fn set_icon(self, icon: Option<impl ToString>) -> Self
Set the icon of the wallet.
Should be in Base64 URL web format data:image/${'svg+xml' | 'webp' | 'png' | 'gif'};base64,${string}
Sourcepub fn add_account(self, account: WalletAccountData) -> Self
pub fn add_account(self, account: WalletAccountData) -> Self
Add a Wallet account data
Sourcepub fn add_accounts(self, accounts: &[WalletAccountData]) -> Self
pub fn add_accounts(self, accounts: &[WalletAccountData]) -> Self
Add multiple Wallet account data(s)
Sourcepub fn replace_accounts(self, accounts: Vec<WalletAccountData>) -> Self
pub fn replace_accounts(self, accounts: Vec<WalletAccountData>) -> Self
Replace all Wallet account data
Sourcepub fn add_chains(self, chains: &[Cluster]) -> Self
pub fn add_chains(self, chains: &[Cluster]) -> Self
Add multiple Clusters
Sourcepub fn replace_chains(self, chains: Vec<Cluster>) -> Self
pub fn replace_chains(self, chains: Vec<Cluster>) -> Self
Replace existing Clusters
Sourcepub fn set_supported_features(self, supported_features: FeatureSupport) -> Self
pub fn set_supported_features(self, supported_features: FeatureSupport) -> Self
Set the supported wallet features
Sourcepub fn set_supported_chains(self, supported_chains: ChainSupport) -> Self
pub fn set_supported_chains(self, supported_chains: ChainSupport) -> Self
Set the chains supported by the wallet
Sourcepub fn accounts(&self) -> &[WalletAccountData]
pub fn accounts(&self) -> &[WalletAccountData]
Get the accounts provided by the wallet
Sourcepub fn standard_connect(&self) -> bool
pub fn standard_connect(&self) -> bool
Check whether the wallet supports standard:connect feature
Sourcepub fn standard_disconnect(&self) -> bool
pub fn standard_disconnect(&self) -> bool
Check whether the wallet supports standard:disconnect feature
Sourcepub fn standard_events(&self) -> bool
pub fn standard_events(&self) -> bool
Check whether the wallet supports standard:events feature
Sourcepub fn solana_signin(&self) -> bool
pub fn solana_signin(&self) -> bool
Check whether the wallet supports solana:signIn feature
Sourcepub fn solana_sign_message(&self) -> bool
pub fn solana_sign_message(&self) -> bool
Check whether the wallet supports solana:signMessage feature
Sourcepub fn solana_sign_and_send_transaction(&self) -> bool
pub fn solana_sign_and_send_transaction(&self) -> bool
Check whether the wallet supports solana:signAndSendTransaction feature
Sourcepub fn solana_sign_transaction(&self) -> bool
pub fn solana_sign_transaction(&self) -> bool
Check whether the wallet supports solana:signTransaction feature
Sourcepub fn version(&self) -> &SemverVersion
pub fn version(&self) -> &SemverVersion
Get the version of the wallet standard that the wallet supports
Trait Implementations§
Source§impl Clone for WalletData
impl Clone for WalletData
Source§fn clone(&self) -> WalletData
fn clone(&self) -> WalletData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more