-
Notifications
You must be signed in to change notification settings - Fork 124
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
Open
mjuchli-da
wants to merge
7
commits into
ChainAgnostic:main
Choose a base branch
from
mjuchli-da:feat/add-canton
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Canton Namespace #201
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e27ad30
Add Canton Namespace
mjuchli-da fce8318
update PR links
mjuchli-da 520b755
add readme; co-author; and some minor tweaks
mjuchli-da d0c32f5
character saving
mjuchli-da cb9010b
address review comments
mjuchli-da 4f69478
review comments
mjuchli-da 3accc13
address review
mjuchli-da File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| 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%3A1220... | ||
| canton:testnet-global:bob%3A%3A1220... | ||
| ``` | ||
|
|
||
| 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` length **MUST** be <= 128 characters. The party namespace takes 68 characters, the url encoded colons 6 characters, the `canton:` prefix 7 characters, and thus leaving 49 characters for the `{networkIdentifier}:{partyHint}`. | ||
|
|
||
| In the case of `networkIdentifier` being `mainnet-global` (14 characters), and 1 colon separator, 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| 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}`) | ||
|
|
||
| ### 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-global/slip44:6767`. | ||
|
|
||
|
|
||
| ### 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}) | ||
|
mjuchli-da marked this conversation as resolved.
|
||
|
|
||
| asset_type = {chain_id}/cip-56:{asset_reference} | ||
| ``` | ||
|
|
||
| *Percent-encoding preserves ensures compliance with the CAIP-19 grammar while preserving Canton's existing Party ID semantics.* | ||
|
|
||
| For Example: | ||
| ``` | ||
| canton:mainnet-global/cip-56:decentralized-usdc-interchain-rep%3A%3A12208115f1e168dd7e792320be9c4ca720c751a02a3053c7606e1c1cd3dad9bf60ef.USDCx | ||
| ``` | ||
|
|
||
| **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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 a limited number of characters for the `{dedicated-name}`. | ||
|
|
||
| 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.