Skip to content

Commit 002194a

Browse files
authored
feat: merge CAIP69 into CAIP10 for specifying EOA wallets (#107)
2 parents 2d72d92 + 01e33ef commit 002194a

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

eip155/caip10.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,33 @@ While Ethereum "accounts" were the unstated norm in the definition of
2121
[CAIP-10][], there are still some particularities of the syntax that should be
2222
specified for the unfamiliar.
2323

24+
### Special case of EOA
25+
26+
To express Ethereum account without reference to any specific [EIP-155][] chain ID, CAIP-10 identifiers can use the special `chainId` segment `0`.
27+
28+
In the Ethereum account system, "externally owned accounts" (i.e. "offchain" wallets) are controlled by user agents and not by on-chain entities (i.e. deployed or deployable smart contract code).
29+
The special chainId `0` SHOULD only be used for accounts that can be used in off-chain contexts, i.e. without the use of an Ethereum node.
30+
31+
Note that a given address cannot be assumed to work on all current and future networks with an [EIP-155][] `chainId`, which may express or derive addresses differently for a given private key; a user account expressed with `chainId` segment of 0 is assumed to control the same account on `chainId` 1 and most ethereum chains, but MAY control a different account or additional accounts on networks that extend the account or addressing model of Ethereum, assume different key or hash derivations, etc.
32+
2433
## Syntax
2534

2635
Ethereum addresses were, historically, case-insensitive and normalized to use
2736
all-lowercase letters (`abcdef`) like most hexadecimal numeric types. With the
28-
ratification of [EIP55][], however, a particular normalization of lowercase- and
37+
ratification of [EIP-55][], however, a particular normalization of lowercase- and
2938
uppercase- `abcdefABCDEF` characters was invented as an efficient form of
30-
checksum. See [EIP55][] for specification.
39+
checksum. See [EIP-55][] for specification.
40+
41+
The chain ID will be used to represent blockchain except special case of 0 as chainID to represent EOA.
42+
43+
The `chain_id` string will be ammended as follows:
44+
45+
```
46+
chain_id: namespace + ":" + network_id + ":" + reference
47+
network_id: [0-9]{1,19}
48+
namespace: [-a-z0-9]{3,8}
49+
reference: 0x[a-fA-F0-9]{1,32}
50+
```
3151

3252
### Backwards Compatibility
3353

@@ -42,6 +62,9 @@ accounts in this manner.
4262
## Test Cases
4363

4464
```
65+
# EOA
66+
eip155:0:0x839395e20bbB182fa440d08F850E6c7A8f6F0780
67+
4568
# Ethereum mainnet (valid/checksummed)
4669
eip155:1:0x22227A31dd842196A246d8f3b775998560eAa61d
4770
@@ -56,24 +79,31 @@ eip155:137:0x0495766CD136138FC492DD499B8DC87A92D6685B
5679
5780
```
5881

82+
## Security Considerations
83+
84+
As the Ethereum namespace evolved, user-agents that connect to dapps through an [EIP-1193][] interface started to accrue "off-chain" use-cases such as authenticating control of an onchain account with an "off-chain" signature (i.e. a transaction signed by the wallet and verified by a dapp or website without either party submitting it to a node or running any on-chain functions). It is RECOMMENDED that wallets using the chainId of `0` be authenticated in a standardized and secure manner which produces verifiable receipts of the authenticaiton event, such as that documented in [ERC-4361][] and extended by [CAIP-122][].
85+
5986
## References
6087

61-
- [EIP155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs
88+
- [EIP-155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs
6289
- [ethereum-lists/chains][]: An open registry for eip155 network operators to claim a
6390
unique chainID and self-publish RPC/node information for them.
64-
- [ERC20][]: Basic [aka Fungible] Token Standard
65-
- [ERC721][]: Non-Fungible Token Standard
91+
- [ERC-20][]: Basic [aka Fungible] Token Standard
92+
- [ERC-721][]: Non-Fungible Token Standard
6693

6794
[Chainid.network]: https://github.com/ethereum-lists/chains
6895
[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md
6996
[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md
7097
[CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md
7198
[CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md
7299
[CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md
73-
[EIP155]: https://eips.ethereum.org/EIPS/eip-155
74-
[EIP55]: https://eips.ethereum.org/EIPS/eip-55
75-
[ERC20]: https://eips.ethereum.org/EIPS/eip-20
76-
[ERC721]: https://eips.ethereum.org/EIPS/eip-721
100+
[CAIP-122]: https://chainagnostic.org/CAIPs/caip-122
101+
[ERC-4361]: https://eips.ethereum.org/EIPS/eip-4361
102+
[EIP-1193]: https://eips.ethereum.org/EIPS/eip-1193
103+
[EIP-155]: https://eips.ethereum.org/EIPS/eip-155
104+
[EIP-55]: https://eips.ethereum.org/EIPS/eip-55
105+
[ERC-20]: https://eips.ethereum.org/EIPS/eip-20
106+
[ERC-721]: https://eips.ethereum.org/EIPS/eip-721
77107

78108

79109
## Rights

0 commit comments

Comments
 (0)