From 607d57a256a4af8ede494046c0fa297e86c8d517 Mon Sep 17 00:00:00 2001 From: Avaunt Date: Wed, 29 Jul 2026 20:57:20 +0100 Subject: [PATCH 1/5] fix: correct heading levels and address minor typos --- radix/README.md | 46 ++++++++++++++++++++ radix/caip10.md | 108 +++++++++++++++++++++++++++++++++++++++++++++++ radix/caip2.md | 104 +++++++++++++++++++++++++++++++++++++++++++++ radix/caip350.md | 100 +++++++++++++++++++++++++++++++++++++++++++ radix/caipX.md | 98 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 456 insertions(+) create mode 100644 radix/README.md create mode 100644 radix/caip10.md create mode 100644 radix/caip2.md create mode 100644 radix/caip350.md create mode 100644 radix/caipX.md diff --git a/radix/README.md b/radix/README.md new file mode 100644 index 00000000..2690a699 --- /dev/null +++ b/radix/README.md @@ -0,0 +1,46 @@ +--- +namespace-identifier: radix +title: Radix DLT +author: ["Avaunt (@AVaunt-consulting)"] +status: Draft +type: Informational +created: 2026-07-28 +requires: ["CAIP-2"] +--- + +# Namespace for {non-technical name for ecosystem or family of chains} + + +As the old saying goes, "If you can't explain it simply, you don't understand it +well enough." Here is where you can provide a simplified and layman-accessible +explanation of what is particular to this namespace or how it differs from EVM +chains, where the CAIPs are easiest to apply/understand. + +## Rationale + +A short (~200 word) description of any technical issues being addressed by the +naming of the namespace, or other informational asides about the particularities +of the namespace. + +## Governance + +A short (~200 word) description of the improvement proposal process or other +specification/governance context that a first-time implementer of cross-chain +work in this namespace/ecosystem should know. + +## References + +Links to external resources that help understanding the namespace or the +specification/applied-CAIP better in this context. This can also include links +to existing implementations. + +The preferred format, for browser-rendering and long-term maintenance, is a +bulletted list of [Name][] links (rather than classical [Name](referent) links), +followed by ` - ` and a summary or explanation of the content. In a separate +section below, add the name-referent pairs in the `[Name]: https://{referent} ` +format-- this will be invisible in any Github-flavored Markdown rendering +(including jekyll/github pages, aka github.io, but also docusaurus and many +dev-docs rendering engines). + +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/radix/caip10.md b/radix/caip10.md new file mode 100644 index 00000000..86465dae --- /dev/null +++ b/radix/caip10.md @@ -0,0 +1,108 @@ +--- +namespace-identifier: <{name of folder}-caip10> +title: <{namespace common name} [, aka ecosystem name] - Account ID Specification> +author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> +discussions-to: +status: Draft +type: Informational +created: +requires (*optional): CAIP-2, CAIP-10 +--- + + + +# CAIP-10 + +*For context, see the [CAIP-10][] specification.* + +## Introduction + + + +## Specification + +### Semantics + + + +### Syntax + + + +### Resolution Mechanics + + + +## Rationale + + + +### Backwards Compatibility + + + +## Test Cases + + + +## Additional Considerations (*OPTIONAL) + + + +## References + + + +[CAIP-2 Profile]: ./caip2.md +[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 +[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/radix/caip2.md b/radix/caip2.md new file mode 100644 index 00000000..99fe70ea --- /dev/null +++ b/radix/caip2.md @@ -0,0 +1,104 @@ +--- +namespace-identifier: <{name of folder}-caip2> +title: <{namespace common name} [, aka ecosystem name] - Blockchain ID Specification> +author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> +discussions-to: +status: Draft +type: Informational +created: +requires (*optional): CAIP-2 +--- + + + +# CAIP-2 + +*For context, see the [CAIP-2][] specification.* + +## Introduction + + + +## Specification + +### Semantics + + + +### Syntax + + + +### Resolution Mechanics + + + +## Rationale + + + +### Backwards Compatibility + + + +## Test Cases + + + +## Additional Considerations (*OPTIONAL) + + + +## References + + + +[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/radix/caip350.md b/radix/caip350.md new file mode 100644 index 00000000..a1d36103 --- /dev/null +++ b/radix/caip350.md @@ -0,0 +1,100 @@ +--- +namespace-identifier: +binary-key: +title: <{namespace common name} [, aka ecosystem name]> +discussions-to: +author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> +status: Draft +type: Informational +created: +requires: +--- + +## Namespace Reference +ChainType binary key: `0xXXXX` +[CAIP-104] namespace: `XXXXX` + +## Chain reference + + + +### Text representation + + + + + +#### Text -> customary (CAIP-2) conversion + + + +#### Customary (CAIP-2) -> text conversion + + + +### Binary representation + + + +#### Text -> binary conversion + + + +#### Binary -> text conversion + + + +### Examples + +## Addresses + +### Text representation + + + +#### Text -> native conversion + + + + + +#### Native -> text conversion + + + + +### Binary representation + + + +#### Text -> binary conversion + + + +#### Binary -> text conversion + + + +### Examples + +## Error handling + + + + + +## Implementation considerations + + + + + +## Extra considerations + + + diff --git a/radix/caipX.md b/radix/caipX.md new file mode 100644 index 00000000..23c21c99 --- /dev/null +++ b/radix/caipX.md @@ -0,0 +1,98 @@ +--- +namespace-identifier: <{name of folder}-caip{X}> where X = the CAIP being applied to this namespace +title: <{namespace common name} [, aka ecosystem name] - {common name for type of entity identified by Caip-X}> +author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> +discussions-to: +status: Draft +type: Informational +created: +requires (*optional): <["CAIP-X", "CAIP-Y"]> +replaces (*optional): +--- + +## Introduction + + + +## Specification + +### Semantics + + + +### Syntax + + + +### Resolution Mechanics + + + +## Rationale + + + +### Backwards Compatibility + + + +## Test Cases + + + +## Additional Considerations (*OPTIONAL) + + + +## References + + + +[CAIP-2 Profile]: ./caip2.md +[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 +[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 1716f5aade2d0d6970986202164d813bc23db6a4 Mon Sep 17 00:00:00 2001 From: Avaunt Date: Sat, 1 Aug 2026 11:04:33 +0100 Subject: [PATCH 2/5] Update Radix namespace specifications: refine CAIP-2 and CAIP-10 profiles, enhance clarity in rationale and governance sections, and remove deprecated CAIP-350 and CAIP-X files. --- bech32m_check.mjs | 57 +++++++++++++++ radix/README.md | 92 +++++++++++++++++------- radix/caip10.md | 180 +++++++++++++++++++++++++++++----------------- radix/caip19.md | 156 ++++++++++++++++++++++++++++++++++++++++ radix/caip2.md | 155 +++++++++++++++++++++------------------ radix/caip350.md | 100 -------------------------- radix/caipX.md | 98 ------------------------- 7 files changed, 476 insertions(+), 362 deletions(-) create mode 100644 bech32m_check.mjs create mode 100644 radix/caip19.md delete mode 100644 radix/caip350.md delete mode 100644 radix/caipX.md diff --git a/bech32m_check.mjs b/bech32m_check.mjs new file mode 100644 index 00000000..061d05ca --- /dev/null +++ b/bech32m_check.mjs @@ -0,0 +1,57 @@ +// Validate and re-encode Radix bech32m addresses for CAIP profile test cases. +const CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"; +const BECH32M_CONST = 0x2bc830a3; + +function polymod(values) { + const gen = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]; + let chk = 1; + for (const v of values) { + const b = chk >>> 25; + chk = ((chk & 0x1ffffff) << 5) ^ v; + for (let i = 0; i < 5; i++) if ((b >>> i) & 1) chk ^= gen[i]; + } + return chk >>> 0; +} + +const hrpExpand = (hrp) => [ + ...[...hrp].map((c) => c.charCodeAt(0) >> 5), + 0, + ...[...hrp].map((c) => c.charCodeAt(0) & 31), +]; + +function decode(addr) { + const pos = addr.lastIndexOf("1"); + const hrp = addr.slice(0, pos); + const data = [...addr.slice(pos + 1)].map((c) => CHARSET.indexOf(c)); + if (data.includes(-1)) return { hrp, data: null, ok: false }; + const ok = polymod([...hrpExpand(hrp), ...data]) === BECH32M_CONST; + return { hrp, data: data.slice(0, -6), ok }; +} + +function encode(hrp, values) { + const mod = polymod([...hrpExpand(hrp), ...values, 0, 0, 0, 0, 0, 0]) ^ BECH32M_CONST; + const checksum = Array.from({ length: 6 }, (_, i) => (mod >>> (5 * (5 - i))) & 31); + return hrp + "1" + [...values, ...checksum].map((v) => CHARSET[v]).join(""); +} + +const tests = [ + "account_rdx129a9wuey40lducsne6r8e5q7xmt07068gcede0x0nrwtsnehpkf6zh", + "resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd", + "resource_tdx_2_1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxtfd2jc", + "resource_rdx1nfxxxxxxxxxxed25sgxxxxxxxxx002236757237xxxxxxxxxed25sg", + "resource_tdx_2_1nfxxxxxxxxxxed25sgxxxxxxxxx002236757237xxxxxxxxx3e2cpa", + "component_tdx_2_1cptxxxxxxxxxfaucetxxxxxxxxx000527798379xxxxxxxxxyulkzl", +]; +for (const t of tests) { + const { hrp, data, ok } = decode(t); + console.log(`${ok ? "VALID " : "INVALID"} hrp=${hrp.padEnd(20)} datalen=${data ? data.length : 0} ${t}`); +} + +// Repair the x402 example account: keep the data part, recompute checksums. +const { data } = decode(tests[0]); +const entityByte = (data[0] << 3) | (data[1] >> 2); +console.log("\nEntity byte of example data: 0x" + entityByte.toString(16)); +const mainnetAccount = encode("account_rdx", data); +const stokenetAccount = encode("account_tdx_2_", data); +console.log("Repaired mainnet account: ", mainnetAccount, decode(mainnetAccount).ok); +console.log("Derived stokenet account: ", stokenetAccount, decode(stokenetAccount).ok); diff --git a/radix/README.md b/radix/README.md index 2690a699..178ca984 100644 --- a/radix/README.md +++ b/radix/README.md @@ -2,45 +2,83 @@ namespace-identifier: radix title: Radix DLT author: ["Avaunt (@AVaunt-consulting)"] +# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened status: Draft type: Informational created: 2026-07-28 -requires: ["CAIP-2"] +requires: ["CAIP-2", "CAIP-10", "CAIP-19"] --- -# Namespace for {non-technical name for ecosystem or family of chains} +# Namespace for Radix DLT - -As the old saying goes, "If you can't explain it simply, you don't understand it -well enough." Here is where you can provide a simplified and layman-accessible -explanation of what is particular to this namespace or how it differs from EVM -chains, where the CAIPs are easiest to apply/understand. +Radix is a layer-1 network purpose-built for decentralized finance, currently +running the "Babylon" protocol generation (live since September 2023). It is +not EVM-compatible: transactions execute in the Radix Engine, an +asset-oriented execution environment in which tokens ("resources") are native +primitives held in accounts rather than balances inside contract storage. +Transactions are expressed as human-readable "transaction manifests" over an +intent-based transaction model, and are signed by zero or more signatories +before being notarized and submitted. + +Radix uses deterministic finality (HotStuff-style BFT): committed transactions +are final, and there are no probabilistic forks. The ledger is a stream of +transactions broken into epochs of roughly five minutes rather than blocks. + +All Radix entity addresses (accounts, resources, components, packages) are +bech32m-encoded strings whose human-readable part (HRP) is the concatenation +of an *entity specifier* (e.g. `account_`, `resource_`) and a *network +specifier* (`rdx` for mainnet, `tdx_2_` for the Stokenet public testnet), +making every address self-describing and network-bound. ## Rationale - -A short (~200 word) description of any technical issues being addressed by the -naming of the namespace, or other informational asides about the particularities -of the namespace. + +The namespace identifier `radix` is the network's common name, used across its +documentation, tooling, and deep links (e.g. the `radix:
` deposit QR +convention). Networks in this namespace are the Radix Babylon networks: one +production mainnet and a small, governed set of test networks, each defined by +a numeric network ID, a logical name, and an address HRP suffix: + +| Network | Network ID | Logical name | HRP network specifier | +| -------- | ---------- | ------------ | --------------------- | +| Mainnet | `1` | `mainnet` | `rdx` | +| Stokenet | `2` | `stokenet` | `tdx_2_` | + +The earlier "Olympia" network generation (2021–2023) was retired when its end +state was migrated into Babylon's genesis; Olympia used different address +encodings and is out of scope for this namespace. ## Governance - -A short (~200 word) description of the improvement proposal process or other -specification/governance context that a first-time implementer of cross-chain -work in this namespace/ecosystem should know. + +The Radix protocol and its reference node implementation are developed by RDX +Works and stewarded by the Radix Foundation. Protocol changes ship as named +"protocol updates" (e.g. "Anemone", "Bottlenose", "Cuttlefish") which are +enacted at epoch boundaries once a supermajority of validator stake signals +readiness. There is no on-chain permissionless improvement-proposal process; +specifications and integrator guidance are published in the official +documentation and the open-source node and toolkit repositories. ## References - -Links to external resources that help understanding the namespace or the -specification/applied-CAIP better in this context. This can also include links -to existing implementations. - -The preferred format, for browser-rendering and long-term maintenance, is a -bulletted list of [Name][] links (rather than classical [Name](referent) links), -followed by ` - ` and a summary or explanation of the content. In a separate -section below, add the name-referent pairs in the `[Name]: https://{referent} ` -format-- this will be invisible in any Github-flavored Markdown rendering -(including jekyll/github pages, aka github.io, but also docusaurus and many -dev-docs rendering engines). + +- [Radix Documentation][] - official developer and integrator documentation. +- [Radix Integrator Concepts][] - addresses, networks, transactions, and API guidance for integrators. +- [Well-Known Addresses][] - canonical registry of native addresses (XRD, badges, packages) per network, including each network's ID and HRP suffix. +- [Address Concepts][] - bech32m address structure: entity specifier, network specifier, and 30-byte payload. +- [Babylon Node][] - reference node implementation (Java/Rust). +- [Radix Engine Toolkit][] - offline transaction construction and address derivation/validation library (Rust core; TypeScript, Python and other bindings). +- [Gateway API][] - indexed network API used by wallets and dashboards. +- [Core API][] - node-local API for integrators running their own node. +- [Radix Dashboard][] - the network explorer. + +[Radix Documentation]: https://docs.radixdlt.com/ +[Radix Integrator Concepts]: https://docs.radixdlt.com/docs/concepts +[Well-Known Addresses]: https://docs.radixdlt.com/docs/well-known-addresses +[Address Concepts]: https://docs.radixdlt.com/docs/concepts +[Babylon Node]: https://github.com/radixdlt/babylon-node +[Radix Engine Toolkit]: https://github.com/radixdlt/radix-engine-toolkit +[Gateway API]: https://radix-babylon-gateway-api.redoc.ly/ +[Core API]: https://radix-babylon-core-api.redoc.ly/ +[Radix Dashboard]: https://dashboard.radixdlt.com/ ## Copyright + Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/radix/caip10.md b/radix/caip10.md index 86465dae..221f7ada 100644 --- a/radix/caip10.md +++ b/radix/caip10.md @@ -1,107 +1,153 @@ --- -namespace-identifier: <{name of folder}-caip10> -title: <{namespace common name} [, aka ecosystem name] - Account ID Specification> -author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> -discussions-to: +namespace-identifier: radix-caip10 +title: Radix DLT Namespace - Accounts +author: ["Avaunt (@AVaunt-consulting)"] +# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened status: Draft -type: Informational -created: -requires (*optional): CAIP-2, CAIP-10 +type: Standard +created: 2026-08-01 +requires: ["CAIP-2", "CAIP-10"] --- - - # CAIP-10 *For context, see the [CAIP-10][] specification.* -## Introduction +## Introduction - +Radix accounts are on-ledger components with a native address, not raw public +keys. Most accounts begin as **virtual accounts**: an address is derived +offline from an Ed25519 or Secp256k1 public key and can receive deposits +before anything exists on-ledger; the account component is instantiated on +first interaction. Account ownership is mutable — an account that started as +a key-derived virtual account may later be controlled by different keys or by +multi-factor access rules ("smart accounts") — so the address, not any public +key, is the stable identifier. ## Specification ### Semantics - +An account address is a bech32m string ([BIP-350][]) composed of: + +- **HRP**: the entity specifier `account_` concatenated with the network + specifier of the target network (`rdx` for mainnet, `tdx_2_` for Stokenet); +- the bech32m separator `1`; +- **data**: 48 base32 characters encoding 30 bytes — 1 entity-type byte + (e.g. `0x51` for a virtual Ed25519 account, `0xd1` for a virtual Secp256k1 + account, or the type byte of a ledger-allocated account) followed by 29 + address bytes (for virtual accounts, the last 29 bytes of the Blake2b-256 + hash of the controlling public key); +- a 6-character checksum computed over the HRP and data. + +Because the checksum covers the HRP, an account address is only valid on the +network named in its HRP, and that network MUST match the [CAIP-2][] segment +of the CAIP-10 identifier (`radix:mainnet` addresses carry `account_rdx`; +`radix:stokenet` addresses carry `account_tdx_2_`). ### Syntax - +The `account_id` is formed of the CAIP-2 identifier followed by the native +account address verbatim: + +``` +account_id: chain_id + ":" + account_address +chain_id: radix:[a-z0-9]{1,32} (see the [CAIP-2 Profile][]) +account_address: account_ + hrp_suffix + "1" + [02-9ac-hj-np-z]{54} +hrp_suffix: rdx | tdx_2_ | (other registered network specifiers) +``` + +Per-network validation regular expressions: + +``` +# Mainnet +radix:mainnet:account_rdx1[02-9ac-hj-np-z]{54} + +# Stokenet +radix:stokenet:account_tdx_2_1[02-9ac-hj-np-z]{54} +``` + +The 54 characters after the separator are 48 data characters plus the +6-character checksum, drawn from the bech32 charset (which excludes `1`, +`b`, `i`, `o`). + +#### Canonicalization + +Addresses MUST be written in lowercase. Bech32m is case-insensitive at decode +time and forbids mixed case entirely; the canonical, and only conformant, +CAIP-10 form for this namespace is the lowercase encoding, so consumers can +compare identifiers by exact string equality. ### Resolution Mechanics - +An address can be validated offline (bech32m checksum + HRP inspection), +e.g. with the [Radix Engine Toolkit][], which also derives virtual account +addresses from public keys. On-ledger state, if any, can be queried via the +Gateway API: + +``` +POST /state/entity/details +{ "addresses": ["account_rdx129a9wuey40lducsne6r8e5q7xmt07068gcede0x0nrwtsnehss5d52"] } +``` + +A valid virtual-account address that has not yet been instantiated will +report no on-ledger state; it is still a correct CAIP-10 identifier and can +receive deposits. ## Rationale - +The native bech32m address is used verbatim (rather than re-encoded) because +it is self-describing (entity and network specifiers), checksummed, and the +only account identifier Radix users, wallets, and APIs exchange. Public keys +are unsuitable identifiers because account ownership is mutable. ### Backwards Compatibility - +Olympia-era account addresses (bech32, ending before September 2023) are a +retired format and are not valid in this namespace. The [Radix Engine +Toolkit][] can map an Olympia Secp256k1 account address to its Babylon +equivalent where historical continuity is needed. ## Test Cases - +This is a list of manually composed and checksum-validated examples: -## Additional Considerations (*OPTIONAL) +``` +# Mainnet virtual Ed25519 account +radix:mainnet:account_rdx129a9wuey40lducsne6r8e5q7xmt07068gcede0x0nrwtsnehss5d52 - +# Stokenet virtual Ed25519 account (same underlying key-hash bytes, different +# network — note the different HRP and checksum) +radix:stokenet:account_tdx_2_129a9wuey40lducsne6r8e5q7xmt07068gcede0x0nrwtsnehrlel8s +``` -## References +## Additional Considerations - +## References + +- [Radix Accounts][] - account model, virtual accounts, and deposit rules. +- [Address Concepts][] - bech32m address structure: entity specifier, network specifier, 30-byte payload. +- [Radix Engine Toolkit][] - offline address derivation and validation. +- [Gateway API][] - `/state/entity/details` endpoint documentation. -[CAIP-2 Profile]: ./caip2.md [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 +[CAIP-2 Profile]: ./caip2.md [CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 +[BIP-350]: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki +[RFC 3986]: https://www.rfc-editor.org/rfc/rfc3986#section-2.1 +[Radix Accounts]: https://docs.radixdlt.com/docs/account +[Address Concepts]: https://docs.radixdlt.com/docs/concepts +[Radix Engine Toolkit]: https://github.com/radixdlt/radix-engine-toolkit +[Gateway API]: https://radix-babylon-gateway-api.redoc.ly/ ## Copyright diff --git a/radix/caip19.md b/radix/caip19.md new file mode 100644 index 00000000..2e2b6302 --- /dev/null +++ b/radix/caip19.md @@ -0,0 +1,156 @@ +--- +namespace-identifier: radix-caip19 +title: Radix DLT Namespace - Assets +author: ["Avaunt (@AVaunt-consulting)"] +# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened +status: Draft +type: Standard +created: 2026-08-01 +requires: ["CAIP-2", "CAIP-19"] +--- + +# CAIP-19 + +*For context, see the [CAIP-19][] specification.* + +## Introduction + +On Radix, tokens are **resources**: native ledger primitives created through +the Radix Engine's resource system rather than balances inside deployed +contracts. Every resource — fungible or non-fungible, including the native +token XRD — is identified by a global resource address with the entity +specifier `resource_`. There is no special-cased "native currency" +identifier: XRD is simply the well-known resource +`resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd` on +mainnet. + +Fungible resources have a divisibility of 0–18 decimal places and balances +are expressed as `Decimal` quantities. Non-fungible resources additionally +contain individual non-fungible units distinguished by a local ID. + +## Specification + +### Semantics + +#### Asset Namespace + +This profile defines a single asset namespace, `resource` (case-sensitive), +covering both fungible and non-fungible resources. Fungibility is a property +of the resource manager, discoverable on-ledger; it is not encoded in the +address string (the entity-type byte inside the address differs between +fungible and non-fungible resource managers, e.g. `0x5d` vs `0x9a`). + +#### Asset Reference + +The asset reference is the native bech32m resource address, verbatim. Its +structure mirrors account addresses (see the [CAIP-10 Profile][]): the HRP is +`resource_` + the network specifier (`rdx`, `tdx_2_`), followed by the +separator `1`, 48 data characters (1 entity-type byte + 29 address bytes) and +a 6-character checksum. The HRP's network specifier MUST match the [CAIP-2][] +segment of the identifier. + +### Syntax + +``` +asset_type: chain_id + "/" + asset_namespace + ":" + asset_reference +chain_id: radix:[a-z0-9]{1,32} (see the [CAIP-2 Profile][]) +asset_namespace: resource +asset_reference: resource_ + hrp_suffix + "1" + [02-9ac-hj-np-z]{54} +hrp_suffix: rdx | tdx_2_ | (other registered network specifiers) +``` + +Per-network validation regular expressions: + +``` +# Mainnet +radix:mainnet/resource:resource_rdx1[02-9ac-hj-np-z]{54} + +# Stokenet +radix:stokenet/resource:resource_tdx_2_1[02-9ac-hj-np-z]{54} +``` + +Addresses MUST be lowercase (see Canonicalization in the [CAIP-10 +Profile][]). + +### Resolution Mechanics + +Resource metadata (symbol, name, divisibility, fungibility, total supply) can +be queried from the Gateway API: + +``` +POST /state/entity/details +{ "addresses": ["resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd"] } +``` + +Well-known native resources (XRD, system badges) for each network are +published in the official [Well-Known Addresses][] registry. + +## Rationale + +The resource address is the canonical asset identifier across all Radix APIs, +wallets, and tooling, and is self-describing in the same way as account +addresses (checksummed, network-bound, entity-typed). A single `resource` +asset namespace reflects the ledger's own model, where fungible and +non-fungible resources share one address space and their fungibility is an +on-ledger property rather than a syntactic distinction. + +### Backwards Compatibility + +Olympia-era resource identifiers ("RRIs", e.g. `xrd_rr1...`) are a retired +format and are not valid in this namespace. + +## Test Cases + +This is a list of manually composed examples using officially published +well-known addresses: + +``` +# XRD (native token, fungible) on mainnet +radix:mainnet/resource:resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd + +# XRD on Stokenet +radix:stokenet/resource:resource_tdx_2_1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxtfd2jc + +# Ed25519 signature virtual badge (a non-fungible resource) on mainnet +radix:mainnet/resource:resource_rdx1nfxxxxxxxxxxed25sgxxxxxxxxx002236757237xxxxxxxxxed25sg +``` + +## Additional Considerations + +### Individual non-fungible units + +Radix non-fungible local IDs come in four types whose native delimiters +(`#123#`, ``, `[hex]`, `{uuid}`) fall outside the CAIP-19 token-ID +charset. Identification of individual non-fungible units (as opposed to the +non-fungible resource as a collection) is therefore out of scope for this +initial profile and may be specified in a future revision, e.g. by +percent-encoding the native local-ID representation. + +### Underscores + +As with CAIP-10 identifiers in this namespace, asset references contain +underscore (`_`) characters from the native HRP, which the formal CAIP-19 +reference charset predating this namespace does not include. The same +handling applies: native form is canonical, `%5F` percent-encoding is +acceptable for strict-conformance consumers (see the [CAIP-10 Profile][] for +details and precedent). + +## References + +- [Radix Resources][] - the resource model for fungible and non-fungible assets. +- [Well-Known Addresses][] - canonical registry of native resources per network. +- [Gateway API][] - `/state/entity/details` endpoint documentation. +- [Radix Dashboard][] - explorer showing resource metadata and holders. + +[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 +[CAIP-2 Profile]: ./caip2.md +[CAIP-10 Profile]: ./caip10.md +[CAIP-19]: https://chainagnostic.org/CAIPs/caip-19 +[Radix Resources]: https://docs.radixdlt.com/docs/resources +[Well-Known Addresses]: https://docs.radixdlt.com/docs/well-known-addresses +[Gateway API]: https://radix-babylon-gateway-api.redoc.ly/ +[Radix Dashboard]: https://dashboard.radixdlt.com/ + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/radix/caip2.md b/radix/caip2.md index 99fe70ea..d809be34 100644 --- a/radix/caip2.md +++ b/radix/caip2.md @@ -1,103 +1,118 @@ --- -namespace-identifier: <{name of folder}-caip2> -title: <{namespace common name} [, aka ecosystem name] - Blockchain ID Specification> -author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> -discussions-to: +namespace-identifier: radix-caip2 +title: Radix DLT Namespace - Chains +author: ["Avaunt (@AVaunt-consulting)"] +# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened status: Draft -type: Informational -created: -requires (*optional): CAIP-2 +type: Standard +created: 2026-08-01 +requires: CAIP-2 --- - - # CAIP-2 *For context, see the [CAIP-2][] specification.* -## Introduction +## Rationale - +Radix Babylon networks are few and centrally registered: one production +mainnet and a small set of persistent test networks. Each network is defined +in the node software by three coupled identifiers: a numeric **network ID** +(`1` for mainnet, `2` for Stokenet), a **logical name** (`mainnet`, +`stokenet`), and an **HRP network specifier** used inside every address on +that network (`rdx`, `tdx_2_`). -## Specification +This profile uses the **logical name** as the CAIP-2 reference. The logical +name is the identifier integrators already pass in the `network` field of +every Core API request, it is human-readable, and the set of networks is +small and governed, so collisions are not a practical concern (the same +reasoning used by the `hedera` and `stellar` namespaces). -### Semantics +## Syntax - +The reference SHOULD be populated with one of the following enumerated +logical network names: -### Syntax +- `mainnet` — Radix mainnet (network ID `1`) +- `stokenet` — the primary public testnet (network ID `2`) - +Other logical names defined by the node software (e.g. transient test +networks with HRP specifier `tdx__`, or `simulator` for the local +`resim` simulator, network ID `242`) follow the same pattern. -### Resolution Mechanics +A regular expression for validating any theoretically possible Radix +network reference is: - +``` +radix:[a-z0-9]{1,32} +``` -## Rationale +### Resolution Method + +To resolve the network of a node or gateway, query its network configuration +endpoint and compare the returned logical name and network ID: + +- Gateway API: `POST /status/network-configuration` +- Core API (own node): `POST /core/status/network-configuration` + +Example response (mainnet gateway, abbreviated): - +```json +{ + "network_id": 1, + "network_name": "mainnet", + "well_known_addresses": { + "xrd": "resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd" + } +} +``` -### Backwards Compatibility +Addresses themselves are also network-bound: every bech32m address embeds the +network's HRP specifier (`rdx`, `tdx_2_`), and its 6-character checksum is +computed over the HRP, so an address valid on one network is invalid on every +other network. - +## Backwards Compatibility + +The retired Olympia network generation (2021–2023) used different address +formats and APIs; its end state was migrated into Babylon's genesis. Olympia +is not addressable in this namespace. ## Test Cases - +This is a list of manually composed examples: -## Additional Considerations (*OPTIONAL) +``` +# Radix mainnet +radix:mainnet - +# Radix Stokenet (primary public testnet) +radix:stokenet +``` -## References +## Additional Considerations + +### Rejected idea: numeric network-ID references - +- [Radix Networks][] - network IDs, logical names, gateway URLs and native addresses per network. +- [Well-Known Addresses][] - canonical per-network address registry including `network_id` and `network_hrp_suffix`. +- [Gateway API][] - `/status/network-configuration` endpoint documentation. +- [Core API][] - node-local equivalent for integrators running their own node. [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 +[Radix Networks]: https://docs.radixdlt.com/docs/network-setup +[Well-Known Addresses]: https://docs.radixdlt.com/docs/well-known-addresses +[Gateway API]: https://radix-babylon-gateway-api.redoc.ly/ +[Core API]: https://radix-babylon-core-api.redoc.ly/ ## Copyright diff --git a/radix/caip350.md b/radix/caip350.md deleted file mode 100644 index a1d36103..00000000 --- a/radix/caip350.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -namespace-identifier: -binary-key: -title: <{namespace common name} [, aka ecosystem name]> -discussions-to: -author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> -status: Draft -type: Informational -created: -requires: ---- - -## Namespace Reference -ChainType binary key: `0xXXXX` -[CAIP-104] namespace: `XXXXX` - -## Chain reference - - - -### Text representation - - - - - -#### Text -> customary (CAIP-2) conversion - - - -#### Customary (CAIP-2) -> text conversion - - - -### Binary representation - - - -#### Text -> binary conversion - - - -#### Binary -> text conversion - - - -### Examples - -## Addresses - -### Text representation - - - -#### Text -> native conversion - - - - - -#### Native -> text conversion - - - - -### Binary representation - - - -#### Text -> binary conversion - - - -#### Binary -> text conversion - - - -### Examples - -## Error handling - - - - - -## Implementation considerations - - - - - -## Extra considerations - - - diff --git a/radix/caipX.md b/radix/caipX.md deleted file mode 100644 index 23c21c99..00000000 --- a/radix/caipX.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -namespace-identifier: <{name of folder}-caip{X}> where X = the CAIP being applied to this namespace -title: <{namespace common name} [, aka ecosystem name] - {common name for type of entity identified by Caip-X}> -author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> -discussions-to: -status: Draft -type: Informational -created: -requires (*optional): <["CAIP-X", "CAIP-Y"]> -replaces (*optional): ---- - -## Introduction - - - -## Specification - -### Semantics - - - -### Syntax - - - -### Resolution Mechanics - - - -## Rationale - - - -### Backwards Compatibility - - - -## Test Cases - - - -## Additional Considerations (*OPTIONAL) - - - -## References - - - -[CAIP-2 Profile]: ./caip2.md -[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 -[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 - -## Copyright - -Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 0479a9fd0fb43bb449b9ae024cfce77f3cbaf14c Mon Sep 17 00:00:00 2001 From: Avaunt Date: Mon, 3 Aug 2026 10:07:20 +0100 Subject: [PATCH 3/5] Remove bech32m_check.mjs file, which contained validation and encoding functions for Radix bech32m addresses. --- bech32m_check.mjs | 57 ----------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 bech32m_check.mjs diff --git a/bech32m_check.mjs b/bech32m_check.mjs deleted file mode 100644 index 061d05ca..00000000 --- a/bech32m_check.mjs +++ /dev/null @@ -1,57 +0,0 @@ -// Validate and re-encode Radix bech32m addresses for CAIP profile test cases. -const CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"; -const BECH32M_CONST = 0x2bc830a3; - -function polymod(values) { - const gen = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]; - let chk = 1; - for (const v of values) { - const b = chk >>> 25; - chk = ((chk & 0x1ffffff) << 5) ^ v; - for (let i = 0; i < 5; i++) if ((b >>> i) & 1) chk ^= gen[i]; - } - return chk >>> 0; -} - -const hrpExpand = (hrp) => [ - ...[...hrp].map((c) => c.charCodeAt(0) >> 5), - 0, - ...[...hrp].map((c) => c.charCodeAt(0) & 31), -]; - -function decode(addr) { - const pos = addr.lastIndexOf("1"); - const hrp = addr.slice(0, pos); - const data = [...addr.slice(pos + 1)].map((c) => CHARSET.indexOf(c)); - if (data.includes(-1)) return { hrp, data: null, ok: false }; - const ok = polymod([...hrpExpand(hrp), ...data]) === BECH32M_CONST; - return { hrp, data: data.slice(0, -6), ok }; -} - -function encode(hrp, values) { - const mod = polymod([...hrpExpand(hrp), ...values, 0, 0, 0, 0, 0, 0]) ^ BECH32M_CONST; - const checksum = Array.from({ length: 6 }, (_, i) => (mod >>> (5 * (5 - i))) & 31); - return hrp + "1" + [...values, ...checksum].map((v) => CHARSET[v]).join(""); -} - -const tests = [ - "account_rdx129a9wuey40lducsne6r8e5q7xmt07068gcede0x0nrwtsnehpkf6zh", - "resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd", - "resource_tdx_2_1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxtfd2jc", - "resource_rdx1nfxxxxxxxxxxed25sgxxxxxxxxx002236757237xxxxxxxxxed25sg", - "resource_tdx_2_1nfxxxxxxxxxxed25sgxxxxxxxxx002236757237xxxxxxxxx3e2cpa", - "component_tdx_2_1cptxxxxxxxxxfaucetxxxxxxxxx000527798379xxxxxxxxxyulkzl", -]; -for (const t of tests) { - const { hrp, data, ok } = decode(t); - console.log(`${ok ? "VALID " : "INVALID"} hrp=${hrp.padEnd(20)} datalen=${data ? data.length : 0} ${t}`); -} - -// Repair the x402 example account: keep the data part, recompute checksums. -const { data } = decode(tests[0]); -const entityByte = (data[0] << 3) | (data[1] >> 2); -console.log("\nEntity byte of example data: 0x" + entityByte.toString(16)); -const mainnetAccount = encode("account_rdx", data); -const stokenetAccount = encode("account_tdx_2_", data); -console.log("Repaired mainnet account: ", mainnetAccount, decode(mainnetAccount).ok); -console.log("Derived stokenet account: ", stokenetAccount, decode(stokenetAccount).ok); From b04c5a9de343ab1c4d280d20bfcd4e2600aabafb Mon Sep 17 00:00:00 2001 From: Avaunt Date: Mon, 3 Aug 2026 10:21:48 +0100 Subject: [PATCH 4/5] Update governance section in README.md to reflect the disbanding of RDX Works and the transition of protocol maintenance to the Radix Foundation, including details about the upcoming Marshall Islands DAO. --- radix/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radix/README.md b/radix/README.md index 178ca984..bafc0084 100644 --- a/radix/README.md +++ b/radix/README.md @@ -49,9 +49,8 @@ encodings and is out of scope for this namespace. ## Governance -The Radix protocol and its reference node implementation are developed by RDX -Works and stewarded by the Radix Foundation. Protocol changes ship as named -"protocol updates" (e.g. "Anemone", "Bottlenose", "Cuttlefish") which are +The Radix protocol and its reference node implementation were originally developed by RDX Works and stewarded by the Radix Foundation. RDX Works has since disbanded and protocol changes are now governed and maintained by the Radix Foundation. Note: As of 3rd August 2026 a Marshall Islands DAO is currently being created with the intention of the Radix Foundation handing over IP, Crypto assets and relevant accounts to the Marshall Islands DAO. The creation of the DAO is expected to be completed before the end of 2026. +Protocol changes ship as named "protocol updates" (e.g. "Anemone", "Bottlenose", "Cuttlefish") which are enacted at epoch boundaries once a supermajority of validator stake signals readiness. There is no on-chain permissionless improvement-proposal process; specifications and integrator guidance are published in the official From a6016e0eaa817c57993681fa5f8e50a9d3a8d618 Mon Sep 17 00:00:00 2001 From: Avaunt Date: Thu, 6 Aug 2026 10:10:52 +0100 Subject: [PATCH 5/5] Set discussions-to header to the namespaces PR URL Co-authored-by: Cursor --- radix/README.md | 2 +- radix/caip10.md | 2 +- radix/caip19.md | 2 +- radix/caip2.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radix/README.md b/radix/README.md index bafc0084..9baecae3 100644 --- a/radix/README.md +++ b/radix/README.md @@ -2,7 +2,7 @@ namespace-identifier: radix title: Radix DLT author: ["Avaunt (@AVaunt-consulting)"] -# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/198 status: Draft type: Informational created: 2026-07-28 diff --git a/radix/caip10.md b/radix/caip10.md index 221f7ada..a54a2638 100644 --- a/radix/caip10.md +++ b/radix/caip10.md @@ -2,7 +2,7 @@ namespace-identifier: radix-caip10 title: Radix DLT Namespace - Accounts author: ["Avaunt (@AVaunt-consulting)"] -# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/198 status: Draft type: Standard created: 2026-08-01 diff --git a/radix/caip19.md b/radix/caip19.md index 2e2b6302..59e2c080 100644 --- a/radix/caip19.md +++ b/radix/caip19.md @@ -2,7 +2,7 @@ namespace-identifier: radix-caip19 title: Radix DLT Namespace - Assets author: ["Avaunt (@AVaunt-consulting)"] -# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/198 status: Draft type: Standard created: 2026-08-01 diff --git a/radix/caip2.md b/radix/caip2.md index d809be34..f1085509 100644 --- a/radix/caip2.md +++ b/radix/caip2.md @@ -2,7 +2,7 @@ namespace-identifier: radix-caip2 title: Radix DLT Namespace - Chains author: ["Avaunt (@AVaunt-consulting)"] -# discussions-to: add URL of the namespaces PR (or a GitHub Discussion) once opened +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/198 status: Draft type: Standard created: 2026-08-01