[][src]Trait solana_sdk::client::SyncClient

pub trait SyncClient {
    fn send_message(
        &self,
        keypairs: &[&Keypair],
        message: Message
    ) -> Result<Signature>;
fn send_instruction(
        &self,
        keypair: &Keypair,
        instruction: Instruction
    ) -> Result<Signature>;
fn transfer(
        &self,
        lamports: u64,
        keypair: &Keypair,
        pubkey: &Pubkey
    ) -> Result<Signature>;
fn get_account_data(&self, pubkey: &Pubkey) -> Result<Option<Vec<u8>>>;
fn get_balance(&self, pubkey: &Pubkey) -> Result<u64>;
fn get_signature_status(
        &self,
        signature: &Signature
    ) -> Result<Option<Result<()>>>;
fn get_recent_blockhash(&self) -> Result<Hash>;
fn get_transaction_count(&self) -> Result<u64>; }

Required methods

fn send_message(
    &self,
    keypairs: &[&Keypair],
    message: Message
) -> Result<Signature>

Create a transaction from the given message, and send it to the server, retrying as-needed.

fn send_instruction(
    &self,
    keypair: &Keypair,
    instruction: Instruction
) -> Result<Signature>

Create a transaction from a single instruction that only requires a single signer. Then send it to the server, retrying as-needed.

fn transfer(
    &self,
    lamports: u64,
    keypair: &Keypair,
    pubkey: &Pubkey
) -> Result<Signature>

Transfer lamports from keypair to pubkey, retrying until the transfer completes or produces and error.

fn get_account_data(&self, pubkey: &Pubkey) -> Result<Option<Vec<u8>>>

Get an account or None if not found.

fn get_balance(&self, pubkey: &Pubkey) -> Result<u64>

Get account balance or 0 if not found.

fn get_signature_status(
    &self,
    signature: &Signature
) -> Result<Option<Result<()>>>

Get signature status.

fn get_recent_blockhash(&self) -> Result<Hash>

Get recent blockhash

fn get_transaction_count(&self) -> Result<u64>

Get transaction count

Loading content...

Implementors

Loading content...