GET /block to retrieve the transactions included in a specific block by its header hash, and GET /stateQueue to inspect the linked list of committed block headers that lives on L1. Together they give you visibility into both individual block contents and the overall progression of the L2 chain.
GET /block and GET /stateQueue are available on full (monolith) nodes only. The related GET /stateQueue/root-unit-diagnostics is also served by api-role nodes and is useful for health monitoring without performing a full state-queue fetch.GET /block — Query Block Transactions
Retrieve the list of transaction hashes included in a Sundial L2 block, identified by its 56-character header hash. The node looks up the block and returns the hashes of every transaction committed to that block.Query Parameters
string
required
The 56-character hex block header hash. Must be a valid hex string of exactly 56 characters — not 64 (which is a transaction hash length). Block header hashes on Sundial are 28 bytes, represented as 56 hex characters.
Example
Responses
- Success (200)
- Invalid Hash (400)
- Not Found
hashes is a 64-character hex transaction hash. An empty hashes array indicates a block with no transactions. Use each hash with GET /tx to retrieve the full CBOR of individual transactions.Fetching Full Transactions for a Block
CombineGET /block with GET /tx to retrieve complete transaction data for every transaction in a block:
GET /stateQueue — Query the L1 State Queue
Fetch the current state-queue linked list from L1. The state queue is an on-chain data structure that tracks every block header committed by L2 operators. Each entry in the queue corresponds to one committed L2 block and records the header hash that anchors it to the Sundial chain. The endpoint fetches state-queue UTxOs from the settlement L1 via the Sundial SDK, logs a visual representation server-side, and returns the non-empty header keys.Example
Response
headers is a 56-character hex block header hash representing a committed block on the state queue.
GET /stateQueue/root-unit-diagnostics — State Queue Health
Check the health of the state-queue root unit — the single on-chain token that anchors the entire state-queue linked list. This endpoint is available on both full nodes andapi-role nodes, making it suitable for automated monitoring and alerting.
Example
Responses
- Healthy (200)
- Invalid (200)
- Provider Error (503)
status of "ok" with count: 1 means the state queue has exactly one root unit, which is the healthy state.Operator Endpoints
The following endpoints are intended for node operators and are only available on full (monolith) nodes unless noted.GET /stateQueue/repair-root-units
Burn duplicate state-queue root units when the root-unit count is greater than 1. This is a targeted repair operation — faster than a full node reset when only the root unit count is wrong. After a successful repair, the root unit count is brought to0; run GET /init once afterward to mint a fresh single root unit.
GET /commitment-wallet/balance
Return the lovelace balance of the block-commitment operator wallet. This endpoint is available on both full nodes andapi-role nodes and is useful for alerting when the commitment wallet is running low.
Block Lifecycle
Understanding where a block sits in its lifecycle helps you interpret state-queue and block query results:Pending — committed to L1, awaiting maturity
Pending — committed to L1, awaiting maturity
An operator has submitted the block header to the L1 state queue, but the block has not yet reached its maturity window. During this period, Watchers (Provers) can submit fraud proofs if the block is invalid. The header hash is present in
GET /stateQueue output.Mature — eligible for merging into confirmed state
Mature — eligible for merging into confirmed state
The maturity window has elapsed without a successful fraud proof. The block’s transactions are finalized and its outputs are spendable. The operator can now trigger a merge to consolidate the block into confirmed state.
Merged — incorporated into confirmed ledger state
Merged — incorporated into confirmed ledger state
The block has been merged into the Sundial confirmed state. Its transactions are permanently recorded and reachable via
GET /block.The Sundial L2 uses an optimistic rollup model — blocks are considered valid by default and only rolled back if a fraud proof is successfully submitted during the maturity window. This means a transaction visible in a pending block is not yet finalized. Wait for the block to reach mature or merged status before treating outputs as settled.