Struct solana_client_wasm::WasmClient
source · pub struct WasmClient { /* private fields */ }
Implementations§
source§impl WasmClient
impl WasmClient
sourcepub fn new(endpoint: &str) -> Self
pub fn new(endpoint: &str) -> Self
Create a WasmClient
.
Default commitment is confirmed
unlike default Solana Client.
pub fn new_with_commitment( endpoint: &str, commitment_config: CommitmentConfig ) -> Self
pub fn commitment(&self) -> CommitmentLevel
pub fn commitment_config(&self) -> CommitmentConfig
pub async fn get_balance_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<u64>
pub async fn get_balance(&self, pubkey: &Pubkey) -> ClientResult<u64>
pub async fn request_airdrop( &self, pubkey: &Pubkey, lamports: u64 ) -> ClientResult<Signature>
pub async fn get_signature_statuses( &self, signatures: &[Signature] ) -> ClientResult<Vec<Option<SignatureStatusesValue>>>
pub async fn get_transaction_with_config( &self, signature: &Signature, config: RpcTransactionConfig ) -> ClientResult<EncodedConfirmedTransactionWithStatusMeta>
pub async fn get_account_with_config( &self, pubkey: &Pubkey, config: RpcAccountInfoConfig ) -> ClientResult<Option<Account>>
pub async fn get_account_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<Option<Account>>
pub async fn get_account(&self, pubkey: &Pubkey) -> ClientResult<Account>
pub async fn get_account_data(&self, pubkey: &Pubkey) -> ClientResult<Vec<u8>>
pub async fn get_latest_blockhash_with_config( &self, commitment_config: CommitmentConfig ) -> ClientResult<(Hash, u64)>
pub async fn get_latest_blockhash_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<(Hash, u64)>
pub async fn get_latest_blockhash(&self) -> ClientResult<Hash>
pub async fn is_blockhash_valid( &self, blockhash: &Hash, commitment_config: CommitmentConfig ) -> ClientResult<bool>
pub async fn get_minimum_balance_for_rent_exemption( &self, data_len: usize ) -> ClientResult<u64>
pub async fn get_fee_for_message(&self, message: &Message) -> ClientResult<u64>
pub async fn send_transaction_with_config( &self, transaction: &Transaction, config: RpcSendTransactionConfig ) -> ClientResult<Signature>
pub async fn send_transaction( &self, transaction: &Transaction ) -> ClientResult<Signature>
pub async fn confirm_transaction_with_commitment( &self, signature: &Signature, commitment_config: CommitmentConfig ) -> ClientResult<bool>
pub async fn confirm_transaction( &self, signature: &Signature ) -> ClientResult<bool>
pub async fn send_and_confirm_transaction_with_config( &self, transaction: &Transaction, commitment_config: CommitmentConfig, config: RpcSendTransactionConfig ) -> ClientResult<Signature>
pub async fn send_and_confirm_transaction_with_commitment( &self, transaction: &Transaction, commitment_config: CommitmentConfig ) -> ClientResult<Signature>
pub async fn send_and_confirm_transaction( &self, transaction: &Transaction ) -> ClientResult<Signature>
pub async fn get_program_accounts_with_config( &self, pubkey: &Pubkey, config: RpcProgramAccountsConfig ) -> ClientResult<Vec<(Pubkey, Account)>>
pub async fn get_program_accounts( &self, pubkey: &Pubkey ) -> ClientResult<Vec<(Pubkey, Account)>>
pub async fn get_slot_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<Slot>
pub async fn get_slot(&self) -> ClientResult<Slot>
pub async fn get_block_with_config( &self, slot: Slot, config: RpcBlockConfig ) -> ClientResult<UiConfirmedBlock>
pub async fn get_version(&self) -> ClientResult<RpcVersionInfo>
pub async fn get_first_available_block(&self) -> ClientResult<Slot>
pub async fn get_block_time(&self, slot: Slot) -> ClientResult<UnixTimestamp>
pub async fn get_block_height_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<u64>
pub async fn get_block_height(&self) -> ClientResult<u64>
pub async fn get_genesis_hash(&self) -> ClientResult<Hash>
pub async fn get_epoch_info_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<EpochInfo>
pub async fn get_epoch_info(&self) -> ClientResult<EpochInfo>
pub async fn get_recent_performance_samples( &self, limit: Option<usize> ) -> ClientResult<Vec<RpcPerfSample>>
pub async fn get_blocks_with_limit_and_commitment( &self, start_slot: Slot, limit: usize, commitment_config: CommitmentConfig ) -> ClientResult<Vec<Slot>>
pub async fn get_blocks_with_limit( &self, start_slot: Slot, limit: usize ) -> ClientResult<Vec<Slot>>
pub async fn get_largest_accounts_with_config( &self, config: RpcLargestAccountsConfig ) -> ClientResult<Vec<RpcAccountBalance>>
pub async fn get_supply_with_config( &self, config: RpcSupplyConfig ) -> ClientResult<RpcSupply>
pub async fn get_supply_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcSupply>
pub async fn get_supply(&self) -> ClientResult<RpcSupply>
pub async fn get_transaction_count_with_config( &self, config: RpcContextConfig ) -> ClientResult<u64>
pub async fn get_transaction_count_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<u64>
pub async fn get_transaction_count(&self) -> ClientResult<u64>
pub async fn get_multiple_accounts_with_config( &self, pubkeys: &[Pubkey], config: RpcAccountInfoConfig ) -> ClientResult<Vec<Option<Account>>>
pub async fn get_multiple_accounts_with_commitment( &self, pubkeys: &[Pubkey], commitment_config: CommitmentConfig ) -> ClientResult<Vec<Option<Account>>>
pub async fn get_multiple_accounts( &self, pubkeys: &[Pubkey] ) -> ClientResult<Vec<Option<Account>>>
pub async fn get_cluster_nodes(&self) -> ClientResult<Vec<RpcContactInfoWasm>>
pub async fn get_vote_accounts_with_config( &self, config: RpcGetVoteAccountsConfig ) -> ClientResult<RpcVoteAccountStatus>
pub async fn get_vote_accounts_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcVoteAccountStatus>
pub async fn get_vote_accounts(&self) -> ClientResult<RpcVoteAccountStatus>
pub async fn get_epoch_schedule(&self) -> ClientResult<EpochSchedule>
pub async fn get_signatures_for_address_with_config( &self, address: &Pubkey, config: GetConfirmedSignaturesForAddress2Config ) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
pub async fn minimum_ledger_slot(&self) -> ClientResult<Slot>
pub async fn get_blocks_with_commitment( &self, start_slot: Slot, end_slot: Option<Slot>, commitment_config: CommitmentConfig ) -> ClientResult<Vec<Slot>>
pub async fn get_blocks( &self, start_slot: Slot, end_slot: Option<Slot> ) -> ClientResult<Vec<Slot>>
pub async fn get_leader_schedule_with_config( &self, slot: Option<Slot>, config: RpcLeaderScheduleConfig ) -> ClientResult<Option<RpcLeaderSchedule>>
pub async fn get_leader_schedule_with_commitment( &self, slot: Option<Slot>, commitment_config: CommitmentConfig ) -> ClientResult<Option<RpcLeaderSchedule>>
pub async fn get_block_production_with_config( &self, config: RpcBlockProductionConfig ) -> ClientResult<RpcBlockProduction>
pub async fn get_block_production_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcBlockProduction>
pub async fn get_block_production(&self) -> ClientResult<RpcBlockProduction>
pub async fn get_inflation_governor_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcInflationGovernor>
pub async fn get_inflation_governor(&self) -> ClientResult<RpcInflationGovernor>
pub async fn get_inflation_rate(&self) -> ClientResult<RpcInflationRate>
pub async fn get_inflation_reward_with_config( &self, addresses: &[Pubkey], epoch: Option<Epoch> ) -> ClientResult<Vec<Option<RpcInflationReward>>>
pub async fn get_inflation_reward( &self, addresses: &[Pubkey] ) -> ClientResult<Vec<Option<RpcInflationReward>>>
pub async fn get_token_account_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<Option<UiTokenAccount>>
pub async fn get_token_account( &self, pubkey: &Pubkey ) -> ClientResult<Option<UiTokenAccount>>
pub async fn get_token_accounts_by_owner_with_commitment( &self, owner: &Pubkey, token_account_filter: TokenAccountsFilter, commitment_config: CommitmentConfig ) -> ClientResult<Vec<RpcKeyedAccount>>
pub async fn get_token_accounts_by_owner( &self, owner: &Pubkey, token_account_filter: TokenAccountsFilter ) -> ClientResult<Vec<RpcKeyedAccount>>
pub async fn get_token_account_balance_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<UiTokenAmount>
pub async fn get_token_account_balance( &self, pubkey: &Pubkey ) -> ClientResult<UiTokenAmount>
pub async fn get_token_supply_with_commitment( &self, mint: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<UiTokenAmount>
pub async fn get_token_supply( &self, mint: &Pubkey ) -> ClientResult<UiTokenAmount>
pub async fn simulate_transaction_with_config( &self, transaction: &Transaction, config: RpcSimulateTransactionConfig ) -> ClientResult<SimulateTransactionResponse>
pub async fn simulate_transaction( &self, transaction: &Transaction ) -> ClientResult<SimulateTransactionResponse>
Auto Trait Implementations§
impl !RefUnwindSafe for WasmClient
impl Send for WasmClient
impl Sync for WasmClient
impl Unpin for WasmClient
impl !UnwindSafe for WasmClient
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