Solana.RPC.Request (Solana v0.2.0) View Source
Functions for creating Solana JSON-RPC API requests.
This client only implements the most common methods (see the function documentation below). If you need a method that's on the full list but is not implemented here, please open an issue or contact the maintainers.
Link to this section Summary
Functions
Encodes a Solana.RPC.Request.t/0
(or a list of them) in the required
format.
Returns all information associated with the account of the provided Pubkey.
Returns the balance of the provided pubkey's account.
Returns identity and transaction information about a confirmed block in the ledger.
Returns minimum balance required to make an account rent exempt.
Returns the account information for a list of pubkeys.
Returns a recent block hash from the ledger, and a fee schedule that can be used to compute the cost of submitting a transaction using it.
Returns the statuses of a list of signatures.
Returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block.
Returns the 20 largest accounts of a particular SPL Token type.
Returns the total supply of an SPL Token.
Returns transaction details for a confirmed transaction.
Requests an airdrop of lamports to an account.
Submits a signed transaction to the cluster for processing.
Link to this section Types
Specs
JSON-RPC API request (JSON encoding)
Specs
JSON-RPC API request (pre-encoding)
Link to this section Functions
Specs
Encodes a Solana.RPC.Request.t/0
(or a list of them) in the required
format.
Specs
get_account_info(account :: Solana.key(), opts :: keyword()) :: t()
Returns all information associated with the account of the provided Pubkey.
For more information, see the Solana docs.
Specs
get_balance(account :: Solana.key(), opts :: keyword()) :: t()
Returns the balance of the provided pubkey's account.
For more information, see the Solana docs.
Specs
get_block(start_slot :: non_neg_integer(), opts :: keyword()) :: t()
Returns identity and transaction information about a confirmed block in the ledger.
For more information, see the Solana docs.
Specs
get_minimum_balance_for_rent_exemption( length :: non_neg_integer(), opts :: keyword() ) :: t()
Returns minimum balance required to make an account rent exempt.
For more information, see the Solana docs.
Specs
get_multiple_accounts(accounts :: [Solana.key()], opts :: keyword()) :: t()
Returns the account information for a list of pubkeys.
For more information, see the Solana docs.
Specs
Returns a recent block hash from the ledger, and a fee schedule that can be used to compute the cost of submitting a transaction using it.
For more information, see the Solana docs.
Specs
get_signature_statuses(signatures :: [Solana.key()], opts :: keyword()) :: t()
Returns the statuses of a list of signatures.
Unless the searchTransactionHistory
configuration parameter is included,
this method only searches the recent status cache of signatures, which retains
statuses for all active slots plus MAX_RECENT_BLOCKHASHES
rooted slots.
For more information, see the Solana docs.
Specs
get_signatures_for_address(account :: Solana.key(), opts :: keyword()) :: t()
Returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block.
For more information, see the Solana docs.
Specs
get_token_largest_accounts(mint :: Solana.key(), opts :: keyword()) :: t()
Returns the 20 largest accounts of a particular SPL Token type.
For more information, see the Solana docs.
Specs
get_token_supply(mint :: Solana.key(), opts :: keyword()) :: t()
Returns the total supply of an SPL Token.
For more information, see the Solana docs.
Specs
get_transaction(signature :: Solana.key(), opts :: keyword()) :: t()
Returns transaction details for a confirmed transaction.
For more information, see the Solana docs.
Specs
request_airdrop( account :: Solana.key(), sol :: pos_integer(), opts :: keyword() ) :: t()
Requests an airdrop of lamports to an account.
For more information, see the Solana docs.
Specs
send_transaction(transaction :: Solana.Transaction.t(), opts :: keyword()) :: t()
Submits a signed transaction to the cluster for processing.
For more information, see the Solana docs.