Namebase domains are Handshake names minted onto Ethereum as non-expiring ERC-721s. MetaMask cannot resolve them on its own: it asks the ENS registry, which has never heard of them. This snap knows where to look instead. It talks to no server. Whatever a name resolves to is where the user's money goes, so it is read from the chain through the user's own provider - which is also why no network permission is needed. addr() falls back to whoever holds the token, so a name keeps paying the right person after a sale. The manifest declares chains only and carries no TLD list, so enabling minting on a new TLD needs no change here. Two rules in src/index.ts filter instead: stay out of TLDs another naming system is authoritative for, and ignore anything without two labels. When in doubt the answer is null, never an address. Hashing mirrors the registry's dsld_node() and every test vector is generated from it. Two requirements are pinned because breaking either is silent: UTS-46 must be transitional, and it must not be ENSIP-15. Either mistake yields a valid-looking node with no records and a name that never resolves. The built bundle is tested separately from the source because tr46 reaches for the Node punycode builtin - without that polyfill the build is clean and every non-ASCII name fails at runtime. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YUVyawKbjSWw57md791LUu
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
MIT License
|
|
|
|
Copyright (c) 2026 Namebase
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|