pub struct BankClient { /* private fields */ }๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Implementationsยง
Sourceยงimpl BankClient
impl BankClient
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn new(bank: Bank) -> Self
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_sysvar_for_tests<T: SysvarSerialize>(&self, sysvar: &T)
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Trait Implementationsยง
Sourceยงimpl AsyncClient for BankClient
impl AsyncClient for BankClient
Sourceยงfn async_send_versioned_transaction(
&self,
transaction: VersionedTransaction,
) -> Result<Signature>
fn async_send_versioned_transaction( &self, transaction: VersionedTransaction, ) -> Result<Signature>
Send a signed versioned transaction, but donโt wait to see if the server accepted it.
Sourceยงfn async_send_transaction(
&self,
transaction: Transaction,
) -> Result<Signature, TransportError>
fn async_send_transaction( &self, transaction: Transaction, ) -> Result<Signature, TransportError>
Send a signed transaction, but donโt wait to see if the server accepted it.
Sourceยงfn async_send_batch(
&self,
transactions: Vec<Transaction>,
) -> Result<(), TransportError>
fn async_send_batch( &self, transactions: Vec<Transaction>, ) -> Result<(), TransportError>
Send a batch of signed transactions without confirmation.
Sourceยงfn async_send_versioned_transaction_batch(
&self,
transactions: Vec<VersionedTransaction>,
) -> Result<(), TransportError>
fn async_send_versioned_transaction_batch( &self, transactions: Vec<VersionedTransaction>, ) -> Result<(), TransportError>
Send a batch of signed versioned transactions without confirmation.
Sourceยงfn async_send_message<T>(
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_send_message<T>( &self, keypairs: &T, message: Message, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Create a transaction from the given message, and send it to the
server, but donโt wait for to see if the server accepted it.
Sourceยงfn async_send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_send_instruction( &self, keypair: &Keypair, instruction: Instruction, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Create a transaction from a single instruction that only requires
a single signer. Then send it to the server, but donโt wait for a reply.
Sourceยงfn async_transfer(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Address,
recent_blockhash: Hash,
) -> Result<Signature, TransportError>
fn async_transfer( &self, lamports: u64, keypair: &Keypair, pubkey: &Address, recent_blockhash: Hash, ) -> Result<Signature, TransportError>
Attempt to transfer lamports from
keypair to pubkey, but donโt wait to confirm.Sourceยงimpl SyncClient for BankClient
impl SyncClient for BankClient
Sourceยงfn send_and_confirm_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
) -> Result<Signature>
fn send_and_confirm_instruction( &self, keypair: &Keypair, instruction: Instruction, ) -> Result<Signature>
Create and process a transaction from a single instruction.
Sourceยงfn transfer_and_confirm(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
) -> Result<Signature>
fn transfer_and_confirm( &self, lamports: u64, keypair: &Keypair, pubkey: &Pubkey, ) -> Result<Signature>
Transfer lamports from keypair to pubkey
Sourceยงfn send_and_confirm_message<T: Signers + ?Sized>(
&self,
keypairs: &T,
message: Message,
) -> Result<Signature>
fn send_and_confirm_message<T: Signers + ?Sized>( &self, keypairs: &T, message: Message, ) -> Result<Signature>
Create a transaction from the given message, and send it to the
server, retrying as-needed.
Sourceยงfn get_account_data(&self, pubkey: &Pubkey) -> Result<Option<Vec<u8>>>
fn get_account_data(&self, pubkey: &Pubkey) -> Result<Option<Vec<u8>>>
Get an account or None if not found.
Sourceยงfn get_account(&self, pubkey: &Pubkey) -> Result<Option<Account>>
fn get_account(&self, pubkey: &Pubkey) -> Result<Option<Account>>
Get an account or None if not found.
Sourceยงfn get_account_with_commitment(
&self,
pubkey: &Pubkey,
_commitment_config: CommitmentConfig,
) -> Result<Option<Account>>
fn get_account_with_commitment( &self, pubkey: &Pubkey, _commitment_config: CommitmentConfig, ) -> Result<Option<Account>>
Get an account or None if not found. Uses explicit commitment configuration.
Sourceยงfn get_balance_with_commitment(
&self,
pubkey: &Pubkey,
_commitment_config: CommitmentConfig,
) -> Result<u64>
fn get_balance_with_commitment( &self, pubkey: &Pubkey, _commitment_config: CommitmentConfig, ) -> Result<u64>
Get account balance or 0 if not found. Uses explicit commitment configuration.
fn get_minimum_balance_for_rent_exemption(&self, data_len: usize) -> Result<u64>
Sourceยงfn get_signature_status(
&self,
signature: &Signature,
) -> Result<Option<Result<()>>>
fn get_signature_status( &self, signature: &Signature, ) -> Result<Option<Result<()>>>
Get signature status.
Sourceยงfn get_signature_status_with_commitment(
&self,
signature: &Signature,
_commitment_config: CommitmentConfig,
) -> Result<Option<Result<()>>>
fn get_signature_status_with_commitment( &self, signature: &Signature, _commitment_config: CommitmentConfig, ) -> Result<Option<Result<()>>>
Get signature status. Uses explicit commitment configuration.
Sourceยงfn get_slot_with_commitment(
&self,
_commitment_config: CommitmentConfig,
) -> Result<u64>
fn get_slot_with_commitment( &self, _commitment_config: CommitmentConfig, ) -> Result<u64>
Get last known slot. Uses explicit commitment configuration.
Sourceยงfn get_transaction_count(&self) -> Result<u64>
fn get_transaction_count(&self) -> Result<u64>
Get transaction count
Sourceยงfn get_transaction_count_with_commitment(
&self,
_commitment_config: CommitmentConfig,
) -> Result<u64>
fn get_transaction_count_with_commitment( &self, _commitment_config: CommitmentConfig, ) -> Result<u64>
Get transaction count. Uses explicit commitment configuration.
Sourceยงfn poll_for_signature_confirmation(
&self,
signature: &Signature,
min_confirmed_blocks: usize,
) -> Result<usize>
fn poll_for_signature_confirmation( &self, signature: &Signature, min_confirmed_blocks: usize, ) -> Result<usize>
Poll until the signature has been confirmed by at least
min_confirmed_blocksSourceยงfn poll_for_signature(&self, signature: &Signature) -> Result<()>
fn poll_for_signature(&self, signature: &Signature) -> Result<()>
Poll to confirm a transaction.
fn get_epoch_info(&self) -> Result<EpochInfo>
Sourceยงfn get_latest_blockhash(&self) -> Result<Hash>
fn get_latest_blockhash(&self) -> Result<Hash>
Get last known blockhash
Sourceยงfn get_latest_blockhash_with_commitment(
&self,
_commitment_config: CommitmentConfig,
) -> Result<(Hash, u64)>
fn get_latest_blockhash_with_commitment( &self, _commitment_config: CommitmentConfig, ) -> Result<(Hash, u64)>
Get latest blockhash with last valid block height. Uses explicit commitment configuration.
Sourceยงfn is_blockhash_valid(
&self,
blockhash: &Hash,
_commitment_config: CommitmentConfig,
) -> Result<bool>
fn is_blockhash_valid( &self, blockhash: &Hash, _commitment_config: CommitmentConfig, ) -> Result<bool>
Check if the blockhash is valid
Auto Trait Implementationsยง
impl Freeze for BankClient
impl !RefUnwindSafe for BankClient
impl Send for BankClient
impl Sync for BankClient
impl Unpin for BankClient
impl !UnwindSafe for BankClient
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
Sourceยงimpl<T> FmtForward for T
impl<T> FmtForward for T
Sourceยงfn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Sourceยงfn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Sourceยงfn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Sourceยงfn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Sourceยงfn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Sourceยงfn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Sourceยงfn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Sourceยงfn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Sourceยงfn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Sourceยงfn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSourceยงfn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSourceยงfn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Sourceยงfn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Sourceยงfn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Sourceยงfn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Sourceยงfn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Sourceยงimpl<T> Pointable for T
impl<T> Pointable for T
Sourceยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Sourceยงimpl<T> Tap for T
impl<T> Tap for T
Sourceยงfn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSourceยงfn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSourceยงfn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSourceยงfn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSourceยงfn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSourceยงfn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSourceยงfn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Sourceยงfn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Sourceยงfn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Sourceยงfn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Sourceยงfn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Sourceยงfn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Sourceยงfn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.