Or run the website locally from the wasm-suite directory.
$ cargo run -q
A collection of tools for working with Aleo testnet2 addresses and signatures
Usage: aleo-testnet2-tools [OPTIONS] <COMMAND>
Commands:
from-key Derive a testnet2 and mainnet address from a private key
from-key-file Derive a testnet2 and mainnet address from a private key file
from-sig Derive a testnet2 and mainnet address from a signature
sign Sign a message with a testnet2 private key
verify Verify a signature with a testnet2 address and message
help Print this message or the help of the given subcommand(s)
Options:
-j, --json Enable JSON output
-h, --help Print help
-V, --version Print version
- Install rust
- Clone this repo
- View help message:
cargo run
- Install a container engine such as docker or podman.
- Build the container:
docker build . -t aleo-testnet2-tools
- Run the CLI in a container
docker run --rm aleo-testnet2-tools tool <COMMAND>
(replace<COMMAND>
withfrom-key ...
or--help
)
Note
The file/path based commands/options will not work in containers
# Example of signing a message using a container with a key from the host filesystem
docker run --rm aleo-testnet2-tools tool sign -p $(cat ~/.aleo/key) -m "hello, world!"
All commands, when run with --json
(eg. cargo run -q -- --json
) will output as JSON.
# Input the private key as plaintext
$ cargo run -q from-key APrivateKey...
testnet2 address: aleo1...
mainnet address: aleo1...
# Input the private key from a file
$ cargo run -q from-key-file ./path/to/testnet2.key
testnet2 address: aleo1...
mainnet address: aleo1...
$ cargo run -q from-sig sign1..."
testnet2 address: aleo1...
# Sign a message from a private key file
$ cargo run -q sign -f ./path/to/testnet2.key -m "my message"
sign1...
# Sign a message from a plaintext private key
$ cargo run -q sign -p APrivate1... -m "my message"
sign1...
# Sign a message from a private key file
$ cargo run -q verify -a aleo1... -m "signed message" -s sign1...
true # (or false)