Skip to Content
Indexer & RPCJSON-RPC Reference

JSON-RPC Reference

The ZNS indexer exposes a read-only JSON-RPC 2.0 API with four methods: resolve, list_for_sale, status, and events.

The canonical spec is openrpc.json, also served at /openrpc.json. Use the explorer below to hit a live indexer, or point any OpenRPC code generator  at the spec URL to scaffold a typed client.

For curl and language examples without the SDK, see Direct RPC. For signature verification, see Signature Scheme.

Hosted endpoints:

NetworkURL
Testnethttps://light.zcash.me/zns-testnet
Mainnet (beta)https://light.zcash.me/zns-mainnet-test
OpenRPC 1.3.2

ZNS Indexer API

v0.1.0 · MIT
openrpc.json
Local: http://127.0.0.1:3000

resolve

Look up a name or address registration

Resolves a ZNS registration by name or by Zcash unified address. If the query is a valid Zcash address, returns an array of all registrations bound to that address (one address may own multiple names). If the query is a name, returns a single registration object or null if not found.

Parameters

NameTypeRequiredDescription
querystringyesA ZNS name (e.g. "alice") or a Zcash unified address

Result - registration

For name queries: a single ResolveResult or null. For address queries: an array of ResolveResult.

one of
ResolveResult
Registration
FieldTypeDescription
name*stringThe registered name. Must be 1-62 characters of lowercase ASCII letters and digits only. No hyphens, no underscores, no unicode. Used verbatim in signature pre-images.
address*stringZcash unified address bound to this name. Used verbatim (byte-for-byte) in signature pre-images.
txid*stringTransaction ID of the registration memo
height*integerBlock height at which the registration was confirmed
nonce*integerReplay-protection counter, incremented on each UPDATE/DELIST. Reset to 0 on BUY. Used verbatim (decimal ASCII) in signature pre-images for UPDATE and DELIST.
signaturestring | nullEd25519 admin signature over the most recent action that wrote this row, encoded as standard base64 with padding (88 characters). The pre-image template is determined by `last_action`. See the 'Signature Verification' section in the API description for encoding rules, all templates, and the full verification procedure.
last_action*"CLAIM" | "UPDATE" | "DELIST" | "BUY"The action that produced the current `signature`. Selects the pre-image template used for signature verification. See the 'Signature Verification' section in the API description for all templates and the full verification procedure.
pubkeystring | nullEd25519 public key of the sovereign owner, encoded as standard base64 with padding (44 characters). Identifies the entity that performed the action recorded in `last_action`.
FieldTypeDescription
listingListing | nullActive listing if the name is for sale, otherwise null
Array of ResolveResult
ResolveResult
Registration
FieldTypeDescription
name*stringThe registered name. Must be 1-62 characters of lowercase ASCII letters and digits only. No hyphens, no underscores, no unicode. Used verbatim in signature pre-images.
address*stringZcash unified address bound to this name. Used verbatim (byte-for-byte) in signature pre-images.
txid*stringTransaction ID of the registration memo
height*integerBlock height at which the registration was confirmed
nonce*integerReplay-protection counter, incremented on each UPDATE/DELIST. Reset to 0 on BUY. Used verbatim (decimal ASCII) in signature pre-images for UPDATE and DELIST.
signaturestring | nullEd25519 admin signature over the most recent action that wrote this row, encoded as standard base64 with padding (88 characters). The pre-image template is determined by `last_action`. See the 'Signature Verification' section in the API description for encoding rules, all templates, and the full verification procedure.
last_action*"CLAIM" | "UPDATE" | "DELIST" | "BUY"The action that produced the current `signature`. Selects the pre-image template used for signature verification. See the 'Signature Verification' section in the API description for all templates and the full verification procedure.
pubkeystring | nullEd25519 public key of the sovereign owner, encoded as standard base64 with padding (44 characters). Identifies the entity that performed the action recorded in `last_action`.
FieldTypeDescription
listingListing | nullActive listing if the name is for sale, otherwise null
null

Errors

  • -32602 Invalid params: missing 'query'

list_for_sale

Get all names currently listed for sale

Returns every name that has an active marketplace listing, ordered by block height descending (newest first). Prices are in zatoshis.

Parameters

None

Result - listings

