pub struct WasmClient { /* private fields */ }

Implementations§

source§

impl WasmClient

source

pub fn new(endpoint: &str) -> Self

Create a WasmClient.

Default commitment is confirmed unlike default Solana Client.

source

pub fn new_with_commitment( endpoint: &str, commitment_config: CommitmentConfig ) -> Self

source

pub fn commitment(&self) -> CommitmentLevel

source

pub fn commitment_config(&self) -> CommitmentConfig

source

pub async fn get_balance_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<u64>

source

pub async fn get_balance(&self, pubkey: &Pubkey) -> ClientResult<u64>

source

pub async fn request_airdrop( &self, pubkey: &Pubkey, lamports: u64 ) -> ClientResult<Signature>

source

pub async fn get_signature_statuses( &self, signatures: &[Signature] ) -> ClientResult<Vec<Option<SignatureStatusesValue>>>

source

pub async fn get_transaction_with_config( &self, signature: &Signature, config: RpcTransactionConfig ) -> ClientResult<EncodedConfirmedTransactionWithStatusMeta>

source

pub async fn get_account_with_config( &self, pubkey: &Pubkey, config: RpcAccountInfoConfig ) -> ClientResult<Option<Account>>

source

pub async fn get_account_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<Option<Account>>

source

pub async fn get_account(&self, pubkey: &Pubkey) -> ClientResult<Account>

source

pub async fn get_account_data(&self, pubkey: &Pubkey) -> ClientResult<Vec<u8>>

source

pub async fn get_latest_blockhash_with_config( &self, commitment_config: CommitmentConfig ) -> ClientResult<(Hash, u64)>

source

pub async fn get_latest_blockhash_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<(Hash, u64)>

source

pub async fn get_latest_blockhash(&self) -> ClientResult<Hash>

source

pub async fn is_blockhash_valid( &self, blockhash: &Hash, commitment_config: CommitmentConfig ) -> ClientResult<bool>

source

pub async fn get_minimum_balance_for_rent_exemption( &self, data_len: usize ) -> ClientResult<u64>

source

pub async fn get_fee_for_message(&self, message: &Message) -> ClientResult<u64>

source

pub async fn send_transaction_with_config( &self, transaction: &Transaction, config: RpcSendTransactionConfig ) -> ClientResult<Signature>

source

pub async fn send_transaction( &self, transaction: &Transaction ) -> ClientResult<Signature>

source

pub async fn confirm_transaction_with_commitment( &self, signature: &Signature, commitment_config: CommitmentConfig ) -> ClientResult<bool>

source

pub async fn confirm_transaction( &self, signature: &Signature ) -> ClientResult<bool>

source

pub async fn send_and_confirm_transaction_with_config( &self, transaction: &Transaction, commitment_config: CommitmentConfig, config: RpcSendTransactionConfig ) -> ClientResult<Signature>

source

pub async fn send_and_confirm_transaction_with_commitment( &self, transaction: &Transaction, commitment_config: CommitmentConfig ) -> ClientResult<Signature>

source

pub async fn send_and_confirm_transaction( &self, transaction: &Transaction ) -> ClientResult<Signature>

source

pub async fn get_program_accounts_with_config( &self, pubkey: &Pubkey, config: RpcProgramAccountsConfig ) -> ClientResult<Vec<(Pubkey, Account)>>

source

pub async fn get_program_accounts( &self, pubkey: &Pubkey ) -> ClientResult<Vec<(Pubkey, Account)>>

source

pub async fn get_slot_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<Slot>

source

pub async fn get_slot(&self) -> ClientResult<Slot>

source

pub async fn get_block_with_config( &self, slot: Slot, config: RpcBlockConfig ) -> ClientResult<UiConfirmedBlock>

source

pub async fn get_version(&self) -> ClientResult<RpcVersionInfo>

source

pub async fn get_first_available_block(&self) -> ClientResult<Slot>

source

pub async fn get_block_time(&self, slot: Slot) -> ClientResult<UnixTimestamp>

source

pub async fn get_block_height_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<u64>

source

pub async fn get_block_height(&self) -> ClientResult<u64>

source

pub async fn get_genesis_hash(&self) -> ClientResult<Hash>

source

pub async fn get_epoch_info_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<EpochInfo>

source

pub async fn get_epoch_info(&self) -> ClientResult<EpochInfo>

source

pub async fn get_recent_performance_samples( &self, limit: Option<usize> ) -> ClientResult<Vec<RpcPerfSample>>

source

pub async fn get_blocks_with_limit_and_commitment( &self, start_slot: Slot, limit: usize, commitment_config: CommitmentConfig ) -> ClientResult<Vec<Slot>>

source

pub async fn get_blocks_with_limit( &self, start_slot: Slot, limit: usize ) -> ClientResult<Vec<Slot>>

source

pub async fn get_largest_accounts_with_config( &self, config: RpcLargestAccountsConfig ) -> ClientResult<Vec<RpcAccountBalance>>

