You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CAIPs/caip-350.md
+30-5Lines changed: 30 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,18 +30,43 @@ Standards like CAIP-2 and CAIP-10 are simple text representations of addresses a
30
30
31
31
## Specification
32
32
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.
34
34
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
39
47
40
48
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].
41
49
42
50
Every namespace MUST specify all of the above in a CAIP-350 profile to maximize interoperability and review.
43
51
A [template for these profiles](https://github.com/ChainAgnostic/namespaces/blob/main/_template/caip350.md) is defined in the Namespaces registry.
44
52
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
+
45
70
## Rationale
46
71
47
72
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