Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nhestrompia/shielded-x402/llms.txt

Use this file to discover all available pages before exploring further.

The sequencer periodically commits authorization batches to a Merkle tree and posts the root on-chain. These endpoints allow you to track commitments and generate inclusion proofs for authorizations.

Get latest commitment

/v1/commitments/latest
GET
Retrieve the most recent commitment epoch.

Response

latestEpochId
string
required
Uint64 string of the latest epoch ID. Returns 0 if no commitments exist.
root
string
required
32-byte hex Merkle root of the commitment. Returns zero hash if no commitments exist.
count
number
Number of authorization leaves in this epoch.
prevRoot
string
32-byte hex root of the previous epoch.
sequencerKeyId
string
Identifier of the sequencer key that created the commitment.
postedAt
string
Uint64 Unix timestamp when the commitment was posted on-chain. Null if not yet posted.
postedTxHash
string
Transaction hash of the on-chain commitment post. Null if not yet posted.

Example

curl --request GET \
  --url https://sequencer.example.com/v1/commitments/latest
{
  "latestEpochId": "42",
  "root": "0xaabbccdd11223344556677889900aabbccdd11223344556677889900aabbccdd",
  "count": 150,
  "prevRoot": "0x1122334455667788990011223344556677889900112233445566778899001122",
  "sequencerKeyId": "seq-key-1",
  "postedAt": "1735689900",
  "postedTxHash": "0x9988776655443322119988776655443322119988776655443322119988776655"
}

Get inclusion proof

/v1/commitments/proof
GET
Generate a Merkle inclusion proof for a specific authorization.

Query parameters

authId
string
required
32-byte hex identifier of the authorization to generate a proof for.

Response

epochId
string
required
Uint64 string of the epoch containing this authorization.
root
string
required
32-byte hex Merkle root of the commitment epoch.
leafHash
string
required
32-byte hex hash of the authorization leaf.
merkleProof
array
required
Array of 32-byte hex sibling hashes for the Merkle proof.
leafIndex
number
required
Zero-based index of the leaf in the Merkle tree.
logSeqNo
string
required
Uint64 string of the authorization’s sequence number in the append-only log.
prevRoot
string
required
32-byte hex root of the previous epoch.
authId
string
required
32-byte hex identifier of the authorization.
leafSalt
string
required
32-byte hex salt used in the leaf computation (derived from sequencer secret).
sequencerKeyId
string
required
Identifier of the sequencer key.
commitTxHash
string
Transaction hash of the on-chain commitment. Only present if the commitment has been posted.

Error codes

CodeDescription
NOT_FOUNDAuthorization not found or not yet committed
authorization not foundAuthId doesn’t exist
authorization leaf not foundLeaf data missing
authorization not committed yetAuthorization hasn’t been included in a commitment epoch
commitment epoch not foundEpoch data missing
commitment root mismatch for epochInternal consistency error in Merkle tree

Example

curl --request GET \
  --url 'https://sequencer.example.com/v1/commitments/proof?authId=0x1122334455667788990011223344556677889900112233445566778899001122'
{
  "epochId": "42",
  "root": "0xaabbccdd11223344556677889900aabbccdd11223344556677889900aabbccdd",
  "leafHash": "0x5566778899001122334455667788990011223344556677889900112233445566",
  "merkleProof": [
    "0x1111111111111111111111111111111111111111111111111111111111111111",
    "0x2222222222222222222222222222222222222222222222222222222222222222",
    "0x3333333333333333333333333333333333333333333333333333333333333333"
  ],
  "leafIndex": 73,
  "logSeqNo": "1542",
  "prevRoot": "0x1122334455667788990011223344556677889900112233445566778899001122",
  "authId": "0x1122334455667788990011223344556677889900112233445566778899001122",
  "leafSalt": "0x4444444444444444444444444444444444444444444444444444444444444444",
  "sequencerKeyId": "seq-key-1",
  "commitTxHash": "0x9988776655443322119988776655443322119988776655443322119988776655"
}

Build docs developers (and LLMs) love