From 484e4e4242fafe989c3ab462e1615f1dfe4ebc4c Mon Sep 17 00:00:00 2001 From: By_caballero <37127325+bumblefudge@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:21:09 -0800 Subject: [PATCH 1/5] to add eosio.md --- eosio.md | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 eosio.md diff --git a/eosio.md b/eosio.md new file mode 100644 index 00000000..678d19e1 --- /dev/null +++ b/eosio.md @@ -0,0 +1,142 @@ +--- +namespace-identifier: eosio +title: EOSIO Namespace +author: Sebastian Montero (@sebastianmontero) +discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 +status: Draft +type: Standard +created: 2022-03-02 +updated: 2022-03-02 +requires: CAIP-2, CAIP-10 +supercedes: CAIP-7 +--- + +# Introduction + +The [EOSIO][] blockchain introduces some interesting variations on the account +model but for the sake of cross-chain addressing conforms quite well to +CASA-style URIs. + +## CAIP-2 + +*For context, see the [CAIP-2][] specification.* + +### Context + +An explanation of and specification for `chain_id` in the EOSIO development +environment can be found in the algorithm for signing transactions in the +[Transactions Protocol][] section of the developer documents, because a valid +`chain_id` is required to authorize any transaction on that chain. Further +information on querying nodes for `chain_id` can be found in the [Chain API +Plugin][] section of the API documentation, and the PR [EOSIO/eos#3425][] that +merged in those capabilities. + +The Chain ID, or rather the `chain_id` as defined by EOSIO, is always a +64-character hexadecimal string containing the SHA256 hash of the genesis state +of a given chain chain. In order to fit the CAIP-2 reference format, a 32 +character prefix of the Chain ID is used; note, however, that the longer +original will be needed to authorize new transactions. + + +### Resolution Method + +See [EOSIO/eos#3425][] and [get_info] for more information about querying +network nodes for [a SHA256 hash of the] genesis state, which is referred to as +`chain ID` and required for authorizing transactions on said chain. + +### Test Cases + +This is a list of manually composed examples + +``` +# EOS Mainnet +//get_info() --> chain_id=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 +eosio:aca376f206b8fc25a6ed44dbdc66547c + +# Jungle Testnet +//get_info() --> chain_id=e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473 +eosio:e70aaab8997e1dfce58fbfac80cbbb8f + +# Telos Mainnet +//get_info() --> chain_id=e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473 +eosio:4667b205c6838ef70ff7988f6e8257e8 + +# Telos Testnet +//get_info() --> chain_id=1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f +eosio:1eaa0824707c8c16bd25145493bf062a +``` + +## CAIP-10 + +*For context, see the [CAIP-10][] specification.* + +### Rationale + +EOSIO aligns squarely with the "account" model rather than the "UXTO" model. +Each account instantiated in a given chain exists thereafter in the state of +that chain; independent of any other additional state maintained by deployed +smart contracts, the [eosio.token][] smart contract maintains a native-token +balance for each account, and can be queried in various modes from any active +node. + +For any valid account on a given chain, not just current native-token balance +but also the "CPU" compute availability abstraction and the details of +authorization/proof-of-control can be requested from the chain's nodes using the +[get_account][] API call. It is worth noting that unlike other account-based +systems, the `[permissions][]` object (and the sui generis multi-signature system it +references) may be required to prove control of an account or authorize a +transaction. This is, of course, out of scope of this document. + +### Syntax + +See the more recent [Standard Account Name][] definition from the Glossary and +the [Naming Best Practices][] from the CDT section of the EOSIO developer +documentation for up-to-date guidance. At time of press, the following regex +accurately validated standard account names on EOSIO: +``` +[a-z][.a-z1-5]{10}[a-z1-5] +``` + +### Test Cases + +This is a list of manually composed examples: + +``` +eosio:aca376f206b8fc25a6ed44dbdc66547c:bumblefudge1 +eosio:e70aaab8997e1dfce58fbfac80cbbb8f:a..........a +eosio:4667b205c6838ef70ff7988f6e8257e8:a1234567890z +eosio:1eaa0824707c8c16bd25145493bf062a:casa2022.biz + +``` + +### Backwards Compatibility + +## References + +- [Standard Account Name][]: Canonical definition of account name constraints +- [EOSIO][]: Overview of developer documentation, starting from core [and unique] concepts +- [EOSIO/eos#3425][]: A github PR discussion detailing some key design decisions around `chain_id` + +[Transactions Protocol]: https://developers.eos.io/welcome/v2.1/protocol/transactions_protocol/#32-sign-transaction +[Chain API Plugin]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index +[EOSIO/eos#3425]: https://github.com/EOSIO/eos/pull/3425 +[EOSIO]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Naming Best Practices]: https://developers.eos.io/manuals/eosio.cdt/v1.8/best-practices/naming-conventions/#non-standard-account-names +[get_account]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_account +[get_info]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_info +[eosio.token]: https://developers.eos.io/welcome/v2.2/tutorials/eosio_token +[permissions]: https://developers.eos.io/welcome/v2.1/glossary/index#permission +[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md +[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md +[CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md +[CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md +[CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md +[EIP155]: https://eips.ethereum.org/EIPS/eip-155 +[ERC20]: https://eips.ethereum.org/EIPS/eip-20 +[ERC721]: https://eips.ethereum.org/EIPS/eip-721 + + +## Rights + +Copyright and related rights waived via CC0. From 12d69235f38706b79629ec315ad16294f4005ad0 Mon Sep 17 00:00:00 2001 From: By_caballero <37127325+bumblefudge@users.noreply.github.com> Date: Thu, 3 Mar 2022 09:25:53 -0800 Subject: [PATCH 2/5] minor editorial --- eosio.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eosio.md b/eosio.md index 678d19e1..c1ed5a3b 100644 --- a/eosio.md +++ b/eosio.md @@ -11,7 +11,9 @@ requires: CAIP-2, CAIP-10 supercedes: CAIP-7 --- -# Introduction +# EOSIO Namespace + +## Introduction The [EOSIO][] blockchain introduces some interesting variations on the account model but for the sake of cross-chain addressing conforms quite well to From 2ac809a94c2cbc41d8abc499708fd315135afe0c Mon Sep 17 00:00:00 2001 From: By_caballero <37127325+bumblefudge@users.noreply.github.com> Date: Sat, 26 Mar 2022 18:45:58 +0100 Subject: [PATCH 3/5] to folderize --- eosio/caip10.md | 89 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 eosio/caip10.md diff --git a/eosio/caip10.md b/eosio/caip10.md new file mode 100644 index 00000000..ef354971 --- /dev/null +++ b/eosio/caip10.md @@ -0,0 +1,89 @@ +--- +namespace-identifier: eosio +title: EOSIO Namespace - Addresses +author: Sebastian Montero (@sebastianmontero) +discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 +status: Draft +type: Standard +created: 2022-03-02 +updated: 2022-03-02 +requires: ["CAIP-2", "CAIP-10"] +supersedes: CAIP-7 +--- + +# CAIP-10 + +*For context, see the [CAIP-10][] specification.* + +## Rationale + +EOSIO aligns squarely with the "account" model rather than the "UXTO" model. +Each account instantiated in a given chain exists thereafter in the state of +that chain; independent of any other additional state maintained by deployed +smart contracts, the [eosio.token][] smart contract maintains a native-token +balance for each account, and can be queried in various modes from any active +node. + +For any valid account on a given chain, not just current native-token balance +but also the "CPU" compute availability abstraction and the details of +authorization/proof-of-control can be requested from the chain's nodes using the +[get_account][] API call. It is worth noting that unlike other account-based +systems, the `[permissions][]` object (and the sui generis multi-signature system it +references) may be required to prove control of an account or authorize a +transaction. This is, of course, out of scope of this document. + +## Syntax + +See the more recent [Standard Account Name][] definition from the Glossary and +the [Naming Best Practices][] from the CDT section of the EOSIO developer +documentation for up-to-date guidance. At time of press, the following regex +accurately validated standard account names on EOSIO: +``` +[a-z][.a-z1-5]{10}[a-z1-5] +``` + +### Backwards Compatibility + +Not applicable or unknown. + +## Test Cases + +This is a list of manually composed examples: + +``` +eosio:aca376f206b8fc25a6ed44dbdc66547c:bumblefudge1 +eosio:e70aaab8997e1dfce58fbfac80cbbb8f:a..........a +eosio:4667b205c6838ef70ff7988f6e8257e8:a1234567890z +eosio:1eaa0824707c8c16bd25145493bf062a:casa2022.biz + +``` + +## References + +- [Standard Account Name][]: Canonical definition of account name constraints +- [EOSIO][]: Overview of developer documentation, starting from core [and unique] concepts +- [EOSIO/eos#3425][]: A github PR discussion detailing some key design decisions around `chain_id` + +[Transactions Protocol]: https://developers.eos.io/welcome/v2.1/protocol/transactions_protocol/#32-sign-transaction +[Chain API Plugin]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index +[EOSIO/eos#3425]: https://github.com/EOSIO/eos/pull/3425 +[EOSIO]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Naming Best Practices]: https://developers.eos.io/manuals/eosio.cdt/v1.8/best-practices/naming-conventions/#non-standard-account-names +[get_account]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_account +[get_info]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_info +[eosio.token]: https://developers.eos.io/welcome/v2.2/tutorials/eosio_token +[permissions]: https://developers.eos.io/welcome/v2.1/glossary/index#permission +[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md +[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md +[CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md +[CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md +[CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md +[EIP155]: https://eips.ethereum.org/EIPS/eip-155 +[ERC20]: https://eips.ethereum.org/EIPS/eip-20 +[ERC721]: https://eips.ethereum.org/EIPS/eip-721 + + +## Rights + +Copyright and related rights waived via CC0. From 4c780e505c2ccce4b7d47a95a1e0668220bbbbcf Mon Sep 17 00:00:00 2001 From: By_caballero <37127325+bumblefudge@users.noreply.github.com> Date: Sat, 26 Mar 2022 18:46:21 +0100 Subject: [PATCH 4/5] to folderize --- eosio/README.md | 40 +++++++++++++++++++++++ eosio.md => eosio/caip2.md | 66 ++++---------------------------------- 2 files changed, 47 insertions(+), 59 deletions(-) create mode 100644 eosio/README.md rename eosio.md => eosio/caip2.md (67%) diff --git a/eosio/README.md b/eosio/README.md new file mode 100644 index 00000000..d7c4b302 --- /dev/null +++ b/eosio/README.md @@ -0,0 +1,40 @@ +--- +namespace-identifier: eosio +title: EOSIO Namespace +--- + +# EOSIO Namespace + +The [EOSIO][] blockchain introduces some interesting variations on the account +model but for the sake of cross-chain addressing conforms quite well to +CASA-style URIs. + +## References + +- [Standard Account Name][]: Canonical definition of account name constraints +- [EOSIO][]: Overview of developer documentation, starting from core [and unique] concepts +- [EOSIO/eos#3425][]: A github PR discussion detailing some key design decisions around `chain_id` + +[Transactions Protocol]: https://developers.eos.io/welcome/v2.1/protocol/transactions_protocol/#32-sign-transaction +[Chain API Plugin]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index +[EOSIO/eos#3425]: https://github.com/EOSIO/eos/pull/3425 +[EOSIO]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Naming Best Practices]: https://developers.eos.io/manuals/eosio.cdt/v1.8/best-practices/naming-conventions/#non-standard-account-names +[get_account]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_account +[get_info]: https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_info +[eosio.token]: https://developers.eos.io/welcome/v2.2/tutorials/eosio_token +[permissions]: https://developers.eos.io/welcome/v2.1/glossary/index#permission +[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md +[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md +[CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md +[CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md +[CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md +[EIP155]: https://eips.ethereum.org/EIPS/eip-155 +[ERC20]: https://eips.ethereum.org/EIPS/eip-20 +[ERC721]: https://eips.ethereum.org/EIPS/eip-721 + + +## Rights + +Copyright and related rights waived via CC0. diff --git a/eosio.md b/eosio/caip2.md similarity index 67% rename from eosio.md rename to eosio/caip2.md index c1ed5a3b..3af0a971 100644 --- a/eosio.md +++ b/eosio/caip2.md @@ -1,6 +1,6 @@ --- namespace-identifier: eosio -title: EOSIO Namespace +title: EOSIO Namespace - Chains author: Sebastian Montero (@sebastianmontero) discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 status: Draft @@ -8,22 +8,14 @@ type: Standard created: 2022-03-02 updated: 2022-03-02 requires: CAIP-2, CAIP-10 -supercedes: CAIP-7 +supersedes: CAIP-7 --- -# EOSIO Namespace - -## Introduction - -The [EOSIO][] blockchain introduces some interesting variations on the account -model but for the sake of cross-chain addressing conforms quite well to -CASA-style URIs. - -## CAIP-2 +# CAIP-2 *For context, see the [CAIP-2][] specification.* -### Context +## Rationale An explanation of and specification for `chain_id` in the EOSIO development environment can be found in the algorithm for signing transactions in the @@ -33,20 +25,21 @@ information on querying nodes for `chain_id` can be found in the [Chain API Plugin][] section of the API documentation, and the PR [EOSIO/eos#3425][] that merged in those capabilities. +## Syntax + The Chain ID, or rather the `chain_id` as defined by EOSIO, is always a 64-character hexadecimal string containing the SHA256 hash of the genesis state of a given chain chain. In order to fit the CAIP-2 reference format, a 32 character prefix of the Chain ID is used; note, however, that the longer original will be needed to authorize new transactions. - ### Resolution Method See [EOSIO/eos#3425][] and [get_info] for more information about querying network nodes for [a SHA256 hash of the] genesis state, which is referred to as `chain ID` and required for authorizing transactions on said chain. -### Test Cases +## Test Cases This is a list of manually composed examples @@ -68,51 +61,6 @@ eosio:4667b205c6838ef70ff7988f6e8257e8 eosio:1eaa0824707c8c16bd25145493bf062a ``` -## CAIP-10 - -*For context, see the [CAIP-10][] specification.* - -### Rationale - -EOSIO aligns squarely with the "account" model rather than the "UXTO" model. -Each account instantiated in a given chain exists thereafter in the state of -that chain; independent of any other additional state maintained by deployed -smart contracts, the [eosio.token][] smart contract maintains a native-token -balance for each account, and can be queried in various modes from any active -node. - -For any valid account on a given chain, not just current native-token balance -but also the "CPU" compute availability abstraction and the details of -authorization/proof-of-control can be requested from the chain's nodes using the -[get_account][] API call. It is worth noting that unlike other account-based -systems, the `[permissions][]` object (and the sui generis multi-signature system it -references) may be required to prove control of an account or authorize a -transaction. This is, of course, out of scope of this document. - -### Syntax - -See the more recent [Standard Account Name][] definition from the Glossary and -the [Naming Best Practices][] from the CDT section of the EOSIO developer -documentation for up-to-date guidance. At time of press, the following regex -accurately validated standard account names on EOSIO: -``` -[a-z][.a-z1-5]{10}[a-z1-5] -``` - -### Test Cases - -This is a list of manually composed examples: - -``` -eosio:aca376f206b8fc25a6ed44dbdc66547c:bumblefudge1 -eosio:e70aaab8997e1dfce58fbfac80cbbb8f:a..........a -eosio:4667b205c6838ef70ff7988f6e8257e8:a1234567890z -eosio:1eaa0824707c8c16bd25145493bf062a:casa2022.biz - -``` - -### Backwards Compatibility - ## References - [Standard Account Name][]: Canonical definition of account name constraints From cdb419781ef2d7a5c55a83fee720601da9a8a9a9 Mon Sep 17 00:00:00 2001 From: By_caballero <37127325+bumblefudge@users.noreply.github.com> Date: Sun, 27 Mar 2022 19:18:44 +0200 Subject: [PATCH 5/5] to fix frontmatter --- eosio/README.md | 5 +++++ eosio/caip10.md | 6 +++--- eosio/caip2.md | 8 ++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/eosio/README.md b/eosio/README.md index d7c4b302..e3cfe234 100644 --- a/eosio/README.md +++ b/eosio/README.md @@ -1,6 +1,11 @@ --- namespace-identifier: eosio title: EOSIO Namespace +status: Draft +type: Informational +created: 2020-11-30 +updated: 2022-03-27 +replaces: CAIP-7 --- # EOSIO Namespace diff --git a/eosio/caip10.md b/eosio/caip10.md index ef354971..48d65506 100644 --- a/eosio/caip10.md +++ b/eosio/caip10.md @@ -5,10 +5,10 @@ author: Sebastian Montero (@sebastianmontero) discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 status: Draft type: Standard -created: 2022-03-02 -updated: 2022-03-02 +created: 2020-11-30 +updated: 2022-03-27 requires: ["CAIP-2", "CAIP-10"] -supersedes: CAIP-7 +replaces: CAIP-7 --- # CAIP-10 diff --git a/eosio/caip2.md b/eosio/caip2.md index 3af0a971..d3d4f94f 100644 --- a/eosio/caip2.md +++ b/eosio/caip2.md @@ -5,10 +5,10 @@ author: Sebastian Montero (@sebastianmontero) discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 status: Draft type: Standard -created: 2022-03-02 -updated: 2022-03-02 -requires: CAIP-2, CAIP-10 -supersedes: CAIP-7 +created: 2020-11-30 +updated: 2022-03-27 +requires: ["CAIP-2", "CAIP-10"] +replaces: CAIP-7 --- # CAIP-2