Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Aleo Mainnet specs, update Aleo Testnet specs #129

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions aleo/caip10.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace-identifier: aleo-caip10
title: Aleo Network - Namespace Accounts
author: Jonathan Gonzalez (@jonandgon, [email protected])
discussions-to: <URL of PR, mailing list, etc>
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/129
status: Draft
type: Standard
created: 2023-09-12
Expand Down Expand Up @@ -42,18 +42,16 @@ A regular expression for validating an Aleo address can be defined as:
## Test Cases

```env
# Aleo Testnet3
aleo:3:aleo1ml2xr6fawppd6uaf8gn95uy2fpqqg8gk74k0lu8na7uvayk64v8qu8hw5u
# Aleo Testnet
aleo:1:aleo1ml2xr6fawppd6uaf8gn95uy2fpqqg8gk74k0lu8na7uvayk64v8qu8hw5u

# Aleo Mainnet
aleo:0: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.
Account addresses / keys are chain-agnostic. Signatures, however, are NOT chain agnostic.

## References
<!--Links to external resources that help understanding the CAIP better. This can e.g. be links to existing implementations.-->
Expand Down
19 changes: 8 additions & 11 deletions aleo/caip2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace-identifier: aleo-caip2
title: Aleo Network - Namespace Chains
author: Jonathan Gonzalez (@jonandgon, [email protected])
discussions-to: <URL of PR, mailing list, etc>
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/129
status: Draft
type: Standard
created: 2023-09-12
Expand All @@ -26,14 +26,12 @@ replaces (*optional): <CAIP-2>

The namespace `aleo` refers to the Aleo Network Layer 1 blockchain.

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.

## Syntax

The Aleo chain ID system maps between a human-readabe string (used to discriminate networks in the paths of [node endpoints][], for example) and an unsigned 16-bit binary integer, known colloquially as an "`u16` number", ranging from 0 to 65535 which is used internally.
For example, at time or writing, the u16 number `3` maps to `testnet3` and `0` will map to `mainnet` once the latter has been released.
For example, at time or writing, the u16 number `1` maps to `testnet` and `0` maps to `mainnet`.
The canonical location of the mapping of u16 integers to network name strings is still to be determined by the community, but in the case of conflicts between the community documentation and this document, the former should be taken as canonical.

### Backwards Compatibility
Expand All @@ -45,29 +43,28 @@ n/a
To resolve a reference for the Aleo namespace, get the latest block information from the chain you are interested in from an Aleo API node. An example using Javascript:

```env
fetch('https://api.explorer.aleo.org/v1/testnet3/latest/block')
fetch('https://api.explorer.provable.com/v1/mainnet/latest/block')
.then(response => response.json())
.then(response => console.log(response.header.metadata.network))
```

will log `3`.
will log `0`.

## Test Cases

This is a manually composed example.

```env
# Aleo Testnet3
aleo:3
# Aleo Testnet
aleo:1

# Aleo mainnet
# Aleo Mainnet
aleo:0
```

## Additional Considerations (*OPTIONAL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Additional Considerations (*OPTIONAL)
## Additional Considerations


Mainnet will release sometime Q1 2024.
The API is subject to change and the example above (particularly other properties) may become inaccurate over time.
Testnet3 has been deprecated and shut down in favor of Testnet.

## References
<!--Links to external resources that help understanding the CAIP better. This can e.g. be links to existing implementations.-->
Expand Down