From 2acbf284fa77e8be3b654389ba2f96690c4abfa3 Mon Sep 17 00:00:00 2001 From: jonandgon Date: Tue, 12 Sep 2023 13:45:29 -0400 Subject: [PATCH 01/17] aleo caips added --- aleo/README.md | 28 +++++++++++++ aleo/caip10.md | 68 +++++++++++++++++++++++++++++++ aleo/caip2.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 aleo/README.md create mode 100644 aleo/caip10.md create mode 100644 aleo/caip2.md diff --git a/aleo/README.md b/aleo/README.md new file mode 100644 index 00000000000000..5a15c6f4ff1c95 --- /dev/null +++ b/aleo/README.md @@ -0,0 +1,28 @@ +--- +namespace-identifier: aleo +title: Aleo Network +author: Jonathan Gonzalez (@jonandgon) +discussions-to: +status: Draft +type: Standard +created: 2023-09-12 +requires (*optional): <["CAIP-2", "CAIP-10"]> +--- + +# Namespace for Aleo Network Blockchains + +This document defines the applicability of CAIP schemes to the networks of the Aleo Network blockchain ecosystem. + +# Syntax + +The `aleo` namespace refers to networks and other objects within the Aleo Network blockchain ecosystem. + +# References + +- [Aleo Network Documentation][]: Developer docs for the Aleo Network. + +[Aleo Network Documentation]: https://developer.aleo.org + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/aleo/caip10.md b/aleo/caip10.md new file mode 100644 index 00000000000000..0f1a9a83e96315 --- /dev/null +++ b/aleo/caip10.md @@ -0,0 +1,68 @@ +--- +namespace-identifier: aleo-caip10 +title: Aleo Network - Namespace Accounts +author: Jonathan Gonzalez (@jonandgon) +discussions-to: +status: Draft +type: Standard +created: 2023-09-12 +requires (*optional): <["CAIP-10"]> +--- + + + +# CAIP-10 + +*For context, see the [CAIP-10][https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md`] specification.* + + +## Rationale + +An Aleo account address is a unique identifier that allows users to transfer value and record data to one another in transactions. + +The account address is comprised of a public key for the account encryption scheme. + +## Syntax + +Address Format Example +`aleo1dg722m22fzpz6xjdrvl9tzu5t68zmypj5p74khlqcac0gvednygqxaax0j` + +An account address is formatted as a `Bech32` string, comprised of 63 characters. The account address is encoded with an address prefix that reads `aleo1`. + +A regular expression for validating an Aleo address can be defined as: + +`^aleo1[a-z0-9]{58}$` + +## Test Cases + +```env +# Aleo Testnet3 +aleo:testnet3:aleo1ml2xr6fawppd6uaf8gn95uy2fpqqg8gk74k0lu8na7uvayk64v8qu8hw5u +``` + +## Additional Considerations (*OPTIONAL) + +Account addresses / keys are chain-agnostic. + +Mainnet will release sometime at the end of 2023 / beginning of 2024. The API is subject to change. + +## References + +- [Aleo Network Documentation][]: Developer docs for the Aleo Network. +- [Aleo Account Documentation][]: Developer docs for account creation. + +[Aleo Network Documentation]: https://developer.aleo.org +[Aleo Account Documentation]: https://developer.aleo.org/concepts/accounts +[CAIP-2]: https://chainAgnostic.org/CAIPS/caip-2 +[CAIP-10]: https://chainAgnostic.org/CAIPS/caip-10 +[aleo CAIP-2]: aleo/caip2 + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/aleo/caip2.md b/aleo/caip2.md new file mode 100644 index 00000000000000..132763a1bd5996 --- /dev/null +++ b/aleo/caip2.md @@ -0,0 +1,107 @@ +--- +namespace-identifier: aleo-caip2 +title: Aleo Network - Namespace Chains +author: Jonathan Gonzalez (@jonandgon) +discussions-to: +status: Draft +type: Standard +created: 2023-09-12 +requires (*optional): <["CAIP-2"]> +replaces (*optional): +--- + + + +# CAIP-2 + +*For context, see the [CAIP-2][https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md] specification.* + +## Rationale + +The namespace `aleo` refers to the Aleo Network Layer 1 blockchain. + +Aleo consists of a single network: a testnet network (Testnet3). + +An identifier for a Aleo chain consists of the namespace prefix "aleo:" +followed by the chain id. + +## Syntax + +The Aleo chain ID is the name of the chain. e.g. `testnet3` or `mainnet` when mainnet is released. + +### Resolution Mechanics + +To obtain the genesis block hash, make a JSON-RPC request to the Aleo api. + +Request (aleo testnet3): + +```curl +curl --request GET \ + --url https://vm.aleo.org/api/testnet3/block/0 \ +``` + +Response (aleo testnet3): + +```json +{ + "block_hash": "ab1cxu7kq6j8yva9nzq394jt90qnpeexsr0fdnqfdzgqrx4fn7czcyqknclrd", + "previous_hash": "ab1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq5g436j", + "header": { + "previous_state_root": "0field", + "transactions_root": "2421468861514346193702333205411662486965424378250484763660928941797390483657field", + "finalize_root": "2347499756727239097527357730627929185508370696360031054030113664724940109165field", + "ratifications_root": "2347499756727239097527357730627929185508370696360031054030113664724940109165field", + "coinbase_accumulator_point": "0field", + "metadata": { + "network": 3, + "round": 0, + "height": 0, + "total_supply_in_microcredits": 1500000000000000, + "cumulative_weight": 0, + "cumulative_proof_target": 0, + "coinbase_target": 4095, + "proof_target": 32, + "last_coinbase_target": 4095, + "last_coinbase_timestamp": 1680307200, + "timestamp": 1680307200 + } + }, + "transactions": [ ... ], + "ratifications": [], + "signature": "sign1t7lf502e0h23jtvls9lagepv5sfvgpxm7yvzwrfhgpqsyevkwqq7hcxuympx2w6c4pt3nvm929l74q96hx9ed57cyvvrdm7hqlt75qm7rawvssddfv078wthdpqynfu3jh5qeruups7t7vyls3jxccnypxa5z55an3zwd9em29wrjxmpyymwflclchtzhr62hwthyumkge2qgcd950p" +} +``` + +### Backwards Compatibility + +n/a + +## Test Cases + +This is a manually composed example. + +```env +# Aleo Testnet3 +aleo:testnet3 +``` + +## Additional Considerations (*OPTIONAL) + +Mainnet will release sometime at the end of 2023 / beginning of 2024. The API is subject to change. + +## References + +- [Aleo Network Documentation][]: Developer docs for the Aleo Network. + +[Aleo Network Documentation]: https://developer.aleo.org +[CAIP-2]: https://chainAgnostic.org/CAIPS/caip-2 + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 2f8830bee3c06f2477830eee5a5c7cd95ff01157 Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:43:32 -0600 Subject: [PATCH 02/17] Update aleo/README.md Co-authored-by: Bumblefudge --- aleo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/README.md b/aleo/README.md index 5a15c6f4ff1c95..fad434930f0090 100644 --- a/aleo/README.md +++ b/aleo/README.md @@ -6,7 +6,7 @@ discussions-to: status: Draft type: Standard created: 2023-09-12 -requires (*optional): <["CAIP-2", "CAIP-10"]> +requires: ["CAIP-2", "CAIP-10"] --- # Namespace for Aleo Network Blockchains From 5d93f00e512e86aa4af0c729e0c81de7ef79be8a Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:43:46 -0600 Subject: [PATCH 03/17] Update aleo/caip10.md Co-authored-by: Bumblefudge --- aleo/caip10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/caip10.md b/aleo/caip10.md index 0f1a9a83e96315..f5439b3110dd67 100644 --- a/aleo/caip10.md +++ b/aleo/caip10.md @@ -19,7 +19,7 @@ requires (*optional): <["CAIP-10"]> # CAIP-10 -*For context, see the [CAIP-10][https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md`] specification.* +*For context, see the [CAIP-10][] specification.* ## Rationale From 340ca31f1036be1077e5e929bb69f9a5f1c2e112 Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:43:55 -0600 Subject: [PATCH 04/17] Update aleo/caip2.md Co-authored-by: Bumblefudge --- aleo/caip2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/caip2.md b/aleo/caip2.md index 132763a1bd5996..273c1e057f9b00 100644 --- a/aleo/caip2.md +++ b/aleo/caip2.md @@ -20,7 +20,7 @@ replaces (*optional): # CAIP-2 -*For context, see the [CAIP-2][https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md] specification.* +*For context, see the [CAIP-2][] specification.* ## Rationale From a25faa60cc063a0c1d1cb627ded186d2c0289555 Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:44:06 -0600 Subject: [PATCH 05/17] Update aleo/caip2.md Co-authored-by: Bumblefudge --- aleo/caip2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/caip2.md b/aleo/caip2.md index 273c1e057f9b00..f188beb38473cb 100644 --- a/aleo/caip2.md +++ b/aleo/caip2.md @@ -26,7 +26,7 @@ replaces (*optional): The namespace `aleo` refers to the Aleo Network Layer 1 blockchain. -Aleo consists of a single network: a testnet network (Testnet3). +To date, Aleo consists of a single network: a testnet network (Testnet3). An identifier for a Aleo chain consists of the namespace prefix "aleo:" followed by the chain id. From 6a5acd45b518d0f14a677dd4fc4aeb4a4e40d2ce Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:17:18 -0600 Subject: [PATCH 06/17] Update aleo/caip2.md Co-authored-by: Bumblefudge --- aleo/caip2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aleo/caip2.md b/aleo/caip2.md index f188beb38473cb..5cd07be36bcbc8 100644 --- a/aleo/caip2.md +++ b/aleo/caip2.md @@ -93,7 +93,8 @@ aleo:testnet3 ## Additional Considerations (*OPTIONAL) -Mainnet will release sometime at the end of 2023 / beginning of 2024. The API is subject to change. +Mainnet will release sometime at the end of 2023 / beginning of 2024. +The API is subject to change and the example above (particularly other properties) may become inaccurate over time. ## References From c8927ec8e89fc5498e7598a8d539055f887b6d9a Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Sat, 18 Nov 2023 10:44:51 +0300 Subject: [PATCH 07/17] Update aleo/README.md Co-authored-by: Bumblefudge --- aleo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/README.md b/aleo/README.md index fad434930f0090..5100d945b0f83b 100644 --- a/aleo/README.md +++ b/aleo/README.md @@ -15,7 +15,7 @@ This document defines the applicability of CAIP schemes to the networks of the A # Syntax -The `aleo` namespace refers to networks and other objects within the Aleo Network blockchain ecosystem. +The `aleo` namespace profiles CAIP scheme and behaviors for referring to networks and other objects within the Aleo Network blockchain ecosystem. # References From 3db58d9cc5ed8c5c9b89538b07d28a0510f4ea43 Mon Sep 17 00:00:00 2001 From: jonandgon <75697675+jonandgon@users.noreply.github.com> Date: Sat, 18 Nov 2023 10:44:59 +0300 Subject: [PATCH 08/17] Update aleo/caip10.md Co-authored-by: Bumblefudge --- aleo/caip10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aleo/caip10.md b/aleo/caip10.md index f5439b3110dd67..5412a16a362f4c 100644 --- a/aleo/caip10.md +++ b/aleo/caip10.md @@ -6,7 +6,7 @@ discussions-to: status: Draft type: Standard created: 2023-09-12 -requires (*optional): <["CAIP-10"]> +requires: CAIP-10 ---