Resolving a Name
Bob wants to send ZEC to alice.zec:
- Call the API --
GET /v1/resolve/alice - Get the address -- plus a Merkle proof for verification
- Verify (optional) -- the Merkle proof confirms the address is in the registry
- Send ZEC -- to the resolved address
Bob never sees the 213-character unified address. He just types alice.zec.
Example
curl https://zns-server-production.up.railway.app/v1/resolve/alice
{
"name": "alice",
"address": "u1qr5e...7xk4",
"smt_root": "a3b2c1d4...",
"merkle_proof": ["0000...", "a1b2..."]
}
Verifying the Response
The merkle_proof lets you independently verify the resolution without trusting the API. It contains 128 sibling hashes from the Sparse Merkle Tree. Hash the address up through the levels -- if you arrive at smt_root, the resolution is correct.
See Merkle Proofs for details.