source

pub async fn get_supply_with_config( &self, config: RpcSupplyConfig ) -> ClientResult<RpcSupply>

source

pub async fn get_supply_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcSupply>

source

pub async fn get_supply(&self) -> ClientResult<RpcSupply>

source

pub async fn get_transaction_count_with_config( &self, config: RpcContextConfig ) -> ClientResult<u64>

source

pub async fn get_transaction_count_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<u64>

source

pub async fn get_transaction_count(&self) -> ClientResult<u64>

source

pub async fn get_multiple_accounts_with_config( &self, pubkeys: &[Pubkey], config: RpcAccountInfoConfig ) -> ClientResult<Vec<Option<Account>>>

source

pub async fn get_multiple_accounts_with_commitment( &self, pubkeys: &[Pubkey], commitment_config: CommitmentConfig ) -> ClientResult<Vec<Option<Account>>>

source

pub async fn get_multiple_accounts( &self, pubkeys: &[Pubkey] ) -> ClientResult<Vec<Option<Account>>>

source

pub async fn get_cluster_nodes(&self) -> ClientResult<Vec<RpcContactInfoWasm>>

source

pub async fn get_vote_accounts_with_config( &self, config: RpcGetVoteAccountsConfig ) -> ClientResult<RpcVoteAccountStatus>

source

pub async fn get_vote_accounts_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcVoteAccountStatus>

source

pub async fn get_vote_accounts(&self) -> ClientResult<RpcVoteAccountStatus>

source

pub async fn get_epoch_schedule(&self) -> ClientResult<EpochSchedule>

source

pub async fn get_signatures_for_address_with_config( &self, address: &Pubkey, config: GetConfirmedSignaturesForAddress2Config ) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>

source

pub async fn minimum_ledger_slot(&self) -> ClientResult<Slot>

source

pub async fn get_blocks_with_commitment( &self, start_slot: Slot, end_slot: Option<Slot>, commitment_config: CommitmentConfig ) -> ClientResult<Vec<Slot>>

source

pub async fn get_blocks( &self, start_slot: Slot, end_slot: Option<Slot> ) -> ClientResult<Vec<Slot>>

source

pub async fn get_leader_schedule_with_config( &self, slot: Option<Slot>, config: RpcLeaderScheduleConfig ) -> ClientResult<Option<RpcLeaderSchedule>>

source

pub async fn get_leader_schedule_with_commitment( &self, slot: Option<Slot>, commitment_config: CommitmentConfig ) -> ClientResult<Option<RpcLeaderSchedule>>

source

pub async fn get_block_production_with_config( &self, config: RpcBlockProductionConfig ) -> ClientResult<RpcBlockProduction>

source

pub async fn get_block_production_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcBlockProduction>

source

pub async fn get_block_production(&self) -> ClientResult<RpcBlockProduction>

source

pub async fn get_inflation_governor_with_commitment( &self, commitment_config: CommitmentConfig ) -> ClientResult<RpcInflationGovernor>

source

pub async fn get_inflation_governor(&self) -> ClientResult<RpcInflationGovernor>

source

pub async fn get_inflation_rate(&self) -> ClientResult<RpcInflationRate>

source

pub async fn get_inflation_reward_with_config( &self, addresses: &[Pubkey], epoch: Option<Epoch> ) -> ClientResult<Vec<Option<RpcInflationReward>>>

source

pub async fn get_inflation_reward( &self, addresses: &[Pubkey] ) -> ClientResult<Vec<Option<RpcInflationReward>>>

source

pub async fn get_token_account_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<Option<UiTokenAccount>>

source

pub async fn get_token_account( &self, pubkey: &Pubkey ) -> ClientResult<Option<UiTokenAccount>>

source

pub async fn get_token_accounts_by_owner_with_commitment( &self, owner: &Pubkey, token_account_filter: TokenAccountsFilter, commitment_config: CommitmentConfig ) -> ClientResult<Vec<RpcKeyedAccount>>

source

pub async fn get_token_accounts_by_owner( &self, owner: &Pubkey, token_account_filter: TokenAccountsFilter ) -> ClientResult<Vec<RpcKeyedAccount>>

source

pub async fn get_token_account_balance_with_commitment( &self, pubkey: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<UiTokenAmount>

source

pub async fn get_token_account_balance( &self, pubkey: &Pubkey ) -> ClientResult<UiTokenAmount>

source

pub async fn get_token_supply_with_commitment( &self, mint: &Pubkey, commitment_config: CommitmentConfig ) -> ClientResult<UiTokenAmount>

source

pub async fn get_token_supply( &self, mint: &Pubkey ) -> ClientResult<UiTokenAmount>

source

pub async fn simulate_transaction_with_config( &self, transaction: &Transaction, config: RpcSimulateTransactionConfig ) -> ClientResult<SimulateTransactionResponse>

source

pub async fn simulate_transaction( &self, transaction: &Transaction ) -> ClientResult<SimulateTransactionResponse>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more