Skip to main content

Name Resolving

The name resolving is done by sending requests to the Indexer API.

For example, John wants to send PIVX to richard.pivx:

  1. Call the API to resolve the name
  2. Get the address and along with it gets all required proofs for checking
  3. Verify proofs (optional). the Merkle proof confirms the address is in the registry
  4. Send PIVX to the resolved address

John never sees the long PIVX address. He just types richard.pivx.

Verifying the Response

The merkle_proof lets you verify the resolution without trusting the API. It contains proof_depth sibling hashes from the compact Sparse Merkle Tree — a handful, not a fixed 128. Hash the record into a leaf, fold the siblings back to the root, and if you arrive at smt_root the record is exactly what the tree commits to.

That proves the record belongs to a tree. To know it is the real one, check smt_root against the anchor contract on BNB Smart Chain. Both steps, with tested code, are on Verifying Proofs.

See Merkle Proofs for details.