From c46eec0839b165e818c99b623804da7789496686 Mon Sep 17 00:00:00 2001 From: Narsiss Date: Fri, 14 Apr 2023 10:58:08 +0800 Subject: [PATCH 1/3] Add files via upload --- amax/README.md | 34 ++++++++++++++++++++++ amax/caip10.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ amax/caip2.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 amax/README.md create mode 100644 amax/caip10.md create mode 100644 amax/caip2.md diff --git a/amax/README.md b/amax/README.md new file mode 100644 index 00000000..195ec15d --- /dev/null +++ b/amax/README.md @@ -0,0 +1,34 @@ +--- +namespace-identifier: amax +title: AMAX Namespace +author: Ray (@dragonmaster), Nariss(@Narsiss) +status: Draft +type: Informational +created: 2023-04-14 +updated: 2023-04-14 +requires: ["CAIP-2","CAIP-10"] +--- + +# Namespace for AMAX Blockchains + +The AMAX 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 + +- [Official website](https://amax.network) +- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) +- [AMAX Developer Portal](https://armonia.gitbook.io/amax-dao-dev/v/chinese-1/) +- [Standard Account Name][]: Canonical definition of account name constraints +- [Account and Permissions][]: Canonical definition of account name constraints + +- [Mainnet](https://expnode.amaxscan.io/v1/chain/get_info) +- [Testnet](https://test-chain.ambt.art/v1/chain/get_info) + +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts + +## Copyright + +Copyright and related rights waived via [CC0](../LICENSE). \ No newline at end of file diff --git a/amax/caip10.md b/amax/caip10.md new file mode 100644 index 00000000..f107da46 --- /dev/null +++ b/amax/caip10.md @@ -0,0 +1,79 @@ +--- +namespace-identifier: amax +title: AMAX Namespace - Addresses +author: Narsiss (@Narsiss) +status: Draft +type: Standard +created: 2023-04-14 +updated: 2023-04-14 +requires: ["CAIP-2", "CAIP-10"] +--- + +# CAIP-10 + +*For context, see the [CAIP-10][] specification.* + +## Rationale + +AMAX 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 [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 AMAX developer +documentation for up-to-date guidance. At time of press, the following regex +accurately validated standard account names on AMAX: +``` +[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: + +``` +amax:aca376f206b8fc25a6ed44dbdc66547c:bumblefudge1 +amax:e70aaab8997e1dfce58fbfac80cbbb8f:a..........a +amax:4667b205c6838ef70ff7988f6e8257e8:a1234567890z +amax: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://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx +[get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info +[get_account]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_account +[token]: https://developers.eos.io/welcome/v2.2/tutorials/eosio_token +[Chain ID]: https://github.com/EOSIO/eos/pull/3425 +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts +[permissions]: https://developers.eos.io/welcome/latest/protocol-guides/accounts_and_permissions +[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 + + +## Rights + +Copyright and related rights waived via CC0. \ No newline at end of file diff --git a/amax/caip2.md b/amax/caip2.md new file mode 100644 index 00000000..bc2bc90d --- /dev/null +++ b/amax/caip2.md @@ -0,0 +1,75 @@ +--- +namespace-identifier: amax +title: AMAX Namespace - Chains +author: Narsiss(@Narsiss) +status: Draft +type: Standard +created: 2023-04-14 +updated: 2023-04-14 +requires: ["CAIP-2", "CAIP-10"] +replaces: CAIP-7 +--- + +# CAIP-2 + +*For context, see the [CAIP-2][] specification.* + +## Rationale + +An explanation of and specification for `chain_id` in the AMAX 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 [get_info][] section of the API documentation, and the PR [Chain ID][] that +merged in those capabilities. + +## Syntax + +The Chain ID, or rather the `chain_id` as defined by AMAX, 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 [Chain ID][] 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 + +``` +# AMAX Mainnet +//get_info() --> chain_id=2403d6f602a87977f898aa3c62c79a760f458745904a15b3cd63a106f62adc16 +amax:2403d6f602a87977f898aa3c62c79a76 + +# AMAX Testnet +//get_info() --> chain_id=208dacab3cd2e181c86841613cf05d9c60786c677e4ce86b266d0a58884968f7 +amax:208dacab3cd2e181c86841613cf05d9c + +``` + +## References + +- [Official website](https://amax.network) +- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) +- [AMAX Developer Portal](https://armonia.gitbook.io/amax-dao-dev/v/chinese-1/) +- [Standard Account Name][]: Canonical definition of account name constraints +- [Chain ID][]: A github PR discussion detailing some key design decisions around `chain_id` + +[Transactions Protocol]: https://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx +[get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info +[Chain ID]: https://github.com/EOSIO/eos/pull/3425 +[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name +[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts +[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 + + + +## Rights + +Copyright and related rights waived via CC0. \ No newline at end of file From 77eedd151adfd6a7d2d95288e4756a95644fa8a2 Mon Sep 17 00:00:00 2001 From: Narsiss Date: Fri, 14 Apr 2023 14:16:43 +0800 Subject: [PATCH 2/3] Add files via upload --- amax/README.md | 5 ++--- amax/caip10.md | 15 ++++++++------- amax/caip2.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/amax/README.md b/amax/README.md index 195ec15d..6a72c23f 100644 --- a/amax/README.md +++ b/amax/README.md @@ -19,15 +19,14 @@ CASA-style URIs. - [Official website](https://amax.network) - [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) -- [AMAX Developer Portal](https://armonia.gitbook.io/amax-dao-dev/v/chinese-1/) - [Standard Account Name][]: Canonical definition of account name constraints -- [Account and Permissions][]: Canonical definition of account name constraints +- [Account and Permissions][](https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts) +- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) - [Mainnet](https://expnode.amaxscan.io/v1/chain/get_info) - [Testnet](https://test-chain.ambt.art/v1/chain/get_info) [Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name -[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts ## Copyright diff --git a/amax/caip10.md b/amax/caip10.md index f107da46..d04f1ef8 100644 --- a/amax/caip10.md +++ b/amax/caip10.md @@ -49,18 +49,20 @@ Not applicable or unknown. This is a list of manually composed examples: ``` -amax:aca376f206b8fc25a6ed44dbdc66547c:bumblefudge1 -amax:e70aaab8997e1dfce58fbfac80cbbb8f:a..........a -amax:4667b205c6838ef70ff7988f6e8257e8:a1234567890z -amax:1eaa0824707c8c16bd25145493bf062a:casa2022.biz +amax:2403d6f602a87977f898aa3c62c79a76:armoniaadmin +amax:208dacab3cd2e181c86841613cf05d9c:solotestacct ``` ## References + + +- [Official website](https://amax.network) +- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) - [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` +- [Chain ID][]: A github PR discussion detailing some key design decisions around `chain_id` +- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) [Transactions Protocol]: https://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx [get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info @@ -69,7 +71,6 @@ amax:1eaa0824707c8c16bd25145493bf062a:casa2022.biz [Chain ID]: https://github.com/EOSIO/eos/pull/3425 [Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name [Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts -[permissions]: https://developers.eos.io/welcome/latest/protocol-guides/accounts_and_permissions [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 diff --git a/amax/caip2.md b/amax/caip2.md index bc2bc90d..bd5fbc45 100644 --- a/amax/caip2.md +++ b/amax/caip2.md @@ -56,9 +56,9 @@ amax:208dacab3cd2e181c86841613cf05d9c - [Official website](https://amax.network) - [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) -- [AMAX Developer Portal](https://armonia.gitbook.io/amax-dao-dev/v/chinese-1/) - [Standard Account Name][]: Canonical definition of account name constraints - [Chain ID][]: A github PR discussion detailing some key design decisions around `chain_id` +- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) [Transactions Protocol]: https://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx [get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info From 147ae0b0504137b7dd1dbd5a807ec86399b44bb1 Mon Sep 17 00:00:00 2001 From: Narsiss Date: Fri, 14 Apr 2023 14:18:07 +0800 Subject: [PATCH 3/3] Add files via upload --- amax/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amax/README.md b/amax/README.md index 6a72c23f..3d4d6d3d 100644 --- a/amax/README.md +++ b/amax/README.md @@ -19,9 +19,9 @@ CASA-style URIs. - [Official website](https://amax.network) - [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) -- [Standard Account Name][]: Canonical definition of account name constraints -- [Account and Permissions][](https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts) +- [Account and Permissions][]: (https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts) - [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) +- [Standard Account Name][]: Canonical definition of account name constraints - [Mainnet](https://expnode.amaxscan.io/v1/chain/get_info) - [Testnet](https://test-chain.ambt.art/v1/chain/get_info)