Skip to content

Add ton-storage namespace codec - #411

Open
TONresistor wants to merge 1 commit into
multiformats:masterfrom
TONresistor:add-ton-storage-codec
Open

Add ton-storage namespace codec#411
TONresistor wants to merge 1 commit into
multiformats:masterfrom
TONresistor:add-ton-storage-codec

Conversation

@TONresistor

@TONresistor TONresistor commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Add a ton-storage namespace codec for TON Storage BagIDs.

Code Name Tag Payload
0xb79910 ton-storage namespace 32-byte TON Storage BagID

TON ADNL addresses already have a dedicated multicodec allocation:
adnl (0xb69910), added in #402.

ADNL addresses are address-based identifiers for TON network endpoints. TON
Storage BagIDs are content-based identifiers derived from a bag's TorrentInfo
cell. Although both are 32 bytes, they require different resolution flows, so
this PR adds a dedicated ton-storage codec instead of reusing adnl.

TON Storage is TON's distributed file storage network. Files are organized into
bags, each identified by a 256-bit BagID.

A BagID is the 32-byte representation hash of the bag's TorrentInfo cell. It is
the native identifier used by TON Storage clients and by TON DNS
dns_storage_address records.

Binary payload:

bag_id[32]

When used as an ENSIP-7 contenthash:

uvarint(0xb79910) || bag_id[32]

The canonical user-facing URI is:

tonstorage://<64-hex-character BagID>

This allocation enables TON Storage BagIDs to be represented as self-describing
content addresses, including in ENSIP-7 contenthash records.

Existing implementations and clients include:

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant