-
Notifications
You must be signed in to change notification settings - Fork 123
Add Canton Namespace #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Canton Namespace #201
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| namespace-identifier: canton | ||
| title: Canton Namespace | ||
| author: Marc Juchli (@mjuchli-da) <marc.juchli@digitalasset.com> | ||
| status: Draft | ||
| type: Informational | ||
| created: 2026-08-21 | ||
| --- | ||
|
|
||
| # Namespace for Canton Network | ||
|
|
||
| The prefix `canton` designates the CAIP-conformant schemata of the Canton namespace. | ||
|
|
||
| ## References | ||
|
|
||
| - [CAIP-2](./caip-2) | ||
| - [CAIP-10](./caip-10) | ||
| - [CAIP-19](./caip-19) | ||
|
|
||
| ## Copyright | ||
|
|
||
| Copyright and related rights waived via CC0. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| namespace-identifier: canton-caip10 | ||
| title: Canton Namespace - Addresses | ||
| author: Marc Juchli (@mjuchli-da) <marc.juchli@digitalasset.com> | ||
| discussions-to: https://github.com/ChainAgnostic/namespaces/pull/201 | ||
| status: Draft | ||
| type: Standard | ||
| created: 2026-08-21 | ||
| requires: ["CAIP-2", "CAIP-10"] | ||
| --- | ||
|
|
||
| # CAIP-10 | ||
|
|
||
| For context, see the [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) specification. | ||
|
|
||
| ## Syntax | ||
|
|
||
| CAIP‑10 defines `account_id` as `{chain_id}:{account_address}` | ||
| - `chain_id` the [CAIP2 Canton ID](./caip2.md) | ||
| - `account_address` the user or entity address on that chain (`[-.%a-zA-Z0-9]{1,128}`). | ||
|
|
||
| The `account_address` is derived from the canonical textual representation of a Canton Party ID. A given Party ID (e.g. `account_address`) is shared across multiple synchronizers (e.g. `chain_id`). | ||
|
|
||
| A Canton Party ID has the following canonical form: | ||
| ``` | ||
| {partyHint}::{partyNamespace} | ||
| ``` | ||
|
|
||
| As the `:` character is not permitted in the CAIP-10 account_address, the canonical Party ID is percent-encoded before being embedded in the CAIP-10 identifier. The resulting format is: | ||
| ``` | ||
| canton:{networkIdentifier}:{partyHint}%3A%3A{partyNamespace} | ||
| ``` | ||
|
|
||
| Examples: | ||
| ``` | ||
| canton:mainnet-global:alice%3A%3A123abc... | ||
| canton:testnet-global:bob%3A%3A1220def... | ||
| ``` | ||
|
|
||
| The percent-encoded value preserves the canonical Party ID and can be decoded by implementations using standard percent-decoding. This approach ensures compliance with the CAIP-10 grammar while preserving Canton's existing Party ID semantics and avoiding the introduction of a new account address format. | ||
|
|
||
| **Note:** the same PartyId (e.g. account_address) is shared across multiple synchronizers (e.g. chain_id). | ||
|
|
||
| ## Limitations | ||
|
|
||
| The `account_address` lenght **MUST** be <= 128 characters. The party namespace takes 64 characters, the url encoded colons 4 characters, the `canton:` prefix 7 characters, and thus leaving 53 characters for the `{networkIdentifier}:{partyHint}`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be percent encoded colons and it's 6 characters, not 4. Isn't the party namespace 68 characters because of the prefix? Also, some of the arithmetics seem confusing here, I'm not sure it's 32 characters for the party hint, but I haven't done the math. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lenght -> Length |
||
|
|
||
| In the case of `networkIdentifier` being `mainnet-global`, the party hint must be <= 32 characters. | ||
|
|
||
|
|
||
| ## References | ||
|
|
||
| - [Canton Core Concepts](https://docs.canton.network/overview/understand/core-concepts#party-identifier-format): Party identifier format | ||
|
|
||
| ## Rights | ||
|
|
||
| Copyright and related rights waived via CC0. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| namespace-identifier: canton-caip19 | ||
| title: Canton Namespace - Assets | ||
| author: Marc Juchli (@mjuchli-da) <marc.juchli@digitalasset.com>, Greg May (@mnrgreg) | ||
| discussions-to: https://github.com/ChainAgnostic/namespaces/pull/201 | ||
| status: Draft | ||
| type: Standard | ||
| created: 2026-08-21 | ||
| requires: ["CAIP-2", "CAIP-19"] | ||
| --- | ||
|
|
||
| # CAIP-19 | ||
|
|
||
| For context, see the [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) specification. | ||
|
|
||
|
|
||
| ## Syntax | ||
|
|
||
| The Canton ecosystem defines a standardized token representation through CIP-0056. To enable interoperability with chain-agnostic tooling, Canton assets are identified using the CAIP-19 asset identification format. | ||
|
|
||
| The `asset type` follows `chain_id + "/" + asset_namespace + ":" + asset_reference`, whereas: | ||
| - `chain_id` is the Canton CAIP-2 | ||
| - `asset_namespace` identifies the asset identification scheme (`[-a-z0-9]{3,8}`) | ||
| - `asset_reference` identifies the asset within that scheme (`[-.%a-zA-Z0-9]{1,128}`) | ||
|
|
||
|
mjuchli-da marked this conversation as resolved.
|
||
| ### Assets with SLIP-44 | ||
|
|
||
| For assets with a SLIP-44 registered coin type, such as `CC` with `6767`, the format is: | ||
| ``` | ||
| asset_namespace = slip44 | ||
| asset_reference = 6767 // CC | ||
| asset_type = {chain_id}/slip44:6767 | ||
| ``` | ||
|
|
||
| Hence, for `CC` on `canton:mainnet-global`, the `asset_type` is `canton:mainnet/slip44:6767`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it |
||
|
|
||
|
|
||
| ### Assets without SLIP-44 | ||
|
|
||
|
mjuchli-da marked this conversation as resolved.
|
||
| For CIP-0056 assets without a SLIP-44 coin type, we leverage CIP-0056 that identifies an instrument by an `InstrumentId`, comprising an administrating party (`admin`) and an instrument identifier (`id`). | ||
| Both components are required to identify the instrument: a single administrator **MAY** administer multiple instruments, so `admin` alone does not identify an asset. | ||
| The `asset_reference` therefore combines the two. | ||
|
|
||
| ``` | ||
| asset_namespace = cip-56 | ||
| asset_reference = percentEncode({instrumentId.admin}) + "." + percentEncode({instrumentId.id}) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think a brief description of |
||
|
|
||
| asset_type = {chain_id}/cip-56:{asset_reference} | ||
| ``` | ||
|
|
||
| For Example: | ||
| ``` | ||
| canton:mainnet-global/cip-56:decentralized-usdc-interchain-rep%3A%3A12208115f1e168dd7e792320be9c4ca720c751a02a3053c7606e1c1cd3dad9bf60ef/USDCx | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The separator is |
||
| ``` | ||
|
|
||
| **Note:** CAIP-19 defines a maximum length of 128 characters for the `asset_reference` component. | ||
| A Canton party identifier of the form `{hint}::{fingerprint}` consumes 68 characters for the fingerprint, 6 for the percent-encoded `::`, and the delimiter consumes 1, leaving 53 characters to be shared between the administrator's party hint and the percent-encoded instrument identifier. | ||
| Implementations **MUST** ensure that the resulting `asset_reference` complies with the CAIP-19 length constraint. | ||
|
|
||
| The optional `token_id` component is not used by CIP-0056, as both InstrumentId components identify an instrument rather than an individual unit of it. | ||
| Should a per-unit identifier become necessary, `token_id` remains available for that purpose, in which case an `asset_id` follows `asset_type + "/" + token_id` | ||
|
|
||
| ## References | ||
|
|
||
| - [Canton CAIP-2](./caip2.md): Canton chain identifier profile | ||
| - [CIP-0056](https://github.com/canton-foundation/cips/blob/main/cip-0056/cip-0056): Canton token standard | ||
| - [SLIP-44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md): Registered coin types | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There exists a precedent for using a compound |
||
| ## Rights | ||
|
|
||
| Copyright and related rights waived via CC0. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| namespace-identifier: canton-caip2 | ||
| title: Canton Namespace - Chains | ||
| author: Marc Juchli (@mjuchli-da) <marc.juchli@digitalasset.com> | ||
| discussions-to: https://github.com/ChainAgnostic/namespaces/pull/201 | ||
| status: Draft | ||
| type: Standard | ||
| created: 2026-08-21 | ||
| requires: CAIP-2 | ||
| --- | ||
|
|
||
| # CAIP-2 | ||
|
|
||
| For context, see the [CAIP-2](https://chainagnostic.org/CAIPs/caip-2) specification. | ||
|
|
||
|
|
||
| ## Syntax | ||
|
|
||
| CAIP‑2 identifiers follow: | ||
|
|
||
| ``` | ||
| chain_id: namespace + ":" + reference | ||
| namespace: [-a-z0-9]{3,8} | ||
| reference: [-_a-zA-Z0-9]{1,32} | ||
| ``` | ||
|
|
||
| CAIP-2 constrains the blockchain reference component to a maximum length of 32 characters and restricts the set of permitted characters. As Canton Synchronizer identifiers do not conform to these constraints, they cannot be used directly as CAIP-2 blockchain identifiers. | ||
|
|
||
| ### Namespace | ||
|
|
||
| The namespace is set to `canton`. | ||
|
|
||
| ### Reference | ||
|
|
||
| To provide a compliant and stable `reference`, Canton Synchronizer IDs **MUST** define a unique network identifier (alias) that satisfies the CAIP-2 reference requirements. This identifier serves as the blockchain reference in the CAIP-2 chain identifier and **MUST** uniquely resolve to the corresponding Synchronizer. | ||
|
|
||
| The mapping between a network identifier and its Synchronizer identifier **MUST** be deterministic and authoritative, ensuring that all implementations resolve the same CAIP-2 identifier to the same Canton network. | ||
|
|
||
| ### Global synchronizers | ||
|
|
||
| The `chain_id` for the well known global synchronizers are: | ||
|
|
||
| ``` | ||
| canton:mainnet-global # Global Synchronizer MainNet | ||
| canton:testnet-global # Global Synchronizer TestNet | ||
| canton:devnet-global # Global Synchronizer DevNet | ||
| ``` | ||
|
|
||
| See reference below for exact `domainId` values. | ||
|
|
||
| ### Other synchronizers | ||
|
|
||
| Aliases for dedicated synchronizers **MAY** be proposed and **SHOULD** be prefixed with the corresponding network: | ||
|
|
||
| ``` | ||
| canton:{mainnet|testnet|devnet}-dedicated-name | ||
| ``` | ||
|
|
||
|
mjuchli-da marked this conversation as resolved.
|
||
| The complete network identifier, prefix and dedicated name together, **MUST** satisfy the CAIP-2 reference production `[-_a-zA-Z0-9]{1,32}`, leaving at most 24 characters for `{dedicated-name}`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically it's at most 25 characters in that case, since devnet is shorter than the others? |
||
|
|
||
| This approach provides human-readable, interoperable identifiers while decoupling the CAIP representation from Canton's internal identifier format and remaining compatible with future network evolution. | ||
|
|
||
| ## References | ||
|
|
||
| - [The Global Synchronizer](https://docs.canton.network/overview/understand/global-synchronizer#network-environments): DevNet, TestNet, and MainNet environments | ||
| - [Scan Global Synchronizer Connectivity API](https://docs.canton.network/sdks-tools/api-reference/splice-scan-gs-connectivity-api): Current synchronizer IDs (`domainId`) for each network | ||
|
|
||
| ## Rights | ||
|
|
||
| Copyright and related rights waived via CC0. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider using the prefix 1220 for both examples, it's weird having one with and one without