SolanaClient class

Encapsulates the jsonrpc-2.0 protocol and implements the Solana RPC API

Constructors

SolanaClient(String rpcUrl)
Constructs a SolanaClient that is capable of sending various RPCs to rpcUrl

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getAccountInfo(String address) Future<AccountInfo>
Returns a Future that resolves to the account related information for address
getBalance(String address) Future<int>
Returns a Future that resolves the the balance of address
getConfirmedSignaturesForAddress2(String address, {int limit: 10, String before, String until}) Future<ConfirmedSignatures>
Returns a Future that resolves to the most recent limit signatures that have been confirmed for a given address [...]
getConfirmedTransaction(String signature, String encoding) Future<TransactionDetails>
Returns a Future that resolves to the transaction details for a given signature in the specified encoding [...]
getRecentBlockhash() Future<Blockhash>
Returns the recent blockhash from the ledger, and a fee schedule that can be used to compute the cost of submitting transaction with the returned Blockhash
getSignatureStatuses(List<TxSignature> signatures, [dynamic searchTransactionHistory = false]) Future<SignatureStatuses>
Returns Future that resolves to the statuses of a list of signatures. Unless the searchTransactionHistory configuration parameter is included, this method only searches the recent status cache of signatures.
getTransactionsList(String address, {int limit: 10}) Future<List<CommonTx>>
Get the limit most recent transactions for the address account
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
requestAirdrop(String address, int lamports, [dynamic commitment = 'processed']) Future<TxSignature>
Requests an airdrop of lamports lamports to address
simulateTransfer(SolanaWallet senderWallet, String recipientAddress, int amountInLamports) Future<SimulateTxResult>
Simulates a transfer of amountInLamports from senderWallet to recipientAddress
toString() String
Returns a string representation of this object.
inherited
transfer(SolanaWallet senderWallet, String recipientAddress, int amountInLamports) Future<TxSignature>
Transfers amountInLamports from senderWallet to recipientAddress
waitForSignatureStatus(TxSignature signature, TxStatus desiredStatus, [dynamic timeout = const Duration(seconds: 30)]) Future<void>
This is just a helper function that allows the caller to wait for the transaction with signature signature to be in a desired desiredStatus. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited