Name Resolving
The name resolving is done by sending requests to the Indexer API.
For example, John wants to send PIVX to richard.pivx:
- Call the API to resolve the name
- Get the address and along with it gets all required proofs for checking
- Verify proofs (optional). the Merkle proof confirms the address is in the registry
- 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.