ZcashNames (ZNS): resolve name.zcash in the send field - #3
Merged
Conversation
Resolve-first ZNS integration (the high-value, low-risk half). New core zns module + resolve_zns_name command: - Calls the public ZNS indexer JSON-RPC `resolve` method (https://light.zcash.me/zns-{testnet,mainnet-test}) and returns the registration whose `address` is the unified address to pay. Extra indexer fields are ignored; a listed-for-sale name surfaces its listing so the UI can warn. - normalize_name / looks_like_zns_name: accept `alice` or `alice.zcash` ([a-z0-9]{1,62}), and avoid misreading Zcash addresses as names (address prefixes are excluded; the send flow will also try address-decode first and fall back to ZNS). - The full ZNS protocol (indexer endpoints, JSON-RPC, and the on-chain ZNS:CLAIM:<name>:<ua>:<sig> signed-memo claim format) is documented in the module so the register/claim write path can follow later. Trust: the resolver is external infrastructure, so the UI MUST show the resolved address for confirmation before sending (documented on the command). 5 unit tests pass; full backend builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wires the ZNS resolver into the send form. When the recipient ends in `.zcash`, a "Look up name" action resolves it via the indexer and shows the resolved unified address for the user to confirm — the send then uses that address. Prepare is blocked until an unresolved name is looked up, address validation is deferred to the resolved address, and a name listed for sale shows a warning (its owner/address may change). Stale resolutions clear when the field changes. Trust is front-and-center: the external resolver never sends funds silently; the address it returned is always displayed before signing. TODO updated: resolve (send field) done; contact-entry names + a resolver cache, and the register/claim write path, remain. tsc + vite build + core tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Beta note: targets the Ironwood (NU6.3) upgrade; names the RC crates it still depends on instead of a vague "pre-release Orchard/PCZT". - Wallet capability: per-pool Orchard/Ironwood balances, V6 pool-aware sends post-NU6.3, and one-click Orchard -> Ironwood migration. - New capabilities: coinholder-poll voting (shielded Vote Cast Memo via the FROST path) and ZcashNames (name.zcash resolution in the send field, confirm-first). - Layout: note the new core modules (voting.rs, zns.rs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
Merging in ZNS integration feature |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a ZNS resolver (core/src/zns.rs + resolve_zns_name) using the public indexer's JSON-RPC resolve, wired into the send recipient field — alice.zcash looks up to a unified address shown for confirmation before sending, with a for-sale warning. Resolve-only; register/claim write path documented as a follow-up.
🤖 Generated with Claude Code