Crate wallet_standard_browser

Source
Expand description

§wallet_standard_browser


The wasm / browser compatible rust based implementation of the wallet standard.


Crate Docs Status Unlicense codecov

§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§

prelude

Structs§

BrowserExperimentalDecryptOutput
BrowserExperimentalEncryptOutput
BrowserStandardConnectOutput
BrowserStandardEventsProperties
BrowserWallet
BrowserWalletAccountInfo
Interface of a WalletAccount, also referred to as an Account.
BrowserWalletInfo
ExperimentalDecryptFeature
ExperimentalDecryptInput
ExperimentalDecryptProps
ExperimentalEncryptFeature
ExperimentalEncryptInput
ExperimentalEncryptProps
StandardConnectFeature
StandardConnectInput
StandardDisconnectFeature
StandardEventsFeature
Wallets

Enums§

WalletError

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_XSALSA20_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§

ConnectedWalletStandardEvents
ExperimentalDecryptOutput
ExperimentalEncryptOutput
FeatureFromJs
IntoWalletError
StandardConnectOutput
StandardEventProperties
Wallet
WalletAccountInfo
Interface of a WalletAccount, also referred to as an Account.
WalletExperimentalDecrypt
WalletExperimentalEncrypt
WalletInfo
WalletStandard
WalletStandardConnect
WalletStandardDisconnect

Functions§

get_wallets
register_wallet
Register a {@link “@wallet-standard/base”.Wallet} as a Standard Wallet with the app.

Type Aliases§

WalletResult