Overview
Various Solana RPC methods return structured JSON objects with well-defined fields and nested data. This page documents the shared JSON data structures reused across Solana RPC responses. Start with the top-level structure returned by the RPC method you are using, then follow the linked sections for any nested objects it contains.| Reference | Details |
|---|---|
| Type definitions | transaction-status-client-types; rpc-client-types; account-decoder-client-types |
| Serialization behavior | transaction-status; rpc |
Top-Level Response Objects
Confirmed Blocks
Block-oriented RPC methods such asgetBlock return confirmed blocks in this
structure:
| Reference | Details |
|---|---|
| Returned by | getBlock; the block field in blockSubscribe notifications |
| Response path | result in getBlock; params.result.value.block in blockSubscribe |
| Type Definition | UiConfirmedBlock |
previousBlockhash
The previous block’s blockhash, as a base-58 encoded string.
blockhash
This block’s blockhash, as a base-58 encoded string.
parentSlot
Slot index of this block’s parent.
transactions
Transactions included in the block. Each entry uses the structure documented in
Encoded Transaction Responses. Present when
transactionDetails is "full" or "accounts".rewards
Rewards recorded for the block. Present when block rewards are requested;
omitted otherwise. Uses the structure documented in Rewards.
numRewardPartitions
Number of reward partitions in the block, when available.
blockTime
Estimated production time of the block as a Unix timestamp.
blockHeight
Block height of this block, if available.
signatures
Transaction signatures only. Present when
transactionDetails is
"signatures".Confirmed Transaction Responses
getTransaction returns a confirmed transaction in this structure:
| Reference | Details |
|---|---|
| Returned by | getTransaction |
| Response path | result |
| Type Definition | EncodedConfirmedTransactionWithStatusMeta |
slot
Slot that contains this transaction.
transaction
Encoded transaction payload. Uses the structure documented in
Encoded Transaction Responses.
meta
Transaction metadata, or
null if metadata is unavailable. Uses the structure
documented in Transaction Status Metadata.version
Transaction version. Omitted when version information is not available,
including legacy transactions when
maxSupportedTransactionVersion is not set.
Versioned transactions serialize as a numeric version.blockTime
Estimated production time of the block that contains this transaction, as a Unix
timestamp.
transactionIndex
Position of the transaction in its block, starting at
0. Omitted by nodes
running Agave before v4.0.Simulation Results
simulateTransaction returns this object inside result.value.
sendTransaction preflight failures use the same structure inside error.data.
Preflight failures return a sparser subset of fields, with several fields set to
null:
| Reference | Details |
|---|---|
| Returned by | simulateTransaction; sendTransaction preflight failures in error.data |
| Response path | result.value in simulateTransaction; error.data in sendTransaction preflight failures |
| Type Definitions | RpcSimulateTransactionResult, RpcBlockhash, UiAccount |
accounts
Post-simulation snapshots for the addresses requested in
simulateTransaction.accounts.addresses. Each element corresponds to the same
index in the request and is either null or an account object using the same
schema documented in Account Data. The data field depends on
the requested account encoding.err
Simulation error. Uses the structure documented in
Transaction Errors.
null indicates success.innerInstructions
Inner instructions captured during simulation.
null unless CPI recording was
requested. Uses the structure documented in
Inner Instructions. By default each instruction is in the
JSON Parsed form, either fully parsed or partially decoded. With
innerInstructionsEncoding: "json", every instruction is a compiled instruction
with account indexes.loadedAccountsDataSize
Total number of account-data bytes loaded while simulating the transaction.
logs
Program log output captured during simulation. This field is
null if the
simulation failed before execution began; otherwise, it is an array that may be
empty.replacementBlockhash
Replacement blockhash the RPC node used when
replaceRecentBlockhash was
enabled.returnData
Most recent instruction return data captured during simulation. Uses the
structure documented in Return Data.
unitsConsumed
Compute units consumed during simulation.
fee
Fee charged for the simulated transaction.
null if simulation failed before
fee calculation completed.preBalances
Lamport balances before simulation, indexed to the transaction account list.
postBalances
Lamport balances after simulation, indexed to the transaction account list.
postTokenBalances
Token balances after simulation. Uses the structure documented in
Token Balances.
preTokenBalances
Token balances before simulation. Uses the structure documented in
Token Balances.
loadedAddresses
Loaded account addresses resolved from lookup tables.
simulateTransaction
currently serializes this field as an object, using empty arrays when no
addresses were loaded. sendTransaction preflight failures may return null
for this field in error.data. Uses the structure documented in
Loaded Addresses.Shared Structures
Encoded Transaction Responses
Transaction-oriented RPC methods embed transactions in an encoded wrapper using this structure:| Reference | Details |
|---|---|
| Included in | transactions[] in Confirmed Blocks; the shared transaction, meta, and version fields in Confirmed Transaction Responses |
| Response path | transactions[] in confirmed blocks; result.transaction, result.meta, and result.version in confirmed transaction responses |
| Type Definition | EncodedTransactionWithStatusMeta |
transaction
Encoded transaction payload. For JSON encodings, this uses the structures
documented in Transactions or
Accounts Only Transaction Responses. For
binary encodings, this is a base-58/base-64 string or a
[string, encoding]
tuple.meta
Transaction metadata, or
null if metadata is unavailable. Uses the structure
documented in Transaction Status Metadata. In
accounts mode block responses, some metadata fields are intentionally omitted,
including innerInstructions, logMessages, loadedAddresses, returnData,
computeUnitsConsumed, and costUnits.version
Transaction version. Omitted when version information is not available,
including legacy transactions when
maxSupportedTransactionVersion is not set.
Versioned transactions serialize as a numeric version.Transactions
Transactions are quite different from those on other blockchains. Be sure to review Anatomy of a Transaction to learn about transactions on Solana.| Reference | Details |
|---|---|
| Included in | Encoded Transaction Responses; the transaction field in Confirmed Transaction Responses |
| Response path | transaction |
| Type Definitions | UiTransaction, UiMessage, UiRawMessage, UiParsedMessage |
| Encoding | Message shape | Instruction shape | Notes |
|---|---|---|---|
json | UiRawMessage | Compiled instructions | accountKeys are base-58 strings. Versioned messages describe lookup tables in addressTableLookups, with resolved loaded addresses reported separately in metadata. |
jsonParsed | UiParsedMessage | Parsed or partially decoded instructions | accountKeys are objects, and parsed versioned responses include lookup-table accounts. |
transactionConfig object holding the
transaction’s resource limits (requests must set
maxSupportedTransactionVersion: 1 to receive v1 transactions):
transactionConfigis present only for v1 messages — it is absent entirely (nevernull) for legacy and v0.- Unset inner fields are explicit
null, not omitted. priorityFeeis a total in lamports, not micro-lamports per compute unit.addressTableLookupsis omitted for v1 messages, which do not support address lookup tables.
JSON
The JSON structure of a transaction is defined as follows:message
Defines the content of the transaction.
signatures
A list of base-58 encoded signatures applied to the transaction. The list is
always of length
message.header.numRequiredSignatures and not empty. The
signature at index i corresponds to the public key at index i in
message.accountKeys. The first one is used as the
transaction id.JSON Parsed
The JSON parsed structure of a transaction follows a similar structure to the regular JSON format, with additional parsing of account and instruction information:message
Defines the content of the transaction.
signatures
A list of base-58 encoded signatures applied to the transaction.
Accounts Only Transaction Responses
When a block is requested withtransactionDetails: "accounts", the response
returns transaction account metadata in this structure:
| Reference | Details |
|---|---|
| Included in | Encoded Transaction Responses when transactionDetails: "accounts" |
| Response path | transaction |
| Type Definition | UiAccountsList |
signatures
Transaction signatures in wire order.
accountKeys
Parsed account metadata for each transaction account. Uses the structure
documented in Parsed Accounts.
Account Data
RPC methods and subscriptions that return account data use this structure:| Reference | Details |
|---|---|
| Returned by | getAccountInfo; getMultipleAccounts; the value field in accountSubscribe notifications |
| Response path | result.value; result.value[]; params.result.value |
| Type Definitions | UiAccount, UiAccountData, UiAccountEncoding, ParsedAccount |
| Reference | Details |
|---|---|
| Included in | Simulation Results; the account field in response objects returned by getProgramAccounts, getTokenAccountsByOwner, getTokenAccountsByDelegate, and programSubscribe |
| Response path | result.value.accounts[]; result[].account; result.value[].account; params.result.value.account |
JSON
data
Account data. If the requested encoding is
binary, this is a plain base-58
string. If the encoding is base58, base64, or base64+zstd, this is
[data, encoding].executable
Whether the account contains a program and is therefore read-only.
lamports
Lamports assigned to this account.
owner
Program owner pubkey, as a base-58 encoded string.
rentEpoch
Epoch at which this account next owes rent.
space
Account data size in bytes. Current Solana RPC responses populate this field for
encoded account responses.
JSON Parsed
WhenjsonParsed encoding is requested, the data field uses this parsed
wrapper when a parser is available:
data
Parsed account data wrapper. When a parser is available, this is
{program, parsed, space}. If jsonParsed is requested but no parser is
available, the RPC node falls back to [data, "base64"].executable
Whether the account contains a program and is therefore read-only.
lamports
Lamports assigned to this account.
owner
Program owner pubkey, as a base-58 encoded string.
rentEpoch
Epoch at which this account next owes rent.
space
Account data size in bytes. Current Solana RPC responses populate this field for
encoded account responses.
Parsed Accounts
Parsed transaction and accounts only responses represent account keys in this structure:| Reference | Details |
|---|---|
| Included in | Transactions; Accounts Only Transaction Responses |
| Response path | message.accountKeys[] in parsed transactions; accountKeys[] in accounts only responses |
| Type Definitions | ParsedAccount, ParsedAccountSource |
pubkey
Account address, as a base-58 encoded string.
signer
Whether this account signed the transaction.
source
Source of the account metadata. This field is
transaction for static message
accounts and lookupTable for loaded lookup-table accounts in
transaction/accounts responses.writable
Whether the transaction marks this account writable.
Address Table Lookups
Versioned transaction messages may include address table lookups:| Reference | Details |
|---|---|
| Included in | Transactions |
| Response path | message.addressTableLookups[] |
| Type Definition | UiAddressTableLookup |
addressTableLookups
List of address table lookups used by a versioned transaction to dynamically
load account addresses.
Transaction Status Metadata
Transaction execution metadata is returned in this structure:| Reference | Details |
|---|---|
| Included in | Encoded Transaction Responses; Confirmed Transaction Responses |
| Response path | meta |
| Type Definition | UiTransactionStatusMeta |
json / full covers full metadata responses in raw JSON form, including
getTransaction responses with encoding: "json" and block responses with
transactionDetails: "full". jsonParsed covers parsed transaction responses,
and accounts covers block responses with transactionDetails: "accounts".
| Field | json / full | jsonParsed | accounts |
|---|---|---|---|
innerInstructions | array | null | array | null | omitted |
logMessages | array | null | array | null | omitted |
loadedAddresses | object | omitted | omitted |
returnData | object | undefined | object | undefined | omitted |
computeUnitsConsumed | u64 | undefined | u64 | undefined | omitted |
costUnits | u64 | undefined | u64 | undefined | omitted |
rewards | array | null | array | null | array | null | omitted |
accounts responses, rewards is omitted when showRewards is false.
Otherwise it serializes as an array or null.
meta
Transaction Errors
Transaction errors serialize as a string or a variant-tagged object:| Reference | Details |
|---|---|
| Included in | Transaction Status Metadata; Simulation Results |
| Response path | err |
| Type Definition | UiTransactionError |
transactionError
Serialized transaction error value.
transactionError
Serialized transaction error value.
Inner Instructions
When an instruction in a transaction makes a cross-program invocation (CPI), the invoked instructions are detailed underinnerInstructions.
| Reference | Details |
|---|---|
| Included in | Transaction Status Metadata; Simulation Results |
| Response path | innerInstructions |
| Type Definitions | UiCompiledInstruction, UiInstruction, UiParsedInstruction, UiPartiallyDecodedInstruction, UiInnerInstructions |
index: u8– Index of the instruction attransaction.message.instructions[index]that made the CPI.instructions: array[object]– List of CPI instructions invoked by the instruction atindex, encoded as Json or JsonParsed objects.
json returns compiled instructions with account indexes, while jsonParsed
returns parsed or partially decoded instructions with base-58 encoded addresses.
Simulation Results use the JSON Parsed form unless
innerInstructionsEncoding is set to json.
JSON Parsed
innerInstructions
JSON
innerInstructions
Token Balances
The JSON structure of token balances is defined as a list of objects in the following structure:| Reference | Details |
|---|---|
| Included in | Transaction Status Metadata; Simulation Results |
| Response path | preTokenBalances[], postTokenBalances[] |
| Type Definitions | UiTransactionTokenBalance, UiTokenAmount |
postTokenBalances
preTokenBalances
Rewards
Transaction and block metadata may include rewards:| Reference | Details |
|---|---|
| Included in | Confirmed Blocks; Transaction Status Metadata |
| Response path | rewards[] |
| Type Definition | Reward |
rewards
Rewards applied while processing a transaction or block.
Loaded Addresses
Transaction metadata may include loaded addresses resolved from lookup tables:| Reference | Details |
|---|---|
| Included in | Transaction Status Metadata; Simulation Results |
| Response path | loadedAddresses |
| Type Definition | UiLoadedAddresses |
loadedAddresses
Loaded account addresses resolved from lookup tables.
Return Data
Transaction metadata may include return data from the most recent instruction that generated it:| Reference | Details |
|---|---|
| Included in | Transaction Status Metadata; Simulation Results |
| Response path | returnData |
| Type Definitions | UiTransactionReturnData, UiReturnDataEncoding |
returnData
Most recent return data generated by an instruction in the transaction.