Skip to main content

Proofs & State


Get Proof for a Name

Retrieve the SP1 zero-knowledge proof for a name's registration.

GET /v1/proof/{name}
curl https://zns-server-production.up.railway.app/v1/proof/alice

Response 200 OK

{
"name": "alice",
"status": "proved",
"block_height": 2920000,
"old_root": "0000000000000000...",
"new_root": "a3b2c1d4e5f6...",
"proof": "base64-encoded-sp1-proof...",
"proof_size_bytes": 260
}
FieldTypeDescription
namestringThe name this proof covers
statusstring"pending" or "proved"
block_heightnumberBlock containing the registration
old_rootstringMerkle root before this registration (hex)
new_rootstringMerkle root after this registration (hex)
proofstring | nullBase64-encoded SP1 compressed proof
proof_size_bytesnumber | nullProof size in bytes
info

Each proof's old_root equals the previous proof's new_root, forming a verifiable chain. See The Proof Chain.


Pending Proofs

Registrations processed but not yet proven.

GET /v1/proofs/pending
curl https://zns-server-production.up.railway.app/v1/proofs/pending

Response 200 OK

{
"pending_count": 2,
"proofs": [
{ "name": "bob", "block_height": 2920050, "status": "pending" }
]
}

State Root

The current Merkle tree root -- represents the complete registry state.

GET /v1/state/root
curl https://zns-server-production.up.railway.app/v1/state/root

Response 200 OK

{
"block_height": 2920100,
"smt_root": "a3b2c1d4e5f6...",
"total_registrations": 42
}

Two independent indexers processing the same blocks must produce the same smt_root.


Status

Scanner and network state.

GET /v1/status
curl https://zns-server-production.up.railway.app/v1/status

Response 200 OK

{
"scanner_height": 2920100,
"chain_height": 2920105,
"total_registrations": 42,
"smt_root": "a3b2c1d4e5f6...",
"escrow_address": "u1escrow...addr"
}
FieldTypeDescription
scanner_heightnumberLast block processed
chain_heightnumberLatest block on chain
total_registrationsnumberTotal names registered
smt_rootstringCurrent Merkle tree root (hex)
escrow_addressstring | nullEscrow address for marketplace
warning

If scanner_height is significantly behind chain_height, recent registrations may not be reflected yet.