Resolution
Resolution is the process of going from a name or address to a registration.
In ZNS, resolution is a single resolve RPC call to the indexer that returns everything a client needs - including the signature to verify the result.
Two resolution modes
| Mode | Input | Returns |
|---|---|---|
| Forward | A name like alice | A single ResolveResult, or null |
| By-address | A Zcash unified address | An array of every registration bound to that address (possibly empty) |
The indexer decides which mode based on whether the query string parses as a Zcash address. No separate method, no flag.
Forward resolution
Forward resolution answers “who owns this name and what address does it point to?”
// Request
{ "jsonrpc": "2.0", "id": 1, "method": "resolve", "params": { "query": "alice" } }
// Response (found)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"name": "alice",
"address": "u1…",
"txid": "abc123…",
"height": 3901200,
"nonce": 2,
"signature": "AQID…",
"last_action": "UPDATE",
"listing": null
}
}A null result means the name is not currently registered. It does not mean “never existed” - a released name will return null just like a name that was never claimed.
What last_action tells you
The last_action field picks the Ed25519 pre-image template you need to verify signature:
last_action | Pre-image template |
|---|---|
CLAIM | CLAIM:{name}:{address} |
UPDATE | UPDATE:{name}:{address}:{nonce} |
BUY | BUY:{name}:{address} |
DELIST | DELIST:{name}:{nonce} |
Note that LIST and RELEASE never appear in last_action on a Registration. A LIST writes the listing row but leaves the registration’s last_action alone. A RELEASE deletes the registration entirely, so there is nothing to return.
See Signature Scheme for the full verification procedure.
Listings come with it
If the name is currently listed for sale, listing is non-null:
"listing": {
"name": "alice",
"price": 100000000,
"nonce": 3,
"txid": "fed321…",
"height": 3901250,
"signature": "CQID…"
}The listing carries its own signature, over the pre-image LIST:{name}:{price}:{nonce}. A client that wants to trust the listing price must verify this signature independently of the enclosing registration’s signature - the two signatures cover different facts.
By-address resolution
Given a unified address, resolve returns every name bound to that address. A single address can own multiple names:
// Request
{ "jsonrpc": "2.0", "id": 1, "method": "resolve", "params": { "query": "u1abc…" } }
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{ "name": "alice", "address": "u1abc…", …, "last_action": "UPDATE" },
{ "name": "alice-blog", "address": "u1abc…", …, "last_action": "CLAIM" }
]
}An empty array means the address has no registered names.
Error handling
resolve does not return errors for missing names; it returns null (for name queries) or [] (for address queries). The JSON-RPC error codes are reserved for protocol-level failures:
| Code | Meaning |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params - e.g. missing query |
-32603 | Internal error |
See JSON-RPC Reference for the exhaustive schema.
Next
- Signature Scheme - how to verify what you get back.
- JSON-RPC Reference - full method + schema reference.