Skip to content

Commit ff57353

Browse files
authored
Merge pull request #395 from 0xMonoAx/main
Update docs CAIP-350
2 parents cb1f3b8 + fab6a9a commit ff57353

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

CAIPs/caip-350.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,43 @@ Standards like CAIP-2 and CAIP-10 are simple text representations of addresses a
3030

3131
## Specification
3232

33-
The purpose of each namespace's profile is to specify deterministic and unambiguous conversions between the following format-pairs:
33+
The purpose of each namespace's profile is to specify deterministic and unambiguous conversions between format pairs for the Addresses and Chain References of the ecosystem.
3434

35-
- Customary address text formats of the ecosystem (which may also be described in its [CAIP-10] profile) and the Interoperable Names text representation defined in [ERC-7930]
36-
- Customary chain reference text formats of the ecosystem (which may also be described in [CAIP-2]) and the text representation defined in [ERC-7930]
37-
- [ERC-7930]'s Interoperable Address and [ERC-7930]'s Interoperable Name of the ecosystem's chain references
38-
- [ERC-7930]'s Interoperable Address and [ERC-7930]'s Interoperable Name of the ecosystem's addresses *for all address formats of said ecosystem*
35+
#### CAIP-2/CAIP-10 Compatibility
36+
The "standard text" in CAIP-350 profiles is a variant of [CAIP-2]/[CAIP-10] that is identical for most namespaces, but less lossy for those where length restrictions cause truncation (e.g., Solana's genesis blockhash).
37+
38+
Each CAIP-350 profile MUST state whether its standard text differs from [CAIP-2]/[CAIP-10], and how.
39+
40+
### Chain References
41+
- **customary text ↔ standard text**: Between customary chain reference text formats of the ecosystem (which may also be described in [CAIP-2]) and a standard text representation
42+
- **standard text ↔ binary**: Between the standard text representation and a binary _ChainReference_ representation
43+
44+
### Addresses
45+
- **customary text ↔ standard text**: Between customary address text formats of the ecosystem (which may also be described in its [CAIP-10] profile) and a standard text representation
46+
- **standard text ↔ binary**: Between the standard text representation and a binary _Address_ representation, for all address formats of said ecosystem
3947

4048
Crucially, each namespace MUST also define exactly ONE (1) 2-byte bytestring to uniquely identify the namespace itself, without colliding with previous definitions, which will provide the value for the `chainType` property defined in [ERC-7930].
4149

4250
Every namespace MUST specify all of the above in a CAIP-350 profile to maximize interoperability and review.
4351
A [template for these profiles](https://github.com/ChainAgnostic/namespaces/blob/main/_template/caip350.md) is defined in the Namespaces registry.
4452

53+
### Chain Identifier Text Representation
54+
55+
56+
The standard text representation of a chain identifier MUST follow the format:
57+
```
58+
<namespace>:<chainReference>
59+
```
60+
Where:
61+
- `<namespace>` is the [CAIP-104] namespace identifier (e.g., `eip155`, `solana`, `bip122`)
62+
- `<chainReference>` is the chain-specific reference as defined by each namespace's CAIP-350 profile
63+
64+
65+
This format ensures global uniqueness across all namespaces and maintains consistency with [CAIP-2].
66+
67+
68+
Each namespace's CAIP-350 profile MUST define only the syntax and semantics of the `<chainReference>` portion. The `<namespace>:` prefix is implicitly applied as defined by this specification and SHOULD NOT be redefined in individual profiles.
69+
4570
## Rationale
4671

4772
The main alternative to this standard would've been to define all formats and conversions in [ERC-7930], turning it into a Living ERC, which was not ideal since:

0 commit comments

Comments
 (0)