solana-client-wasm 1.14.11

Solana non-blocking WASM RPC client.
Documentation

Solana WASM Client

Crates.io License

Non-blocking implementation of WASM compatible Solana Client.

Usage

You can use solana-client non-blocking API.

solana-sdk is exported from the lib so you don't need to add it to your dependencies.

Example

use solana_client_wasm::{
    solana_sdk::signature::{Keypair, Signer},
    WasmClient,
};

// Create client
let client = WasmClient::new("https://api.devnet.solana.com");

// Get a random pubkey
let pubkey = Keypair::new().pubkey();

// Get balance
let balance = client.get_balance(&pubkey).await?; // in lamports
log::info!("Balance is {balance}"); // 0