Skip to main content

RPC Response Types

Detailed JSON schemas for all RPC response objects.

BlockResponse

Returned by chain_getBlock, chain_getBlockByNumber, chain_getBlockByHash, chain_getLatestBlock.

{
"hash": "0a1b2c...",
"height": 42,
"timestamp": 1710000000,
"parent_hash": "ff0011...",
"state_root": "abc123...",
"tx_root": "def456...",
"proposer": "aabbcc...",
"version": 1,
"transaction_count": 15
}
FieldTypeDescription
hashstringBlock hash (hex, 128 chars = 64 bytes SHA-512)
heightu64Block number
timestampu64Unix timestamp (seconds)
parent_hashstringParent block hash (hex)
state_rootstringState root hash (hex, 64 chars)
tx_rootstringTransaction root hash (hex, 64 chars)
proposerstringProposer public key (hex, 64 chars)
versionu32Block format version
transaction_countu64Number of transactions in the block

AccountResponse

Returned by account_getAccount, account_getBalance, account_getNonce.

{
"address": "aabbcc...",
"balance": "1000000000000000000",
"nonce": 5
}
FieldTypeDescription
addressstringAccount address (hex, 64 chars = 32-byte ed25519 pubkey)
balancestringBalance in smallest unit (u128 as decimal string, 18 decimals)
nonceu64Current transaction nonce

TransactionResponse

Returned by tx_getTransaction.

{
"hash": "aabbcc...",
"from": "112233...",
"to": "445566...",
"amount": 1000,
"nonce": 1,
"fee": 1000000000000000,
"timestamp": 1710000000,
"block_height": 42
}
FieldTypeDescription
hashstringTransaction hash (hex)
fromstringSender address (hex)
tostringRecipient address (hex)
amountu64Transfer amount
nonceu64Sender nonce at time of submission
feeu128?Transaction fee (optional)
timestampu64?Block timestamp if confirmed
block_heightu64?Block height if confirmed

TransactionReceiptResponse

Returned by tx_getTransactionReceipt.

{
"hash": "aabbcc...",
"from": "112233...",
"to": "445566...",
"amount": 1000,
"fee": 1000000000000000,
"block_height": 42,
"block_hash": "ff0011...",
"timestamp": 1710000000,
"status": "confirmed"
}

Status values: "confirmed", "pending", "not_found".

HealthResponse

Returned by savitri_health.

{
"status": "ok",
"service": "savitri-rpc",
"mode": "lightnode"
}

Mode values: "lightnode", "masternode", "unknown".

PouLocalResponse

Returned by pou_getConsensusState / savitri_pouLocal.

{
"local_score": 750,
"leader": "12Dxyz...",
"leader_score": 920,
"epoch": 15,
"local_is_leader": false,
"election_ready": true
}
FieldTypeDescription
local_scoreu16?This node's PoU score (0-1000)
leaderstring?Current leader peer ID
leader_scoreu16?Leader's PoU score
epochu64?Current epoch number
local_is_leaderboolWhether this node is the current leader
election_readyboolWhether an election can run

PouPeersResponse

Returned by savitri_pouPeers.

{
"peers": {
"12D3KooW...abc": 750,
"12D3KooW...def": 820
}
}

NodeInfoResponse

Returned by net_nodeInfo.

{
"node_id": "12D3KooW...",
"protocol_version": "1.0.0",
"network": "savitri-testnet",
"listening": true,
"peer_count": 14,
"block_height": 42,
"syncing": false,
"mode": "lightnode"
}

MempoolSizeResponse

Returned by mempool_getSize.

{
"pending": 150,
"queued": 30
}

TokenInfoResponse

Returned by token_getTokenInfo.

{
"token_id": "savt",
"name": "Savitri Test Token",
"symbol": "TEST",
"decimals": 18,
"total_supply": "100000000000000000000000000"
}

FaucetClaimResponse

Returned by savitri_faucetClaim.

{
"tx_hash": "0xabc...",
"amount": "5000000000000000000"
}

Amount is 5 SAVT (5 * 10^18 smallest units).

SyncingResponse

Returned by savitri_syncing.

{
"syncing": true,
"current_block": 100,
"highest_block": 500
}

MonolithInfoResponse

Returned by savitri_getMonolithHead.

{
"exec_height": 1000,
"window_start": 900,
"epoch_id": 5,
"block_count": 100,
"size_bytes": 524288,
"monolith_id": "mono_1000",
"produced_at_ms": 1710000000000,
"cosignature_count": 3
}