getBlock RPC Method
Returns identity and transaction information about a confirmed block in the ledger.Parameters
u64 requiredSlot number, as u64 integer
object optionalConfiguration object containing the following fields:encoding
string optional-
Default:
json - Encoding format for each returned Transaction
-
Values:
json,jsonParsed,base58,base64
string optional-
Default:
full - Level of transaction detail to return
-
Values:
full,accounts,signatures,none
bool optional- Whether to populate the rewards array
- Default includes rewards
string optional-
Default:
finalized - Note: processed is not supported
Result Details
The result field will be:-
<null>- if specified block is not confirmed -
<object>- if block is confirmed, containing:-
blockhash: <string>- the blockhash of this block -
previousBlockhash: <string>- the blockhash of this block’s parent -
parentSlot: <u64>- the slot index of this block’s parent -
transactions: <array>- array of transactions containing:-
transaction: <object>- transaction object with message and signatures -
meta: <object>- transaction metadata including:-
err: <object|null>- error if transaction failed -
computeUnitsConsumed: <number>- compute units used -
logMessages: <array>- program log messages
-
-
-
blockTime: <i64|null>- estimated production time -
blockHeight: <u64|null>- number of blocks beneath this block
-