Commit 45c88b8
authored
Add adnl codec for TON network addresses (#402)
Add multicodec namespace entry for TON ADNL addresses in the 0xbX9910 range following the existing namespace convention (alongside skynet, arweave, subspace, kumandra, massa).
What is ADNL?
ADNL (Abstract Datagram Network Layer) is TON's peer-to-peer networking protocol. An ADNL address is a 32-byte identifier computed as `SHA-256(TL_constructor_id || pubkey)`, where the TL constructor id for `pub.ed25519` is `0x4813b4c6` serialized little-endian (wire bytes `c6 b4 13 48`), followed by the 32-byte Ed25519 public key. Reference: `ton-blockchain/ton` — `keys/keys.cpp::compute_short_id()`.
https://docs.ton.org/develop/network/adnl-udp
Codec added:
│ 0xb69910 │ adnl │ TON ADNL address: 32-byte SHA-256(0x4813b4c6_LE || Ed25519-pubkey)
Motivation
This codec enables ENSIP-7 contenthash encoding for TON sites, allowing `.eth` domains to resolve to TON resources through standard content-addressed URIs.
Reference implementation: https://github.com/TONresistor/Tonutils-Proxy/blob/contenthash/resolver/contenthash.go
Live example: tonnet.eth contenthash set on Ethereum mainnet1 parent 8984dc3 commit 45c88b8
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
| |||
0 commit comments