JSON RPC API
Renec nodes accept HTTP requests using the JSON-RPC 2.0 specification.
To interact with a Renec node inside a JavaScript application, use the solana-web3.js library, which gives a convenient interface for the RPC methods.
#
RPC HTTP EndpointDefault port: 8899 e.g. http://localhost:8899, http://192.168.1.88:8899
#
RPC PubSub WebSocket EndpointDefault port: 8900 e.g. ws://localhost:8900, http://192.168.1.88:8900
#
Methods- getAccountInfo
- getBalance
- getBlock
- getBlockHeight
- getBlockProduction
- getBlockCommitment
- getBlocks
- getBlocksWithLimit
- getBlockTime
- getClusterNodes
- getEpochInfo
- getEpochSchedule
- getFeeForMessage
- getFirstAvailableBlock
- getGenesisHash
- getHealth
- getHighestSnapshotSlot
- getIdentity
- getInflationGovernor
- getInflationRate
- getInflationReward
- getLargestAccounts
- getLatestBlockhash
- getLeaderSchedule
- getMaxRetransmitSlot
- getMaxShredInsertSlot
- getMinimumBalanceForRentExemption
- getMultipleAccounts
- getProgramAccounts
- getRecentPerformanceSamples
- getSignaturesForAddress
- getSignatureStatuses
- getSlot
- getSlotLeader
- getSlotLeaders
- getStakeActivation
- getSupply
- getTokenAccountBalance
- getTokenAccountsByDelegate
- getTokenAccountsByOwner
- getTokenLargestAccounts
- getTokenSupply
- getTransaction
- getTransactionCount
- getVersion
- getVoteAccounts
- isBlockhashValid
- minimumLedgerSlot
- requestAirdrop
- sendTransaction
- simulateTransaction
- Subscription Websocket
#
Unstable MethodsUnstable methods may see breaking changes in patch releases and may not be supported in perpetuity.
- blockSubscribe
- blockUnsubscribe
- slotsUpdatesSubscribe
- slotsUpdatesUnsubscribe
- voteSubscribe
- voteUnsubscribe
#
Deprecated Methods- getConfirmedBlock
- getConfirmedBlocks
- getConfirmedBlocksWithLimit
- getConfirmedSignaturesForAddress2
- getConfirmedTransaction
- getFeeCalculatorForBlockhash
- getFeeRateGovernor
- getFees
- getRecentBlockhash
- getSnapshotSlot
#
Request FormattingTo make a JSON-RPC request, send an HTTP POST request with a Content-Type:
application/json
header. The JSON request data should contain 4 fields:
jsonrpc: <string>
, set to"2.0"
id: <number>
, a unique client-generated identifying integermethod: <string>
, a string containing the method to be invokedparams: <array>
, a JSON array of ordered parameter values
Example using curl:
The response output will be a JSON object with the following fields:
jsonrpc: <string>
, matching the request specificationid: <number>
, matching the request identifierresult: <array|number|object|string>
, requested data or success confirmation
Requests can be sent in batches by sending an array of JSON-RPC request objects as the data for a single POST.
#
Definitions- Hash: A SHA-256 hash of a chunk of data.
- Pubkey: The public key of a Ed25519 key-pair.
- Transaction: A list of Renec instructions signed by a client keypair to authorize those actions.
- Signature: An Ed25519 signature of transaction's payload data including instructions. This can be used to identify transactions.
#
Configuring State CommitmentFor preflight checks and transaction processing, Renec nodes choose which bank state to query based on a commitment requirement set by the client. The commitment describes how finalized a block is at that point in time. When querying the ledger state, it's recommended to use lower levels of commitment to report progress and higher levels to ensure the state will not be rolled back.
In descending order of commitment (most finalized to least finalized), clients may specify:
"finalized"
- the node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized"confirmed"
- the node will query the most recent block that has been voted on by supermajority of the cluster.- It incorporates votes from gossip and replay.
- It does not count votes on descendants of a block, only direct votes on that block.
- This confirmation level also upholds "optimistic confirmation" guarantees in release 1.3 and onwards.
"processed"
- the node will query its most recent block. Note that the block may still be skipped by the cluster.
For processing many dependent transactions in series, it's recommended to use
"confirmed"
commitment, which balances speed with rollback safety.
For total safety, it's recommended to use"finalized"
commitment.
#
ExampleThe commitment parameter should be included as the last element in the params
array:
#
Default:If commitment configuration is not provided, the node will default to "finalized"
commitment
Only methods that query bank state accept the commitment parameter. They are indicated in the API Reference below.
#
RpcResponse StructureMany methods that take a commitment parameter return an RpcResponse JSON object comprised of two parts:
context
: An RpcResponseContext JSON structure including aslot
field at which the operation was evaluated.value
: The value returned by the operation itself.
#
Health CheckAlthough not a JSON RPC API, a GET /health
at the RPC HTTP Endpoint provides a
health-check mechanism for use by load balancers or other network
infrastructure. This request will always return a HTTP 200 OK response with a body of
"ok", "behind" or "unknown" based on the following conditions:
- If one or more
--known-validator
arguments are provided torenec-validator
, "ok" is returned when the node has withinHEALTH_CHECK_SLOT_DISTANCE
slots of the highest known validator, otherwise "behind". "unknown" is returned when no slot information from known validators is not yet available. - "ok" is always returned if no known validators are provided.
#
JSON RPC API Reference#
getAccountInfoReturns all information associated with the account of provided Pubkey
#
Parameters:<string>
- Pubkey of account to query, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be an RpcResponse JSON object with value
equal to:
<null>
- if the requested account doesn't exist<object>
- otherwise, a JSON object containing:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
#
Example:Request:
Response:
#
Example:Request:
Response:
#
getBalanceReturns the balance of the account of provided Pubkey
#
Parameters:<string>
- Pubkey of account to query, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:RpcResponse<u64>
- RpcResponse JSON object withvalue
field set to the balance
#
Example:Request:
Result:
#
getBlockReturns identity and transaction information about a confirmed block in the ledger
#
Parameters:<u64>
- slot, as u64 integer<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional)
transactionDetails: <string>
- level of transaction detail to return, either "full", "accounts", "signatures", or "none". If parameter not provided, the default detail level is "full". If "accounts" are requested, transaction details only include signatures and an annotated list of accounts in each transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances, pre_token_balances, and post_token_balances. - (optional)
rewards: bool
- whether to populate therewards
array. If parameter not provided, the default includes rewards. - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
maxSupportedTransactionVersion: <number>
- set the max transaction version to return in responses. If the requested block contains a transaction with a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and a block containing any versioned transaction will prompt the error.
- (optional)
#
Results:The result field will be an object with the following fields:
<null>
- if specified block is not confirmed<object>
- if block is confirmed, an object with the following fields:blockhash: <string>
- the blockhash of this block, as base-58 encoded stringpreviousBlockhash: <string>
- the blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"parentSlot: <u64>
- the slot index of this block's parenttransactions: <array>
- present if "full" transaction details are requested; an array of JSON objects containing:transaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parametermeta: <object>
- transaction status metadata object, containingnull
or:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transactionrewards: <array|null>
- transaction-level rewards, populated if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string|undefined>
- type of reward: "fee", "rent", "voting", "staking"commission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
loadedAddresses: <object|undefined>
- Transaction addresses loaded from address lookup tables. Undefined ifmaxSupportedTransactionVersion
is not set in request params.writable: <array[string]>
- Ordered list of base-58 encoded addresses for writable loaded accountsreadonly: <array[string]>
- Ordered list of base-58 encoded addresses for readonly loaded accounts
version: <"legacy"|number|undefined>
- Transaction version. Undefined ifmaxSupportedTransactionVersion
is not set in request params.
signatures: <array>
- present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the blockrewards: <array|undefined>
- block-level rewards, present if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string|undefined>
- type of reward: "fee", "rent", "voting", "staking"commission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
blockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch). null if not availableblockHeight: <u64 | null>
- the number of blocks beneath this block
#
Example:Request:
Result:
#
Example:Request:
Result:
#
Transaction StructureTransactions are quite different from those on other blockchains. Be sure to review Anatomy of a Transaction to learn about transactions on Renec.
The JSON structure of a transaction is defined as follows:
signatures: <array[string]>
- A list of base-58 encoded signatures applied to the transaction. The list is always of lengthmessage.header.numRequiredSignatures
and not empty. The signature at indexi
corresponds to the public key at indexi
inmessage.account_keys
. The first one is used as the transaction id.message: <object>
- Defines the content of the transaction.accountKeys: <array[string]>
- List of base-58 encoded public keys used by the transaction, including by the instructions and for signatures. The firstmessage.header.numRequiredSignatures
public keys must sign the transaction.header: <object>
- Details the account types and signatures required by the transaction.numRequiredSignatures: <number>
- The total number of signatures required to make the transaction valid. The signatures must match the firstnumRequiredSignatures
ofmessage.account_keys
.numReadonlySignedAccounts: <number>
- The lastnumReadonlySignedAccounts
of the signed keys are read-only accounts. Programs may process multiple transactions that load read-only accounts within a single PoH entry, but are not permitted to credit or debit lamports or modify account data. Transactions targeting the same read-write account are evaluated sequentially.numReadonlyUnsignedAccounts: <number>
- The lastnumReadonlyUnsignedAccounts
of the unsigned keys are read-only accounts.
recentBlockhash: <string>
- A base-58 encoded hash of a recent block in the ledger used to prevent transaction duplication and to give transactions lifetimes.instructions: <array[object]>
- List of program instructions that will be executed in sequence and committed in one atomic transaction if all succeed.programIdIndex: <number>
- Index into themessage.accountKeys
array indicating the program account that executes this instruction.accounts: <array[number]>
- List of ordered indices into themessage.accountKeys
array indicating which accounts to pass to the program.data: <string>
- The program input data encoded in a base-58 string.
addressTableLookups: <array[object]|undefined>
- List of address table lookups used by a transaction to dynamically load addresses from on-chain address lookup tables. Undefined ifmaxSupportedTransactionVersion
is not set.accountKey: <string>
- base-58 encoded public key for an address lookup table account.writableIndexes: <array[number]>
- List of indices used to load addresses of writable accounts from a lookup table.readonlyIndexes: <array[number]>
- List of indices used to load addresses of readonly accounts from a lookup table.
#
Inner Instructions StructureThe Renec runtime records the cross-program instructions that are invoked during transaction processing and makes these available for greater transparency of what was executed on-chain per transaction instruction. Invoked instructions are grouped by the originating transaction instruction and are listed in order of processing.
The JSON structure of inner instructions is defined as a list of objects in the following structure:
index: number
- Index of the transaction instruction from which the inner instruction(s) originatedinstructions: <array[object]>
- Ordered list of inner program instructions that were invoked during a single transaction instruction.programIdIndex: <number>
- Index into themessage.accountKeys
array indicating the program account that executes this instruction.accounts: <array[number]>
- List of ordered indices into themessage.accountKeys
array indicating which accounts to pass to the program.data: <string>
- The program input data encoded in a base-58 string.
#
Token Balances StructureThe JSON structure of token balances is defined as a list of objects in the following structure:
accountIndex: <number>
- Index of the account in which the token balance is provided for.mint: <string>
- Pubkey of the token's mint.owner: <string | undefined>
- Pubkey of token balance's owner.programId: <string | undefined>
- Pubkey of the Token program that owns the account.uiTokenAmount: <object>
-amount: <string>
- Raw amount of tokens as a string, ignoring decimals.decimals: <number>
- Number of decimals configured for token's mint.uiAmount: <number | null>
- Token amount as a float, accounting for decimals. DEPRECATEDuiAmountString: <string>
- Token amount as a string, accounting for decimals.
#
getBlockHeightReturns the current block height of the node
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:<u64>
- Current block height
#
Example:Request:
Result:
#
getBlockProductionReturns recent block production information from the current or previous epoch.
#
Parameters:<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
range: <object>
- Slot range to return block production for. If parameter not provided, defaults to current epoch.firstSlot: <u64>
- first slot to return block production information for (inclusive)- (optional)
lastSlot: <u64>
- last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot
- (optional)
identity: <string>
- Only return results for this validator identity (base-58 encoded)
#
Results:The result will be an RpcResponse JSON object with value
equal to:
<object>
byIdentity: <object>
- a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced.range: <object>
- Block production slot rangefirstSlot: <u64>
- first slot of the block production information (inclusive)lastSlot: <u64>
- last slot of block production information (inclusive)
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getBlockCommitmentReturns commitment for particular block
#
Parameters:<u64>
- block, identified by Slot
#
Results:The result field will be a JSON object containing:
commitment
- commitment, comprising either:<null>
- Unknown block<array>
- commitment, array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 toMAX_LOCKOUT_HISTORY
+ 1
totalStake
- total active stake, in lamports, of the current epoch
#
Example:Request:
Result:
#
getBlocksReturns a list of confirmed blocks between two slots
#
Parameters:<u64>
- start_slot, as u64 integer<u64>
- (optional) end_slot, as u64 integer- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
#
Results:The result field will be an array of u64 integers listing confirmed blocks
between start_slot
and either end_slot
, if provided, or latest confirmed block,
inclusive. Max range allowed is 500,000 slots.
#
Example:Request:
Result:
#
getBlocksWithLimitReturns a list of confirmed blocks starting at the given slot
#
Parameters:<u64>
- start_slot, as u64 integer<u64>
- limit, as u64 integer- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
#
Results:The result field will be an array of u64 integers listing confirmed blocks
starting at start_slot
for up to limit
blocks, inclusive.
#
Example:Request:
Result:
#
getBlockTimeReturns the estimated production time of a block.
Each validator reports their UTC time to the ledger on a regular interval by intermittently adding a timestamp to a Vote for a particular block. A requested block's time is calculated from the stake-weighted mean of the Vote timestamps in a set of recent blocks recorded on the ledger.
#
Parameters:<u64>
- block, identified by Slot
#
Results:<i64>
- estimated production time, as Unix timestamp (seconds since the Unix epoch)<null>
- timestamp is not available for this block
#
Example:Request:
Result:
#
getClusterNodesReturns information about all the nodes participating in the cluster
#
Parameters:None
#
Results:The result field will be an array of JSON objects, each with the following sub fields:
pubkey: <string>
- Node public key, as base-58 encoded stringgossip: <string | null>
- Gossip network address for the nodetpu: <string | null>
- TPU network address for the noderpc: <string | null>
- JSON RPC network address for the node, ornull
if the JSON RPC service is not enabledversion: <string | null>
- The software version of the node, ornull
if the version information is not availablefeatureSet: <u32 | null >
- The unique identifier of the node's feature setshredVersion: <u16 | null>
- The shred version the node has been configured to use
#
Example:Request:
Result:
#
getEpochInfoReturns information about the current epoch
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result field will be an object with the following fields:
absoluteSlot: <u64>
, the current slotblockHeight: <u64>
, the current block heightepoch: <u64>
, the current epochslotIndex: <u64>
, the current slot relative to the start of the current epochslotsInEpoch: <u64>
, the number of slots in this epochtransactionCount: <u64 | null>
, total number of transactions processed without error since genesis
#
Example:Request:
Result:
#
getEpochScheduleReturns epoch schedule information from this cluster's genesis config
#
Parameters:None
#
Results:The result field will be an object with the following fields:
slotsPerEpoch: <u64>
, the maximum number of slots in each epochleaderScheduleSlotOffset: <u64>
, the number of slots before beginning of an epoch to calculate a leader schedule for that epochwarmup: <bool>
, whether epochs start short and growfirstNormalEpoch: <u64>
, first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM_SLOTS_PER_EPOCH)firstNormalSlot: <u64>
, MINIMUM_SLOTS_PER_EPOCH * (2.pow(firstNormalEpoch) - 1)
#
Example:Request:
Result:
#
getFeeForMessageNEW: This method is only available in renec v1.9 or newer. Please use getFees for renec v1.8
Get the fee the network will charge for a particular Message
#
Parameters:message: <string>
- Base-64 encoded Message<object>
- (optional) Commitment (used for retrieving blockhash)
#
Results:<u64 | null>
- Fee corresponding to the message at the specified blockhash
#
Example:Request:
Result:
#
getFirstAvailableBlockReturns the slot of the lowest confirmed block that has not been purged from the ledger
#
Parameters:None
#
Results:<u64>
- Slot
#
Example:Request:
Result:
#
getGenesisHashReturns the genesis hash
#
Parameters:None
#
Results:<string>
- a Hash as base-58 encoded string
#
Example:Request:
Result:
#
getHealthReturns the current health of the node.
If one or more --known-validator
arguments are provided to
renec-validator
, "ok" is returned when the node has within
HEALTH_CHECK_SLOT_DISTANCE
slots of the highest known validator, otherwise
an error is returned. "ok" is always returned if no known validators are
provided.
#
Parameters:None
#
Results:If the node is healthy: "ok" If the node is unhealthy, a JSON RPC error response is returned. The specifics of the error response are UNSTABLE and may change in the future
#
Example:Request:
Healthy Result:
Unhealthy Result (generic):
Unhealthy Result (if additional information is available)
#
getHighestSnapshotSlotNEW: This method is only available in renec v1.9 or newer. Please use getSnapshotSlot for renec v1.8
Returns the highest slot information that the node has snapshots for.
This will find the highest full snapshot slot, and the highest incremental snapshot slot based on the full snapshot slot, if there is one.
#
Parameters:None
#
Results:<object>
full: <u64>
- Highest full snapshot slotincremental: <u64 | undefined>
- Highest incremental snapshot slot based onfull
#
Example:Request:
Result:
Result when the node has no snapshot:
#
getIdentityReturns the identity pubkey for the current node
#
Parameters:None
#
Results:The result field will be a JSON object with the following fields:
identity
, the identity pubkey of the current node (as a base-58 encoded string)
#
Example:Request:
Result:
#
getInflationGovernorReturns the current inflation governor
#
Parameters:<object>
- (optional) Commitment
#
Results:The result field will be a JSON object with the following fields:
initial: <f64>
, the initial inflation percentage from time 0terminal: <f64>
, terminal inflation percentagetaper: <f64>
, rate per year at which inflation is lowered. Rate reduction is derived using the target slot time in genesis configfoundation: <f64>
, percentage of total inflation allocated to the foundationfoundationTerm: <f64>
, duration of foundation pool inflation in years
#
Example:Request:
Result:
#
getInflationRateReturns the specific inflation values for the current epoch
#
Parameters:None
#
Results:The result field will be a JSON object with the following fields:
total: <f64>
, total inflationvalidator: <f64>
, inflation allocated to validatorsfoundation: <f64>
, inflation allocated to the foundationepoch: <u64>
, epoch for which these values are valid
#
Example:Request:
Result:
#
getInflationRewardReturns the inflation / staking reward for a list of addresses for an epoch
#
Parameters:<array>
- An array of addresses to query, as base-58 encoded strings<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
epoch: <u64>
- An epoch for which the reward occurs. If omitted, the previous epoch will be used - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
ResultsThe result field will be a JSON array with the following fields:
epoch: <u64>
, epoch for which reward occuredeffectiveSlot: <u64>
, the slot in which the rewards are effectiveamount: <u64>
, reward amount in lamportspostBalance: <u64>
, post balance of the account in lamportscommission: <u8|undefined>
- vote account commission when the reward was credited
#
ExampleRequest:
Response:
#
getLargestAccountsReturns the 20 largest accounts, by lamport balance (results may be cached up to two hours)
#
Parameters:<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
filter: <string>
- filter results by account type; currently supported:circulating|nonCirculating
#
Results:The result will be an RpcResponse JSON object with value
equal to an array of:
<object>
- otherwise, a JSON object containing:address: <string>
, base-58 encoded address of the accountlamports: <u64>
, number of lamports in the account, as a u64
#
Example:Request:
Result:
#
getLatestBlockhashNEW: This method is only available in renec v1.9 or newer. Please use getRecentBlockhash for renec v1.8
Returns the latest blockhash
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment (used for retrieving blockhash) - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:RpcResponse<object>
- RpcResponse JSON object withvalue
field set to a JSON object including:blockhash: <string>
- a Hash as base-58 encoded stringlastValidBlockHeight: <u64>
- last block height at which the blockhash will be valid
#
Example:Request:
Result:
#
getLeaderScheduleReturns the leader schedule for an epoch
#
Parameters:<u64>
- (optional) Fetch the leader schedule for the epoch that corresponds to the provided slot. If unspecified, the leader schedule for the current epoch is fetched<object>
- (optional) Configuration object containing the following field:- (optional) Commitment
- (optional)
identity: <string>
- Only return results for this validator identity (base-58 encoded)
#
Results:<null>
- if requested epoch is not found<object>
- otherwise, the result field will be a dictionary of validator identities, as base-58 encoded strings, and their corresponding leader slot indices as values (indices are relative to the first slot in the requested epoch)
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getMaxRetransmitSlotGet the max slot seen from retransmit stage.
#
Results:<u64>
- Slot
#
Example:Request:
Result:
#
getMaxShredInsertSlotGet the max slot seen from after shred insert.
#
Results:<u64>
- Slot
#
Example:Request:
Result:
#
getMinimumBalanceForRentExemptionReturns minimum balance required to make account rent exempt.
#
Parameters:<usize>
- account data length<object>
- (optional) Commitment
#
Results:<u64>
- minimum lamports required in account
#
Example:Request:
Result:
#
getMultipleAccountsReturns the account information for a list of Pubkeys
#
Parameters:<array>
- An array of Pubkeys to query, as base-58 encoded strings (up to a maximum of 100).<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be an RpcResponse JSON object with value
equal to:
An array of:
<null>
- if the account at that Pubkey doesn't exist<object>
- otherwise, a JSON object containing:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getProgramAccountsReturns all accounts owned by the provided program Pubkey
#
Parameters:<string>
- Pubkey of program, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
filters: <array>
- filter results using various filter objects; account must meet all filter criteria to be included in results - (optional)
withContext: bool
- wrap the result in an RpcResponse JSON object. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Filters:memcmp: <object>
- compares a provided series of bytes with program account data at a particular offset. Fields:offset: <usize>
- offset into program account data to start comparisonbytes: <string>
- data to match, as base-58 encoded string and limited to less than 129 bytes
dataSize: <u64>
- compares the program account data length with the provided data size
#
Results:By default the result field will be an array of JSON objects. If withContext
flag is set the array will be wrapped in an RpcResponse JSON object.
The array will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string,encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getRecentPerformanceSamplesReturns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.
#
Parameters:limit: <usize>
- (optional) number of samples to return (maximum 720)
#
Results:An array of:
RpcPerfSample<object>
slot: <u64>
- Slot in which sample was taken atnumTransactions: <u64>
- Number of transactions in samplenumSlots: <u64>
- Number of slots in samplesamplePeriodSecs: <u16>
- Number of seconds in a sample window
#
Example:Request:
Result:
#
getSignaturesForAddressReturns signatures for confirmed transactions that include the given address in
their accountKeys
list. Returns signatures backwards in time from the
provided signature or most recent confirmed block
#
Parameters:<string>
- account address as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
limit: <number>
- maximum transaction signatures to return (between 1 and 1,000, default: 1,000). - (optional)
before: <string>
- start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block. - (optional)
until: <string>
- search until this transaction signature, if found before limit reached. - (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result field will be an array of transaction signature information, ordered from newest to oldest transaction:
<object>
signature: <string>
- transaction signature as base-58 encoded stringslot: <u64>
- The slot that contains the block with the transactionerr: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsmemo: <string |null>
- Memo associated with the transaction, null if no memo is presentblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available.
#
Example:Request:
Result:
#
getSignatureStatusesReturns 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.
#
Parameters:<array>
- An array of transaction signatures to confirm, as base-58 encoded strings<object>
- (optional) Configuration object containing the following field:searchTransactionHistory: <bool>
- if true, a Renec node will search its ledger cache for any signatures not found in the recent status cache
#
Results:An RpcResponse containing a JSON object consisting of an array of TransactionStatus objects.
RpcResponse<object>
- RpcResponse JSON object withvalue
field:
An array of:
<null>
- Unknown transaction<object>
slot: <u64>
- The slot the transaction was processedconfirmations: <usize | null>
- Number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the clustererr: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsconfirmationStatus: <string | null>
- The transaction's cluster confirmation status; eitherprocessed
,confirmed
, orfinalized
. See Commitment for more on optimistic confirmation.- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getSlotReturns the slot that has reached the given or default commitment level
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:<u64>
- Current slot
#
Example:Request:
Result:
#
getSlotLeaderReturns the current slot leader
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:<string>
- Node identity Pubkey as base-58 encoded string
#
Example:Request:
Result:
#
getSlotLeadersReturns the slot leaders for a given slot range
#
Parameters:<u64>
- Start slot, as u64 integer<u64>
- Limit, as u64 integer
#
Results:<array[string]>
- Node identity public keys as base-58 encoded strings
#
Example:If the current slot is #99, query the next 10 leaders with the following request:
Request:
Result:
The first leader returned is the leader for slot #100:
#
getStakeActivationReturns epoch activation information for a stake account
#
Parameters:<string>
- Pubkey of stake account to query, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
epoch: <u64>
- epoch for which to calculate activation details. If parameter not provided, defaults to current epoch. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be a JSON object with the following fields:
state: <string
- the stake account's activation state, one of:active
,inactive
,activating
,deactivating
active: <u64>
- stake active during the epochinactive: <u64>
- stake inactive during the epoch
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getSupplyReturns information about the current supply.
#
Parameters:<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
excludeNonCirculatingAccountsList: <bool>
- exclude non circulating accounts list from response
#
Results:The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
total: <u64>
- Total supply in lamportscirculating: <u64>
- Circulating supply in lamportsnonCirculating: <u64>
- Non-circulating supply in lamportsnonCirculatingAccounts: <array>
- an array of account addresses of non-circulating accounts, as strings. IfexcludeNonCirculatingAccountsList
is enabled, the returned array will be empty.
#
Example:Request:
Result:
#
getTokenAccountBalanceReturns the token balance of an SPL Token account.
#
Parameters:<string>
- Pubkey of Token account to query, as base-58 encoded string<object>
- (optional) Commitment
#
Results:The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
amount: <string>
- the raw balance without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the balance, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the balance as a string, using mint-prescribed decimals
For more details on returned data: The Token Balances Structure response from getBlock follows a similar structure.
#
Example:Request:
Result:
#
getTokenAccountsByDelegateReturns all SPL Token accounts by approved Delegate.
#
Parameters:<string>
- Pubkey of account delegate to query, as base-58 encoded string<object>
- Either:mint: <string>
- Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string; orprogramId: <string>
- Pubkey of the Token program that owns the accounts, as base-58 encoded string
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be an RpcResponse JSON object with value
equal to an array of JSON objects, which will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <object>
, Token state data associated with the account, either as encoded binary data or in JSON format{<program>: <state>}
executable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
When the data is requested with the jsonParsed
encoding a format similar to that of the Token Balances Structure can be expected inside the structure, both for the tokenAmount
and the delegatedAmount
, with the latter being an optional object.
#
Example:Result:
#
getTokenAccountsByOwnerReturns all SPL Token accounts by token owner.
#
Parameters:<string>
- Pubkey of account owner to query, as base-58 encoded string<object>
- Either:mint: <string>
- Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string; orprogramId: <string>
- Pubkey of the Token program that owns the accounts, as base-58 encoded string
<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". "base58" is limited to Account data of less than 129 bytes. "base64" will return base64 encoded data for Account data of any size. "base64+zstd" compresses the Account data using Zstandard and base64-encodes the result. "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to "base64" encoding, detectable when thedata
field is type<string>
. - (optional)
dataSlice: <object>
- limit the returned account data using the providedoffset: <usize>
andlength: <usize>
fields; only available for "base58", "base64" or "base64+zstd" encodings. - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be an RpcResponse JSON object with value
equal to an array of JSON objects, which will contain:
pubkey: <string>
- the account Pubkey as base-58 encoded stringaccount: <object>
- a JSON object, with the following sub fields:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <object>
, Token state data associated with the account, either as encoded binary data or in JSON format{<program>: <state>}
executable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
When the data is requested with the jsonParsed
encoding a format similar to that of the Token Balances Structure can be expected inside the structure, both for the tokenAmount
and the delegatedAmount
, with the latter being an optional object.
#
Example:Result:
#
getTokenLargestAccountsReturns the 20 largest accounts of a particular SPL Token type.
#
Parameters:<string>
- Pubkey of token Mint to query, as base-58 encoded string<object>
- (optional) Commitment
#
Results:The result will be an RpcResponse JSON object with value
equal to an array of JSON objects containing:
address: <string>
- the address of the token accountamount: <string>
- the raw token account balance without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the token account balance, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the token account balance as a string, using mint-prescribed decimals
#
Example:Result:
#
getTokenSupplyReturns the total supply of an SPL Token type.
#
Parameters:<string>
- Pubkey of token Mint to query, as base-58 encoded string<object>
- (optional) Commitment
#
Results:The result will be an RpcResponse JSON object with value
equal to a JSON object containing:
amount: <string>
- the raw total token supply without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number | null>
- the total token supply, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the total token supply as a string, using mint-prescribed decimals
#
Example:Result:
#
getTransactionReturns transaction details for a confirmed transaction
#
Parameters:<string>
- transaction signature as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
maxSupportedTransactionVersion: <number>
- set the max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and any versioned transaction will prompt the error.
- (optional)
#
Results:<null>
- if transaction is not found or not confirmed<object>
- if transaction is confirmed, an object with the following fields:slot: <u64>
- the slot this transaction was processed intransaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parameterblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when the transaction was processed. null if not availablemeta: <object | null>
- transaction status metadata object:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transaction- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
rewards: <array|null>
- transaction-level rewards, populated if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string>
- type of reward: currently only "rent", other types may be added in the futurecommission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
loadedAddresses: <object|undefined>
- Transaction addresses loaded from address lookup tables. Undefined ifmaxSupportedTransactionVersion
is not set in request params.writable: <array[string]>
- Ordered list of base-58 encoded addresses for writable loaded accountsreadonly: <array[string]>
- Ordered list of base-58 encoded addresses for readonly loaded accounts
version: <"legacy"|number|undefined>
- Transaction version. Undefined ifmaxSupportedTransactionVersion
is not set in request params.
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getTransactionCountReturns the current Transaction count from the ledger
#
Parameters:<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:<u64>
- count
#
Example:Result:
#
getVersionReturns the current renec versions running on the node
#
Parameters:None
#
Results:The result field will be a JSON object with the following fields:
solana-core
, software version of solana-corefeature-set
, unique identifier of the current software's feature set
#
Example:Request:
Result:
#
getVoteAccountsReturns the account info and associated stake for all the voting accounts in the current bank.
#
Parameters:<object>
- (optional) Configuration object containing the following field:- (optional) Commitment
- (optional)
votePubkey: <string>
- Only return results for this validator vote address (base-58 encoded) - (optional)
keepUnstakedDelinquents: <bool>
- Do not filter out delinquent validators with no stake - (optional)
delinquentSlotDistance: <u64>
- Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified.
#
Results:The result field will be a JSON object of current
and delinquent
accounts,
each containing an array of JSON objects with the following sub fields:
votePubkey: <string>
- Vote account address, as base-58 encoded stringnodePubkey: <string>
- Validator identity, as base-58 encoded stringactivatedStake: <u64>
- the stake, in lamports, delegated to this vote account and active in this epochepochVoteAccount: <bool>
- bool, whether the vote account is staked for this epochcommission: <number>
, percentage (0-100) of rewards payout owed to the vote accountlastVote: <u64>
- Most recent slot voted on by this vote accountepochCredits: <array>
- History of how many credits earned by the end of each epoch, as an array of arrays containing:[epoch, credits, previousCredits]
#
Example:Request:
Result:
#
Example: Restrict results to a single validator vote accountRequest:
Result:
#
isBlockhashValidNEW: This method is only available in renec v1.9 or newer. Please use getFeeCalculatorForBlockhash for renec v1.8
Returns whether a blockhash is still valid or not
#
Parameters:blockhash: <string>
- the blockhash of this block, as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment (used for retrieving blockhash) - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:<bool>
- True if the blockhash is still valid
#
Example:Request:
Result:
#
minimumLedgerSlotReturns the lowest slot that the node has information about in its ledger. This value may increase over time if the node is configured to purge older ledger data
#
Parameters:None
#
Results:u64
- Minimum ledger slot
#
Example:Result:
#
requestAirdropRequests an airdrop of lamports to a Pubkey
#
Parameters:<string>
- Pubkey of account to receive lamports, as base-58 encoded string<integer>
- lamports, as a u64<object>
- (optional) Commitment (used for retrieving blockhash and verifying airdrop success)
#
Results:<string>
- Transaction Signature of airdrop, as base-58 encoded string
#
Example:Result:
#
sendTransactionSubmits a signed transaction to the cluster for processing.
This method does not alter the transaction in any way; it relays the transaction created by clients to the node as-is.
If the node's rpc service receives the transaction, this method immediately succeeds, without waiting for any confirmations. A successful response from this method does not guarantee the transaction is processed or confirmed by the cluster.
While the rpc service will reasonably retry to submit it, the transaction
could be rejected if transaction's recent_blockhash
expires before it lands.
Use getSignatureStatuses
to ensure
a transaction is processed and confirmed.
Before submitting, the following preflight checks are performed:
- The transaction signatures are verified
- The transaction is simulated against the bank slot specified by the preflight commitment. On failure an error will be returned. Preflight checks may be disabled if desired. It is recommended to specify the same commitment and preflight commitment to avoid confusing behavior.
The returned signature is the first signature in the transaction, which is used to identify the transaction (transaction id). This identifier can be easily extracted from the transaction data before submission.
#
Parameters:<string>
- fully-signed Transaction, as encoded string<object>
- (optional) Configuration object containing the following field:skipPreflight: <bool>
- if true, skip the preflight transaction checks (default: false)preflightCommitment: <string>
- (optional) Commitment level to use for preflight (default:"finalized"
).encoding: <string>
- (optional) Encoding used for the transaction data. Either"base58"
(slow, DEPRECATED), or"base64"
. (default:"base58"
).maxRetries: <usize>
- (optional) Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires.- (optional)
minContextSlot: <number>
- set the minimum slot at which to perform preflight transaction checks.
#
Results:<string>
- First Transaction Signature embedded in the transaction, as base-58 encoded string (transaction id)
#
Example:Result:
#
simulateTransactionSimulate sending a transaction
#
Parameters:<string>
- Transaction, as an encoded string. The transaction must have a valid blockhash, but is not required to be signed.<object>
- (optional) Configuration object containing the following fields:sigVerify: <bool>
- if true the transaction signatures will be verified (default: false, conflicts withreplaceRecentBlockhash
)commitment: <string>
- (optional) Commitment level to simulate the transaction at (default:"finalized"
).encoding: <string>
- (optional) Encoding used for the transaction data. Either"base58"
(slow, DEPRECATED), or"base64"
. (default:"base58"
).replaceRecentBlockhash: <bool>
- (optional) if true the transaction recent blockhash will be replaced with the most recent blockhash. (default: false, conflicts withsigVerify
)accounts: <object>
- (optional) Accounts configuration object containing the following fields:encoding: <string>
- (optional) encoding for returned Account data, either "base64" (default), "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to binary encoding, detectable when thedata
field is type<string>
.addresses: <array>
- An array of accounts to return, as base-58 encoded strings
- (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
#
Results:An RpcResponse containing a TransactionStatus object
The result will be an RpcResponse JSON object with value
set to a JSON object with the following fields:
err: <object | string | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionslogs: <array | null>
- Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure)accounts: <array> | null>
- array of accounts with the same length as theaccounts.addresses
array in the request<null>
- if the account doesn't exist or iferr
is not null<object>
- otherwise, a JSON object containing:lamports: <u64>
, number of lamports assigned to this account, as a u64owner: <string>
, base-58 encoded Pubkey of the program this account has been assigned todata: <[string, encoding]|object>
, data associated with the account, either as encoded binary data or JSON format{<program>: <state>}
, depending on encoding parameterexecutable: <bool>
, boolean indicating if the account contains a program (and is strictly read-only)rentEpoch: <u64>
, the epoch at which this account will next owe rent, as u64
unitsConsumed: <u64 | undefined>
, The number of compute budget units consumed during the processing of this transaction
#
Example:Result:
#
Subscription WebsocketAfter connecting to the RPC PubSub websocket at ws://<ADDRESS>/
:
- Submit subscription requests to the websocket using the methods below
- Multiple subscriptions may be active at once
- Many subscriptions take the optional
commitment
parameter, defining how finalized a change should be to trigger a notification. For subscriptions, if commitment is unspecified, the default value is"finalized"
.
#
accountSubscribeSubscribe to an account to receive notifications when the lamports or data for a given account public key changes
#
Parameters:<string>
- account Pubkey, as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:<object>
- (optional) Commitmentencoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to binary encoding, detectable when thedata
field is type<string>
.
#
Results:<number>
- Subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification format is the same as seen in the getAccountInfo RPC HTTP method.
Base58 encoding:
Parsed-JSON encoding:
#
accountUnsubscribeUnsubscribe from account change notifications
#
Parameters:<number>
- id of account Subscription to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
blockSubscribe - Unstable, disabled by defaultThis subscription is unstable and only available if the validator was started
with the --rpc-pubsub-enable-block-subscription
flag. The format of this
subscription may change in the future
Subscribe to receive notification anytime a new block is Confirmed or Finalized.
#
Parameters:filter: <string>|<object>
- filter criteria for the logs to receive results by account type; currently supported:- "all" - include all transactions in block
{ "mentionsAccountOrProgram": <string> }
- return only transactions that mention the provided public key (as base-58 encoded string). If no mentions in a given block, then no notification will be sent.
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
- (optional)
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when thedata
field is type<string>
. Default is "base64". - (optional)
transactionDetails: <string>
- level of transaction detail to return, either "full", "signatures", or "none". If parameter not provided, the default detail level is "full". - (optional)
showRewards: bool
- whether to populate therewards
array. If parameter not provided, the default includes rewards.
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an object with the following fields:
-slot: <u64>
- The corresponding slot.
err: <object | null>
- Error if something went wrong publishing the notification otherwise null.block: <object | null>
- A block object as seen in the getBlock RPC HTTP method.
#
blockUnsubscribeUnsubscribe from block notifications
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Response:
#
logsSubscribeSubscribe to transaction logging
#
Parameters:filter: <string>|<object>
- filter criteria for the logs to receive results by account type; currently supported:- "all" - subscribe to all transactions except for simple vote transactions
- "allWithVotes" - subscribe to all transactions including simple vote transactions
{ "mentions": [ <string> ] }
- subscribe to all transactions that mention the provided Pubkey (as base-58 encoded string)
<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
#
Results:<integer>
- Subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an RpcResponse JSON object with value equal to:
signature: <string>
- The transaction signature base58 encoded.err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionslogs: <array | null>
- Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure)
Example:
#
logsUnsubscribeUnsubscribe from transaction logging
#
Parameters:<integer>
- id of subscription to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
programSubscribeSubscribe to a program to receive notifications when the lamports or data for a given account owned by the program changes
#
Parameters:<string>
- program_id Pubkey, as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:- (optional) Commitment
encoding: <string>
- encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when thedata
field is type<string>
.- (optional)
filters: <array>
- filter results using various filter objects; account must meet all filter criteria to be included in results
#
Results:<integer>
- Subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification format is a single program account object as seen in the getProgramAccounts RPC HTTP method.
Base58 encoding:
Parsed-JSON encoding:
#
programUnsubscribeUnsubscribe from program-owned account change notifications
#
Parameters:<integer>
- id of account Subscription to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
signatureSubscribeSubscribe to a transaction signature to receive notification when the transaction is confirmed On signatureNotification
, the subscription is automatically cancelled
#
Parameters:<string>
- Transaction Signature, as base-58 encoded string<object>
- (optional) Commitment
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an RpcResponse JSON object with value containing an object with:
err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitions
Example:
#
signatureUnsubscribeUnsubscribe from signature confirmation notification
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
slotSubscribeSubscribe to receive notification anytime a slot is processed by the validator
#
Parameters:None
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an object with the following fields:
parent: <u64>
- The parent slotroot: <u64>
- The current root slotslot: <u64>
- The newly set slot value
Example:
#
slotUnsubscribeUnsubscribe from slot notifications
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
slotsUpdatesSubscribe - UnstableThis subscription is unstable; the format of this subscription may change in the future and it may not always be supported
Subscribe to receive a notification from the validator on a variety of updates on every slot
#
Parameters:None
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an object with the following fields:
parent: <u64>
- The parent slotslot: <u64>
- The newly updated slottimestamp: <i64>
- The Unix timestamp of the updatetype: <string>
- The update type, one of:- "firstShredReceived"
- "completed"
- "createdBank"
- "frozen"
- "dead"
- "optimisticConfirmation"
- "root"
#
slotsUpdatesUnsubscribeUnsubscribe from slot-update notifications
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
rootSubscribeSubscribe to receive notification anytime a new root is set by the validator.
#
Parameters:None
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The result is the latest root slot number.
#
rootUnsubscribeUnsubscribe from root notifications
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Result:
#
voteSubscribe - Unstable, disabled by defaultThis subscription is unstable and only available if the validator was started
with the --rpc-pubsub-enable-vote-subscription
flag. The format of this
subscription may change in the future
Subscribe to receive notification anytime a new vote is observed in gossip. These votes are pre-consensus therefore there is no guarantee these votes will enter the ledger.
#
Parameters:None
#
Results:integer
- subscription id (needed to unsubscribe)
#
Example:Request:
Result:
#
Notification Format:The notification will be an object with the following fields:
hash: <string>
- The vote hashslots: <array>
- The slots covered by the vote, as an array of u64 integerstimestamp: <i64 | null>
- The timestamp of the votesignature: <string>
- The signature of the transaction that contained this vote
#
voteUnsubscribeUnsubscribe from vote notifications
#
Parameters:<integer>
- subscription id to cancel
#
Results:<bool>
- unsubscribe success message
#
Example:Request:
Response:
#
JSON RPC API Deprecated Methods#
getConfirmedBlockDEPRECATED: Please use getBlock instead This method is expected to be removed in renec v2.0
Returns identity and transaction information about a confirmed block in the ledger
#
Parameters:<u64>
- slot, as u64 integer<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional)
transactionDetails: <string>
- level of transaction detail to return, either "full", "signatures", or "none". If parameter not provided, the default detail level is "full". - (optional)
rewards: bool
- whether to populate therewards
array. If parameter not provided, the default includes rewards. - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
#
Results:The result field will be an object with the following fields:
<null>
- if specified block is not confirmed<object>
- if block is confirmed, an object with the following fields:blockhash: <string>
- the blockhash of this block, as base-58 encoded stringpreviousBlockhash: <string>
- the blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"parentSlot: <u64>
- the slot index of this block's parenttransactions: <array>
- present if "full" transaction details are requested; an array of JSON objects containing:transaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parametermeta: <object>
- transaction status metadata object, containingnull
or:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transaction- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
signatures: <array>
- present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the blockrewards: <array>
- present if rewards are requested; an array of JSON objects containing:pubkey: <string>
- The public key, as base-58 encoded string, of the account that received the rewardlamports: <i64>
- number of reward lamports credited or debited by the account, as a i64postBalance: <u64>
- account balance in lamports after the reward was appliedrewardType: <string|undefined>
- type of reward: "fee", "rent", "voting", "staking"commission: <u8|undefined>
- vote account commission when the reward was credited, only present for voting and staking rewards
blockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch). null if not available
#
Example:Request:
Result:
#
Example:Request:
Result:
For more details on returned data: Transaction Structure Inner Instructions Structure Token Balances Structure
#
getConfirmedBlocksDEPRECATED: Please use getBlocks instead This method is expected to be removed in renec v2.0
Returns a list of confirmed blocks between two slots
#
Parameters:<u64>
- start_slot, as u64 integer<u64>
- (optional) end_slot, as u64 integer- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
#
Results:The result field will be an array of u64 integers listing confirmed blocks
between start_slot
and either end_slot
, if provided, or latest confirmed block,
inclusive. Max range allowed is 500,000 slots.
#
Example:Request:
Result:
#
getConfirmedBlocksWithLimitDEPRECATED: Please use getBlocksWithLimit instead This method is expected to be removed in renec v2.0
Returns a list of confirmed blocks starting at the given slot
#
Parameters:<u64>
- start_slot, as u64 integer<u64>
- limit, as u64 integer- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
#
Results:The result field will be an array of u64 integers listing confirmed blocks
starting at start_slot
for up to limit
blocks, inclusive.
#
Example:Request:
Result:
#
getConfirmedSignaturesForAddress2DEPRECATED: Please use getSignaturesForAddress instead This method is expected to be removed in renec v2.0
Returns signatures for confirmed transactions that include the given address in
their accountKeys
list. Returns signatures backwards in time from the
provided signature or most recent confirmed block
#
Parameters:<string>
- account address as base-58 encoded string<object>
- (optional) Configuration object containing the following fields:limit: <number>
- (optional) maximum transaction signatures to return (between 1 and 1,000, default: 1,000).before: <string>
- (optional) start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block.until: <string>
- (optional) search until this transaction signature, if found before limit reached.- (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
#
Results:The result field will be an array of transaction signature information, ordered from newest to oldest transaction:
<object>
signature: <string>
- transaction signature as base-58 encoded stringslot: <u64>
- The slot that contains the block with the transactionerr: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsmemo: <string |null>
- Memo associated with the transaction, null if no memo is presentblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available.
#
Example:Request:
Result:
#
getConfirmedTransactionDEPRECATED: Please use getTransaction instead This method is expected to be removed in renec v2.0
Returns transaction details for a confirmed transaction
#
Parameters:<string>
- transaction signature as base-58 encoded string<object>
- (optional) Configuration object containing the following optional fields:- (optional)
encoding: <string>
- encoding for each returned Transaction, either "json", "jsonParsed", "base58" (slow), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in thetransaction.message.instructions
list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts
,data
, andprogramIdIndex
fields). - (optional) Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
#
Results:<null>
- if transaction is not found or not confirmed<object>
- if transaction is confirmed, an object with the following fields:slot: <u64>
- the slot this transaction was processed intransaction: <object|[string,encoding]>
- Transaction object, either in JSON format or encoded binary data, depending on encoding parameterblockTime: <i64 | null>
- estimated production time, as Unix timestamp (seconds since the Unix epoch) of when the transaction was processed. null if not availablemeta: <object | null>
- transaction status metadata object:err: <object | null>
- Error if transaction failed, null if transaction succeeded. TransactionError definitionsfee: <u64>
- fee this transaction was charged, as u64 integerpreBalances: <array>
- array of u64 account balances from before the transaction was processedpostBalances: <array>
- array of u64 account balances after the transaction was processedinnerInstructions: <array|null>
- List of inner instructions ornull
if inner instruction recording was not enabled during this transactionpreTokenBalances: <array|undefined>
- List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transactionpostTokenBalances: <array|undefined>
- List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transactionlogMessages: <array|null>
- array of string log messages ornull
if log message recording was not enabled during this transaction- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
#
Example:Request:
Result:
#
Example:Request:
Result:
#
getFeeCalculatorForBlockhashDEPRECATED: Please use isBlockhashValid or getFeeForMessage instead This method is expected to be removed in renec v2.0
Returns the fee calculator associated with the query blockhash, or null
if the blockhash has expired
#
Parameters:<string>
- query blockhash as a Base58 encoded string<object>
- (optional) Configuration object containing the following fields:- (optional)
commitment: <string>
- Commitment - (optional)
minContextSlot: <number>
- set the minimum slot that the request can be evaluated at.
- (optional)
#
Results:The result will be an RpcResponse JSON object with value
equal to:
<null>
- if the query blockhash has expired<object>
- otherwise, a JSON object containing:feeCalculator: <object>
,FeeCalculator
object describing the cluster fee rate at the queried blockhash
#
Example:Request:
Result:
#
getFeeRateGovernorReturns the fee rate governor information from the root bank
#
Parameters:None
#
Results:The result
field will be an object
with the following fields:
burnPercent: <u8>
, Percentage of fees collected to be destroyedmaxLamportsPerSignature: <u64>
, Largest valuelamportsPerSignature
can attain for the next slotminLamportsPerSignature: <u64>
, Smallest valuelamportsPerSignature
can attain for the next slottargetLamportsPerSignature: <u64>
, Desired fee rate for the clustertargetSignaturesPerSlot: <u64>
, Desired signature rate for the cluster
#
Example:Request:
Result:
#
getFeesDEPRECATED: Please use getFeeForMessage instead This method is expected to be removed in renec v2.0
Returns a recent block hash from the ledger, a fee schedule that can be used to compute the cost of submitting a transaction using it, and the last slot in which the blockhash will be valid.
#
Parameters:<object>
- (optional) Commitment
#
Results:The result will be an RpcResponse JSON object with value
set to a JSON object with the following fields:
blockhash: <string>
- a Hash as base-58 encoded stringfeeCalculator: <object>
- FeeCalculator object, the fee schedule for this block hashlastValidSlot: <u64>
- DEPRECATED - this value is inaccurate and should not be relied uponlastValidBlockHeight: <u64>
- last block height at which the blockhash will be valid
#
Example:Request:
Result:
#
getRecentBlockhashDEPRECATED: Please use getLatestBlockhash instead This method is expected to be removed in renec v2.0
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.
#
Parameters:<object>
- (optional) Commitment
#
Results:An RpcResponse containing a JSON object consisting of a string blockhash and FeeCalculator JSON object.
RpcResponse<object>
- RpcResponse JSON object withvalue
field set to a JSON object including:blockhash: <string>
- a Hash as base-58 encoded stringfeeCalculator: <object>
- FeeCalculator object, the fee schedule for this block hash
#
Example:Request:
Result:
#
getSnapshotSlotDEPRECATED: Please use getHighestSnapshotSlot instead This method is expected to be removed in renec v2.0
Returns the highest slot that the node has a snapshot for
#
Parameters:None
#
Results:<u64>
- Snapshot slot
#
Example:Request:
Result:
Result when the node has no snapshot: