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: eip155/caip350.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,19 @@ See [EIP-155] and [EIP-2294].
22
22
### Text representation
23
23
24
24
```
25
-
eip155:<number>
25
+
<number>
26
26
```
27
+
27
28
Where `<number>` is the decimal representation of the chain's `chainId`, without leading zeroes.
28
29
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
30
34
31
35
In the case where the `chainId` is larger than what can be represented in 32 decimal characters, the leading 32 characters should be used.
32
36
33
-
##### CAIP-2 - text representation conversion
37
+
##### Customary (CAIP-2) conversion - text representation conversion
34
38
35
39
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.
36
40
@@ -60,8 +64,11 @@ Bytes of EVM addresses are trivially stored as the payload.
60
64
It's worth noting that addresses are currently 20 bytes, but that might change in the future, most likely to 32 bytes [^2]
61
65
62
66
### 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.
63
71
64
-
For text representation, the 20 bytes of EVM addresses should be hexadecimal-encoded according to [EIP-55].
65
72
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.
66
73
This profile should be amended in the future to reflect it in such a case.
Copy file name to clipboardExpand all lines: solana/caip350.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,19 @@ We chose to use the blockhash in full, as opposed to using the [CAIP-2], for con
22
22
23
23
### Text representation
24
24
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).
26
29
27
-
##### Text representation -> CAIP-2 conversion
30
+
> **Note:** Per [CAIP-350], the full chain identifier is `solana:<genesis_blockhash>` (e.g., `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`).
28
31
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.
30
32
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
32
38
33
39
This transformation is not fully deterministic.
34
40
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
61
67
62
68
### Text representation
63
69
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.
65
75
66
76
##### Text representation -> native representation conversion
0 commit comments