ListForSaleResult
FieldTypeDescription
listings*Listing[]All active listings, newest first

status

Get indexer synchronization status

Returns the current state of the ZNS indexer, including the latest synced block height, the admin public key used for signature verification, the UIVK being watched, counts of registered names and active listings, and the current pricing tiers.

Parameters

None

Result - status

StatusResult
FieldTypeDescription
synced_height*integerLatest block height the indexer has processed
admin_pubkey*stringEd25519 public key (32 raw bytes) used to verify all signed assertions in this API, encoded as standard base64 with padding (44 characters). See the 'Signature Verification' section in the API description for the full verification procedure.
uivk*stringUnified incoming viewing key the indexer watches for memos
address*stringZcash unified address corresponding to the watched UIVK
registered*integerTotal number of registered names
listed*integerNumber of names currently listed for sale
pricing*object | nullCurrent pricing configuration, or null if SETPRICE has never been issued. NOTE: this object carries no signature and cannot be cryptographically verified via this endpoint. See the 'Verifying pricing' subsection in the API description for details on how clients can obtain a trust-minimized view of pricing.

events

Query the activity log with optional filters

Returns historical ZNS events (CLAIM, LIST, DELIST, RELEASE, UPDATE, BUY, SETPRICE) with optional filtering by name, action type(s), and block height. Results are ordered by block height descending. Supports pagination via limit and offset.

Parameters

NameTypeRequiredDescription
namestringnoFilter events for a specific name
action"CLAIM" | "LIST" | "DELIST" | "RELEASE" | "UPDATE" | "BUY" | "SETPRICE"noFilter by a single action type
since_heightintegernoOnly return events after this block height
limitintegernoMaximum number of events to return (default 50, max 500)
offsetintegernoNumber of events to skip for pagination (default 0)

Result - events

EventsResult
FieldTypeDescription
events*Event[]Matching events, newest first
total*integerTotal number of matching events (before limit/offset)

Schemas

Reusable types referenced by the methods above.

Registration

A ZNS name registration

A ZNS name registration

FieldTypeDescription
name*stringThe registered name. Must be 1-62 characters of lowercase ASCII letters and digits only. No hyphens, no underscores, no unicode. Used verbatim in signature pre-images.
address*stringZcash unified address bound to this name. Used verbatim (byte-for-byte) in signature pre-images.
txid*stringTransaction ID of the registration memo
height*integerBlock height at which the registration was confirmed
nonce*integerReplay-protection counter, incremented on each UPDATE/DELIST. Reset to 0 on BUY. Used verbatim (decimal ASCII) in signature pre-images for UPDATE and DELIST.
signaturestring | nullEd25519 admin signature over the most recent action that wrote this row, encoded as standard base64 with padding (88 characters). The pre-image template is determined by `last_action`. See the 'Signature Verification' section in the API description for encoding rules, all templates, and the full verification procedure.
last_action*"CLAIM" | "UPDATE" | "DELIST" | "BUY"The action that produced the current `signature`. Selects the pre-image template used for signature verification. See the 'Signature Verification' section in the API description for all templates and the full verification procedure.
pubkeystring | nullEd25519 public key of the sovereign owner, encoded as standard base64 with padding (44 characters). Identifies the entity that performed the action recorded in `last_action`.

Listing

A marketplace listing for a registered name

A marketplace listing for a registered name

FieldTypeDescription
name*stringThe listed name. Same constraints as `Registration.name`. Used verbatim in the LIST signature pre-image.
price*integerAsking price in zatoshis (1 ZEC = 100,000,000 zatoshis). Used verbatim (decimal ASCII, no padding) in the LIST signature pre-image.
nonce*integerReplay-protection nonce used in the LIST signature pre-image. Used verbatim (decimal ASCII) to reconstruct `LIST:{name}:{price}:{nonce}`.
txid*stringTransaction ID of the listing memo
height*integerBlock height at which the listing was confirmed
signature*stringEd25519 admin signature over the pre-image `LIST:{name}:{price}:{nonce}`, encoded as standard base64 with padding (88 characters). See the 'Signature Verification' section in the API description for encoding rules and the verification procedure. This signature must be verified independently of any enclosing `Registration.signature`.

ResolveResult

A registration with optional listing info

Registration

