pub struct Wallet { /* private fields */ }
Implementations§
Source§impl Wallet
impl Wallet
Sourcepub fn name(&self) -> String
pub fn name(&self) -> String
get the name of the wallet connector application
This can be "lace"
for example.
Sourcepub fn version(&self) -> String
pub fn version(&self) -> String
get the version of the wallet connector application
Can be "0.1.0"
Sourcepub fn supported_extensions(&self) -> Vec<Extension>
pub fn supported_extensions(&self) -> Vec<Extension>
list the extensions supported by this wallet connector application.
Sourcepub async fn enabled(&self) -> Result<bool, APIError>
pub async fn enabled(&self) -> Result<bool, APIError>
Check if the wallet is already connected or not: i.e. if the users have already approved for the webapp to use connect with the wallet.
If this returns true
then calling Wallet::enable
will returns the
ConnectedWallet
without prompting the user.
Sourcepub async fn enable(&self) -> Result<ConnectedWallet, APIError>
pub async fn enable(&self) -> Result<ConnectedWallet, APIError>
Returns the ConnectedWallet
after prompting the user to authorise your
webapp. If the application is already authorised calling this function will
return the ConnectedWallet
without prompting the user.
Trait Implementations§
impl StructuralPartialEq for Wallet
Auto Trait Implementations§
impl Freeze for Wallet
impl RefUnwindSafe for Wallet
impl !Send for Wallet
impl !Sync for Wallet
impl Unpin for Wallet
impl UnwindSafe for Wallet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more