Available on crate feature
client only.Expand description
Async RPC client helpers for fetching and deserializing accounts.
Requires the client feature (adds a solana-client dependency).
ⓘ
use anchor_parser::client;
use my_program::accounts::MyAccount;
let account = client::fetch_account::<MyAccount>(&rpc_client, &address).await?;
let accounts = client::fetch_accounts::<MyAccount>(&rpc_client, &[addr1, addr2]).await?;Functions§
- fetch_
account - Fetch and deserialize a single account from an async RPC client.
- fetch_
accounts - Fetch and deserialize multiple accounts of the same type.