A ZNS name registration

FieldTypeDescription
name*stringThe registered name. Must be 1-62 characters of lowercase ASCII letters and digits only. No hyphens, no underscores, no unicode. Used verbatim in signature pre-images.
address*stringZcash unified address bound to this name. Used verbatim (byte-for-byte) in signature pre-images.
txid*stringTransaction ID of the registration memo
height*integerBlock height at which the registration was confirmed
nonce*integerReplay-protection counter, incremented on each UPDATE/DELIST. Reset to 0 on BUY. Used verbatim (decimal ASCII) in signature pre-images for UPDATE and DELIST.
signaturestring | nullEd25519 admin signature over the most recent action that wrote this row, encoded as standard base64 with padding (88 characters). The pre-image template is determined by `last_action`. See the 'Signature Verification' section in the API description for encoding rules, all templates, and the full verification procedure.
last_action*"CLAIM" | "UPDATE" | "DELIST" | "BUY"The action that produced the current `signature`. Selects the pre-image template used for signature verification. See the 'Signature Verification' section in the API description for all templates and the full verification procedure.
pubkeystring | nullEd25519 public key of the sovereign owner, encoded as standard base64 with padding (44 characters). Identifies the entity that performed the action recorded in `last_action`.
FieldTypeDescription
listingListing | nullActive listing if the name is for sale, otherwise null

ListForSaleResult

FieldTypeDescription
listings*Listing[]All active listings, newest first

Event

A single ZNS activity event

A single ZNS activity event

FieldTypeDescription
id*integerAuto-incrementing event ID
name*stringThe name this event relates to. Follows the same pattern as `Registration.name` for name-scoped actions (CLAIM, UPDATE, BUY, LIST, DELIST, RELEASE). Empty string for SETPRICE events, which are not scoped to a specific name.
action*"CLAIM" | "LIST" | "DELIST" | "RELEASE" | "UPDATE" | "BUY" | "SETPRICE"The type of action that occurred. Selects the pre-image template for verifying `signature`. See the 'Signature Verification' section in the API description for all templates.
txid*stringTransaction ID that triggered this event
height*integerBlock height at which this event was confirmed
uastring | nullRelevant address: claimer (CLAIM), owner (LIST), new address (UPDATE), buyer (BUY). Null for DELIST, RELEASE, and SETPRICE. Used verbatim in the signature pre-image as the `{address}` field for CLAIM/UPDATE/BUY.
priceinteger | nullPrice in zatoshis. Present for LIST and BUY; null otherwise. Used verbatim (decimal ASCII) in the LIST signature pre-image.
nonceinteger | nullReplay-protection nonce used in the signed payload. Present for LIST, DELIST, RELEASE, UPDATE, and SETPRICE. Used verbatim (decimal ASCII) in the signature pre-image.
signaturestring | nullEd25519 admin signature over the event's pre-image, encoded as standard base64 with padding (88 characters). The pre-image template is determined by `action`. Present for all action types. See the 'Signature Verification' section in the API description for all templates and the verification procedure.
pubkeystring | nullEd25519 public key of the sovereign owner who performed this action, encoded as standard base64 with padding (44 characters). Present only for name-scoped actions (CLAIM, LIST, DELIST, UPDATE, BUY, RELEASE) that were signed by a user rather than the admin. Null for admin-signed actions and SETPRICE events.

EventsResult

FieldTypeDescription
events*Event[]Matching events, newest first
total*integerTotal number of matching events (before limit/offset)

StatusResult

FieldTypeDescription
synced_height*integerLatest block height the indexer has processed
admin_pubkey*stringEd25519 public key (32 raw bytes) used to verify all signed assertions in this API, encoded as standard base64 with padding (44 characters). See the 'Signature Verification' section in the API description for the full verification procedure.
uivk*stringUnified incoming viewing key the indexer watches for memos
address*stringZcash unified address corresponding to the watched UIVK
registered*integerTotal number of registered names
listed*integerNumber of names currently listed for sale
pricing*object | nullCurrent pricing configuration, or null if SETPRICE has never been issued. NOTE: this object carries no signature and cannot be cryptographically verified via this endpoint. See the 'Verifying pricing' subsection in the API description for details on how clients can obtain a trust-minimized view of pricing.
Last updated on