Skip to content

Commit a2e5bd9

Browse files
authored
Update docs: template and namespace profiles (#165)
2 parents 906eb0f + 56071be commit a2e5bd9

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

_template/caip350.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@ created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
1010
requires: <list of standards required to understand this one>
1111
---
1212

13-
## Chain reference
14-
13+
## Namespace Reference
1514
ChainType binary key: `0xXXXX`
1615
[CAIP-104] namespace: `XXXXX`
1716

17+
## Chain reference
18+
1819
<!-- check existing caip350 profiles on namespaces chainagnostic.org as well as open PRs for collisions with previously-registered binary keys -->
1920

2021
### Text representation
2122

22-
<!-- a description of the format of chain namespace + reference intended for the text representation of ERC-7930 Interoperable Addresses -->
23+
<!-- a description of the format of the chain reference specific to this namespace -->
24+
<!-- this defines ONLY the chainReference portion; per CAIP-350, the full chain identifier is <namespace>:<chainReference> -->
2325
<!-- MUST include how to represent the ChainType without a reference, since that is supported by [ERC-7930] -->
2426

25-
##### Text representation -> CAIP-2 conversion
27+
##### Text representation -> customary (CAIP-2) conversion
2628

2729
<!-- instructions for how to convert from the above to a CAIP-2 string -->
2830

29-
##### CAIP-2 - text representation conversion
31+
##### Customary (CAIP-2) conversion - text representation conversion
3032

31-
<!-- instructions for how to convert from a CAIP-2 string to the Interoperable Address format -->
33+
<!-- instructions for how to convert from a CAIP-2 string to this standard's text representation -->
3234

3335
#### Binary representation
3436

eip155/caip350.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ See [EIP-155] and [EIP-2294].
2222
### Text representation
2323

2424
```
25-
eip155:<number>
25+
<number>
2626
```
27+
2728
Where `<number>` is the decimal representation of the chain's `chainId`, without leading zeroes.
2829

29-
##### Text representation -> CAIP-2 conversion
30+
> **Note:** Per [CAIP-350], the full chain identifier is `eip155:<number>` (e.g., `eip155:1`, `eip155:10`).
31+
32+
33+
##### Text representation -> customary (CAIP-2) conversion
3034

3135
In the case where the `chainId` is larger than what can be represented in 32 decimal characters, the leading 32 characters should be used.
3236

33-
##### CAIP-2 - text representation conversion
37+
##### Customary (CAIP-2) conversion - text representation conversion
3438

3539
This transformation would not be fully deterministic in the case where `chainId`s larger than 10^32 are used. It is assumed wallets and other software will be able to differentiate between chains from just the leading 32 decimal characters, and use a lookup table of popular chains to complete the missing information to convert CAIP-2 identifiers to this standard.
3640

@@ -60,8 +64,11 @@ Bytes of EVM addresses are trivially stored as the payload.
6064
It's worth noting that addresses are currently 20 bytes, but that might change in the future, most likely to 32 bytes [^2]
6165

6266
### Text representation
67+
```
68+
<address>
69+
```
70+
Where `<address>` is the 20 bytes of an EVM address, hexadecimal-encoded according to [EIP-55] with `0x` prefix.
6371

64-
For text representation, the 20 bytes of EVM addresses should be hexadecimal-encoded according to [EIP-55].
6572
This standard deliberately does not define the text representation of EVM addresses if they are extended in the future, since it's not possible to know which human-readable representation will be more familiar to users in such hypothetical scenario.
6673
This profile should be amended in the future to reflect it in such a case.
6774

solana/caip350.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@ We chose to use the blockhash in full, as opposed to using the [CAIP-2], for con
2222

2323
### Text representation
2424

25-
The full base58btc-encoded genesis blockhash is used. This is larger than the [CAIP-2] representation.
25+
```
26+
<genesis_blockhash>
27+
```
28+
Where `<genesis_blockhash>` is the full 44-character base58btc-encoded genesis blockhash. This is larger than the [CAIP-2] representation (which truncates to 32 characters).
2629

27-
##### Text representation -> CAIP-2 conversion
30+
> **Note:** Per [CAIP-350], the full chain identifier is `solana:<genesis_blockhash>` (e.g., `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`).
2831
29-
The leading 32 characters are used, and the rest discarded, in a manner similar to what is specified on [this namespace's CAIP-2](caip2.md) profile.
3032

31-
##### CAIP-2 - text representation conversion
33+
##### Text representation -> customary (CAIP-2) conversion
34+
35+
The leading 32 characters are used, and the rest discarded, in a manner similar to what is specified on [this namespace's CAIP-2](caip2.md) profile (e.g., `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`).
36+
37+
##### Customary (CAIP-2) conversion?CAIP-2 - text representation conversion
3238

3339
This transformation is not fully deterministic.
3440
It is assumed wallets and other software will be able to differentiate between chains with just the leading 32 base58btc-encoded characters, and use a lookup table of chains to complete the missing information to convert [CAIP-2] identifiers to those defined in this standard.
@@ -61,7 +67,11 @@ Solana addresses are 32-byte public keys, conventionally displayed to users as b
6167

6268
### Text representation
6369

64-
base58btc-encoded ASCII of the entire public key bytes.
70+
```
71+
<public_key>
72+
```
73+
74+
Where `<public_key>` is the base58btc-encoded ASCII of the entire 32-byte public key.
6575

6676
##### Text representation -> native representation conversion
6777

0 commit comments

Comments
 (0)