Node JSON RPC API reference
This document provides a complete reference for the Aztec Node JSON RPC API. All methods are exposed via JSON RPC on the node's configured port (default: 8080).
API endpoint
Default URL: http://localhost:8080
Admin URL: http://localhost:8880
(for admin methods)
All methods use standard JSON RPC 2.0 format with methods prefixed by node_
or nodeAdmin_
.
Block queries
node_getBlockNumber
Returns the latest block number synchronized by the node.
Parameters: None
Returns: number
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getBlockNumber","params":[],"id":1}'
node_getProvenBlockNumber
Returns the latest proven block number.
Parameters: None
Returns: number
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getProvenBlockNumber","params":[],"id":1}'
node_getL2Tips
Returns the tips of the L2 chain (latest, pending, proven).
Parameters: None
Returns: Object containing latest
, pending
, and proven
block info
Example:
curl -s -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
| jq -r ".result.proven.number"
node_getBlock
Gets a block by its number.
Parameters:
blockNumber
-number | "latest"
- Block number or "latest"
Returns: L2Block | null
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getBlock","params":[12345],"id":1}'
node_getBlocks
Gets multiple blocks in a range.
Parameters:
from
-number
- Starting block number (≥ 1)limit
-number
- Max blocks to return (1-100)
Returns: L2Block[]
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getBlocks","params":[100,50],"id":1}'
node_getBlockHeader
Gets a block header.
Parameters:
blockNumber
-number | "latest" | undefined
- Block number or omit for latest
Returns: BlockHeader | null
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getBlockHeader","params":["latest"],"id":1}'
Transaction operations
node_sendTx
Submits a transaction to the P2P mempool.
Parameters:
tx
-Tx
- The transaction object
Returns: void
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_sendTx","params":[{"data":"0x..."}],"id":1}'
node_getTxReceipt
Gets a transaction receipt.
Parameters:
txHash
-string
- Transaction hash (32-byte hex)
Returns: TxReceipt
- Receipt with status (mined, pending, or dropped)
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getTxReceipt","params":["0x1234..."],"id":1}'
node_getTxEffect
Gets the transaction effect for a given transaction.
Parameters:
txHash
-string
- Transaction hash
Returns: IndexedTxEffect | null
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getTxEffect","params":["0x1234..."],"id":1}'
node_getTxByHash
Gets a single pending transaction by hash.
Parameters:
txHash
-string
- Transaction hash
Returns: Tx | null
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getTxByHash","params":["0x1234..."],"id":1}'
node_getPendingTxs
Gets pending transactions from the mempool.
Parameters:
limit
-number | undefined
- Max txs to return (1-100, default: 100)after
-string | undefined
- Return txs after this tx hash
Returns: Tx[]
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getPendingTxs","params":[50],"id":1}'
node_getPendingTxCount
Gets the count of pending transactions.
Parameters: None
Returns: number
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getPendingTxCount","params":[],"id":1}'
node_isValidTx
Validates a transaction for correctness.
Parameters:
tx
-Tx
- Transaction to validateoptions
-object | undefined
- Options:isSimulation
,skipFeeEnforcement
Returns: TxValidationResult
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_isValidTx","params":[{"data":"0x..."},{"isSimulation":true}],"id":1}'
node_simulatePublicCalls
Simulates the public part of a transaction.
Parameters:
tx
-Tx
- Transaction to simulateskipFeeEnforcement
-boolean | undefined
- Skip fee enforcement
Returns: PublicSimulationOutput
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_simulatePublicCalls","params":[{"data":"0x..."},false],"id":1}'
State queries
node_getPublicStorageAt
Gets public storage value at a contract slot.
Parameters:
blockNumber
-number | "latest"
- Block numbercontract
-string
- Contract address (32-byte hex)slot
-string
- Storage slot (32-byte hex)
Returns: string
- Storage value (32-byte hex)
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getPublicStorageAt","params":["latest","0x1234...","0x0000..."],"id":1}'
node_getWorldStateSyncStatus
Gets the sync status of the node's world state.
Parameters: None
Returns: WorldStateSyncStatus
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getWorldStateSyncStatus","params":[],"id":1}'
Merkle tree queries
node_findLeavesIndexes
Finds indexes of leaves in a merkle tree.
Parameters:
blockNumber
-number | "latest"
- Block numbertreeId
-number
- Tree ID (0-6)leafValues
-string[]
- Leaf values (max 1000, 32-byte hex each)
Tree IDs:
0
- NULLIFIER_TREE1
- NOTE_HASH_TREE2
- PUBLIC_DATA_TREE3
- L1_TO_L2_MESSAGE_TREE4
- ARCHIVE5
- BLOCKS_TREE
Returns: Array of leaf indexes with block metadata
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_findLeavesIndexes","params":["latest",1,["0x1234...","0x5678..."]],"id":1}'
node_getNullifierSiblingPath
Gets sibling path for a nullifier tree leaf.
Parameters:
blockNumber
-number | "latest"
- Block numberleafIndex
-string
- Leaf index (bigint as string)
Returns: string[]
- Sibling path
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getNullifierSiblingPath","params":[12345,"100"],"id":1}'
node_getNoteHashSiblingPath
Gets sibling path for a note hash tree leaf.
Parameters:
blockNumber
-number | "latest"
- Block numberleafIndex
-string
- Leaf index (bigint as string)
Returns: string[]
- Sibling path
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getNoteHashSiblingPath","params":["latest","100"],"id":1}'
node_getArchiveSiblingPath
Gets sibling path for an archive tree leaf.
Parameters:
blockNumber
-number | "latest"
- Block numberleafIndex
-string
- Leaf index (bigint as string)
Returns: string[]
- Sibling path
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":[12345,"50"],"id":1}'
node_getPublicDataSiblingPath
Gets sibling path for a public data tree leaf.
Parameters:
blockNumber
-number | "latest"
- Block numberleafIndex
-string
- Leaf index (bigint as string)
Returns: string[]
- Sibling path
Example:
curl -X POST http://localhost:8080 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getPublicDataSiblingPath","params":["latest","200"],"id":1}'