Documentation Index
Fetch the complete documentation index at: https://docs.soo.network/llms.txt
Use this file to discover all available pages before exploring further.
getBlock RPC Method
Returns identity and transaction information about a confirmed block in the ledger.
Parameters
u64 required
Slot number, as u64 integerobject optional
Configuration object containing the following fields:encoding string optional
-
Default:
json
-
Encoding format for each returned Transaction
-
Values:
json, jsonParsed, base58, base64
transactionDetails string optional
-
Default:
full
-
Level of transaction detail to return
-
Values:
full, accounts, signatures, none
rewards bool optional
-
Whether to populate the rewards array
-
Default includes rewards
commitment string optional
-
Default:
finalized
-
Note: processed is not supported
Code Sample
curl https://rpc.testnet.soo.network/rpc \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlock",
"params": [
369624,
{
"encoding": "json",
"transactionDetails": "full",
"rewards": true,
"commitment": "finalized"
}
]
}'
Response
{
"jsonrpc": "2.0",
"result": {
"blockHeight": 369624,
"blockTime": 1734675806,
"blockhash": "11111111111111111111111111111111",
"parentSlot": 369623,
"previousBlockhash": "11111111111111111111111111111111",
"rewards": [],
"transactions": [
{
"meta": {
"computeUnitsConsumed": 3035,
"err": null,
"fee": 0,
"innerInstructions": [],
"loadedAddresses": {
"readonly": [],
"writable": []
},
"logMessages": [
"Program L1BLockinfo11111111111111111111111111111111 invoke [1]",
"Program log: Instruction: UpdateL1BlockInfo",
"Program L1BLockinfo11111111111111111111111111111111 consumed 3035 of 200000 compute units",
"Program L1BLockinfo11111111111111111111111111111111 success"
],
"postBalances": [1, 95004, 57072],
"postTokenBalances": [],
"preBalances": [1, 95004, 57072],
"preTokenBalances": [],
"rewards": [],
"status": {"Ok": null}
},
"transaction": {
"message": {
"accountKeys": [
"NoSigTxPayer1111111111111111111111111111111",
"5ThJTCxpdn54bk3gBAWKZS4K9ogHEX56WooYbXQDnm3Q",
"L1BLockinfo11111111111111111111111111111111"
],
"header": {
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 1,
"numRequiredSignatures": 1
},
"recentBlockhash": "11111111111111111111111111111111"
},
"signatures": [
"1111111111111758YvxNHh7sR7pt4JS6fWMn55ks1tzfsZDjoszC7jzrQjBUKkDw7W5mxz9VSZsztWNGWkf"
]
}
}
]
},
"id": 1
}
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