Expand description
§wallet_standard_browser
The wasm / browser compatible rust based implementation of the wallet standard.
§Installation
To install you can used the following command:
cargo add wallet_standard_browser
Or directly add the following to your Cargo.toml
:
[dependencies]
wallet_standard_browser = "0.1" # replace with the latest version
§Usage
The Wallet Standard is a set of traits and conventions designed to improve the user experience and developer experience of wallets and applications for any blockchain.
This crate provides a Rust implementation of the Solana Wallet Standard, which aims to create a consistent interface for wallets and dApps to interact across different blockchain ecosystems. Here’s a brief overview of how to use this crate to fetch
use wallet_standard_browser::get_wallets;
use wallet_standard_browser::prelude::*;
async fn run() -> anyhow::Result<()> {
let wallet_getter = get_wallets().await?;
let wallets = wallet_getter.get();
Ok(())
}
Modules§
Structs§
- Browser
Experimental Decrypt Output - Browser
Experimental Encrypt Output - Browser
Standard Connect Output - Browser
Standard Events Properties - Browser
Wallet - Browser
Wallet Account Info - Interface of a
WalletAccount
, also referred to as an Account. - Browser
Wallet Info - Experimental
Decrypt Feature - Experimental
Decrypt Input - Experimental
Decrypt Props - Experimental
Encrypt Feature - Experimental
Encrypt Input - Experimental
Encrypt Props - Standard
Connect Feature - Standard
Connect Input - Standard
Disconnect Feature - Standard
Events Feature - Wallets
Enums§
Constants§
- APP_
READY_ EVENT - Event that will be dispatched by the app on the
window
when the app is ready to register {@link Wallet | Wallets}. - CIPHER_
X25519_ XSALS A20_ POLY1305 - Default encryption algorithm in
NaCl
. Curve25519 scalar multiplication, Salsa20 secret-key encryption, and Poly1305 one-time authentication. - EXPERIMENTAL_
DECRYPT - EXPERIMENTAL_
ENCRYPT - REGISTER_
WALLET_ EVENT - Event that will be dispatched on the
window
by each {@link Wallet | Wallet} when the Wallet is ready to be registered by the app. - STANDARD_
CONNECT - STANDARD_
DISCONNECT - STANDARD_
EVENTS
Traits§
- Connected
Wallet Standard Events - Experimental
Decrypt Output - Experimental
Encrypt Output - Feature
From Js - Into
Wallet Error - Standard
Connect Output - Standard
Event Properties - Wallet
- Wallet
Account Info - Interface of a
WalletAccount
, also referred to as an Account. - Wallet
Experimental Decrypt - Wallet
Experimental Encrypt - Wallet
Info - Wallet
Standard - Wallet
Standard Connect - Wallet
Standard Disconnect
Functions§
- get_
wallets - register_
wallet - Register a {@link “@wallet-standard/base”.Wallet} as a Standard Wallet with the app.