docs: add aliasing design (architecture/aliasing.md) - #7
Merged
Conversation
Forward-looking design that separates the user-facing identifier, the on-chain coin recipient, and the server-side state lookup key into five independent layers. Aliases (`name@host`) become the only user-visible form; raw hex is removed from the UI entirely. Cross-references the current addressing scheme, SPEC §15 D2/D10, and zk-coins/node#170 (network-layer decentralization).
TaprootFreak
marked this pull request as ready for review
June 1, 2026 22:42
Per project constraint: the wallet SDK must mirror familiar wallet SDKs (Cake, LayerZ, BlueWallet, …) so integrators work only with seed and address. All zk-specific concepts move into the node. Changes: - New Layer 2 (SDK surface) section with concrete TypeScript shape and explicit "does / does not" lists. - ECDH / payment derivation moved into the node (Layer 3 rewritten as node-internal; previous wallet-side derivation removed). - Capability split (scan_priv / spend_priv) removed; single wallet signing key. View-only / watch-only flows declared out of scope. - "Default choices" updated: scan location no longer a question; default-alias derivation rule added. - Trust trade-off (operator visibility) made explicit, with self-hosting as the documented escape hatch. - Integration mapping table for Cake / LayerZ / BlueWallet.
This was referenced Jun 1, 2026
4 tasks
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.
Summary
Adds
docs/architecture/aliasing.md— a forward-looking design that separates the user-facing identifier, the on-chain coin recipient field, and the server-side state lookup key into five independent layers.Today these three concepts collapse onto a single 64-hex string, which is the root cause of:
username-resolve → address → balance / historyworking as an unauthenticated lookup chain,counterparty_addresslands per zk-coins/node#160),The design proposes:
name@host, permanent, stable for the wallet's lifetime, the only form ever shown to the user..well-knownendpoint that returns routing material only (no balance, no activity).payment_tag+scan_hintin the coin (direct extension of SPEC §15 D2/D10)./api/balance,/api/history,/api/scan) become Schnorr-signed, with a three-tier capability split (receive / view viascan_priv/ spend viaspend_priv).Why a separate doc
addressing.mddescribes the current three-phase implementation. This document is explicitly marked Design and supersedes it once implemented. Keeping them side by side preserves the audit trail of how the address model evolved.Cross-references
architecture/addressing.md,architecture/privacy-model.md,architecture/nullifier-design.mdWhat this PR does not do
addressing.mddocument (kept for current-state reference).SPEC.md.Local verification
npm ci && npm run build— green, no broken links or markdown errors.Test plan
architecture/aliasing.mdend-to-end and confirms the five-layer model holds together.addressing.md, SPEC §15, and #170 land correctly.