From f6fe1bd4e7d7e33100db7ad6894f84c4a7230d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Fri, 10 Mar 2023 09:56:49 +0100 Subject: [PATCH 1/2] feat(examples): Add expected CLI output for given inputs --- .github/workflows/ci-tests.yml | 5 + Makefile | 17 +- examples/README.md | 79 +++ examples/account/allow-negative.in.static | 1 + examples/account/allow-negative.out.static | 14 + examples/account/allow-paratime.y.in | 1 + examples/account/allow-paratime.y.out | 14 + examples/account/allow.y.in | 1 + examples/account/allow.y.out | 14 + .../account/amend-commission-schedule.y.in | 1 + .../account/amend-commission-schedule.y.out | 23 + examples/account/burn.y.in | 1 + examples/account/burn.y.out | 13 + examples/account/config/cli.toml | 132 ++++ examples/account/config/emma.wallet | 1 + examples/account/config/eric.wallet | 1 + examples/account/config/eugene.wallet | 1 + examples/account/config/orlando.wallet | 1 + examples/account/config/oscar.wallet | 1 + examples/account/delegate.y.in | 1 + examples/account/delegate.y.out | 14 + examples/account/deposit-eth.y.in | 1 + examples/account/deposit-eth.y.out | 17 + examples/account/deposit-named.y.in | 1 + examples/account/deposit-named.y.out | 17 + examples/account/deposit-oasis.y.in | 1 + examples/account/deposit-oasis.y.out | 17 + examples/account/deposit.y.in | 1 + examples/account/deposit.y.out | 17 + examples/account/entity-deregister.y.in | 1 + examples/account/entity-deregister.y.out | 13 + examples/account/entity-register.y.in | 1 + examples/account/entity-register.y.out | 27 + examples/account/entity.json | 7 + examples/account/from-public-key.in | 1 + examples/account/from-public-key.out | 1 + examples/account/node-unfreeze.y.in | 1 + examples/account/node-unfreeze.y.out | 15 + .../show-delegations-validator.in.static | 1 + .../show-delegations-validator.out.static | 65 ++ examples/account/show-delegations.in.static | 1 + examples/account/show-delegations.out.static | 32 + examples/account/show-eth.in | 1 + examples/account/show-eth.out | 12 + examples/account/show-mainnet.in | 1 + examples/account/show-mainnet.out | 8 + examples/account/show-named.in | 1 + examples/account/show-named.out | 8 + examples/account/show-no-paratime.in | 1 + examples/account/show-no-paratime.out | 8 + examples/account/show-oasis.in | 1 + examples/account/show-oasis.out | 8 + examples/account/show-testnet.in | 1 + examples/account/show-testnet.out | 8 + examples/account/show.in | 1 + examples/account/show.out | 8 + examples/account/transfer-eth.y.in | 1 + examples/account/transfer-eth.y.out | 17 + examples/account/transfer-eth2.y.in | 1 + examples/account/transfer-eth2.y.out | 17 + .../account/transfer-named-no-paratime.y.in | 1 + .../account/transfer-named-no-paratime.y.out | 14 + examples/account/transfer-named.y.in | 1 + examples/account/transfer-named.y.out | 17 + examples/account/undelegate.y.in | 1 + examples/account/undelegate.y.out | 14 + examples/account/withdraw-named.y.in | 1 + examples/account/withdraw-named.y.out | 17 + examples/account/withdraw-oasis.y.in | 1 + examples/account/withdraw-oasis.y.out | 17 + examples/account/withdraw.y.in | 1 + examples/account/withdraw.y.out | 17 + examples/addressbook/00-add-oasis.in | 1 + examples/addressbook/00-add-oasis.out | 0 examples/addressbook/01-add-eth.in | 1 + examples/addressbook/01-add-eth.out | 0 examples/addressbook/02-transfer.y.in | 1 + examples/addressbook/02-transfer.y.out | 17 + examples/addressbook/03-list.in | 1 + examples/addressbook/03-list.out | 3 + examples/addressbook/04-show-eth.in | 1 + examples/addressbook/04-show-eth.out | 3 + examples/addressbook/05-show-oasis.in | 1 + examples/addressbook/05-show-oasis.out | 2 + examples/addressbook/06-rename.in | 1 + examples/addressbook/06-rename.out | 0 examples/addressbook/07-list.in | 1 + examples/addressbook/07-list.out | 3 + examples/addressbook/08-rename.in | 1 + examples/addressbook/08-rename.out | 0 examples/addressbook/09-remove.in | 1 + examples/addressbook/09-remove.out | 0 examples/addressbook/10-list.in | 1 + examples/addressbook/10-list.out | 2 + examples/addressbook/config/cli.toml | 118 ++++ examples/addressbook/config/emma.wallet | 1 + examples/addressbook/config/eugene.wallet | 1 + examples/addressbook/config/oscar.wallet | 1 + .../network-governance/cast-vote.in.static | 1 + .../network-governance/cast-vote.out.static | 16 + examples/network-governance/list.in | 1 + examples/network-governance/list.out | 8 + examples/network-governance/show.in.static | 1 + examples/network-governance/show.out.static | 40 ++ examples/network-set-rpc/00-list.in | 1 + examples/network-set-rpc/00-list.out | 5 + examples/network-set-rpc/01-set-rpc.in | 1 + examples/network-set-rpc/01-set-rpc.out | 0 examples/network-set-rpc/02-list.in | 1 + examples/network-set-rpc/02-list.out | 5 + examples/network-set-rpc/config/cli.toml | 134 ++++ examples/network-show/gas-costs.in | 1 + examples/network-show/gas-costs.out | 8 + examples/network-show/id-entity.in | 1 + examples/network-show/id-entity.out | 7 + examples/network-show/id-node.in.static | 1 + examples/network-show/id-node.out.static | 27 + examples/network-show/id-paratime.in.static | 1 + examples/network-show/id-paratime.out.static | 82 +++ examples/network-show/native-token.in.static | 1 + examples/network-show/native-token.out.static | 16 + examples/network/00-list.in | 1 + examples/network/00-list.out | 5 + examples/network/01-remove.in | 1 + examples/network/01-remove.out | 0 examples/network/02-list.in | 1 + examples/network/02-list.out | 4 + examples/network/03-set-default.in | 1 + examples/network/03-set-default.out | 0 examples/network/04-list.in | 1 + examples/network/04-list.out | 4 + examples/network/add-tcpip.in.static | 1 + examples/network/add-tcpip.out.static | 3 + examples/network/add-unix.in.static | 1 + examples/network/add-unix.out.static | 3 + examples/network/config/cli.toml | 134 ++++ examples/network/status.in.static | 1 + examples/network/status.out.static | 602 ++++++++++++++++++ examples/paratime-remove/00-list.in | 1 + examples/paratime-remove/00-list.out | 8 + examples/paratime-remove/01-remove.in | 1 + examples/paratime-remove/01-remove.out | 0 examples/paratime-remove/02-list.in | 1 + examples/paratime-remove/02-list.out | 7 + examples/paratime-remove/config/cli.toml | 92 +++ examples/paratime-show/show-tx-encrypted.in | 1 + examples/paratime-show/show-tx-encrypted.out | 46 ++ examples/paratime-show/show-tx.in | 1 + examples/paratime-show/show-tx.out | 46 ++ examples/paratime-show/show.in | 1 + examples/paratime-show/show.out | 13 + examples/paratime/00-list.in | 1 + examples/paratime/00-list.out | 7 + examples/paratime/01-set-default.in | 1 + examples/paratime/01-set-default.out | 0 examples/paratime/02-list.in | 1 + examples/paratime/02-list.out | 7 + .../paratime/statistics-negative.in.static | 1 + .../paratime/statistics-negative.out.static | 53 ++ examples/paratime/statistics.in.static | 1 + examples/paratime/statistics.out.static | 53 ++ examples/setup/first-run.in | 1 + examples/setup/first-run.out | 22 + examples/setup/wallet-list-config.in.static | 1 + examples/setup/wallet-list-config.out.static | 2 + examples/setup/wallet-list.in | 1 + examples/setup/wallet-list.out | 1 + examples/transaction/show-invalid.in | 1 + examples/transaction/show-invalid.out | 17 + examples/transaction/show-paratime-tx.in | 1 + examples/transaction/show-paratime-tx.out | 20 + examples/transaction/show-unsigned.in | 1 + examples/transaction/show-unsigned.out | 12 + examples/transaction/show.in | 1 + examples/transaction/show.out | 16 + examples/transaction/sign.y.in | 1 + examples/transaction/sign.y.out | 14 + examples/transaction/testtx.json | 7 + examples/transaction/testtx2.json | 8 + examples/transaction/testtx_unsigned.json | 9 + examples/wallet/00-list.in | 1 + examples/wallet/00-list.out | 6 + examples/wallet/01-rename.in | 1 + examples/wallet/01-rename.out | 0 examples/wallet/02-list.in | 1 + examples/wallet/02-list.out | 6 + examples/wallet/03-rename.in | 1 + examples/wallet/03-rename.out | 0 examples/wallet/04-set-default.in | 1 + examples/wallet/04-set-default.out | 0 examples/wallet/05-list.in | 1 + examples/wallet/05-list.out | 6 + examples/wallet/config/cli.toml | 118 ++++ examples/wallet/config/emma.wallet | 1 + examples/wallet/config/eugene.wallet | 1 + examples/wallet/config/oscar.wallet | 1 + scripts/gen_example.sh | 96 +++ 197 files changed, 2782 insertions(+), 1 deletion(-) create mode 100644 examples/README.md create mode 100644 examples/account/allow-negative.in.static create mode 100644 examples/account/allow-negative.out.static create mode 100644 examples/account/allow-paratime.y.in create mode 100644 examples/account/allow-paratime.y.out create mode 100644 examples/account/allow.y.in create mode 100644 examples/account/allow.y.out create mode 100644 examples/account/amend-commission-schedule.y.in create mode 100644 examples/account/amend-commission-schedule.y.out create mode 100644 examples/account/burn.y.in create mode 100644 examples/account/burn.y.out create mode 100644 examples/account/config/cli.toml create mode 100644 examples/account/config/emma.wallet create mode 100644 examples/account/config/eric.wallet create mode 100644 examples/account/config/eugene.wallet create mode 100644 examples/account/config/orlando.wallet create mode 100644 examples/account/config/oscar.wallet create mode 100644 examples/account/delegate.y.in create mode 100644 examples/account/delegate.y.out create mode 100644 examples/account/deposit-eth.y.in create mode 100644 examples/account/deposit-eth.y.out create mode 100644 examples/account/deposit-named.y.in create mode 100644 examples/account/deposit-named.y.out create mode 100644 examples/account/deposit-oasis.y.in create mode 100644 examples/account/deposit-oasis.y.out create mode 100644 examples/account/deposit.y.in create mode 100644 examples/account/deposit.y.out create mode 100644 examples/account/entity-deregister.y.in create mode 100644 examples/account/entity-deregister.y.out create mode 100644 examples/account/entity-register.y.in create mode 100644 examples/account/entity-register.y.out create mode 100644 examples/account/entity.json create mode 100644 examples/account/from-public-key.in create mode 100644 examples/account/from-public-key.out create mode 100644 examples/account/node-unfreeze.y.in create mode 100644 examples/account/node-unfreeze.y.out create mode 100644 examples/account/show-delegations-validator.in.static create mode 100644 examples/account/show-delegations-validator.out.static create mode 100644 examples/account/show-delegations.in.static create mode 100644 examples/account/show-delegations.out.static create mode 100644 examples/account/show-eth.in create mode 100644 examples/account/show-eth.out create mode 100644 examples/account/show-mainnet.in create mode 100644 examples/account/show-mainnet.out create mode 100644 examples/account/show-named.in create mode 100644 examples/account/show-named.out create mode 100644 examples/account/show-no-paratime.in create mode 100644 examples/account/show-no-paratime.out create mode 100644 examples/account/show-oasis.in create mode 100644 examples/account/show-oasis.out create mode 100644 examples/account/show-testnet.in create mode 100644 examples/account/show-testnet.out create mode 100644 examples/account/show.in create mode 100644 examples/account/show.out create mode 100644 examples/account/transfer-eth.y.in create mode 100644 examples/account/transfer-eth.y.out create mode 100644 examples/account/transfer-eth2.y.in create mode 100644 examples/account/transfer-eth2.y.out create mode 100644 examples/account/transfer-named-no-paratime.y.in create mode 100644 examples/account/transfer-named-no-paratime.y.out create mode 100644 examples/account/transfer-named.y.in create mode 100644 examples/account/transfer-named.y.out create mode 100644 examples/account/undelegate.y.in create mode 100644 examples/account/undelegate.y.out create mode 100644 examples/account/withdraw-named.y.in create mode 100644 examples/account/withdraw-named.y.out create mode 100644 examples/account/withdraw-oasis.y.in create mode 100644 examples/account/withdraw-oasis.y.out create mode 100644 examples/account/withdraw.y.in create mode 100644 examples/account/withdraw.y.out create mode 100644 examples/addressbook/00-add-oasis.in create mode 100644 examples/addressbook/00-add-oasis.out create mode 100644 examples/addressbook/01-add-eth.in create mode 100644 examples/addressbook/01-add-eth.out create mode 100644 examples/addressbook/02-transfer.y.in create mode 100644 examples/addressbook/02-transfer.y.out create mode 100644 examples/addressbook/03-list.in create mode 100644 examples/addressbook/03-list.out create mode 100644 examples/addressbook/04-show-eth.in create mode 100644 examples/addressbook/04-show-eth.out create mode 100644 examples/addressbook/05-show-oasis.in create mode 100644 examples/addressbook/05-show-oasis.out create mode 100644 examples/addressbook/06-rename.in create mode 100644 examples/addressbook/06-rename.out create mode 100644 examples/addressbook/07-list.in create mode 100644 examples/addressbook/07-list.out create mode 100644 examples/addressbook/08-rename.in create mode 100644 examples/addressbook/08-rename.out create mode 100644 examples/addressbook/09-remove.in create mode 100644 examples/addressbook/09-remove.out create mode 100644 examples/addressbook/10-list.in create mode 100644 examples/addressbook/10-list.out create mode 100644 examples/addressbook/config/cli.toml create mode 100644 examples/addressbook/config/emma.wallet create mode 100644 examples/addressbook/config/eugene.wallet create mode 100644 examples/addressbook/config/oscar.wallet create mode 100644 examples/network-governance/cast-vote.in.static create mode 100644 examples/network-governance/cast-vote.out.static create mode 100644 examples/network-governance/list.in create mode 100644 examples/network-governance/list.out create mode 100644 examples/network-governance/show.in.static create mode 100644 examples/network-governance/show.out.static create mode 100644 examples/network-set-rpc/00-list.in create mode 100644 examples/network-set-rpc/00-list.out create mode 100644 examples/network-set-rpc/01-set-rpc.in create mode 100644 examples/network-set-rpc/01-set-rpc.out create mode 100644 examples/network-set-rpc/02-list.in create mode 100644 examples/network-set-rpc/02-list.out create mode 100644 examples/network-set-rpc/config/cli.toml create mode 100644 examples/network-show/gas-costs.in create mode 100644 examples/network-show/gas-costs.out create mode 100644 examples/network-show/id-entity.in create mode 100644 examples/network-show/id-entity.out create mode 100644 examples/network-show/id-node.in.static create mode 100644 examples/network-show/id-node.out.static create mode 100644 examples/network-show/id-paratime.in.static create mode 100644 examples/network-show/id-paratime.out.static create mode 100644 examples/network-show/native-token.in.static create mode 100644 examples/network-show/native-token.out.static create mode 100644 examples/network/00-list.in create mode 100644 examples/network/00-list.out create mode 100644 examples/network/01-remove.in create mode 100644 examples/network/01-remove.out create mode 100644 examples/network/02-list.in create mode 100644 examples/network/02-list.out create mode 100644 examples/network/03-set-default.in create mode 100644 examples/network/03-set-default.out create mode 100644 examples/network/04-list.in create mode 100644 examples/network/04-list.out create mode 100644 examples/network/add-tcpip.in.static create mode 100644 examples/network/add-tcpip.out.static create mode 100644 examples/network/add-unix.in.static create mode 100644 examples/network/add-unix.out.static create mode 100644 examples/network/config/cli.toml create mode 100644 examples/network/status.in.static create mode 100644 examples/network/status.out.static create mode 100644 examples/paratime-remove/00-list.in create mode 100644 examples/paratime-remove/00-list.out create mode 100644 examples/paratime-remove/01-remove.in create mode 100644 examples/paratime-remove/01-remove.out create mode 100644 examples/paratime-remove/02-list.in create mode 100644 examples/paratime-remove/02-list.out create mode 100644 examples/paratime-remove/config/cli.toml create mode 100644 examples/paratime-show/show-tx-encrypted.in create mode 100644 examples/paratime-show/show-tx-encrypted.out create mode 100644 examples/paratime-show/show-tx.in create mode 100644 examples/paratime-show/show-tx.out create mode 100644 examples/paratime-show/show.in create mode 100644 examples/paratime-show/show.out create mode 100644 examples/paratime/00-list.in create mode 100644 examples/paratime/00-list.out create mode 100644 examples/paratime/01-set-default.in create mode 100644 examples/paratime/01-set-default.out create mode 100644 examples/paratime/02-list.in create mode 100644 examples/paratime/02-list.out create mode 100644 examples/paratime/statistics-negative.in.static create mode 100644 examples/paratime/statistics-negative.out.static create mode 100644 examples/paratime/statistics.in.static create mode 100644 examples/paratime/statistics.out.static create mode 100644 examples/setup/first-run.in create mode 100644 examples/setup/first-run.out create mode 100644 examples/setup/wallet-list-config.in.static create mode 100644 examples/setup/wallet-list-config.out.static create mode 100644 examples/setup/wallet-list.in create mode 100644 examples/setup/wallet-list.out create mode 100644 examples/transaction/show-invalid.in create mode 100644 examples/transaction/show-invalid.out create mode 100644 examples/transaction/show-paratime-tx.in create mode 100644 examples/transaction/show-paratime-tx.out create mode 100644 examples/transaction/show-unsigned.in create mode 100644 examples/transaction/show-unsigned.out create mode 100644 examples/transaction/show.in create mode 100644 examples/transaction/show.out create mode 100644 examples/transaction/sign.y.in create mode 100644 examples/transaction/sign.y.out create mode 100644 examples/transaction/testtx.json create mode 100644 examples/transaction/testtx2.json create mode 100644 examples/transaction/testtx_unsigned.json create mode 100644 examples/wallet/00-list.in create mode 100644 examples/wallet/00-list.out create mode 100644 examples/wallet/01-rename.in create mode 100644 examples/wallet/01-rename.out create mode 100644 examples/wallet/02-list.in create mode 100644 examples/wallet/02-list.out create mode 100644 examples/wallet/03-rename.in create mode 100644 examples/wallet/03-rename.out create mode 100644 examples/wallet/04-set-default.in create mode 100644 examples/wallet/04-set-default.out create mode 100644 examples/wallet/05-list.in create mode 100644 examples/wallet/05-list.out create mode 100644 examples/wallet/config/cli.toml create mode 100644 examples/wallet/config/emma.wallet create mode 100644 examples/wallet/config/eugene.wallet create mode 100644 examples/wallet/config/oscar.wallet create mode 100755 scripts/gen_example.sh diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 6fc47b92..95265268 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -43,3 +43,8 @@ jobs: - name: Run tests run: | make test + - name: Check examples + run: | + make clean-examples + make examples + git diff --exit-code examples diff --git a/Makefile b/Makefile index e7052859..08beef02 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ include common.mk +# Each Oasis CLI example's input .in must have a corresponding output .out. +EXAMPLES := $(patsubst %.in,%.out,$(wildcard examples/*/*.in)) + # Check if Go's linkers flags are set in common.mk and add them as extra flags. ifneq ($(GOLDFLAGS),) GO_EXTRA_FLAGS += -ldflags $(GOLDFLAGS) @@ -9,10 +12,20 @@ endif all: build # Build. -build: +build: oasis +oasis: $(shell find . -name "*.go" -type f) go.sum go.mod @$(PRINT) "$(MAGENTA)*** Building Go code...$(OFF)\n" @$(GO) build -v -o oasis $(GOFLAGS) $(GO_EXTRA_FLAGS) +examples: $(EXAMPLES) + +examples/%.out: examples/%.in oasis scripts/gen_example.sh + @rm -f $@ + @scripts/gen_example.sh $< $@ + +clean-examples: + @rm -f examples/*/*.out + # Format code. fmt: @$(PRINT) "$(CYAN)*** Running Go formatters...$(OFF)\n" @@ -64,6 +77,8 @@ clean: # List of targets that are not actual files. .PHONY: \ all build \ + examples \ + clean-examples \ fmt \ $(lint-targets) lint \ $(test-targets) test \ diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..8682af49 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,79 @@ +# Oasis CLI Examples + +This folder contains example scenarios for the Oasis CLI. The snippets are +included in the documentation and also serve as a check for potential +regressions in the CLI. + +Each example is stored inside its own folder. The folder contains: + +- one or more invocation files, +- output file for each invocation file with the content of the resulting + standard output, +- input and output artifacts +- `config` folder containing custom config file to be used for the scenario. + +## Invocation files + +Invocation files have `.in` extension and they will be executed in +alphabetic order. This is important, if you have destructive operations (e.g +adding or removing a wallet) where the order of execution should be respected. +In this case, name the files starting with a number, for example `00-create.in`. + +Each `.in` file begins with `oasis` command, which will be replaced with the +path to the actual Oasis CLI command when generating example outputs. + +An example invocation file content to create a new wallet: + +``` +oasis wallet create john +``` + +### Non-Interactive Execution + +If you want to invoke Oasis in a non-interactive mode (by appending +`-y -o /dev/null` parameters), replace the `.in` extension with `.y.in`. For +example `00-create.in` becomes `00-create.y.in`. + +### Custom Config Files + +Sometimes, you want to use a predefined config file for the Oasis CLI. Put +your desired `cli.toml` and the wallet files to the `config` subfolder +inside your example folder. The folder will be then copied over to a temporary +location before invoking the first file and then fed to CLI by passing the +corresponding `--config` parameter. This way, you can prepare and execute +CLI in an already prepared environment without a dozen of presteps. + +### Example Artifacts + +If an example requires external files such as a JSON file containing an entity +descriptor or a raw transaction, simply put it alongside the input file. +Assume the working directory will be the one that the input file resides in. +The same goes for the output artifacts (e.g. signed transaction). + +## Output Files + +The Oasis CLI output for the given input will be stored in a file named the same +as the corresponding invocation file, but having `.out` extension instead of +`.in`. + +Scenarios should be designed in a way that the output files remain equal unless +a different behavior of the Oasis CLI is expected. + +## Static examples + +If you do not want the example to be executed, but you simply want to store +Oasis CLI execution snippets for example to be included in the documentation, +replace `.in` and `.out` extension with `.in.static` and `.out.static` +respectively. Such files will not be tested and regenerated each time, but you +will have to update it manually. We discourage using this mechanism, but it may +be useful in cases when the output is expected to change and would not make +sense to update it each time (e.g. `oasis network status` returns the current +block height). + +## Running Examples + +To run the examples and generate outputs, invoke in the top-level directory: + +```sh +make examples +``` diff --git a/examples/account/allow-negative.in.static b/examples/account/allow-negative.in.static new file mode 100644 index 00000000..0e4eb059 --- /dev/null +++ b/examples/account/allow-negative.in.static @@ -0,0 +1 @@ +oasis account allow logan -- -10 diff --git a/examples/account/allow-negative.out.static b/examples/account/allow-negative.out.static new file mode 100644 index 00000000..749efa5e --- /dev/null +++ b/examples/account/allow-negative.out.static @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.Allow +Body: + Beneficiary: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl + Amount change: -10.0 TEST +Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 1288 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/allow-paratime.y.in b/examples/account/allow-paratime.y.in new file mode 100644 index 00000000..9847ca34 --- /dev/null +++ b/examples/account/allow-paratime.y.in @@ -0,0 +1 @@ +oasis account allow paratime:sapphire 10 diff --git a/examples/account/allow-paratime.y.out b/examples/account/allow-paratime.y.out new file mode 100644 index 00000000..2d5dba9b --- /dev/null +++ b/examples/account/allow-paratime.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.Allow +Body: + Beneficiary: oasis1qqczuf3x6glkgjuf0xgtcpjjw95r3crf7y2323xd + Amount change: +10.0 TEST +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1278 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/allow.y.in b/examples/account/allow.y.in new file mode 100644 index 00000000..2c895967 --- /dev/null +++ b/examples/account/allow.y.in @@ -0,0 +1 @@ +oasis account allow logan 10 diff --git a/examples/account/allow.y.out b/examples/account/allow.y.out new file mode 100644 index 00000000..ad0138ab --- /dev/null +++ b/examples/account/allow.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.Allow +Body: + Beneficiary: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl + Amount change: +10.0 TEST +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1278 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/amend-commission-schedule.y.in b/examples/account/amend-commission-schedule.y.in new file mode 100644 index 00000000..3d813837 --- /dev/null +++ b/examples/account/amend-commission-schedule.y.in @@ -0,0 +1 @@ +oasis account amend-commission-schedule --bounds 29000/1000/2000,35000/900/1900 --rates 29000/1500 diff --git a/examples/account/amend-commission-schedule.y.out b/examples/account/amend-commission-schedule.y.out new file mode 100644 index 00000000..1084f8ae --- /dev/null +++ b/examples/account/amend-commission-schedule.y.out @@ -0,0 +1,23 @@ +You are about to sign the following transaction: +Method: staking.AmendCommissionSchedule +Body: + Amendment: + Rates: + (1) start: epoch 29000 + rate: 1.5% + Rate Bounds: + (1) start: epoch 29000 + minimum rate: 1.0% + maximum rate: 2.0% + (2) start: epoch 35000 + minimum rate: 0.9% + maximum rate: 1.9% +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1355 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/burn.y.in b/examples/account/burn.y.in new file mode 100644 index 00000000..6e9ea911 --- /dev/null +++ b/examples/account/burn.y.in @@ -0,0 +1 @@ +oasis account burn 2.5 diff --git a/examples/account/burn.y.out b/examples/account/burn.y.out new file mode 100644 index 00000000..4b7a3ce5 --- /dev/null +++ b/examples/account/burn.y.out @@ -0,0 +1,13 @@ +You are about to sign the following transaction: +Method: staking.Burn +Body: + Amount: 2.5 TEST +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1235 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/config/cli.toml b/examples/account/config/cli.toml new file mode 100644 index 00000000..460191ec --- /dev/null +++ b/examples/account/config/cli.toml @@ -0,0 +1,132 @@ +[networks] +default = 'testnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'sapphire' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[wallets] +default = 'oscar' + +[wallets.emma] +address = 'oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh' +algorithm = 'secp256k1-raw' +description = '' +kind = 'file' +number = 0 + +[wallets.eric] +address = 'oasis1qzplmfaeywvtc2qnylyhk0uzcxr4y5s3euhaug7q' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'file' +number = 0 + +[wallets.eugene] +address = 'oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'file' +number = 0 + +[wallets.lenny] +address = 'oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'ledger' +number = 3 + +[wallets.logan] +address = 'oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl' +algorithm = 'ed25519-legacy' +description = '' +kind = 'ledger' +number = 0 + +[wallets.orlando] +address = 'oasis1qq84sc4q0shp5c5klwklqu59evz2mg59hveg7dqx' +algorithm = 'ed25519-adr8' +description = '' +kind = 'file' +number = 0 + +[wallets.oscar] +address = 'oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e' +algorithm = 'ed25519-adr8' +description = '' +kind = 'file' +number = 0 diff --git a/examples/account/config/emma.wallet b/examples/account/config/emma.wallet new file mode 100644 index 00000000..787264f9 --- /dev/null +++ b/examples/account/config/emma.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"+70IILRvyz2ISvRtFLp07WV5dJVZ3hTXPYLMjP7IR9Q=","time":1,"memory":65536,"threads":4}},"nonce":"OAVpbA7l6CxNuXmVe3981cq9Az2rRcUVd93KkHwpnoo=","data":"5Ij6aKiJPVxHWU2KyRQE055eErOysvECJw+6BYd4sJw2OubA+CuiIrhENzd9e3MC1cXdqlcUUS30p+5ASJrbgQ1IFe6WFcMncCUF8GEek9k+L5GMUCwrUStDb/rqlzILZifysmrffByQISas6IFXgy1I5WGC3xQ="} \ No newline at end of file diff --git a/examples/account/config/eric.wallet b/examples/account/config/eric.wallet new file mode 100644 index 00000000..209d5f08 --- /dev/null +++ b/examples/account/config/eric.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"8BlOeFWkkcHOGxluM/pdOD4tCdhN+XkoNvSKNjc2G9k=","time":1,"memory":65536,"threads":4}},"nonce":"ZWAEpH7CzWECwuqnj58bfVipnjwzOm1JiYvlPJtuWTA=","data":"uDJ8SR0jAmc7HPhWF52czGFyjIgoYbEGKKfwhWReD5jJUvBoUR7Va2u1HaW0M9GJnPHAAMF3llRagAHaGzdz2zvyC+cewzH2Y4YhsI7ZZtq930sjPoxIMrbtm+8EdrPhF5AuES7tB6QoSjUhnwGo6lxfJd8CbSCFKRCfijqTMVV17K+t4WlGpTlZYUbuaeUjIniAUa0jydSzy3Ur2HwUEzZXRUWkM8QdCl+44Qhh3I3E2Kkcfc1X3rh4/3bzBKZSsrdH9j3nmH0OUt3X9Co53Tin5SGaf4z+"} \ No newline at end of file diff --git a/examples/account/config/eugene.wallet b/examples/account/config/eugene.wallet new file mode 100644 index 00000000..1c7db004 --- /dev/null +++ b/examples/account/config/eugene.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"VPbTQJminqFbuM10OjLb1Rs5zYDbZV/QP1SlZHlHh1M=","time":1,"memory":65536,"threads":4}},"nonce":"XbvEzIhTIyh+HhVntQen1DEEwJJHQsyRGGczL0h55dE=","data":"LHzfNmIwD4AS9F5lp6io/KcEhDoBHrkJPOhOZ1C/a+YZlsqhFnXW5esSNDi48Oe6iMqVrtxApyxRb8rI+ZFI+lMREzalfXpO5GV42ny7h2bwvGON5ItE1DhkqTtbYKU3Fy/Z07sr2SzGBxtdsL4OPtKVSMvV4mm69aBLbLf4lUN3cAX6mbTrrEgAswBISW6EDDwYG6LkdIUSjok="} \ No newline at end of file diff --git a/examples/account/config/orlando.wallet b/examples/account/config/orlando.wallet new file mode 100644 index 00000000..14c71c36 --- /dev/null +++ b/examples/account/config/orlando.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"aMWiNKkObdbJ5YBrAjAAV3DonFMwdCpIoWp8RXyagpM=","time":1,"memory":65536,"threads":4}},"nonce":"KUlVqgbRw9roZj6KiJk47uXJ4ohzZNiznouXDwJ2yDE=","data":"muSrgs8iJrRusaAPaWu0d/4TysA9RM2BH+Ddw8c4gav5FxU3R/z7V7kOk7ZjXN6F8S9T1cenmmn4uESVgIs333YRGOBCVwxV2+dxrVlr7GAzi2uicWAU5tsUbBbdgxepKVoWWRKBeRfbJXZVTu8WM+4ZQPGhry9DdR98mvdueNtLqChMGxYoKOGiApj36u6i+xRJrOa4cKsLyNMPqQn4BI5GL4FbhSbIB3vhHQZ3pA1gvagIc1/MGy/hvmcsteDbBn7m/vjG"} \ No newline at end of file diff --git a/examples/account/config/oscar.wallet b/examples/account/config/oscar.wallet new file mode 100644 index 00000000..101d2c28 --- /dev/null +++ b/examples/account/config/oscar.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"PMXSZ2OIM2q7YyLHKUrAotJBANA7QLOaEWDzpYcQ81g=","time":1,"memory":65536,"threads":4}},"nonce":"rWq6PYJWjGqGGueSafq2O1Zz1Gshx4gjpweryfCGFFo=","data":"nIzNG8TASLoZqINSVcQhW/9IFuMJ9+U+Hm9tB3m3Fnnua74jekDRVHIFzKmi7Z2tkV/KfIJyKsqdfPMM0O5aJbXW/qSZl7Wma4JNh3MgOrH4m9wvEWF/vzGgs4EctZnlao3y2DxQtedivPjyg6k1qWSP3RQoyLY/fliTaNETDpqbc08xOuhmVKzSse2UxZazpChVU55LA9wiwKN5Mfw+i3bEueiHuet8ECnax/rbGPTEnHMjmtGC9D69VWLBXn+NNIW2WQYuPvDkHBQS/zqT"} \ No newline at end of file diff --git a/examples/account/delegate.y.in b/examples/account/delegate.y.in new file mode 100644 index 00000000..8f53957f --- /dev/null +++ b/examples/account/delegate.y.in @@ -0,0 +1 @@ +oasis account delegate 20 oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk --no-paratime diff --git a/examples/account/delegate.y.out b/examples/account/delegate.y.out new file mode 100644 index 00000000..a1963865 --- /dev/null +++ b/examples/account/delegate.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.AddEscrow +Body: + To: oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk + Amount: 20.0 TEST +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1271 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/deposit-eth.y.in b/examples/account/deposit-eth.y.in new file mode 100644 index 00000000..89daedc0 --- /dev/null +++ b/examples/account/deposit-eth.y.in @@ -0,0 +1 @@ +oasis accounts deposit 10 0x90adE3B7065fa715c7a150313877dF1d33e777D5 --gas-price 0 diff --git a/examples/account/deposit-eth.y.out b/examples/account/deposit-eth.y.out new file mode 100644 index 00000000..02a7ed0b --- /dev/null +++ b/examples/account/deposit-eth.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Deposit +Body: + To: oasis1qpupfu7e2n6pkezeaw0yhj8mcem8anj64ytrayne + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 11310 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/deposit-named.y.in b/examples/account/deposit-named.y.in new file mode 100644 index 00000000..e910a953 --- /dev/null +++ b/examples/account/deposit-named.y.in @@ -0,0 +1 @@ +oasis accounts deposit 10 eugene --gas-price 0 diff --git a/examples/account/deposit-named.y.out b/examples/account/deposit-named.y.out new file mode 100644 index 00000000..cc8d0b80 --- /dev/null +++ b/examples/account/deposit-named.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Deposit +Body: + To: eugene (oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz) + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 11310 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/deposit-oasis.y.in b/examples/account/deposit-oasis.y.in new file mode 100644 index 00000000..6233319c --- /dev/null +++ b/examples/account/deposit-oasis.y.in @@ -0,0 +1 @@ +oasis account deposit 10 oasis1qpxhsf7xnm007csw2acaa7mta2krzpwex5c90qu6 --gas-price 0 diff --git a/examples/account/deposit-oasis.y.out b/examples/account/deposit-oasis.y.out new file mode 100644 index 00000000..b0a5deb6 --- /dev/null +++ b/examples/account/deposit-oasis.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Deposit +Body: + To: oasis1qpxhsf7xnm007csw2acaa7mta2krzpwex5c90qu6 + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 11310 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/deposit.y.in b/examples/account/deposit.y.in new file mode 100644 index 00000000..438cd095 --- /dev/null +++ b/examples/account/deposit.y.in @@ -0,0 +1 @@ +oasis accounts deposit 10 --gas-price 0 diff --git a/examples/account/deposit.y.out b/examples/account/deposit.y.out new file mode 100644 index 00000000..2b0bb832 --- /dev/null +++ b/examples/account/deposit.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Deposit +Body: + To: Self + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 11285 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/entity-deregister.y.in b/examples/account/entity-deregister.y.in new file mode 100644 index 00000000..f63e5e52 --- /dev/null +++ b/examples/account/entity-deregister.y.in @@ -0,0 +1 @@ +oasis account entity deregister diff --git a/examples/account/entity-deregister.y.out b/examples/account/entity-deregister.y.out new file mode 100644 index 00000000..08c90a3f --- /dev/null +++ b/examples/account/entity-deregister.y.out @@ -0,0 +1,13 @@ +You are about to sign the following transaction: +Method: registry.DeregisterEntity +Body: + {} +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1231 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/entity-register.y.in b/examples/account/entity-register.y.in new file mode 100644 index 00000000..9650e8c4 --- /dev/null +++ b/examples/account/entity-register.y.in @@ -0,0 +1 @@ +oasis account entity register entity.json diff --git a/examples/account/entity-register.y.out b/examples/account/entity-register.y.out new file mode 100644 index 00000000..99840c84 --- /dev/null +++ b/examples/account/entity-register.y.out @@ -0,0 +1,27 @@ +Signing the entity descriptor... +(In case you are using a hardware-based signer you may need to confirm on device.) +You are about to sign the following transaction: +Method: registry.RegisterEntity +Body: + { + "untrusted_raw_value": { + "v": 2, + "id": "Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8=", + "nodes": [ + "nshzFvqLNNLN+HS0id5XmXrVMhIgFV456i4VQicWgjk=" + ] + }, + "signature": { + "public_key": "Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8=", + "signature": "DAwn+N8hKmQMbZda/fFJSEgErDAAdebXLfIPOpqUkJowJLUAL+nfrUMz5SVkKc0TnqQOavoSAVFz1yoRJ3QuBA==" + } + } +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 2471 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/entity.json b/examples/account/entity.json new file mode 100644 index 00000000..7367b95b --- /dev/null +++ b/examples/account/entity.json @@ -0,0 +1,7 @@ +{ + "v": 2, + "id": "Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8=", + "nodes": [ + "nshzFvqLNNLN+HS0id5XmXrVMhIgFV456i4VQicWgjk=" + ] +} diff --git a/examples/account/from-public-key.in b/examples/account/from-public-key.in new file mode 100644 index 00000000..1b094ea4 --- /dev/null +++ b/examples/account/from-public-key.in @@ -0,0 +1 @@ +oasis account from-public-key NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= diff --git a/examples/account/from-public-key.out b/examples/account/from-public-key.out new file mode 100644 index 00000000..7b30a595 --- /dev/null +++ b/examples/account/from-public-key.out @@ -0,0 +1 @@ +oasis1qrec770vrek0a9a5lcrv0zvt22504k68svq7kzve diff --git a/examples/account/node-unfreeze.y.in b/examples/account/node-unfreeze.y.in new file mode 100644 index 00000000..f24582da --- /dev/null +++ b/examples/account/node-unfreeze.y.in @@ -0,0 +1 @@ +oasis account node-unfreeze fasTG3pMOwLfFA7JX3R8Kxw1zFflqeY6NP/cpjcFu5I= diff --git a/examples/account/node-unfreeze.y.out b/examples/account/node-unfreeze.y.out new file mode 100644 index 00000000..0c0b0a96 --- /dev/null +++ b/examples/account/node-unfreeze.y.out @@ -0,0 +1,15 @@ +You are about to sign the following transaction: +Method: registry.UnfreezeNode +Body: + { + "node_id": "fasTG3pMOwLfFA7JX3R8Kxw1zFflqeY6NP/cpjcFu5I=" + } +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1274 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/show-delegations-validator.in.static b/examples/account/show-delegations-validator.in.static new file mode 100644 index 00000000..1549d0f7 --- /dev/null +++ b/examples/account/show-delegations-validator.in.static @@ -0,0 +1 @@ +oasis account show oasis1qz8w4erh0kkwpmdtwd3dt9ueaz9hmzfpecjhd7t4 --show-delegations diff --git a/examples/account/show-delegations-validator.out.static b/examples/account/show-delegations-validator.out.static new file mode 100644 index 00000000..b12763d4 --- /dev/null +++ b/examples/account/show-delegations-validator.out.static @@ -0,0 +1,65 @@ +Address: oasis1qz8w4erh0kkwpmdtwd3dt9ueaz9hmzfpecjhd7t4 +Nonce: 17 + +=== CONSENSUS LAYER (testnet) === + Total: 1300.598418401 TEST + Available: 52.73923316 TEST + + Active Delegations from this Account: + Total: 1247.859185241 TEST + + Delegations: + - To: oasis1qz8w4erh0kkwpmdtwd3dt9ueaz9hmzfpecjhd7t4 (self) + Amount: 1247.859185241 TEST (1167021437369 shares) + + Active Delegations to this Account: + Total: 1833.451690691 TEST + (1714678589317 shares) + + Delegations: + - From: oasis1qz8w4erh0kkwpmdtwd3dt9ueaz9hmzfpecjhd7t4 (self) + Amount: 1247.859185241 TEST (1167021437369 shares) + - From: oasis1qztnau4t75cf8wh3truwtl7awvnkwe4st5l25yfn + Amount: 148.289115949 TEST (138682777102 shares) + - From: oasis1qrvguq055xh42yjl84yn2h5dhm59fkzg9st0mu90 + Amount: 116.290596782 TEST (108757158672 shares) + - From: oasis1qzhulmesqkcu23r0h5hfslwelud46mkm25zh7uqq + Amount: 111.30081746 TEST (104090622972 shares) + - From: oasis1qq05qnywdzz3m45dzqxuek0p4a5dxr86rgxlxc58 + Amount: 104.855987628 TEST (98063296601 shares) + - From: oasis1qzpvsgt56jxz324dxjv5272mz4j6kfadd5ur7f98 + Amount: 104.855987628 TEST (98063296601 shares) + + Commission Schedule: + Rates: + (1) start: epoch 15883 + rate: 7.0% + (2) start: epoch 15994 + rate: 11.0% + (3) start: epoch 16000 + rate: 14.0% + (4) start: epoch 16134 + rate: 18.0% + Rate Bounds: + (1) start: epoch 15883 + minimum rate: 0.0% + maximum rate: 10.0% + (2) start: epoch 15993 + minimum rate: 0.0% + maximum rate: 20.0% + + Stake Accumulator: + Claims: + - Name: registry.RegisterEntity + Staking Thresholds: + - Global: entity + - Name: registry.RegisterNode.LAdHWnCkjFR5NUkFHVpfGuKFfZW1Cqjzu6wTFY6v2JI= + Staking Thresholds: + - Global: node-validator + - Name: registry.RegisterNode.xk58fx5ys6CSO33ngMQkgOL5UUHSgOSt0QbqWGGuEF8= + Staking Thresholds: + - Global: node-compute + Staking Thresholds: + - Global: node-compute + Staking Thresholds: + - Global: node-compute diff --git a/examples/account/show-delegations.in.static b/examples/account/show-delegations.in.static new file mode 100644 index 00000000..2839e40e --- /dev/null +++ b/examples/account/show-delegations.in.static @@ -0,0 +1 @@ +oasis account show oasis1qrec770vrek0a9a5lcrv0zvt22504k68svq7kzve --show-delegations diff --git a/examples/account/show-delegations.out.static b/examples/account/show-delegations.out.static new file mode 100644 index 00000000..6d782a26 --- /dev/null +++ b/examples/account/show-delegations.out.static @@ -0,0 +1,32 @@ +Address: oasis1qrec770vrek0a9a5lcrv0zvt22504k68svq7kzve +Nonce: 33 + +=== CONSENSUS LAYER (testnet) === + Total: 972.898210067 TEST + Available: 951.169098086 TEST + + Active Delegations from this Account: + Total: 16.296833986 TEST + + Delegations: + - To: oasis1qz2tg4hsatlxfaf8yut9gxgv8990ujaz4sldgmzx + Amount: 16.296833986 TEST (15000000000 shares) + Debonding Delegations from this Account: + Total: 5.432277995 TEST + + Delegations: + - To: oasis1qz2tg4hsatlxfaf8yut9gxgv8990ujaz4sldgmzx + Amount: 5.432277995 TEST (5432277995 shares) + End Time: epoch 26558 + + Allowances for this Account: + Total: 269.5000002 TEST + Allowances: + - Beneficiary: oasis1qqczuf3x6glkgjuf0xgtcpjjw95r3crf7y2323xd + Amount: 269.5 TEST + - Beneficiary: oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx + Amount: 0.0000002 TEST + +=== sapphire PARATIME === +Balances for all denominations: + 6.9995378 TEST diff --git a/examples/account/show-eth.in b/examples/account/show-eth.in new file mode 100644 index 00000000..eac9d679 --- /dev/null +++ b/examples/account/show-eth.in @@ -0,0 +1 @@ +oasis account show 0xA3243B310CfA8D4b008780BC87E0bb9f6d4FDA06 diff --git a/examples/account/show-eth.out b/examples/account/show-eth.out new file mode 100644 index 00000000..ea6ae993 --- /dev/null +++ b/examples/account/show-eth.out @@ -0,0 +1,12 @@ +Address: oasis1qzplmfaeywvtc2qnylyhk0uzcxr4y5s3euhaug7q +Nonce: 0 + +=== CONSENSUS LAYER (testnet) === + Total: 0.0 TEST + Available: 0.0 TEST + + + +=== sapphire PARATIME === +Balances for all denominations: + 10.0 TEST diff --git a/examples/account/show-mainnet.in b/examples/account/show-mainnet.in new file mode 100644 index 00000000..45bbd080 --- /dev/null +++ b/examples/account/show-mainnet.in @@ -0,0 +1 @@ +oasis account show oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 --network mainnet diff --git a/examples/account/show-mainnet.out b/examples/account/show-mainnet.out new file mode 100644 index 00000000..29c6af2f --- /dev/null +++ b/examples/account/show-mainnet.out @@ -0,0 +1,8 @@ +Address: oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 +Nonce: 0 + +=== CONSENSUS LAYER (mainnet) === + Total: 0.0 ROSE + Available: 0.0 ROSE + + diff --git a/examples/account/show-named.in b/examples/account/show-named.in new file mode 100644 index 00000000..03da3f85 --- /dev/null +++ b/examples/account/show-named.in @@ -0,0 +1 @@ +oasis account show orlando diff --git a/examples/account/show-named.out b/examples/account/show-named.out new file mode 100644 index 00000000..301343f7 --- /dev/null +++ b/examples/account/show-named.out @@ -0,0 +1,8 @@ +Address: oasis1qq84sc4q0shp5c5klwklqu59evz2mg59hveg7dqx +Nonce: 0 + +=== CONSENSUS LAYER (testnet) === + Total: 10.0 TEST + Available: 10.0 TEST + + diff --git a/examples/account/show-no-paratime.in b/examples/account/show-no-paratime.in new file mode 100644 index 00000000..53322669 --- /dev/null +++ b/examples/account/show-no-paratime.in @@ -0,0 +1 @@ +oasis account show eric --no-paratime diff --git a/examples/account/show-no-paratime.out b/examples/account/show-no-paratime.out new file mode 100644 index 00000000..811cb3dd --- /dev/null +++ b/examples/account/show-no-paratime.out @@ -0,0 +1,8 @@ +Address: oasis1qzplmfaeywvtc2qnylyhk0uzcxr4y5s3euhaug7q +Nonce: 0 + +=== CONSENSUS LAYER (testnet) === + Total: 0.0 TEST + Available: 0.0 TEST + + diff --git a/examples/account/show-oasis.in b/examples/account/show-oasis.in new file mode 100644 index 00000000..6c1a454f --- /dev/null +++ b/examples/account/show-oasis.in @@ -0,0 +1 @@ +oasis account show oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 diff --git a/examples/account/show-oasis.out b/examples/account/show-oasis.out new file mode 100644 index 00000000..08efe17f --- /dev/null +++ b/examples/account/show-oasis.out @@ -0,0 +1,8 @@ +Address: oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 +Nonce: 0 + +=== CONSENSUS LAYER (testnet) === + Total: 1.0 TEST + Available: 1.0 TEST + + diff --git a/examples/account/show-testnet.in b/examples/account/show-testnet.in new file mode 100644 index 00000000..f51157fd --- /dev/null +++ b/examples/account/show-testnet.in @@ -0,0 +1 @@ +oasis account show oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 --network testnet diff --git a/examples/account/show-testnet.out b/examples/account/show-testnet.out new file mode 100644 index 00000000..08efe17f --- /dev/null +++ b/examples/account/show-testnet.out @@ -0,0 +1,8 @@ +Address: oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000 +Nonce: 0 + +=== CONSENSUS LAYER (testnet) === + Total: 1.0 TEST + Available: 1.0 TEST + + diff --git a/examples/account/show.in b/examples/account/show.in new file mode 100644 index 00000000..079dca05 --- /dev/null +++ b/examples/account/show.in @@ -0,0 +1 @@ +oasis account show diff --git a/examples/account/show.out b/examples/account/show.out new file mode 100644 index 00000000..a6b6ed4d --- /dev/null +++ b/examples/account/show.out @@ -0,0 +1,8 @@ +Address: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e +Nonce: 1 + +=== CONSENSUS LAYER (testnet) === + Total: 0.0 TEST + Available: 0.0 TEST + + diff --git a/examples/account/transfer-eth.y.in b/examples/account/transfer-eth.y.in new file mode 100644 index 00000000..f745a662 --- /dev/null +++ b/examples/account/transfer-eth.y.in @@ -0,0 +1 @@ +oasis account transfer 1.5 0xDce075E1C39b1ae0b75D554558b6451A226ffe00 --account orlando diff --git a/examples/account/transfer-eth.y.out b/examples/account/transfer-eth.y.out new file mode 100644 index 00000000..c8f92efe --- /dev/null +++ b/examples/account/transfer-eth.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: accounts.Transfer +Body: + To: test:dave (oasis1qrk58a6j2qn065m6p06jgjyt032f7qucy5wqeqpt) + Amount: 1.5 TEST +Authorized signer(s): + 1. cb+NHKt7JT4fumy0wQdkiBwO3P+DUh8ylozMpsu1xH4= (ed25519) + Nonce: 0 +Fee: + Amount: 0.000231 TEST + Gas limit: 2310 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: orlando diff --git a/examples/account/transfer-eth2.y.in b/examples/account/transfer-eth2.y.in new file mode 100644 index 00000000..c3ad1a25 --- /dev/null +++ b/examples/account/transfer-eth2.y.in @@ -0,0 +1 @@ +oasis account transfer 1.5 0xDce075E1C39b1ae0b75D554558b6451A226ffe00 --account eric diff --git a/examples/account/transfer-eth2.y.out b/examples/account/transfer-eth2.y.out new file mode 100644 index 00000000..2e8cbf4d --- /dev/null +++ b/examples/account/transfer-eth2.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: accounts.Transfer +Body: + To: test:dave (oasis1qrk58a6j2qn065m6p06jgjyt032f7qucy5wqeqpt) + Amount: 1.5 TEST +Authorized signer(s): + 1. A1ik9X/7X/eGSoSYOKSIJqM7pZ5It/gHbF+wraxi33u3 (secp256k1eth) + Nonce: 0 +Fee: + Amount: 0.0002316 TEST + Gas limit: 2316 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: eric diff --git a/examples/account/transfer-named-no-paratime.y.in b/examples/account/transfer-named-no-paratime.y.in new file mode 100644 index 00000000..76bde49c --- /dev/null +++ b/examples/account/transfer-named-no-paratime.y.in @@ -0,0 +1 @@ +oasis account transfer 2.5 oscar --account orlando --no-paratime diff --git a/examples/account/transfer-named-no-paratime.y.out b/examples/account/transfer-named-no-paratime.y.out new file mode 100644 index 00000000..d5ff22d7 --- /dev/null +++ b/examples/account/transfer-named-no-paratime.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.Transfer +Body: + To: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e + Amount: 2.5 TEST +Nonce: 0 +Fee: + Amount: 0.0 TEST + Gas limit: 1264 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: orlando diff --git a/examples/account/transfer-named.y.in b/examples/account/transfer-named.y.in new file mode 100644 index 00000000..7581a52c --- /dev/null +++ b/examples/account/transfer-named.y.in @@ -0,0 +1 @@ +oasis account transfer 2.5 oscar --account orlando diff --git a/examples/account/transfer-named.y.out b/examples/account/transfer-named.y.out new file mode 100644 index 00000000..30e05c7f --- /dev/null +++ b/examples/account/transfer-named.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: accounts.Transfer +Body: + To: oscar (oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e) + Amount: 2.5 TEST +Authorized signer(s): + 1. cb+NHKt7JT4fumy0wQdkiBwO3P+DUh8ylozMpsu1xH4= (ed25519) + Nonce: 0 +Fee: + Amount: 0.000231 TEST + Gas limit: 2310 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: orlando diff --git a/examples/account/undelegate.y.in b/examples/account/undelegate.y.in new file mode 100644 index 00000000..e43ddca4 --- /dev/null +++ b/examples/account/undelegate.y.in @@ -0,0 +1 @@ +oasis account undelegate 20000000000 oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk --no-paratime diff --git a/examples/account/undelegate.y.out b/examples/account/undelegate.y.out new file mode 100644 index 00000000..0dd2ad31 --- /dev/null +++ b/examples/account/undelegate.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.ReclaimEscrow +Body: + From: oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk + Shares: 20000000000 +Nonce: 1 +Fee: + Amount: 0.0 TEST + Gas limit: 1275 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: oscar diff --git a/examples/account/withdraw-named.y.in b/examples/account/withdraw-named.y.in new file mode 100644 index 00000000..f0459ba3 --- /dev/null +++ b/examples/account/withdraw-named.y.in @@ -0,0 +1 @@ +oasis account withdraw 10 orlando diff --git a/examples/account/withdraw-named.y.out b/examples/account/withdraw-named.y.out new file mode 100644 index 00000000..f51316ba --- /dev/null +++ b/examples/account/withdraw-named.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Withdraw +Body: + To: orlando (oasis1qq84sc4q0shp5c5klwklqu59evz2mg59hveg7dqx) + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0011311 TEST + Gas limit: 11311 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/withdraw-oasis.y.in b/examples/account/withdraw-oasis.y.in new file mode 100644 index 00000000..d20e0320 --- /dev/null +++ b/examples/account/withdraw-oasis.y.in @@ -0,0 +1 @@ +oasis accounts withdraw 10 oasis1qpxhsf7xnm007csw2acaa7mta2krzpwex5c90qu6 diff --git a/examples/account/withdraw-oasis.y.out b/examples/account/withdraw-oasis.y.out new file mode 100644 index 00000000..036facdd --- /dev/null +++ b/examples/account/withdraw-oasis.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Withdraw +Body: + To: oasis1qpxhsf7xnm007csw2acaa7mta2krzpwex5c90qu6 + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0011311 TEST + Gas limit: 11311 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/account/withdraw.y.in b/examples/account/withdraw.y.in new file mode 100644 index 00000000..7aefbe41 --- /dev/null +++ b/examples/account/withdraw.y.in @@ -0,0 +1 @@ +oasis account withdraw 10 diff --git a/examples/account/withdraw.y.out b/examples/account/withdraw.y.out new file mode 100644 index 00000000..02e41411 --- /dev/null +++ b/examples/account/withdraw.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: consensus.Withdraw +Body: + To: Self + Amount: 10.0 TEST +Authorized signer(s): + 1. Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= (ed25519) + Nonce: 0 +Fee: + Amount: 0.0011286 TEST + Gas limit: 11286 + (gas price: 0.0000001 TEST per gas unit) + +Network: testnet +ParaTime: sapphire +Account: oscar diff --git a/examples/addressbook/00-add-oasis.in b/examples/addressbook/00-add-oasis.in new file mode 100644 index 00000000..4a487c2c --- /dev/null +++ b/examples/addressbook/00-add-oasis.in @@ -0,0 +1 @@ +oasis addressbook add mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw diff --git a/examples/addressbook/00-add-oasis.out b/examples/addressbook/00-add-oasis.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/addressbook/01-add-eth.in b/examples/addressbook/01-add-eth.in new file mode 100644 index 00000000..6a5c0a96 --- /dev/null +++ b/examples/addressbook/01-add-eth.in @@ -0,0 +1 @@ +oasis addressbook add meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1 diff --git a/examples/addressbook/01-add-eth.out b/examples/addressbook/01-add-eth.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/addressbook/02-transfer.y.in b/examples/addressbook/02-transfer.y.in new file mode 100644 index 00000000..baf0efd2 --- /dev/null +++ b/examples/addressbook/02-transfer.y.in @@ -0,0 +1 @@ +oasis account transfer 2.5 meghan diff --git a/examples/addressbook/02-transfer.y.out b/examples/addressbook/02-transfer.y.out new file mode 100644 index 00000000..323bb82f --- /dev/null +++ b/examples/addressbook/02-transfer.y.out @@ -0,0 +1,17 @@ +You are about to sign the following transaction: +Format: plain +Method: accounts.Transfer +Body: + To: meghan (oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega) + Amount: 2.5 ROSE +Authorized signer(s): + 1. ArEjDxsPfDvfeLlity4mjGzy8E/nI4umiC8vYQh+eh/c (secp256k1eth) + Nonce: 0 +Fee: + Amount: 0.0002316 ROSE + Gas limit: 2316 + (gas price: 0.0000001 ROSE per gas unit) + +Network: mainnet +ParaTime: emerald +Account: eugene diff --git a/examples/addressbook/03-list.in b/examples/addressbook/03-list.in new file mode 100644 index 00000000..88359914 --- /dev/null +++ b/examples/addressbook/03-list.in @@ -0,0 +1 @@ +oasis addressbook list diff --git a/examples/addressbook/03-list.out b/examples/addressbook/03-list.out new file mode 100644 index 00000000..41e98bc1 --- /dev/null +++ b/examples/addressbook/03-list.out @@ -0,0 +1,3 @@ +NAME ADDRESS +meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1 +mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw diff --git a/examples/addressbook/04-show-eth.in b/examples/addressbook/04-show-eth.in new file mode 100644 index 00000000..1049d27c --- /dev/null +++ b/examples/addressbook/04-show-eth.in @@ -0,0 +1 @@ +oasis addressbook show meghan diff --git a/examples/addressbook/04-show-eth.out b/examples/addressbook/04-show-eth.out new file mode 100644 index 00000000..0595a0f3 --- /dev/null +++ b/examples/addressbook/04-show-eth.out @@ -0,0 +1,3 @@ +Name: meghan +Ethereum address: 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1 +Native address: oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega diff --git a/examples/addressbook/05-show-oasis.in b/examples/addressbook/05-show-oasis.in new file mode 100644 index 00000000..8849057e --- /dev/null +++ b/examples/addressbook/05-show-oasis.in @@ -0,0 +1 @@ +oasis addressbook show mike diff --git a/examples/addressbook/05-show-oasis.out b/examples/addressbook/05-show-oasis.out new file mode 100644 index 00000000..cd9ebe37 --- /dev/null +++ b/examples/addressbook/05-show-oasis.out @@ -0,0 +1,2 @@ +Name: mike +Native address: oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw diff --git a/examples/addressbook/06-rename.in b/examples/addressbook/06-rename.in new file mode 100644 index 00000000..5254d7c8 --- /dev/null +++ b/examples/addressbook/06-rename.in @@ -0,0 +1 @@ +oasis addressbook rename mike mark diff --git a/examples/addressbook/06-rename.out b/examples/addressbook/06-rename.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/addressbook/07-list.in b/examples/addressbook/07-list.in new file mode 100644 index 00000000..88359914 --- /dev/null +++ b/examples/addressbook/07-list.in @@ -0,0 +1 @@ +oasis addressbook list diff --git a/examples/addressbook/07-list.out b/examples/addressbook/07-list.out new file mode 100644 index 00000000..379930a4 --- /dev/null +++ b/examples/addressbook/07-list.out @@ -0,0 +1,3 @@ +NAME ADDRESS +mark oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw +meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1 diff --git a/examples/addressbook/08-rename.in b/examples/addressbook/08-rename.in new file mode 100644 index 00000000..f1c5db7c --- /dev/null +++ b/examples/addressbook/08-rename.in @@ -0,0 +1 @@ +oasis addressbook rename mark mike diff --git a/examples/addressbook/08-rename.out b/examples/addressbook/08-rename.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/addressbook/09-remove.in b/examples/addressbook/09-remove.in new file mode 100644 index 00000000..a38f8370 --- /dev/null +++ b/examples/addressbook/09-remove.in @@ -0,0 +1 @@ +oasis addressbook remove mike diff --git a/examples/addressbook/09-remove.out b/examples/addressbook/09-remove.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/addressbook/10-list.in b/examples/addressbook/10-list.in new file mode 100644 index 00000000..88359914 --- /dev/null +++ b/examples/addressbook/10-list.in @@ -0,0 +1 @@ +oasis addressbook list diff --git a/examples/addressbook/10-list.out b/examples/addressbook/10-list.out new file mode 100644 index 00000000..0f89bf1c --- /dev/null +++ b/examples/addressbook/10-list.out @@ -0,0 +1,2 @@ +NAME ADDRESS +meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1 diff --git a/examples/addressbook/config/cli.toml b/examples/addressbook/config/cli.toml new file mode 100644 index 00000000..77cfcbed --- /dev/null +++ b/examples/addressbook/config/cli.toml @@ -0,0 +1,118 @@ +[networks] +default = 'mainnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'emerald' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[wallets] +default = 'eugene' + +[wallets.emma] +address = 'oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh' +algorithm = 'secp256k1-raw' +description = '' +kind = 'file' +number = 0 + +[wallets.eugene] +address = 'oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'file' +number = 0 + +[wallets.lenny] +address = 'oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'ledger' +number = 3 + +[wallets.logan] +address = 'oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl' +algorithm = 'ed25519-legacy' +description = '' +kind = 'ledger' +number = 0 + +[wallets.oscar] +address = 'oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e' +algorithm = 'ed25519-adr8' +description = '' +kind = 'file' +number = 0 diff --git a/examples/addressbook/config/emma.wallet b/examples/addressbook/config/emma.wallet new file mode 100644 index 00000000..787264f9 --- /dev/null +++ b/examples/addressbook/config/emma.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"+70IILRvyz2ISvRtFLp07WV5dJVZ3hTXPYLMjP7IR9Q=","time":1,"memory":65536,"threads":4}},"nonce":"OAVpbA7l6CxNuXmVe3981cq9Az2rRcUVd93KkHwpnoo=","data":"5Ij6aKiJPVxHWU2KyRQE055eErOysvECJw+6BYd4sJw2OubA+CuiIrhENzd9e3MC1cXdqlcUUS30p+5ASJrbgQ1IFe6WFcMncCUF8GEek9k+L5GMUCwrUStDb/rqlzILZifysmrffByQISas6IFXgy1I5WGC3xQ="} \ No newline at end of file diff --git a/examples/addressbook/config/eugene.wallet b/examples/addressbook/config/eugene.wallet new file mode 100644 index 00000000..1c7db004 --- /dev/null +++ b/examples/addressbook/config/eugene.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"VPbTQJminqFbuM10OjLb1Rs5zYDbZV/QP1SlZHlHh1M=","time":1,"memory":65536,"threads":4}},"nonce":"XbvEzIhTIyh+HhVntQen1DEEwJJHQsyRGGczL0h55dE=","data":"LHzfNmIwD4AS9F5lp6io/KcEhDoBHrkJPOhOZ1C/a+YZlsqhFnXW5esSNDi48Oe6iMqVrtxApyxRb8rI+ZFI+lMREzalfXpO5GV42ny7h2bwvGON5ItE1DhkqTtbYKU3Fy/Z07sr2SzGBxtdsL4OPtKVSMvV4mm69aBLbLf4lUN3cAX6mbTrrEgAswBISW6EDDwYG6LkdIUSjok="} \ No newline at end of file diff --git a/examples/addressbook/config/oscar.wallet b/examples/addressbook/config/oscar.wallet new file mode 100644 index 00000000..101d2c28 --- /dev/null +++ b/examples/addressbook/config/oscar.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"PMXSZ2OIM2q7YyLHKUrAotJBANA7QLOaEWDzpYcQ81g=","time":1,"memory":65536,"threads":4}},"nonce":"rWq6PYJWjGqGGueSafq2O1Zz1Gshx4gjpweryfCGFFo=","data":"nIzNG8TASLoZqINSVcQhW/9IFuMJ9+U+Hm9tB3m3Fnnua74jekDRVHIFzKmi7Z2tkV/KfIJyKsqdfPMM0O5aJbXW/qSZl7Wma4JNh3MgOrH4m9wvEWF/vzGgs4EctZnlao3y2DxQtedivPjyg6k1qWSP3RQoyLY/fliTaNETDpqbc08xOuhmVKzSse2UxZazpChVU55LA9wiwKN5Mfw+i3bEueiHuet8ECnax/rbGPTEnHMjmtGC9D69VWLBXn+NNIW2WQYuPvDkHBQS/zqT"} \ No newline at end of file diff --git a/examples/network-governance/cast-vote.in.static b/examples/network-governance/cast-vote.in.static new file mode 100644 index 00000000..40253c75 --- /dev/null +++ b/examples/network-governance/cast-vote.in.static @@ -0,0 +1 @@ +oasis network governance cast-vote 5 yes diff --git a/examples/network-governance/cast-vote.out.static b/examples/network-governance/cast-vote.out.static new file mode 100644 index 00000000..8f167a41 --- /dev/null +++ b/examples/network-governance/cast-vote.out.static @@ -0,0 +1,16 @@ +Unlock your account. +? Passphrase: +You are about to sign the following transaction: +Method: governance.CastVote +Body: + Proposal ID: 5 + Vote: yes +Nonce: 7 +Fee: + Amount: 0.0 TEST + Gas limit: 1240 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: test diff --git a/examples/network-governance/list.in b/examples/network-governance/list.in new file mode 100644 index 00000000..68e65e8d --- /dev/null +++ b/examples/network-governance/list.in @@ -0,0 +1 @@ +oasis network governance list --network testnet diff --git a/examples/network-governance/list.out b/examples/network-governance/list.out new file mode 100644 index 00000000..84ec273b --- /dev/null +++ b/examples/network-governance/list.out @@ -0,0 +1,8 @@ +ID KIND SUBMITTER CREATED AT CLOSES AT STATE +1 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 5633 5645 passed +2 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 7525 7537 passed +3 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 8817 8829 passed +4 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14183 14195 passed +5 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14869 14881 passed +6 cancel upgrade 5 oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14895 14907 passed +7 upgrade oasis1qrs2dl6nz6fcxxr3tq37laxlz6hxk6kuscnr6rxj 14982 14994 passed diff --git a/examples/network-governance/show.in.static b/examples/network-governance/show.in.static new file mode 100644 index 00000000..10e02ec5 --- /dev/null +++ b/examples/network-governance/show.in.static @@ -0,0 +1 @@ +oasis network governance show 5 --network localhost_testnet diff --git a/examples/network-governance/show.out.static b/examples/network-governance/show.out.static new file mode 100644 index 00000000..2332be79 --- /dev/null +++ b/examples/network-governance/show.out.static @@ -0,0 +1,40 @@ +Network: localhost_testnet +Proposal ID: 5 +Status: passed +Results: + - yes: 40353433694198429 + - no: 0 + - abstain: 0 + +=== VOTED STAKE === +Total voting stake: 50569514477387972 +Voted stake: 40353433694198429 (79.80%) +Voted yes stake: 40353433694198429 (100.00%) +Threshold: 68% + +=== VALIDATORS VOTED === + 1. oasis1qz2tg4hsatlxfaf8yut9gxgv8990ujaz4sldgmzx,,10090915233195893 (19.95%) + 2. oasis1qqv25adrld8jjquzxzg769689lgf9jxvwgjs8tha,,10088536651526034 (19.95%) + 3. oasis1qq2vzcvxn0js5unsch5me2xz4kr43vcasv0d5eq4,,10087294462687006 (19.95%) + 4. oasis1qz424yg28jqmgfq3xvly6ky64jqnmlylfc27d7cp,,10086687346789496 (19.95%) + +=== VALIDATORS NOT VOTED === + 1. oasis1qr37y56g92chzvsew54kj7gu47cxyly7jytt5rm0,,10086569233063782 (19.95%) + 2. oasis1qrwncs459lauc77zw23efdn9dmfcp23cxv095l5z,GateOmega,36880124779329 (0.07%) + 3. oasis1qq60zmsfca0gvmm3v8906pn5zqtt4ee2ssexramg,Validatrium,33702388192293 (0.07%) + 4. oasis1qzjm0zwfg4egs9kk4d9rkujudzk8pjp5rvxyr3ag,Munay Network,11688006553404 (0.02%) + 5. oasis1qpq97fm6lf87jzms9agd6z902nh7axtxvus6m352,LDV,10366034293998 (0.02%) + 6. oasis1qpz97gfrvj5xzx8jx7x9zweeq0rcf2q6jg4a09qz,Stardust Staking,10073645442224 (0.02%) + 7. oasis1qr2jxg57ch6p3787t2a8973v8zn8g82nxuex0773,Doorgod,9065607211215 (0.02%) + 8. oasis1qz9x0zpja6n25hc5242k2e60l6a7ke2zsq9cqrqz,SerGo,5038002123045 (0.01%) + 9. oasis1qqxxut9x74dutu587f9nj8787qz4dm0ueu05l88c,Princess Stake,2820051385569 (0.01%) + 10. oasis1qq45am6gzaur2rxhk26av9qf7ryhgca6ecg28clu,Jr,2015272611166 (0.00%) + 11. oasis1qzlzczsdme4scprjjh4h4vtljnmx3ag4vgpdnqln,Alexander (aka Bambarello) Validator,1591674847600 (0.00%) + 12. oasis1qrq7hgvv26003hy89klcmy3mnedrmyd7lvf0k6qn,Perfect Stake,1402251445282 (0.00%) + 13. oasis1qzwe6xywazp29tp20974wgxhdcpdf6yxfcn2jxvv,Simply Staking,1259545381854 (0.00%) + 14. oasis1qphcvmsh6mw98vtg0cg4dvdsen5tm0g3e58eqpnp,Appload,1107161223526 (0.00%) + 15. oasis1qpc66dgff4wrkj8kac4njrl2uvww3c9m5ycjwar2,,1007401444145 (0.00%) + 16. oasis1qpswaz4djukz0zanquyh2vswk59up22emysq5am9,StakeService,797017095508 (0.00%) + 17. oasis1qr4vsan850vmztuy9r2pex4fj4wxnmhvlgclg500,,297168911795 (0.00%) + 18. oasis1qrdrup88pr27pjaaqh2m34dl6hu2u0lh4cfk3lnh,,200192811785 (0.00%) + 19. oasis1qqgvqelw8kmcd8k4cqypcsyajkl3gq6ppc4t34n2,AnkaStake,200004372023 (0.00%) diff --git a/examples/network-set-rpc/00-list.in b/examples/network-set-rpc/00-list.in new file mode 100644 index 00000000..7a53c25a --- /dev/null +++ b/examples/network-set-rpc/00-list.in @@ -0,0 +1 @@ +oasis network list diff --git a/examples/network-set-rpc/00-list.out b/examples/network-set-rpc/00-list.out new file mode 100644 index 00000000..86bb935d --- /dev/null +++ b/examples/network-set-rpc/00-list.out @@ -0,0 +1,5 @@ +NAME CHAIN CONTEXT RPC +mainnet (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 grpc.oasis.dev:443 +mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock +testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet.grpc.oasis.dev:443 +testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet2.grpc.oasis.dev:443 diff --git a/examples/network-set-rpc/01-set-rpc.in b/examples/network-set-rpc/01-set-rpc.in new file mode 100644 index 00000000..7caed395 --- /dev/null +++ b/examples/network-set-rpc/01-set-rpc.in @@ -0,0 +1 @@ +oasis network set-rpc testnet_alt testnet3.grpc.oasis.dev:443 diff --git a/examples/network-set-rpc/01-set-rpc.out b/examples/network-set-rpc/01-set-rpc.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/network-set-rpc/02-list.in b/examples/network-set-rpc/02-list.in new file mode 100644 index 00000000..7a53c25a --- /dev/null +++ b/examples/network-set-rpc/02-list.in @@ -0,0 +1 @@ +oasis network list diff --git a/examples/network-set-rpc/02-list.out b/examples/network-set-rpc/02-list.out new file mode 100644 index 00000000..01d6065e --- /dev/null +++ b/examples/network-set-rpc/02-list.out @@ -0,0 +1,5 @@ +NAME CHAIN CONTEXT RPC +mainnet (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 grpc.oasis.dev:443 +mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock +testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet.grpc.oasis.dev:443 +testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet3.grpc.oasis.dev:443 diff --git a/examples/network-set-rpc/config/cli.toml b/examples/network-set-rpc/config/cli.toml new file mode 100644 index 00000000..e310c073 --- /dev/null +++ b/examples/network-set-rpc/config/cli.toml @@ -0,0 +1,134 @@ +[networks] +default = 'mainnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'emerald' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet_alt] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = 'Testnet alt' +rpc = 'testnet2.grpc.oasis.dev:443' + +[networks.testnet_alt.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet_alt.paratimes] +default = '' + +[networks.mainnet_local] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'unix:/serverdir_mainnet/internal.sock' + +[networks.mainnet_local.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes] +default = 'emerald' + +[networks.mainnet_local.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet_local.paratimes.cipher.denominations] +[networks.mainnet_local.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet_local.paratimes.emerald.denominations] +[networks.mainnet_local.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet_local.paratimes.sapphire.denominations] +[networks.mainnet_local.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[wallets] +default = '' diff --git a/examples/network-show/gas-costs.in b/examples/network-show/gas-costs.in new file mode 100644 index 00000000..f5b8d6bc --- /dev/null +++ b/examples/network-show/gas-costs.in @@ -0,0 +1 @@ +oasis network show gas-costs diff --git a/examples/network-show/gas-costs.out b/examples/network-show/gas-costs.out new file mode 100644 index 00000000..b5fd631d --- /dev/null +++ b/examples/network-show/gas-costs.out @@ -0,0 +1,8 @@ +Gas costs for network mainnet: + - add_escrow: 1000 + - allow: 1000 + - amend_commission_schedule: 1000 + - burn: 1000 + - reclaim_escrow: 1000 + - transfer: 1000 + - withdraw: 1000 diff --git a/examples/network-show/id-entity.in b/examples/network-show/id-entity.in new file mode 100644 index 00000000..6461d83f --- /dev/null +++ b/examples/network-show/id-entity.in @@ -0,0 +1 @@ +oasis network show xQN6ffLSdc51EfEQ2BzltK1iWYAw6Y1CkBAbFzlhhEQ= diff --git a/examples/network-show/id-entity.out b/examples/network-show/id-entity.out new file mode 100644 index 00000000..a98d567c --- /dev/null +++ b/examples/network-show/id-entity.out @@ -0,0 +1,7 @@ +{ + "v": 2, + "id": "xQN6ffLSdc51EfEQ2BzltK1iWYAw6Y1CkBAbFzlhhEQ=", + "nodes": [ + "Kb6opWKGbJHL0LK2Lto+m5ROIAXLhIr1lxQz0/kAOUM=" + ] +} diff --git a/examples/network-show/id-node.in.static b/examples/network-show/id-node.in.static new file mode 100644 index 00000000..2da886f9 --- /dev/null +++ b/examples/network-show/id-node.in.static @@ -0,0 +1 @@ +oasis network show Kb6opWKGbJHL0LK2Lto+m5ROIAXLhIr1lxQz0/kAOUM= diff --git a/examples/network-show/id-node.out.static b/examples/network-show/id-node.out.static new file mode 100644 index 00000000..c2366248 --- /dev/null +++ b/examples/network-show/id-node.out.static @@ -0,0 +1,27 @@ +{ + "v": 2, + "id": "Kb6opWKGbJHL0LK2Lto+m5ROIAXLhIr1lxQz0/kAOUM=", + "entity_id": "xQN6ffLSdc51EfEQ2BzltK1iWYAw6Y1CkBAbFzlhhEQ=", + "expiration": 23482, + "tls": { + "pub_key": "SslsTv8Cq/UvKHPk8w1S/Ag/wwsscqSa05bqDAVOR1I=", + "next_pub_key": "js0fhS02f+G3kW7uu+N47lzcfxjbBEPkPibTfeQrJTA=", + "addresses": null + }, + "p2p": { + "id": "e9fyvK+2FwU805dag81qOsrKHaO5b+nQnHyzEySi258=", + "addresses": null + }, + "consensus": { + "id": "3K2Vx3gTop+/GoM9Zh+ZSGPwVb2BRTFtcAo6xPo4pb4=", + "addresses": [ + "e9fyvK+2FwU805dag81qOsrKHaO5b+nQnHyzEySi258=@125.122.166.210:26656" + ] + }, + "vrf": { + "id": "3z85R+Rdud27NUTMFf4gO4NBQbMEnWqnhHhI6AtNx74=" + }, + "runtimes": null, + "roles": "validator", + "software_version": "22.2.7" +} diff --git a/examples/network-show/id-paratime.in.static b/examples/network-show/id-paratime.in.static new file mode 100644 index 00000000..dba19a9b --- /dev/null +++ b/examples/network-show/id-paratime.in.static @@ -0,0 +1 @@ +oasis network show 000000000000000000000000000000000000000000000000f80306c9858e7279 diff --git a/examples/network-show/id-paratime.out.static b/examples/network-show/id-paratime.out.static new file mode 100644 index 00000000..5d309d97 --- /dev/null +++ b/examples/network-show/id-paratime.out.static @@ -0,0 +1,82 @@ +{ + "v": 3, + "id": "000000000000000000000000000000000000000000000000f80306c9858e7279", + "entity_id": "TAv9qXjV4yBphnKLJcNkzois1TLoYUjaRPrMfY58Apo=", + "genesis": { + "state_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a", + "round": 0 + }, + "kind": 1, + "tee_hardware": 1, + "key_manager": "4000000000000000000000000000000000000000000000008c5ea5e49b4bc9ac", + "executor": { + "group_size": 5, + "group_backup_size": 7, + "allowed_stragglers": 1, + "round_timeout": 2, + "max_messages": 256, + "min_live_rounds_percent": 90, + "min_live_rounds_eval": 20, + "max_liveness_fails": 4 + }, + "txn_scheduler": { + "batch_flush_timeout": 1000000000, + "max_batch_size": 1000, + "max_batch_size_bytes": 1048576, + "propose_batch_timeout": 2 + }, + "storage": { + "checkpoint_interval": 100000, + "checkpoint_num_kept": 2, + "checkpoint_chunk_size": 8388608 + }, + "admission_policy": { + "any_node": {} + }, + "constraints": { + "executor": { + "backup-worker": { + "validator_set": {}, + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 7 + } + }, + "worker": { + "validator_set": {}, + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 7 + } + } + } + }, + "staking": { + "thresholds": { + "node-compute": "5000000000000000" + }, + "min_in_message_fee": "0" + }, + "governance_model": "entity", + "deployments": [ + { + "version": { + "minor": 4 + }, + "valid_from": 20944, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVgg3mqV02+CDfyth1fNyaR8jo3rVp024JOBkBGnjtLPypM=" + }, + { + "version": { + "minor": 5, + "patch": 2 + }, + "valid_from": 23476, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVggMBEUvUKRVLByqR+3a/KVNkkMjorOJLTw2Znb36baBQY=" + } + ] +} diff --git a/examples/network-show/native-token.in.static b/examples/network-show/native-token.in.static new file mode 100644 index 00000000..54256d72 --- /dev/null +++ b/examples/network-show/native-token.in.static @@ -0,0 +1 @@ +oasis network show native-token diff --git a/examples/network-show/native-token.out.static b/examples/network-show/native-token.out.static new file mode 100644 index 00000000..fe65b9f9 --- /dev/null +++ b/examples/network-show/native-token.out.static @@ -0,0 +1,16 @@ +Network: mainnet +Token's ticker symbol: ROSE +Token's base-10 exponent: 9 +Total supply: 10000000000.0 ROSE +Common pool: 853509298.875305407 ROSE +Last block fees: 0.0 ROSE +Governance deposits: 0.0 ROSE +Debonding interval: 336 epoch(s) + +=== STAKING THRESHOLDS === + entity: 100.0 ROSE + node-validator: 100.0 ROSE + node-compute: 100.0 ROSE + node-keymanager: 100.0 ROSE + runtime-compute: 50000.0 ROSE + runtime-keymanager: 50000.0 ROSE diff --git a/examples/network/00-list.in b/examples/network/00-list.in new file mode 100644 index 00000000..7a53c25a --- /dev/null +++ b/examples/network/00-list.in @@ -0,0 +1 @@ +oasis network list diff --git a/examples/network/00-list.out b/examples/network/00-list.out new file mode 100644 index 00000000..86bb935d --- /dev/null +++ b/examples/network/00-list.out @@ -0,0 +1,5 @@ +NAME CHAIN CONTEXT RPC +mainnet (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 grpc.oasis.dev:443 +mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock +testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet.grpc.oasis.dev:443 +testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet2.grpc.oasis.dev:443 diff --git a/examples/network/01-remove.in b/examples/network/01-remove.in new file mode 100644 index 00000000..79ae4d84 --- /dev/null +++ b/examples/network/01-remove.in @@ -0,0 +1 @@ +oasis network remove testnet_alt diff --git a/examples/network/01-remove.out b/examples/network/01-remove.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/network/02-list.in b/examples/network/02-list.in new file mode 100644 index 00000000..7a53c25a --- /dev/null +++ b/examples/network/02-list.in @@ -0,0 +1 @@ +oasis network list diff --git a/examples/network/02-list.out b/examples/network/02-list.out new file mode 100644 index 00000000..7a9ddb01 --- /dev/null +++ b/examples/network/02-list.out @@ -0,0 +1,4 @@ +NAME CHAIN CONTEXT RPC +mainnet (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 grpc.oasis.dev:443 +mainnet_local b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock +testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet.grpc.oasis.dev:443 diff --git a/examples/network/03-set-default.in b/examples/network/03-set-default.in new file mode 100644 index 00000000..6e08ec4c --- /dev/null +++ b/examples/network/03-set-default.in @@ -0,0 +1 @@ +oasis network set-default mainnet_local diff --git a/examples/network/03-set-default.out b/examples/network/03-set-default.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/network/04-list.in b/examples/network/04-list.in new file mode 100644 index 00000000..7a53c25a --- /dev/null +++ b/examples/network/04-list.in @@ -0,0 +1 @@ +oasis network list diff --git a/examples/network/04-list.out b/examples/network/04-list.out new file mode 100644 index 00000000..9cbd502d --- /dev/null +++ b/examples/network/04-list.out @@ -0,0 +1,4 @@ +NAME CHAIN CONTEXT RPC +mainnet b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 grpc.oasis.dev:443 +mainnet_local (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock +testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet.grpc.oasis.dev:443 diff --git a/examples/network/add-tcpip.in.static b/examples/network/add-tcpip.in.static new file mode 100644 index 00000000..00851796 --- /dev/null +++ b/examples/network/add-tcpip.in.static @@ -0,0 +1 @@ +oasis network add testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a testnet2.grpc.oasis.dev:443 diff --git a/examples/network/add-tcpip.out.static b/examples/network/add-tcpip.out.static new file mode 100644 index 00000000..112fcd4c --- /dev/null +++ b/examples/network/add-tcpip.out.static @@ -0,0 +1,3 @@ +? Description: Testnet alternative +? Denomination symbol: TEST +? Denomination decimal places: (9) diff --git a/examples/network/add-unix.in.static b/examples/network/add-unix.in.static new file mode 100644 index 00000000..0e8d8af4 --- /dev/null +++ b/examples/network/add-unix.in.static @@ -0,0 +1 @@ +oasis network add testnet_local 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a unix:/serverdir_testnet/internal.sock diff --git a/examples/network/add-unix.out.static b/examples/network/add-unix.out.static new file mode 100644 index 00000000..30d808bd --- /dev/null +++ b/examples/network/add-unix.out.static @@ -0,0 +1,3 @@ +? Description: Testnet network, local node +? Denomination symbol: TEST +? Denomination decimal places: (9) diff --git a/examples/network/config/cli.toml b/examples/network/config/cli.toml new file mode 100644 index 00000000..e310c073 --- /dev/null +++ b/examples/network/config/cli.toml @@ -0,0 +1,134 @@ +[networks] +default = 'mainnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'emerald' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet_alt] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = 'Testnet alt' +rpc = 'testnet2.grpc.oasis.dev:443' + +[networks.testnet_alt.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet_alt.paratimes] +default = '' + +[networks.mainnet_local] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'unix:/serverdir_mainnet/internal.sock' + +[networks.mainnet_local.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes] +default = 'emerald' + +[networks.mainnet_local.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet_local.paratimes.cipher.denominations] +[networks.mainnet_local.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet_local.paratimes.emerald.denominations] +[networks.mainnet_local.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet_local.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet_local.paratimes.sapphire.denominations] +[networks.mainnet_local.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[wallets] +default = '' diff --git a/examples/network/status.in.static b/examples/network/status.in.static new file mode 100644 index 00000000..0f79195c --- /dev/null +++ b/examples/network/status.in.static @@ -0,0 +1 @@ +oasis network status diff --git a/examples/network/status.out.static b/examples/network/status.out.static new file mode 100644 index 00000000..b59ea432 --- /dev/null +++ b/examples/network/status.out.static @@ -0,0 +1,602 @@ +{ + "software_version": "22.2.8", + "identity": { + "node": "KzHeO03gpY/73myCANcPNnNPyH7OZIHpK6BQtk9WTj0=", + "p2p": "0j16hb76BSBV7lQwgjPpxWX0RTCaMIDf4uTwEVnO8Ac=", + "consensus": "ioX5hA28VJJgyFPHU16E7SML6pV9aX6km+ll23//Opk=", + "tls": [ + "efMGmFw5YvJ4Ln2Ja559gs/uLQ1A86P/A/aKLGkOF+I=", + "mm724Lx2RydBJtsfxydqPTfXjqcJYnQS4JhOT8zlFHo=" + ] + }, + "consensus": { + "status": "ready", + "version": { + "major": 6 + }, + "backend": "tendermint", + "mode": "full", + "features": 3, + "node_peers": [ + "bc655c4da35ba3b8a189abb4fa831e631f21a447@131.153.242.59:40410", + "097b640924c0a8e8080e21cd537df2b01415c202@95.217.85.213:36656", + "aa883b624f5e2bccbc14597f018654ee7482ab3f@131.153.200.7:26656", + "d4018c17cfacedb7e52df646594437a66753482b@65.108.6.54:30656", + "b7b1d46b26fae3bb37c8ae6c23086c9873b6a535@40.76.70.110:55070", + "f018d5d96c280ca888e4fd49df4494e68e80a2d9@65.108.215.176:26656", + "902e60d6d4ceee9691ef90df41843931c07a165e@84.234.96.78:26656", + "f9ae69d1bf77532cfe982a7bcd5cdacdefddb85f@65.109.27.142:26656", + "ab61c9197d6687c8b1a41fe1afcfe642e36ece82@168.62.244.111:56268", + "7539e4105002269bf176d78f97305e66a4f96d98@104.43.20.77:33032", + "676d5f8ae9c14a27a6de7cd6157f8e0523edec66@65.21.124.228:34052", + "73bc4e45d7d4bfc466e6f9a54d11d2d5d0ecd643@20.231.80.199:45828", + "3681297ed4504e9028c0f2b6fa4384de29b3d93b@131.153.158.101:43024", + "17c49d285903fc54390e37120feb3524db424c97@178.170.46.120:59898", + "6b767e05affde66a7d5c079b153cf59231d0e5af@95.217.118.121:36656", + "c504f34667643f7b2d5247d90c4564d1bf98a70b@213.239.215.145:40844", + "6303b863cbdd8ac06f2126e0cdf6f9c0efbcbded@80.64.208.170:26656", + "60e14c30fd2d48527e0ecaaccd55b334be988db5@65.108.204.252:52528", + "726a6823bd231dae0dbdab6f443d0b0c01c3439f@65.108.201.32:37890", + "4b3feafda8634130a1ad28da832746326fc71151@135.181.116.9:26656", + "d0025b64c336ece450d70a7beda190baae0f1a2b@66.85.144.106:26656", + "1076ecf9b338072fbbd017060d2ab3a1f4ecae90@95.216.247.36:43518", + "5a424d5e4130e18c3f8e5dbb60e5d31dec75006f@20.245.174.253:55300", + "dc1b0f926fc0e9ff660d12e90fa5d39f09d6f940@34.135.162.244:60846", + "661f73c5b760d25254156d341172f1d2a815c91c@23.109.30.84:63652", + "716c6f9047c2d4ec689e146044ad14757d399de7@95.217.77.154:50052", + "9f464b3d1f7d8ac14245f0d27b609f823554d0c9@185.132.133.99:46657", + "845e501768ce86822e75c1b2af72b0dce2db32f8@34.86.197.181:26656", + "8775adc61538840d465f20e37d36422d0a1ca31e@135.181.211.184:46184", + "dbbc6938b97f4ab168de1855c2ca49480a156752@148.251.246.233:47368", + "b9a3ef0d8eddc23829da35d12c0b20de57924d9a@66.85.140.10:49030", + "df5073625c1fdaef1e42d985baa922347b417e7c@65.108.127.220:35148", + "7bcb02a07d161b5b576bd7b9963f39e3dbe1bfe8@142.132.203.173:60750", + "4cf89deb5c40e4196e309b5cabbf4654700533aa@93.157.248.142:43824", + "a499f9bd11b54f82a2c778e1c091402dce17b2cb@65.109.52.165:47168", + "881c493ca3b1cf2a97df5392b2f297f7f1c9b599@91.90.179.51:45566", + "19a982acb7d9d761e600b86a57141b1851586901@135.181.1.160:36656", + "4490b4c1f5f3ee4c1ace07e663ff1cb6b63af535@194.195.212.183:47366", + "71504a0a83c25b48691ab708f45079248bab0c31@135.181.179.38:36656", + "404372701d0be0f79033ab52d50b8706d6d7fdef@85.15.140.73:38508", + "0cd411b2652030caec59f0d0753d430b7c765f0e@213.21.202.23:52146", + "ba4ae8667a9b41168481ceefc1d3340426ebcb4e@66.85.157.22:60568", + "83302fdfe703928e9ea250214fb1552f292b64c9@138.201.250.242:50512", + "b2f26729d87471814624f096b1fb7f3312e4e13a@65.108.159.229:26656", + "772d93cfb3c617b132b1accd9351d410b308dff6@20.188.123.73:47366", + "9182dd1d4f25fbdc0b560fa1bd3a833679df1673@144.137.17.159:36850", + "2ee22ae65efbdef3708782d5cb970fbf1f419196@66.85.147.254:52906", + "57b6225269abc5d0e6d5f49139b721b73d2d3d1d@178.63.93.41:37448", + "721d8282b15a59abee88662d40dd941106f45f68@35.193.14.105:40742", + "29d3fee2455c964d2b407918016ef21c4c2b1336@35.235.101.24:1285", + "8787650b568d2c3f58a672f54ad6277b1cd2255a@194.33.45.161:35838", + "8de09c821c83cc6dfe1c90727f8c8a2f425ea3f8@92.255.207.113:42180", + "509d0687f51759c3043bc2cdcd776234ab56c9ac@95.216.72.47:31656", + "6c89a15304567f97b5c415209f342b84bb6f1ea3@95.216.37.80:42678", + "f1bfe70d4a23b2b743ee9b5b5d805bde71eca673@52.178.10.10:56588", + "03ec0534396270bd6382bd94a60976770c066fdd@20.225.137.194:44372", + "b5e54f50e208d86fb33b481d950bc97b923bd55d@34.135.151.3:38740", + "ad5ba473f67735b29546415258a980d3f5d75caf@131.153.165.57:42464", + "8e3ebe98e3bc759b8fafa231a3d10e71744f4f75@193.201.82.230:37282", + "66fbd9c9a5f5cb8214b1d1e92b061ed2252b9bed@23.88.91.115:56724", + "2ea665e41bc3533738856d5b8cf100dd88f30335@65.108.248.54:26656", + "10f41e143df165752beb40ca3a7e4ad6be854c82@34.241.24.207:33086", + "ec05ab6d196eca890d4842a768698ea4dd891ac7@34.220.204.235:5402", + "230ff96d5466a59522cfedacafffb740a2d0d51e@20.232.215.170:45834", + "0b549cde019d483a354c794f86e4bf98610cf2c0@13.209.252.30:15445", + "d6f1a1b7fb6efe3be3bf954907ba41ee74449038@3.10.117.28:45042", + "461d702c386f857d6f40fd884f1ef9b81716a04d@66.85.156.102:41492", + "114aeb19a08cbec00d4673f8567e5d6e7647ca8c@80.64.208.20:26656", + "721536cee14d65b591f45cd05bedf3917d8170d3@142.132.204.126:57494", + "641517419eac9bc43124ab165dfcdd82d635d6a6@20.253.182.162:49680", + "d47dfcb8cdaf50d8332c84e44c09974deb7d51cb@20.225.233.113:45454", + "53572f689e5bacdd3c6527e6594ec49c8f3093f6@34.86.165.6:40050", + "5fd8d9e2e031c4f342ba7faccc5a009c37cc42e3@46.166.138.194:1571", + "7187d60bb22c553646d44319b697be2c5c69eaf4@131.153.47.62:37200", + "8d3f8e6984dba66e9445c75d99a96000d55e4e40@20.168.196.165:52492", + "3a17fbb5cf5dbc1e39406182baebdf71e7bd7063@135.181.112.38:26657", + "da4e9879404f6175096bf7debc4c9fd5618330e3@172.104.56.217:37908", + "49f568338f9137c734e5aa6c857e4ea79db6d663@65.52.244.40:26656", + "3fef173fe6042e72397f488769970513b4174656@44.240.166.110:30990", + "ab6047fff198a5c7974c70ba5b9afa6e336e4ec5@20.127.79.126:34286" + ], + "latest_height": 15772992, + "latest_hash": "e5718445525ecdb149685ff6b334e32197b53c11291ad82c6b4c666b9e8b436d", + "latest_time": "2023-06-07T13:36:34+02:00", + "latest_epoch": 26272, + "latest_state_root": { + "ns": "0000000000000000000000000000000000000000000000000000000000000000", + "version": 15772991, + "root_type": 1, + "hash": "ae6e36ae1d414e554952c3a951acf3acefe538b7151fe1f0ff91a7377d1f0072" + }, + "genesis_height": 8535081, + "genesis_hash": "5864fda0248a1fa53e65d36d9288ee89578003f8980d1900f76638737b43d0ee", + "last_retained_height": 8535081, + "last_retained_hash": "5864fda0248a1fa53e65d36d9288ee89578003f8980d1900f76638737b43d0ee", + "chain_context": "50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a", + "is_validator": false + }, + "runtimes": { + "0000000000000000000000000000000000000000000000000000000000000000": { + "descriptor": { + "v": 3, + "id": "0000000000000000000000000000000000000000000000000000000000000000", + "entity_id": "4eM2SdjntkGGH0DqhloG8HJsPNSoEeYHFACuOV+9qbc=", + "genesis": { + "state_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a", + "round": 0 + }, + "kind": 1, + "tee_hardware": 1, + "key_manager": "4000000000000000000000000000000000000000000000004a1a53dff2ae482d", + "executor": { + "group_size": 3, + "group_backup_size": 5, + "allowed_stragglers": 1, + "round_timeout": 2, + "max_messages": 256 + }, + "txn_scheduler": { + "batch_flush_timeout": 1000000000, + "max_batch_size": 1000, + "max_batch_size_bytes": 10485760, + "propose_batch_timeout": 2 + }, + "storage": { + "checkpoint_interval": 10000, + "checkpoint_num_kept": 2, + "checkpoint_chunk_size": 8388608 + }, + "admission_policy": { + "any_node": {} + }, + "constraints": { + "executor": { + "backup-worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 5 + } + }, + "worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 5 + } + } + } + }, + "staking": { + "min_in_message_fee": "0" + }, + "governance_model": "entity", + "deployments": [ + { + "version": { + "major": 2, + "minor": 6, + "patch": 1 + }, + "valid_from": 21574, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVgg+rF441O1/TtufRl4gK9f3R6mMQfF3MWJDgOTx3kGF6E=" + }, + { + "version": { + "major": 2, + "minor": 6, + "patch": 2 + }, + "valid_from": 22845, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVggm8bEEbu18UnK96qtYtt9XqHNOSeRrmCG4IYvBVAlia8=" + } + ] + }, + "latest_round": 1722387, + "latest_hash": "1c53179b80ac5ae004e0864291ee993d10a3b170ac9c401bdd8145b13c57738d", + "latest_time": "2023-06-07T13:26:23+02:00", + "latest_state_root": { + "ns": "0000000000000000000000000000000000000000000000000000000000000000", + "version": 1722387, + "root_type": 1, + "hash": "883af2896dfc0761e7bc22fc8966f8240aaa11e6c8dfabc53258f77a54851ede" + }, + "genesis_round": 1675996, + "genesis_hash": "2286ec2a7d41e031af618e64bbfc5e531be4ed05d3bf73179ed9b51c9ae50bc8", + "last_retained_round": 1675996, + "last_retained_hash": "2286ec2a7d41e031af618e64bbfc5e531be4ed05d3bf73179ed9b51c9ae50bc8", + "committee": { + "status": "ready", + "active_version": { + "major": 2, + "minor": 6, + "patch": 2 + }, + "latest_round": 1722387, + "latest_height": 15772882, + "executor_roles": null, + "is_txn_scheduler": false, + "peers": [ + "/ip4/66.85.140.10/tcp/30002/p2p/12D3KooWN93Yo85zQ5NgKcBSWTNkGX1SgVNoNCyExpPdj8Av6qW2", + "/ip4/131.153.242.59/tcp/30004/p2p/12D3KooWDBtUt3Yknwn7UEdK4iyuvJREVs2PJrwfjGAfrjyCEXAs", + "/ip4/66.85.156.101/tcp/31002/p2p/12D3KooWLpJ4ssESgun9yc1MmXUyF7EDYuZWfXpMq9s7BPFrZxaC", + "/ip4/131.153.165.57/tcp/56657/p2p/12D3KooWShtALnfo2R8hAYNk2ufLvif7J3iSSZY348hfTXXJbxPE", + "/ip4/66.85.157.22/tcp/50002/p2p/12D3KooWDeiujxENvSs9eQ8s3BrZdBDoFhppU3DJzC3adwaVWL2g", + "/ip4/65.52.244.40/tcp/30002/p2p/12D3KooWDoGEevYNQXyaLt2JcRYcp6Sns3iCcoHbBSrteSCy9QwT", + "/ip4/194.33.45.161/tcp/40004/p2p/12D3KooWMBv6UqfRwpPJqxgrwNSqnZhHh2BMX51QmXFFqUWXT6fe", + "/ip4/66.85.147.254/tcp/30003/p2p/12D3KooWPGE1dGobdJRGZcBbrSgFnj4DJZZdJsnzEMtEfN2EbaC3", + "/ip4/84.234.96.78/tcp/40002/p2p/12D3KooWRnWM8UBDsLUe56a3mLfNKR2VYSxzx8qmvWx7pTLsvVwr", + "/ip4/131.153.200.7/tcp/30002/p2p/12D3KooWQQTToZP6TL8MbEyFJMQ3H8y7YguJyGE97L4o74AqkUCj", + "/ip4/91.235.116.246/tcp/40002/p2p/12D3KooWGfFTqAMc2EvLGoFSMcMo4egSf8bBJSNt46ww2YtTjYAv", + "/ip4/93.157.248.142/tcp/3020/p2p/12D3KooWCSuscbixtspKpa9gw5wasEcwRBxbL3vfV4uvR69qZqsD", + "/ip4/213.21.202.23/tcp/30002/p2p/12D3KooWLL8KegpRcDxZznUCD9PsMwuDVWsdCWTgeLT1m8ub4sTF", + "/ip4/66.85.144.106/tcp/30002/p2p/12D3KooWFNb7BR734YfMyQZVexcg3Ai1Y8uWyxSqENnckMcpkhrT", + "/ip4/131.153.158.101/tcp/50002/p2p/12D3KooWBvcMkcyqskohCcUr8ZgieUoprYUrU2EZLNQ2mH4j4sm9", + "/ip4/131.153.47.62/tcp/30002/p2p/12D3KooWKc95HoDZtuYnqx5dttkyCK9BGeYx8DBE6o1k8nrjmrMW", + "/ip4/89.212.17.232/tcp/30002/p2p/12D3KooWEYtZz1pzwvFFUjMRKBckJ7qt6X63PjJVWFrFtezRqC4H", + "/ip4/35.193.14.105/tcp/9002/p2p/12D3KooWPJYHjNP5sHPuFQQ83Fa7pAz93oA6oqSWQ5dpbE8MuUQ5", + "/ip4/84.255.245.194/tcp/9200/p2p/12D3KooW9tZDg59zv5JA2yi7guggePUpR4mJnriELLKi3RqvC5Y6", + "/ip4/34.135.151.3/tcp/9002/p2p/12D3KooWEkXQtJ4oxKnWWFucvAp7oBedgCcPhFRwZsy6b1WaJUCU", + "/ip4/95.216.224.58/tcp/34648/p2p/12D3KooWGiJwU9ajppAA8R1tFsAezXatNC1fd18VxufnRG7veves", + "/ip4/34.94.197.191/tcp/3022/p2p/12D3KooWQ1pjpnq5yAkG3nyawShPwt9WvLjZ6xRxZr86zntztfwK" + ], + "host": { + "versions": [ + { + "major": 2, + "minor": 6, + "patch": 2 + }, + { + "major": 2, + "minor": 6, + "patch": 1 + } + ] + } + }, + "storage": { + "last_finalized_round": 1722387 + } + }, + "00000000000000000000000000000000000000000000000072c8215e60d5bca7": { + "descriptor": { + "v": 3, + "id": "00000000000000000000000000000000000000000000000072c8215e60d5bca7", + "entity_id": "4eM2SdjntkGGH0DqhloG8HJsPNSoEeYHFACuOV+9qbc=", + "genesis": { + "state_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a", + "round": 0 + }, + "kind": 1, + "tee_hardware": 0, + "executor": { + "group_size": 5, + "group_backup_size": 9, + "allowed_stragglers": 1, + "round_timeout": 2, + "max_messages": 256, + "min_live_rounds_percent": 90, + "min_live_rounds_eval": 5, + "max_liveness_fails": 4 + }, + "txn_scheduler": { + "batch_flush_timeout": 1000000000, + "max_batch_size": 1000, + "max_batch_size_bytes": 10485760, + "propose_batch_timeout": 2 + }, + "storage": { + "checkpoint_interval": 1000, + "checkpoint_num_kept": 2, + "checkpoint_chunk_size": 8388608 + }, + "admission_policy": { + "any_node": {} + }, + "constraints": { + "executor": { + "backup-worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 10 + } + }, + "worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 10 + } + } + } + }, + "staking": { + "min_in_message_fee": "0" + }, + "governance_model": "entity", + "deployments": [ + { + "version": { + "major": 9, + "patch": 1 + }, + "valid_from": 17225 + }, + { + "version": { + "major": 10 + }, + "valid_from": 22509 + } + ] + }, + "latest_round": 2209868, + "latest_hash": "ce6edf3ae764f247a263754cf6389518ffbbffa80250ed702219308a77cc3180", + "latest_time": "2023-06-07T13:35:39+02:00", + "latest_state_root": { + "ns": "00000000000000000000000000000000000000000000000072c8215e60d5bca7", + "version": 2209868, + "root_type": 1, + "hash": "e2c70cab88b7f46111bedc1f1506797b2f5c0fb8a80224adaa18b5c72a222c0d" + }, + "genesis_round": 398623, + "genesis_hash": "c1b7a1fd55710e5c79424677af298c4ef2139b1230649bda4e6cf6e04df75bd5", + "last_retained_round": 398623, + "last_retained_hash": "c1b7a1fd55710e5c79424677af298c4ef2139b1230649bda4e6cf6e04df75bd5", + "committee": { + "status": "ready", + "active_version": { + "major": 10 + }, + "latest_round": 2209868, + "latest_height": 15772982, + "executor_roles": null, + "is_txn_scheduler": false, + "peers": [ + "/ip4/66.85.140.10/tcp/30002/p2p/12D3KooWN93Yo85zQ5NgKcBSWTNkGX1SgVNoNCyExpPdj8Av6qW2", + "/ip4/23.88.91.115/tcp/50003/p2p/12D3KooWGsbKuGo9gLLLssLDngk8NJofDQxi8uPVqRwFtfAWUHKR", + "/ip4/65.108.201.32/tcp/29002/p2p/12D3KooWAJLCfsfREXULRABPNaaMEU2XtuhqnYJvJSEnH7JJdBha", + "/ip4/142.132.204.126/tcp/50002/p2p/12D3KooWCNXz8AU4D4aiirHp2qKJhuK5QL8DFimhxu9tYsWwvnFt", + "/ip4/185.132.133.99/tcp/30002/p2p/12D3KooWEN4UXFzoxCUvtP83hGefJDVvuEt4e3Eqhy1hy38rzgQW", + "/ip4/95.216.247.36/tcp/30002/p2p/12D3KooWKhGMFwNrT5mA4sMoAKMUX2YswwzJMTtrcKg917yyc1qa", + "/ip4/131.153.200.7/tcp/30002/p2p/12D3KooWQQTToZP6TL8MbEyFJMQ3H8y7YguJyGE97L4o74AqkUCj", + "/ip4/178.170.46.120/tcp/30002/p2p/12D3KooWFVBp2fnoDEA45C3pdkAwk3kFNDFKbhQCBLkv1ePwBPAL", + "/ip4/95.217.85.213/tcp/30002/p2p/12D3KooWQ1YBqaQnL2JumfxTsFp5TYEDDRgzy8j5mUAvUY1EUaex", + "/ip4/135.181.155.98/tcp/30002/p2p/12D3KooWRTp64wFccJy1S2dv9D61ruB6hGfb6w6y5L3kGawnxfh7", + "/ip4/65.108.204.252/tcp/40003/p2p/12D3KooW9tbj2yAo7A7UnKKZwqWiREVTbnJJjKYBhLJVLR7qQfor", + "/ip4/10.64.31.167/tcp/9200/p2p/12D3KooWDzDwvUPuN1vVWbYUaAJnJuh9Qfm1eZCaxsXRaxhvnnEe", + "/ip4/135.181.1.160/tcp/30002/p2p/12D3KooWFdKYxjzFKZmZG69LPvisfyjQiiyRv1N1MHPrf5jufFKR", + "/ip4/194.195.212.183/tcp/30002/p2p/12D3KooWD9vHKr1vCMf2RV558SbyaQehKtAsU74WSGfkmQWkGFxo", + "/ip4/95.217.118.121/tcp/30002/p2p/12D3KooWGuX2sHNUSvJ63dqrUTLXwkRwBU9gNFiMHhA3vkxFihj5", + "/ip4/95.217.77.154/tcp/30002/p2p/12D3KooWC9MRbrgJFFZGHy4JD8sN9dc7BEb4dLewKsEyE1SZrH8t", + "/ip4/178.63.93.41/tcp/23002/p2p/12D3KooWLXKzvKnushSWERyJzSgTghw7Yq9ETUFdzhsc8zSWykrU", + "/ip4/65.21.124.228/tcp/30002/p2p/12D3KooWSHZrQVJFkT9HhkZS5Rjz7GNR71gVdgaCihyRxt6c3tpi", + "/ip4/135.181.179.38/tcp/30002/p2p/12D3KooW9xxbWPzU71Wd8W96juBAW2q6XAwj1HEidKwCL5p6aQqe", + "/ip4/95.216.37.80/tcp/30002/p2p/12D3KooWRNWmsA3JXpG8TqNbvE9SqGCZTejtCZJVnn73KoC7tYhv", + "/ip4/10.64.180.120/tcp/9200/p2p/12D3KooWAq3pGLymxzGQjL1SEwgFsD8TTvPBfxnSUdu148c4hNGJ", + "/ip4/91.90.179.51/tcp/30002/p2p/12D3KooWFQdPUA6ojmH1JEGLq14oDzK1JjDSCkpxCKBvYnHdKc4A", + "/ip4/213.239.215.145/tcp/50003/p2p/12D3KooWRQvW91WN8hofPtkFfkg21PjhQJjnbMeYnvBWzifPt87b", + "/ip4/65.108.127.220/tcp/33002/p2p/12D3KooWHRgEYMcazqALiWjm5eAxGUeq5qsD2pgqvuqDi78TM7nn", + "/ip4/66.85.144.106/tcp/30002/p2p/12D3KooWFNb7BR734YfMyQZVexcg3Ai1Y8uWyxSqENnckMcpkhrT", + "/ip4/138.201.250.242/tcp/31002/p2p/12D3KooWHL7ijr2Moo1HMvvundEdbVeMhEpyPfgrKdUPeAVreoSX", + "/ip4/142.132.203.173/tcp/34002/p2p/12D3KooWNSQJJDYMnujYzJU8v2dtqNTbWprhcb8E4JPpRULc4saw", + "/ip4/65.109.52.165/tcp/33002/p2p/12D3KooWMpnvR6QVK81drJR9KQwqKTRvyanPWrpubMV25sqXDuL6", + "/ip4/84.234.96.78/tcp/40003/p2p/12D3KooWJA4TP3zPuJqFyzHWxBqF6rTSiekM5z2smgxGrXrmRY6M", + "/ip4/131.153.47.62/tcp/30002/p2p/12D3KooWKc95HoDZtuYnqx5dttkyCK9BGeYx8DBE6o1k8nrjmrMW", + "/ip4/85.15.140.73/tcp/40002/p2p/12D3KooWHPcQbvEb9jYuzGj3x92rjkD6nRWUJbPs6apWYCEKBs8w", + "/ip4/34.135.162.244/tcp/9002/p2p/12D3KooWDWjwVjZYitMpn8mpmvdFbpt9x9gQx9QBnv4s6rPAydVR", + "/ip4/35.193.14.105/tcp/9002/p2p/12D3KooWPJYHjNP5sHPuFQQ83Fa7pAz93oA6oqSWQ5dpbE8MuUQ5", + "/ip4/84.255.245.194/tcp/9200/p2p/12D3KooW9tZDg59zv5JA2yi7guggePUpR4mJnriELLKi3RqvC5Y6", + "/ip4/34.135.151.3/tcp/9002/p2p/12D3KooWEkXQtJ4oxKnWWFucvAp7oBedgCcPhFRwZsy6b1WaJUCU", + "/ip4/95.216.224.58/tcp/34648/p2p/12D3KooWGiJwU9ajppAA8R1tFsAezXatNC1fd18VxufnRG7veves", + "/ip4/34.94.197.191/tcp/3022/p2p/12D3KooWQ1pjpnq5yAkG3nyawShPwt9WvLjZ6xRxZr86zntztfwK", + "/ip4/89.212.17.232/tcp/30002/p2p/12D3KooWEYtZz1pzwvFFUjMRKBckJ7qt6X63PjJVWFrFtezRqC4H" + ], + "host": { + "versions": [ + { + "major": 10 + }, + { + "major": 9, + "patch": 1 + } + ] + } + }, + "storage": { + "last_finalized_round": 2209868 + } + }, + "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c": { + "descriptor": { + "v": 3, + "id": "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c", + "entity_id": "4eM2SdjntkGGH0DqhloG8HJsPNSoEeYHFACuOV+9qbc=", + "genesis": { + "state_root": "c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a", + "round": 0 + }, + "kind": 1, + "tee_hardware": 1, + "key_manager": "4000000000000000000000000000000000000000000000004a1a53dff2ae482d", + "executor": { + "group_size": 5, + "group_backup_size": 5, + "allowed_stragglers": 1, + "round_timeout": 2, + "max_messages": 256, + "min_live_rounds_percent": 90, + "min_live_rounds_eval": 5, + "max_liveness_fails": 4 + }, + "txn_scheduler": { + "batch_flush_timeout": 1000000000, + "max_batch_size": 1000, + "max_batch_size_bytes": 10485760, + "propose_batch_timeout": 2 + }, + "storage": { + "checkpoint_interval": 10000, + "checkpoint_num_kept": 2, + "checkpoint_chunk_size": 8388608 + }, + "admission_policy": { + "entity_whitelist": { + "entities": { + "+fzk/Pi4DBmPhCzs8Gsw+jrbv9Z6HMfIdohb/hqWe7g=": {}, + "/RupFkoz/Hep2Xm1eqtzwuLw+hS2AQNiKVgqQwnMalE=": {}, + "4eM2SdjntkGGH0DqhloG8HJsPNSoEeYHFACuOV+9qbc=": {}, + "EHvOdqDElP5ozbICSKy3UOXQlcsvqZr+9rQvAJHcf9k=": {}, + "Efqu3z0lip+aDXkJUZqL9KfqpUIrgvISgGOdE/3OITw=": {}, + "IDrC50ExgNOjHYJjzHYMttOR7X94rSa33yoYXCCkTtU=": {}, + "IRvPVE480/nTZf6WqEaxVhkPxstagLuG8WVO8O8izBg=": {}, + "Jq1iRZxhzEPXOtCtZiA/SktLGyyfN4oX4tJWVspEb7U=": {}, + "L/xlgKf4Tx1XZogRBnuBmFS52NFoccW6QjMA8VS7g1g=": {}, + "OJcLY+0jDg0fhmMy7HuPE8N92SXIaocO7xduo7khnlc=": {}, + "RKCvE04I/BWb7VC6tzAetR3cLSlmPOrshElcoFLCjnk=": {}, + "W/Fj1JlO2hAgVSohQZZ3OQDb39Yf9O/jXxcOeW5E6AQ=": {}, + "W4mvWjUL27JnIbC3iQOlrKdpsIVFoQ8RDpt6wv1mocw=": {}, + "WfLM2tJM1E586dI7myztwIEUQ2mFBoQa4lIbMNfDo+A=": {}, + "Y1FLFDa4o7JbRnjHc53AwvHzUEEShwEicxREwaKkPks=": {}, + "ZxJyyH+JPdGNfjy+ZPq+GpFY0fAJKm9VFXZIPwMcKm4=": {}, + "dXBtIJ1+LMkIaydaSUS3quh4bHFgjf8kSJd6n666lk8=": {}, + "efBR83hww44OezMuvJ0T9Ewu4uPSQkOlO7EQq79KSis=": {}, + "fPCd+Ht/hfOfuvbtAE6+jwXpiETXRfqwEkw1TaUbk3M=": {}, + "h+8UuA74MU55qKDosnQ+mcPkMEbAFfqXnpGBjZQur0Q=": {}, + "np5ghSwh8QmA2CwtvgtbQ2p+BDspieZ5u9gu6pczHuo=": {}, + "nt9VYeY++mGIwmjM9wYfnF7lqTqoxNof8MsIkECtLpE=": {}, + "oLM78jZoGtkkx/0zN4CLGbucWCreI/N5JbIHP5UJO9k=": {}, + "ofyDzh2lzf+vqI9BcM+0/JCAM0rQkzaDst84CLh646U=": {}, + "pERaTagl7a57dXiVI3ZzoQbWskX3YmUHppeqcPdCVY8=": {}, + "ucBShpGap3zSeKqkAo5XRcfeOZrvQYAK37CKUHrCK9A=": {}, + "yOqwGZT2NMZdFgs01SAyDs30vaigDUwIsagTHBpEs8k=": {} + } + } + }, + "constraints": { + "executor": { + "backup-worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 5 + } + }, + "worker": { + "max_nodes": { + "limit": 1 + }, + "min_pool_size": { + "limit": 5 + } + } + } + }, + "staking": { + "min_in_message_fee": "0" + }, + "governance_model": "entity", + "deployments": [ + { + "version": { + "minor": 5, + "patch": 1 + }, + "valid_from": 24972, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVgg0zImD+/+Pxb7ZJa754pdbqsM8+Oz+L1kpV8dvM0iyjY=" + }, + { + "version": { + "minor": 5, + "patch": 2 + }, + "valid_from": 25747, + "tee": "oWhlbmNsYXZlc4GiaW1yX3NpZ25lclggQCXat+vaH77MTjY3YG4CEhTQ9BxtBCL9N4sqi4iBhFlqbXJfZW5jbGF2ZVggVZvrsFF6qV1Rl4r79g5UStNEGLxKACD9EmOVJVC33/k=" + } + ] + }, + "latest_round": 1481357, + "latest_hash": "a439b18202e8d6809fa273785a074f327b5b169a40c1579b8386aff397422d3c", + "latest_time": "2023-06-07T13:36:34+02:00", + "latest_state_root": { + "ns": "000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c", + "version": 1481357, + "root_type": 1, + "hash": "7b82bdb6afbb1d2c4a25178b061337a284b6ee5e9c942cb3e4a8eb01867e2ac7" + }, + "genesis_round": 0, + "genesis_hash": "5888cd04413b7a3e5e04c74354533a833c75be4aed22d162059000f973995f15", + "last_retained_round": 0, + "last_retained_hash": "5888cd04413b7a3e5e04c74354533a833c75be4aed22d162059000f973995f15", + "committee": { + "status": "ready", + "active_version": { + "minor": 5, + "patch": 2 + }, + "latest_round": 1481357, + "latest_height": 15772992, + "executor_roles": null, + "is_txn_scheduler": false, + "peers": [ + "/ip4/91.235.116.246/tcp/40002/p2p/12D3KooWGfFTqAMc2EvLGoFSMcMo4egSf8bBJSNt46ww2YtTjYAv", + "/ip4/66.85.157.18/tcp/41002/p2p/12D3KooWHqQ77Sd3auXYcYuAEyhzvAVqmMMgJ4gtQ7z49tMhgzps", + "/ip4/52.178.10.10/tcp/9002/p2p/12D3KooWLx9Fh5RkaumFv4xFYbz73DaTtNKerMXScbZ1acJrcnbg", + "/ip4/131.153.158.101/tcp/50003/p2p/12D3KooWF15eoo1VTTYZ7tzHohS38kPdywbAxdfh6QyADt5rXA7y", + "/ip4/66.85.147.250/tcp/30004/p2p/12D3KooWDo1H3WGT2VzcAx1NtzoK9iZdrANw8SADx3VaqaT1JjKo", + "/ip4/131.153.165.57/tcp/56659/p2p/12D3KooWLHS7beFWkeR36f1SB1Sg133FeDujEYWKPFtRphaV6kVe", + "/ip4/213.21.202.23/tcp/30002/p2p/12D3KooWLL8KegpRcDxZznUCD9PsMwuDVWsdCWTgeLT1m8ub4sTF", + "/ip4/66.85.144.110/tcp/30002/p2p/12D3KooWFNb7BR734YfMyQZVexcg3Ai1Y8uWyxSqENnckMcpkhrT", + "/ip4/168.62.244.111/tcp/30002/p2p/12D3KooWNiymyC95m17qzrYGsUXuRK7afVQDAzRLpMXaNt3kEzXs", + "/ip4/194.33.45.161/tcp/40005/p2p/12D3KooWC9jULB6ZiooKBZHJQHx281mVbPK4hVNXSTHehR37C243", + "/ip4/84.234.96.78/tcp/41002/p2p/12D3KooWAmfVFWnMdEiwwTXgKe9QLZH8WU7C9jvTcxoKPZRkY6Pr", + "/ip4/20.225.137.194/tcp/9002/p2p/12D3KooWFoVZmj99Z35ujpmWXfByFLzKdRMEtEA4svKJaKXH7ayM", + "/ip4/131.153.47.62/tcp/30002/p2p/12D3KooWKc95HoDZtuYnqx5dttkyCK9BGeYx8DBE6o1k8nrjmrMW", + "/ip4/131.153.242.59/tcp/30005/p2p/12D3KooWPqxbB3yW8nnzxqh3LkpAKRGt1YeUPfy8t7WhmYdej5R8", + "/ip4/66.85.140.10/tcp/30002/p2p/12D3KooWN93Yo85zQ5NgKcBSWTNkGX1SgVNoNCyExpPdj8Av6qW2", + "/ip4/66.85.156.101/tcp/31002/p2p/12D3KooWLpJ4ssESgun9yc1MmXUyF7EDYuZWfXpMq9s7BPFrZxaC", + "/ip4/131.153.200.7/tcp/30002/p2p/12D3KooWQQTToZP6TL8MbEyFJMQ3H8y7YguJyGE97L4o74AqkUCj", + "/ip4/20.245.174.253/tcp/9002/p2p/12D3KooWBmcgkuG2qRq4aD6BDyaytnknGqzZWyw7HZAY31L8rYvs", + "/ip4/20.168.196.165/tcp/9002/p2p/12D3KooWJtDiHMyU9Srwj2r5MQABdaErW51rwaJMMTxDZ4XXSNXS", + "/ip4/40.76.70.110/tcp/9002/p2p/12D3KooWQJJhtCwJqvQ1CHTW1xD6U9aXceCBmAJTR2GGXyTBsW1g", + "/ip4/95.216.224.58/tcp/34648/p2p/12D3KooWGiJwU9ajppAA8R1tFsAezXatNC1fd18VxufnRG7veves", + "/ip4/34.94.197.191/tcp/3022/p2p/12D3KooWQ1pjpnq5yAkG3nyawShPwt9WvLjZ6xRxZr86zntztfwK", + "/ip4/172.24.72.26/tcp/9200/p2p/12D3KooWQviEyxLL2Sg1r9g6HQzDm8WN8KUwpwL3gPJfieXpmFDL", + "/ip4/89.212.17.232/tcp/30002/p2p/12D3KooWEYtZz1pzwvFFUjMRKBckJ7qt6X63PjJVWFrFtezRqC4H", + "/ip4/35.193.14.105/tcp/9002/p2p/12D3KooWPJYHjNP5sHPuFQQ83Fa7pAz93oA6oqSWQ5dpbE8MuUQ5", + "/ip4/84.255.245.194/tcp/9200/p2p/12D3KooW9tZDg59zv5JA2yi7guggePUpR4mJnriELLKi3RqvC5Y6", + "/ip4/20.232.215.170/tcp/9002/p2p/12D3KooWH1cwh3xzGQDT2Dp22Qc3fGGWqn8vYTvm232wp27M71Ft", + "/ip4/34.135.151.3/tcp/9002/p2p/12D3KooWEkXQtJ4oxKnWWFucvAp7oBedgCcPhFRwZsy6b1WaJUCU", + "/ip4/127.0.0.1/tcp/9200/p2p/12D3KooWDLhy9p7CLK2srzqwFHYRQtrGtRVAe66nJuqyBB61FFbv" + ], + "host": { + "versions": [ + { + "minor": 5, + "patch": 2 + }, + { + "minor": 5, + "patch": 1 + } + ] + } + }, + "storage": { + "last_finalized_round": 1481357 + } + } + }, + "registration": { + "last_registration": "0001-01-01T00:00:00Z" + } +} diff --git a/examples/paratime-remove/00-list.in b/examples/paratime-remove/00-list.in new file mode 100644 index 00000000..2436de4a --- /dev/null +++ b/examples/paratime-remove/00-list.in @@ -0,0 +1 @@ +oasis paratime list diff --git a/examples/paratime-remove/00-list.out b/examples/paratime-remove/00-list.out new file mode 100644 index 00000000..84e47acd --- /dev/null +++ b/examples/paratime-remove/00-list.out @@ -0,0 +1,8 @@ +NETWORK PARATIME ID +mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb +mainnet emerald (*) 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +mainnet sapphire 000000000000000000000000000000000000000000000000f80306c9858e7279 +testnet cipher 0000000000000000000000000000000000000000000000000000000000000000 +testnet emerald (*) 00000000000000000000000000000000000000000000000072c8215e60d5bca7 +testnet sapphire 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c +testnet sapphire2 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6d diff --git a/examples/paratime-remove/01-remove.in b/examples/paratime-remove/01-remove.in new file mode 100644 index 00000000..ba711f0e --- /dev/null +++ b/examples/paratime-remove/01-remove.in @@ -0,0 +1 @@ +oasis paratime remove testnet sapphire2 diff --git a/examples/paratime-remove/01-remove.out b/examples/paratime-remove/01-remove.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/paratime-remove/02-list.in b/examples/paratime-remove/02-list.in new file mode 100644 index 00000000..2436de4a --- /dev/null +++ b/examples/paratime-remove/02-list.in @@ -0,0 +1 @@ +oasis paratime list diff --git a/examples/paratime-remove/02-list.out b/examples/paratime-remove/02-list.out new file mode 100644 index 00000000..c7e154a5 --- /dev/null +++ b/examples/paratime-remove/02-list.out @@ -0,0 +1,7 @@ +NETWORK PARATIME ID +mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb +mainnet emerald (*) 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +mainnet sapphire 000000000000000000000000000000000000000000000000f80306c9858e7279 +testnet cipher 0000000000000000000000000000000000000000000000000000000000000000 +testnet emerald (*) 00000000000000000000000000000000000000000000000072c8215e60d5bca7 +testnet sapphire 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c diff --git a/examples/paratime-remove/config/cli.toml b/examples/paratime-remove/config/cli.toml new file mode 100644 index 00000000..72ddd56d --- /dev/null +++ b/examples/paratime-remove/config/cli.toml @@ -0,0 +1,92 @@ +[networks] +default = 'mainnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'emerald' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire2] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6d' + +[networks.testnet.paratimes.sapphire2.denominations] +[networks.testnet.paratimes.sapphire2.denominations._] +decimals = 18 +symbol = 'TEST' + +[wallets] +default = '' diff --git a/examples/paratime-show/show-tx-encrypted.in b/examples/paratime-show/show-tx-encrypted.in new file mode 100644 index 00000000..c768c339 --- /dev/null +++ b/examples/paratime-show/show-tx-encrypted.in @@ -0,0 +1 @@ +oasis paratime show 1078544 0 --network testnet --paratime sapphire diff --git a/examples/paratime-show/show-tx-encrypted.out b/examples/paratime-show/show-tx-encrypted.out new file mode 100644 index 00000000..d35c24aa --- /dev/null +++ b/examples/paratime-show/show-tx-encrypted.out @@ -0,0 +1,46 @@ +Network: testnet +ParaTime: sapphire +Round: 1078544 +Version: 0 +Namespace: 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c +Timestamp: 2023-05-03T15:06:19Z +Type: 1 +Previous: 1e239120b149d02e04778affbfc126cebfe5c758c953b015ab8cef876bd5f702 +I/O root: 498269b1f1607ac35f8860437d2e9648994263f865905a4551174cf6e0fce52f +State root: 9c2abe9051842cfa8d4b0981cfc9a08e55d13e516811ec20147e8a58c0b85c08 +Messages (out): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Messages (in): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Transactions: 1 + +=== Transaction 0 === +Kind: evm.ethereum.v0 +Hash: 41cc58c02147b7728c9dfcf528cfa71c6f4c04fc98fe33c5b2b9811e0379fa82 +Eth hash: 0x970a642de01cffdcdd9e75d288d912b96c48bd29e14f2ad2b572770647ac97d4 +Chain ID: 23295 +Nonce: 1185 +Type: 0 +To: 0x8c064bCf7C0DA3B3b090BAbFE8f3323534D84d68 +Value: 0 +Gas limit: 1000000 +Gas price: 100000000000 +Data: + a264626f6479a362706b5820051201801dd7c98d4b5b195344146ce425cc01f12912e37cbd2fd92d5654354c646461746159015d6c56384c75f48ba3e3ca53607969ae6d9d44e2b6921e7fd34ee5aee8da5a1b519709bf4778a725048552e6b3520281285969cae0169adfd6d5792847bc37439d89c4b9dbbf2cf3c22e305c9a3a3d5b61026831c8f672b49e565cdc6eda81a55492262a0ede45742020efdca28f9d53ec928c1ac5171345d956bdda31971eafc90892f8fdaf75587358db0c2cd20f182b34b9d11e98958fb2320f0b62a4061bca65ca529dcd51ced9b8f1d8ca45d4c3be642000324b176077fec82bbc7770ca670f5fa73a397871e4940fef662654c70aebeac53424f42a5a6b90792db90807912f8a491a2d5ea141dddf03cb8061c8cbedef1d847779792d6ccc679a64adf7961e793c0a9314c74e151e938d111186d0c47a265f390e482edc37ce53a49f7e319bcaa395c882cf5778c7c8245828db199000ae494c66f9f6dd7159116417d2671dd99c4e00683e42e53700014b3e71f9b752579fdb499eddbf83a71333656e6f6e63654f914e6a1dcbf430c9de867ed8534ec266666f726d617401 + +=== Result of transaction 0 === +Status: ok +Data: + "a1626f6ba264646174615561a6f942703204748459335a5d50058ebe8bf6cc5c656e6f6e63654f000000000010750f00000000000000" + +=== Events emitted by transaction 0 === +Events: 1 + + --- Event 0 --- + Module: core + Code: 1 + Data: + [ + { + "amount": 31451 + } + ] + diff --git a/examples/paratime-show/show-tx.in b/examples/paratime-show/show-tx.in new file mode 100644 index 00000000..3ca9e403 --- /dev/null +++ b/examples/paratime-show/show-tx.in @@ -0,0 +1 @@ +oasis paratime show 5850612 0 diff --git a/examples/paratime-show/show-tx.out b/examples/paratime-show/show-tx.out new file mode 100644 index 00000000..089ed5fd --- /dev/null +++ b/examples/paratime-show/show-tx.out @@ -0,0 +1,46 @@ +Network: mainnet +ParaTime: emerald +Round: 5850612 +Version: 0 +Namespace: 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +Timestamp: 2023-05-29T11:21:20Z +Type: 1 +Previous: 3e91bd4fc60d8a2cc03dc50c87ff532bef5703fedc35bba8aed4d8980526bb51 +I/O root: d16db82426c93e2671b8fbe74db56d17fbc88800e93490dd0a6feae11d35a9a8 +State root: 2c1bc5c89c59bee77511e7a58e7494bb815ab73bb63333da1c15d171e48b79b8 +Messages (out): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Messages (in): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Transactions: 1 + +=== Transaction 0 === +Kind: evm.ethereum.v0 +Hash: 4fc2907da5f73599519ed120916b7a9073a433b23b7ae65747e24fe75ebba832 +Eth hash: 0x9cc12c960004b724356000d1d9af0ca3a092951d759590748a98431eb49c8d10 +Chain ID: 42262 +Nonce: 1976 +Type: 0 +To: 0x47DAcE3BDcc877f77fB92925ea55e25c792Bf265 +Value: 0 +Gas limit: 900000 +Gas price: 100000000000 +Data: + 2ee6f87400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008d03941494a56164ea04d79f9867dddb0dd754a625cc21085e9307a7ec5206ca17db95be9eba7c71362e238396d4d01ba5621e66894a0228f6b3651f15660000008606060000000000066a7c4e95a979400021c718c22d52d0f3a789b752d4c2fd5908a8a733f02b3e437304892105992512539f769423a515cba1e73c01e0cf7930f5e91cb291031739fe5ad6c20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + +=== Result of transaction 0 === +Status: ok +Data: + "0000000000000000000000000000000000000000000000000000000000000000" + +=== Events emitted by transaction 0 === +Events: 1 + + --- Event 0 --- + Module: core + Code: 1 + Data: + [ + { + "amount": 48219 + } + ] + diff --git a/examples/paratime-show/show.in b/examples/paratime-show/show.in new file mode 100644 index 00000000..9099d142 --- /dev/null +++ b/examples/paratime-show/show.in @@ -0,0 +1 @@ +oasis paratime show 5850612 diff --git a/examples/paratime-show/show.out b/examples/paratime-show/show.out new file mode 100644 index 00000000..0e71fad1 --- /dev/null +++ b/examples/paratime-show/show.out @@ -0,0 +1,13 @@ +Network: mainnet +ParaTime: emerald +Round: 5850612 +Version: 0 +Namespace: 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +Timestamp: 2023-05-29T11:21:20Z +Type: 1 +Previous: 3e91bd4fc60d8a2cc03dc50c87ff532bef5703fedc35bba8aed4d8980526bb51 +I/O root: d16db82426c93e2671b8fbe74db56d17fbc88800e93490dd0a6feae11d35a9a8 +State root: 2c1bc5c89c59bee77511e7a58e7494bb815ab73bb63333da1c15d171e48b79b8 +Messages (out): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Messages (in): c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a +Transactions: 1 diff --git a/examples/paratime/00-list.in b/examples/paratime/00-list.in new file mode 100644 index 00000000..2436de4a --- /dev/null +++ b/examples/paratime/00-list.in @@ -0,0 +1 @@ +oasis paratime list diff --git a/examples/paratime/00-list.out b/examples/paratime/00-list.out new file mode 100644 index 00000000..c7e154a5 --- /dev/null +++ b/examples/paratime/00-list.out @@ -0,0 +1,7 @@ +NETWORK PARATIME ID +mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb +mainnet emerald (*) 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +mainnet sapphire 000000000000000000000000000000000000000000000000f80306c9858e7279 +testnet cipher 0000000000000000000000000000000000000000000000000000000000000000 +testnet emerald (*) 00000000000000000000000000000000000000000000000072c8215e60d5bca7 +testnet sapphire 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c diff --git a/examples/paratime/01-set-default.in b/examples/paratime/01-set-default.in new file mode 100644 index 00000000..208b258c --- /dev/null +++ b/examples/paratime/01-set-default.in @@ -0,0 +1 @@ +oasis paratime set-default testnet cipher diff --git a/examples/paratime/01-set-default.out b/examples/paratime/01-set-default.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/paratime/02-list.in b/examples/paratime/02-list.in new file mode 100644 index 00000000..2436de4a --- /dev/null +++ b/examples/paratime/02-list.in @@ -0,0 +1 @@ +oasis paratime list diff --git a/examples/paratime/02-list.out b/examples/paratime/02-list.out new file mode 100644 index 00000000..bcda2bda --- /dev/null +++ b/examples/paratime/02-list.out @@ -0,0 +1,7 @@ +NETWORK PARATIME ID +mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb +mainnet emerald (*) 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +mainnet sapphire 000000000000000000000000000000000000000000000000f80306c9858e7279 +testnet cipher (*) 0000000000000000000000000000000000000000000000000000000000000000 +testnet emerald 00000000000000000000000000000000000000000000000072c8215e60d5bca7 +testnet sapphire 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c diff --git a/examples/paratime/statistics-negative.in.static b/examples/paratime/statistics-negative.in.static new file mode 100644 index 00000000..5ab4da38 --- /dev/null +++ b/examples/paratime/statistics-negative.in.static @@ -0,0 +1 @@ +oasis paratime statistics -- -5 diff --git a/examples/paratime/statistics-negative.out.static b/examples/paratime/statistics-negative.out.static new file mode 100644 index 00000000..7e3bfe7f --- /dev/null +++ b/examples/paratime/statistics-negative.out.static @@ -0,0 +1,53 @@ +=== PARATIME STATISTICS === +Network: mainnet +ParaTime ID: 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +Start height: 14097903 +End height: 14097908 +ParaTime rounds: 4 +Successful rounds: 4 +Epoch transition rounds: 0 +Proposer timed out rounds: 0 +Failed rounds: 0 +Discrepancies: 0 +Discrepancies (timeout): 0 +Suspended: 0 + +=== ENTITY STATISTICS === +| ENTITY ADDR | ENTITY NAME | ELECTED | PRIMARY | BACKUP | PROPOSER | PRIMARY INVOKED | PRIMARY GOOD COMMIT | PRIM BAD COMMMIT | BCKP INVOKED | BCKP GOOD COMMIT | BCKP BAD COMMIT | PRIMARY MISSED | BCKP MISSED | PROPOSER MISSED | PROPOSED TIMEOUT | +|------------------------------------------------|--------------------------------|---------|---------|--------|----------|-----------------|---------------------|------------------|--------------|------------------|-----------------|----------------|-------------|-----------------|------------------| +| oasis1qrmexg6kh67xvnp7k42sx482nja5760stcrcdkhm | ushakov | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzt4fvcc6cw9af69tek9p3mfjwn3a5e5vcyrw7ac | StakeService | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qq7vyz4ewrdh00yujw0mgkf459et306xmvh2h3zg | P2P.ORG - P2P Validator | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqx820g2geqzeyeyfnm5hgz72eaj9emajgqmscy0 | max999 | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz22xm9vyg0uqxncc667m4j4p5mrsj455c743lfn | S5 | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqewwznmvwfvee0dyq9g48acy0wcw890g549pukz | Wanderer Staking | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp60saapdcrhe5zp3c3zk52r4dcfkr2uyuc5qjxp | Tessellated Geometry | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrs8zlh0mj37ug0jzlcykz808ylw93xwkvknm7yc | Bitoven | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzf03q57jdgdwp2w7y6a8yww6mak9khuag9qt0kd | Spectrum Staking | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpjuke27se2wnmvx6e8uc4l5h44yjp9h7g2clqfq | RockX | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpxpnxxk4qcgl7n55tx0yuqmrcw5cy2u5vzjq5u4 | Perfect Stake | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqrv4g5wu543wa7fcae76eucqfn2uc77zgqw8fxk | Lusia | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqf6wmc0ax3mykd028ltgtqr49h3qffcm50gwag3 | ou812 | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qps9drw07z0gmh5z2pn7zwl3z53ate2yvqf3uzq5 | cherkes | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qr0jwz65c29l044a204e3cllvumdg8cmsgt2k3ql | Staking Fund | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qq0xmq7r0z9sdv02t5j9zs7en3n6574gtg8v9fyt | Mars Staking | Long term fee | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| | 1% | | | | | | | | | | | | | | | +| oasis1qrdx0n7lgheek24t24vejdks9uqmfldtmgdv7jzz | Bit Cat🐱 | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpntrlgxp5tt36pkdezdjt5d27fzkvp22y46qura | Chloris Network | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrtq873ddwnnjqyv66ezdc9ql2a07l37d5vae9k0 | Forbole | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp9xlxurlcx3k5h3pkays56mp48zfv9nmcf982kn | ELYSIUM | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpavd66xsezz8s4wjw2fyycxw8jm2nlpnuejlg2g | Spherical One | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz8vfnkcc48grazt83gstfm6yjwyptalny8cywtp | Kumaji | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qppctxzn8djkqfvrxugak9v7dp25vddq7sxqhkry | Tuzem | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp4f47plgld98n5g2ltalalnndnzz96euv9n89lz | Julia-Ju | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzl99wft8jtt7ppprk7ce7s079z3r3t77s6pf3dd | DCC Capital | 4 | 4 | 0 | 1 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz0pvg26eudajp60835wl3jxhdxqz03q5qt9us34 | AnkaStake | 4 | 4 | 0 | 1 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrgxl0ylc7lvkj0akv6s32rj4k98nr0f7smf6m4k | itokenpool | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrugz89g5esmhs0ezer0plsfvmcgctge35n32vmr | Validatrium | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qram2p9w3yxm4px5nth8n7ugggk5rr6ay5d284at | Realizable | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz72lvk2jchk0fjrz7u2swpazj3t5p0edsdv7sf8 | Ocean Stake | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp53ud2pcmm73mlf4qywnrr245222mvlz5a2e5ty | SerGo | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz0ea28d8p4xk8xztems60wq22f9pm2yyyd82tmt | Simply Staking | 4 | 4 | 0 | 1 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpaygvzwd5ffh2f5p4qdqylymgqcvl7sp5gxyrl3 | Appload | 4 | 4 | 0 | 1 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzugextrcdueshq63w7l9x4xglnusznsgqa95w7e | Alexander (aka Bambarello) | 4 | 4 | 4 | 0 | 3 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| | Validator | | | | | | | | | | | | | | | diff --git a/examples/paratime/statistics.in.static b/examples/paratime/statistics.in.static new file mode 100644 index 00000000..f5246d1b --- /dev/null +++ b/examples/paratime/statistics.in.static @@ -0,0 +1 @@ +oasis paratime statistics diff --git a/examples/paratime/statistics.out.static b/examples/paratime/statistics.out.static new file mode 100644 index 00000000..02d33cfe --- /dev/null +++ b/examples/paratime/statistics.out.static @@ -0,0 +1,53 @@ +=== PARATIME STATISTICS === +Network: mainnet +ParaTime ID: 000000000000000000000000000000000000000000000000e2eaa99fc008f87f +Start height: 14097886 +End height: 14097887 +ParaTime rounds: 1 +Successful rounds: 1 +Epoch transition rounds: 0 +Proposer timed out rounds: 0 +Failed rounds: 0 +Discrepancies: 0 +Discrepancies (timeout): 0 +Suspended: 0 + +=== ENTITY STATISTICS === +| ENTITY ADDR | ENTITY NAME | ELECTED | PRIMARY | BACKUP | PROPOSER | PRIMARY INVOKED | PRIMARY GOOD COMMIT | PRIM BAD COMMMIT | BCKP INVOKED | BCKP GOOD COMMIT | BCKP BAD COMMIT | PRIMARY MISSED | BCKP MISSED | PROPOSER MISSED | PROPOSED TIMEOUT | +|------------------------------------------------|--------------------------------|---------|---------|--------|----------|-----------------|---------------------|------------------|--------------|------------------|-----------------|----------------|-------------|-----------------|------------------| +| oasis1qpxpnxxk4qcgl7n55tx0yuqmrcw5cy2u5vzjq5u4 | Perfect Stake | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpavd66xsezz8s4wjw2fyycxw8jm2nlpnuejlg2g | Spherical One | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz72lvk2jchk0fjrz7u2swpazj3t5p0edsdv7sf8 | Ocean Stake | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz0ea28d8p4xk8xztems60wq22f9pm2yyyd82tmt | Simply Staking | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzl99wft8jtt7ppprk7ce7s079z3r3t77s6pf3dd | DCC Capital | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qps9drw07z0gmh5z2pn7zwl3z53ate2yvqf3uzq5 | cherkes | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpjuke27se2wnmvx6e8uc4l5h44yjp9h7g2clqfq | RockX | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz8vfnkcc48grazt83gstfm6yjwyptalny8cywtp | Kumaji | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzt4fvcc6cw9af69tek9p3mfjwn3a5e5vcyrw7ac | StakeService | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz0pvg26eudajp60835wl3jxhdxqz03q5qt9us34 | AnkaStake | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrs8zlh0mj37ug0jzlcykz808ylw93xwkvknm7yc | Bitoven | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qr0jwz65c29l044a204e3cllvumdg8cmsgt2k3ql | Staking Fund | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpntrlgxp5tt36pkdezdjt5d27fzkvp22y46qura | Chloris Network | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzf03q57jdgdwp2w7y6a8yww6mak9khuag9qt0kd | Spectrum Staking | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qq7vyz4ewrdh00yujw0mgkf459et306xmvh2h3zg | P2P.ORG - P2P Validator | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qzugextrcdueshq63w7l9x4xglnusznsgqa95w7e | Alexander (aka Bambarello) | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| | Validator | | | | | | | | | | | | | | | +| oasis1qrugz89g5esmhs0ezer0plsfvmcgctge35n32vmr | Validatrium | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrdx0n7lgheek24t24vejdks9uqmfldtmgdv7jzz | Bit Cat🐱 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp9xlxurlcx3k5h3pkays56mp48zfv9nmcf982kn | ELYSIUM | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp4f47plgld98n5g2ltalalnndnzz96euv9n89lz | Julia-Ju | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqf6wmc0ax3mykd028ltgtqr49h3qffcm50gwag3 | ou812 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qq0xmq7r0z9sdv02t5j9zs7en3n6574gtg8v9fyt | Mars Staking | Long term fee | 1 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| | 1% | | | | | | | | | | | | | | | +| oasis1qqewwznmvwfvee0dyq9g48acy0wcw890g549pukz | Wanderer Staking | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqx820g2geqzeyeyfnm5hgz72eaj9emajgqmscy0 | max999 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp60saapdcrhe5zp3c3zk52r4dcfkr2uyuc5qjxp | Tessellated Geometry | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qpaygvzwd5ffh2f5p4qdqylymgqcvl7sp5gxyrl3 | Appload | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrgxl0ylc7lvkj0akv6s32rj4k98nr0f7smf6m4k | itokenpool | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qram2p9w3yxm4px5nth8n7ugggk5rr6ay5d284at | Realizable | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qz22xm9vyg0uqxncc667m4j4p5mrsj455c743lfn | S5 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qppctxzn8djkqfvrxugak9v7dp25vddq7sxqhkry | Tuzem | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qqrv4g5wu543wa7fcae76eucqfn2uc77zgqw8fxk | Lusia | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrtq873ddwnnjqyv66ezdc9ql2a07l37d5vae9k0 | Forbole | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qp53ud2pcmm73mlf4qywnrr245222mvlz5a2e5ty | SerGo | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| oasis1qrmexg6kh67xvnp7k42sx482nja5760stcrcdkhm | ushakov | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | diff --git a/examples/setup/first-run.in b/examples/setup/first-run.in new file mode 100644 index 00000000..1b6309bf --- /dev/null +++ b/examples/setup/first-run.in @@ -0,0 +1 @@ +oasis diff --git a/examples/setup/first-run.out b/examples/setup/first-run.out new file mode 100644 index 00000000..9d3e41a8 --- /dev/null +++ b/examples/setup/first-run.out @@ -0,0 +1,22 @@ +CLI for interacting with the Oasis network + +Usage: + oasis [command] + +Available Commands: + account Account operations + addressbook Manage addresses in the local address book + completion Generate the autocompletion script for the specified shell + contract WebAssembly smart contracts operations + help Help about any command + network Consensus layer operations + paratime ParaTime layer operations + transaction Raw transaction operations + wallet Manage accounts in the local wallet + +Flags: + --config string config file to use + -h, --help help for oasis + -v, --version version for oasis + +Use "oasis [command] --help" for more information about a command. diff --git a/examples/setup/wallet-list-config.in.static b/examples/setup/wallet-list-config.in.static new file mode 100644 index 00000000..b149ad53 --- /dev/null +++ b/examples/setup/wallet-list-config.in.static @@ -0,0 +1 @@ +oasis wallet list --config ~/.config/oasis_dev/cli.toml diff --git a/examples/setup/wallet-list-config.out.static b/examples/setup/wallet-list-config.out.static new file mode 100644 index 00000000..7239595a --- /dev/null +++ b/examples/setup/wallet-list-config.out.static @@ -0,0 +1,2 @@ +ACCOUNT KIND ADDRESS +oscar file (ed25519-adr8:0) oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e diff --git a/examples/setup/wallet-list.in b/examples/setup/wallet-list.in new file mode 100644 index 00000000..7ce91f4a --- /dev/null +++ b/examples/setup/wallet-list.in @@ -0,0 +1 @@ +oasis wallet list diff --git a/examples/setup/wallet-list.out b/examples/setup/wallet-list.out new file mode 100644 index 00000000..ced7e3f3 --- /dev/null +++ b/examples/setup/wallet-list.out @@ -0,0 +1 @@ +ACCOUNT KIND ADDRESS diff --git a/examples/transaction/show-invalid.in b/examples/transaction/show-invalid.in new file mode 100644 index 00000000..47e57b1c --- /dev/null +++ b/examples/transaction/show-invalid.in @@ -0,0 +1 @@ +oasis transaction show testtx.json --network mainnet diff --git a/examples/transaction/show-invalid.out b/examples/transaction/show-invalid.out new file mode 100644 index 00000000..8887420f --- /dev/null +++ b/examples/transaction/show-invalid.out @@ -0,0 +1,17 @@ +Hash: bd312d0faf8b7399b8b92b07cb6b40b418995875551341fa8540503322c5b70a +Signer: NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= + (signature: k51gq/PyDHCjm2vEMMpePnnTOaFUddRadfrP8UmgzMz1G0JDr+1lRH9lsg04+2krpmMYs7TOgX55+RVJ5a+LDw==) + [INVALID SIGNATURE] +Content: + Method: staking.Transfer + Body: + To: oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx + Amount: 1.0 ROSE + Nonce: 1 + Fee: + Amount: 0.0 ROSE + Gas limit: 1 + (gas price: 0.0 ROSE per gas unit) + +Network: mainnet +ParaTime: none (consensus layer) diff --git a/examples/transaction/show-paratime-tx.in b/examples/transaction/show-paratime-tx.in new file mode 100644 index 00000000..fbbb15be --- /dev/null +++ b/examples/transaction/show-paratime-tx.in @@ -0,0 +1 @@ +oasis transaction show testtx2.json --network testnet --paratime sapphire diff --git a/examples/transaction/show-paratime-tx.out b/examples/transaction/show-paratime-tx.out new file mode 100644 index 00000000..612e91b0 --- /dev/null +++ b/examples/transaction/show-paratime-tx.out @@ -0,0 +1,20 @@ +Hash: 3013be1ba6e1ef17921382f01b53f519174b2f35753d1fc37ad11bfc382f51f5 +Signer(s): + 1. NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= + (signature: mxOARaaRkHrHiUObGO2KbUXZhmbIS2h3hsRM+3Y/DzvMtbVdwcZm2EZ7oP7dR5XHKkrQnjMwZnkT0mdZUsLIBw==) +Content: + Format: plain + Method: accounts.Transfer + Body: + To: test:bob (oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx) + Amount: 1.0 TEST + Authorized signer(s): + 1. NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= (ed25519) + Nonce: 1 + Fee: + Amount: 0.0 TEST + Gas limit: 1 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: sapphire diff --git a/examples/transaction/show-unsigned.in b/examples/transaction/show-unsigned.in new file mode 100644 index 00000000..0ae6572d --- /dev/null +++ b/examples/transaction/show-unsigned.in @@ -0,0 +1 @@ +oasis transaction show testtx_unsigned.json --network testnet diff --git a/examples/transaction/show-unsigned.out b/examples/transaction/show-unsigned.out new file mode 100644 index 00000000..fae60b02 --- /dev/null +++ b/examples/transaction/show-unsigned.out @@ -0,0 +1,12 @@ +Method: staking.Transfer +Body: + To: oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx + Amount: 1.0 TEST +Nonce: 32 +Fee: + Amount: 0.0 TEST + Gas limit: 1265 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) diff --git a/examples/transaction/show.in b/examples/transaction/show.in new file mode 100644 index 00000000..0a60bbd9 --- /dev/null +++ b/examples/transaction/show.in @@ -0,0 +1 @@ +oasis transaction show testtx.json --network testnet diff --git a/examples/transaction/show.out b/examples/transaction/show.out new file mode 100644 index 00000000..57673491 --- /dev/null +++ b/examples/transaction/show.out @@ -0,0 +1,16 @@ +Hash: bd312d0faf8b7399b8b92b07cb6b40b418995875551341fa8540503322c5b70a +Signer: NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= + (signature: k51gq/PyDHCjm2vEMMpePnnTOaFUddRadfrP8UmgzMz1G0JDr+1lRH9lsg04+2krpmMYs7TOgX55+RVJ5a+LDw==) +Content: + Method: staking.Transfer + Body: + To: oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx + Amount: 1.0 TEST + Nonce: 1 + Fee: + Amount: 0.0 TEST + Gas limit: 1 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) diff --git a/examples/transaction/sign.y.in b/examples/transaction/sign.y.in new file mode 100644 index 00000000..1281598b --- /dev/null +++ b/examples/transaction/sign.y.in @@ -0,0 +1 @@ +oasis transaction sign testtx_unsigned.json --network testnet --account test:alice diff --git a/examples/transaction/sign.y.out b/examples/transaction/sign.y.out new file mode 100644 index 00000000..a3c9644b --- /dev/null +++ b/examples/transaction/sign.y.out @@ -0,0 +1,14 @@ +You are about to sign the following transaction: +Method: staking.Transfer +Body: + To: oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx + Amount: 1.0 TEST +Nonce: 39 +Fee: + Amount: 0.0 TEST + Gas limit: 1265 + (gas price: 0.0 TEST per gas unit) + +Network: testnet +ParaTime: none (consensus layer) +Account: test:alice diff --git a/examples/transaction/testtx.json b/examples/transaction/testtx.json new file mode 100644 index 00000000..299d1177 --- /dev/null +++ b/examples/transaction/testtx.json @@ -0,0 +1,7 @@ +{ + "untrusted_raw_value": "pGNmZWWiY2dhcwFmYW1vdW50QGRib2R5omJ0b1UAyND0Wds45cwxynfmbSxEVty+tQJmYW1vdW50RDuaygBlbm9uY2UBZm1ldGhvZHBzdGFraW5nLlRyYW5zZmVy", + "signature": { + "public_key": "NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE=", + "signature": "k51gq/PyDHCjm2vEMMpePnnTOaFUddRadfrP8UmgzMz1G0JDr+1lRH9lsg04+2krpmMYs7TOgX55+RVJ5a+LDw==" + } +} diff --git a/examples/transaction/testtx2.json b/examples/transaction/testtx2.json new file mode 100644 index 00000000..8311f6df --- /dev/null +++ b/examples/transaction/testtx2.json @@ -0,0 +1,8 @@ +{ + "Body": "o2F2AWJhaaJic2mBomVub25jZQFsYWRkcmVzc19zcGVjoWlzaWduYXR1cmWhZ2VkMjU1MTlYIDXD8zVt2FNk/roDVLVFraEJ0b2zi/XWEmgX24xyz9aRY2ZlZaJjZ2FzAWZhbW91bnSCQEBkY2FsbKJkYm9keaJidG9VAMjQ9FnbOOXMMcp35m0sRFbcvrUCZmFtb3VudIJIDeC2s6dkAABAZm1ldGhvZHFhY2NvdW50cy5UcmFuc2Zlcg==", + "AuthProofs": [ + { + "signature": "mxOARaaRkHrHiUObGO2KbUXZhmbIS2h3hsRM+3Y/DzvMtbVdwcZm2EZ7oP7dR5XHKkrQnjMwZnkT0mdZUsLIBw==" + } + ] +} diff --git a/examples/transaction/testtx_unsigned.json b/examples/transaction/testtx_unsigned.json new file mode 100644 index 00000000..fd344eb3 --- /dev/null +++ b/examples/transaction/testtx_unsigned.json @@ -0,0 +1,9 @@ +{ + "nonce": 32, + "fee": { + "amount": "0", + "gas": 1265 + }, + "method": "staking.Transfer", + "body": "omJ0b1UAyND0Wds45cwxynfmbSxEVty+tQJmYW1vdW50RDuaygA=" +} \ No newline at end of file diff --git a/examples/wallet/00-list.in b/examples/wallet/00-list.in new file mode 100644 index 00000000..7ce91f4a --- /dev/null +++ b/examples/wallet/00-list.in @@ -0,0 +1 @@ +oasis wallet list diff --git a/examples/wallet/00-list.out b/examples/wallet/00-list.out new file mode 100644 index 00000000..ff3c5400 --- /dev/null +++ b/examples/wallet/00-list.out @@ -0,0 +1,6 @@ +ACCOUNT KIND ADDRESS +emma file (secp256k1-raw) oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh +eugene file (secp256k1-bip44:0) oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +lenny ledger (secp256k1-bip44:3) oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall +logan ledger (ed25519-legacy:0) oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl +oscar (*) file (ed25519-adr8:0) oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e diff --git a/examples/wallet/01-rename.in b/examples/wallet/01-rename.in new file mode 100644 index 00000000..5d0c07ad --- /dev/null +++ b/examples/wallet/01-rename.in @@ -0,0 +1 @@ +oasis wallet rename lenny lester diff --git a/examples/wallet/01-rename.out b/examples/wallet/01-rename.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/wallet/02-list.in b/examples/wallet/02-list.in new file mode 100644 index 00000000..7ce91f4a --- /dev/null +++ b/examples/wallet/02-list.in @@ -0,0 +1 @@ +oasis wallet list diff --git a/examples/wallet/02-list.out b/examples/wallet/02-list.out new file mode 100644 index 00000000..e06b1518 --- /dev/null +++ b/examples/wallet/02-list.out @@ -0,0 +1,6 @@ +ACCOUNT KIND ADDRESS +emma file (secp256k1-raw) oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh +eugene file (secp256k1-bip44:0) oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +lester ledger (secp256k1-bip44:3) oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall +logan ledger (ed25519-legacy:0) oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl +oscar (*) file (ed25519-adr8:0) oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e diff --git a/examples/wallet/03-rename.in b/examples/wallet/03-rename.in new file mode 100644 index 00000000..8bc0e135 --- /dev/null +++ b/examples/wallet/03-rename.in @@ -0,0 +1 @@ +oasis wallet rename lester lenny diff --git a/examples/wallet/03-rename.out b/examples/wallet/03-rename.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/wallet/04-set-default.in b/examples/wallet/04-set-default.in new file mode 100644 index 00000000..c2c73c4b --- /dev/null +++ b/examples/wallet/04-set-default.in @@ -0,0 +1 @@ +oasis wallet set-default lenny diff --git a/examples/wallet/04-set-default.out b/examples/wallet/04-set-default.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/wallet/05-list.in b/examples/wallet/05-list.in new file mode 100644 index 00000000..7ce91f4a --- /dev/null +++ b/examples/wallet/05-list.in @@ -0,0 +1 @@ +oasis wallet list diff --git a/examples/wallet/05-list.out b/examples/wallet/05-list.out new file mode 100644 index 00000000..66b261a4 --- /dev/null +++ b/examples/wallet/05-list.out @@ -0,0 +1,6 @@ +ACCOUNT KIND ADDRESS +emma file (secp256k1-raw) oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh +eugene file (secp256k1-bip44:0) oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +lenny (*) ledger (secp256k1-bip44:3) oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall +logan ledger (ed25519-legacy:0) oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl +oscar file (ed25519-adr8:0) oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e diff --git a/examples/wallet/config/cli.toml b/examples/wallet/config/cli.toml new file mode 100644 index 00000000..f54960a2 --- /dev/null +++ b/examples/wallet/config/cli.toml @@ -0,0 +1,118 @@ +[networks] +default = 'mainnet' + +[networks.mainnet] +chain_context = 'b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535' +description = '' +rpc = 'grpc.oasis.dev:443' + +[networks.mainnet.denomination] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes] +default = 'emerald' + +[networks.mainnet.paratimes.cipher] +description = '' +id = '000000000000000000000000000000000000000000000000e199119c992377cb' + +[networks.mainnet.paratimes.cipher.denominations] +[networks.mainnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'ROSE' + +[networks.mainnet.paratimes.emerald] +description = '' +id = '000000000000000000000000000000000000000000000000e2eaa99fc008f87f' + +[networks.mainnet.paratimes.emerald.denominations] +[networks.mainnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.mainnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000f80306c9858e7279' + +[networks.mainnet.paratimes.sapphire.denominations] +[networks.mainnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'ROSE' + +[networks.testnet] +chain_context = '50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a' +description = '' +rpc = 'testnet.grpc.oasis.dev:443' + +[networks.testnet.denomination] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes] +default = 'emerald' + +[networks.testnet.paratimes.cipher] +description = '' +id = '0000000000000000000000000000000000000000000000000000000000000000' + +[networks.testnet.paratimes.cipher.denominations] +[networks.testnet.paratimes.cipher.denominations._] +decimals = 9 +symbol = 'TEST' + +[networks.testnet.paratimes.emerald] +description = '' +id = '00000000000000000000000000000000000000000000000072c8215e60d5bca7' + +[networks.testnet.paratimes.emerald.denominations] +[networks.testnet.paratimes.emerald.denominations._] +decimals = 18 +symbol = 'TEST' + +[networks.testnet.paratimes.sapphire] +description = '' +id = '000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c' + +[networks.testnet.paratimes.sapphire.denominations] +[networks.testnet.paratimes.sapphire.denominations._] +decimals = 18 +symbol = 'TEST' + +[wallets] +default = 'oscar' + +[wallets.emma] +address = 'oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh' +algorithm = 'secp256k1-raw' +description = '' +kind = 'file' +number = 0 + +[wallets.eugene] +address = 'oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'file' +number = 0 + +[wallets.lenny] +address = 'oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall' +algorithm = 'secp256k1-bip44' +description = '' +kind = 'ledger' +number = 3 + +[wallets.logan] +address = 'oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl' +algorithm = 'ed25519-legacy' +description = '' +kind = 'ledger' +number = 0 + +[wallets.oscar] +address = 'oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e' +algorithm = 'ed25519-adr8' +description = '' +kind = 'file' +number = 0 diff --git a/examples/wallet/config/emma.wallet b/examples/wallet/config/emma.wallet new file mode 100644 index 00000000..787264f9 --- /dev/null +++ b/examples/wallet/config/emma.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"+70IILRvyz2ISvRtFLp07WV5dJVZ3hTXPYLMjP7IR9Q=","time":1,"memory":65536,"threads":4}},"nonce":"OAVpbA7l6CxNuXmVe3981cq9Az2rRcUVd93KkHwpnoo=","data":"5Ij6aKiJPVxHWU2KyRQE055eErOysvECJw+6BYd4sJw2OubA+CuiIrhENzd9e3MC1cXdqlcUUS30p+5ASJrbgQ1IFe6WFcMncCUF8GEek9k+L5GMUCwrUStDb/rqlzILZifysmrffByQISas6IFXgy1I5WGC3xQ="} \ No newline at end of file diff --git a/examples/wallet/config/eugene.wallet b/examples/wallet/config/eugene.wallet new file mode 100644 index 00000000..1c7db004 --- /dev/null +++ b/examples/wallet/config/eugene.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"VPbTQJminqFbuM10OjLb1Rs5zYDbZV/QP1SlZHlHh1M=","time":1,"memory":65536,"threads":4}},"nonce":"XbvEzIhTIyh+HhVntQen1DEEwJJHQsyRGGczL0h55dE=","data":"LHzfNmIwD4AS9F5lp6io/KcEhDoBHrkJPOhOZ1C/a+YZlsqhFnXW5esSNDi48Oe6iMqVrtxApyxRb8rI+ZFI+lMREzalfXpO5GV42ny7h2bwvGON5ItE1DhkqTtbYKU3Fy/Z07sr2SzGBxtdsL4OPtKVSMvV4mm69aBLbLf4lUN3cAX6mbTrrEgAswBISW6EDDwYG6LkdIUSjok="} \ No newline at end of file diff --git a/examples/wallet/config/oscar.wallet b/examples/wallet/config/oscar.wallet new file mode 100644 index 00000000..101d2c28 --- /dev/null +++ b/examples/wallet/config/oscar.wallet @@ -0,0 +1 @@ +{"kdf":{"argon2":{"salt":"PMXSZ2OIM2q7YyLHKUrAotJBANA7QLOaEWDzpYcQ81g=","time":1,"memory":65536,"threads":4}},"nonce":"rWq6PYJWjGqGGueSafq2O1Zz1Gshx4gjpweryfCGFFo=","data":"nIzNG8TASLoZqINSVcQhW/9IFuMJ9+U+Hm9tB3m3Fnnua74jekDRVHIFzKmi7Z2tkV/KfIJyKsqdfPMM0O5aJbXW/qSZl7Wma4JNh3MgOrH4m9wvEWF/vzGgs4EctZnlao3y2DxQtedivPjyg6k1qWSP3RQoyLY/fliTaNETDpqbc08xOuhmVKzSse2UxZazpChVU55LA9wiwKN5Mfw+i3bEueiHuet8ECnax/rbGPTEnHMjmtGC9D69VWLBXn+NNIW2WQYuPvDkHBQS/zqT"} \ No newline at end of file diff --git a/scripts/gen_example.sh b/scripts/gen_example.sh new file mode 100755 index 00000000..cd748e35 --- /dev/null +++ b/scripts/gen_example.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +# Run Oasis CLI as defined in $1 and store its output to $2. +# Appends "-y -o /dev/null" to command execution, if filename $1 contains .y. + +set -euo pipefail + +OASIS_CMD=$(readlink -f ./oasis) +IN=$(readlink -f $1) +touch "$2" # MacOS: readlink -f does not work if file does not exist. readlink -m is not implemented yet. +OUT=$(readlink -f $2) +EXAMPLE_NAME="$(basename $(dirname $IN))" +CUSTOM_CFG_DIR="$(dirname $IN)/config" +CFG_DIR="/tmp/cli_examples/${EXAMPLE_NAME}" +CFG_FLAG="--config /tmp/cli_examples/${EXAMPLE_NAME}/cli.toml" +USER_CFG_DIR="${HOME}/.config/oasis" +RESTORE_CFG_DIR="${HOME}/.config/oasis.backup" + +# TODO: Is there a standardized way to determine $XDG_CONFIG_HOME? +if [ $(uname -s) == "Darwin" ] +then + USER_CFG_DIR="${HOME}/Library/Application Support/oasis" + RESTORE_CFG_DIR="${HOME}/Library/Application Support/oasis.backup" +fi + +# Check, if the input filename ends with .y.in and append -y -o /dev/null. +# This is useful e.g. for signing the transactions by both not broadcasting +# anything so we don't break the state and that we still have a clean input file +# that can be included in the documentation. +YES_FLAG="" +if [ "$(echo "$IN" | cut -d "." -f 2)" == "y" ]; then + YES_FLAG="-y -o /dev/null" +fi + +echo "Running ${EXAMPLE_NAME}/$(basename $IN):" + +# Prepare clean config file for the example or take the example-specific one, if +# it exists. +function init_cfg() { + # Init config in the first scenario step only. + if [ "$IN" != "$(ls $(dirname $IN)/*.in | head -n1)" ]; then + return + fi + + rm -rf "${CFG_DIR}" + mkdir -p "$(dirname ${CFG_DIR})" + + # Check for example-specific config and copy it over. + if [ -d "${CUSTOM_CFG_DIR}" ]; then + cp -r "${CUSTOM_CFG_DIR}" "${CFG_DIR}" + return + fi + + # Otherwise, generate a clean config file. + if [ -d "${USER_CFG_DIR}" ]; then + if [ -d "${RESTORE_CFG_DIR}" ]; then + echo "error: cannot initialize config: restore config directory ${RESTORE_CFG_DIR} already exists. Please restore it into your ${USER_CFG_DIR} or remove it" + exit 1 + fi + mv "${USER_CFG_DIR}" "${RESTORE_CFG_DIR}" + fi + + # XXX: What is the simplest Oasis CLI command to generate initial config file? + ${OASIS_CMD} network ls >/dev/null + wait + + # Use the fresh config for our example. + mv "${USER_CFG_DIR}" "${CFG_DIR}" + + # Restore the original config, if it existed. + if [ -d "${RESTORE_CFG_DIR}" ]; then + mv "${RESTORE_CFG_DIR}" "${USER_CFG_DIR}" + fi +} + +init_cfg + +# Replace "oasis" with the actual path to the Oasis CLI executable. +CMD="$(sed "s#oasis#$OASIS_CMD#" $IN) ${CFG_FLAG} ${YES_FLAG}" +echo " ${CMD}" + +# Use UTC timezone. +export TZ=UTC + +# Execute the Oasis CLI and store the PID. +cd $(dirname ${IN}) +${CMD} > ${OUT} + +# Trim last two lines, if in non-interactive mode ("Sign this transaction?" and +# "In case you are using a hardware-based signer..."). +if [ "$YES_FLAG" != "" ] && grep -q "Sign this transaction?" "${OUT}" +then + OUT_LINES=$(( $(cat ${OUT} | wc -l)-2 )) # MacOS: head -n -2 is not implemented yet + head -n ${OUT_LINES} ${OUT} > ${OUT}.tmp + mv ${OUT}.tmp ${OUT} +fi From d09b32182a7627bb6b4c9e90e8e64887d83d6437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Tue, 23 May 2023 11:39:20 +0200 Subject: [PATCH 2/2] feat(docs): Add User's guide --- .markdownlint.yml | 15 +- README.md | 14 +- docs/README.md | 45 ++++ docs/account.md | 610 ++++++++++++++++++++++++++++++++++++++++++++ docs/addressbook.md | 86 +++++++ docs/network.md | 306 ++++++++++++++++++++++ docs/paratime.md | 203 +++++++++++++++ docs/setup.md | 78 ++++++ docs/transaction.md | 128 ++++++++++ docs/wallet.md | 405 +++++++++++++++++++++++++++++ examples/README.md | 4 +- 11 files changed, 1886 insertions(+), 8 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/account.md create mode 100644 docs/addressbook.md create mode 100644 docs/network.md create mode 100644 docs/paratime.md create mode 100644 docs/setup.md create mode 100644 docs/transaction.md create mode 100644 docs/wallet.md diff --git a/.markdownlint.yml b/.markdownlint.yml index ffdbd7e4..f993a52d 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -10,8 +10,19 @@ line-length: # Line length checking is not strict by default. strict: true line_length: 80 - # Allow longer lines for code blocks. - code_block_line_length: 100 + # Code blocks for examples are imported directly from the command output + # and do not have sensible max line length. + code_blocks: false + +# Front matter title (shown in the menu and doccards) may differ from the one +# on the actual page. +single-title: + front_matter_title: "" + +# Docusaurus uses custom {#some-title} syntax to define fragments (anchors), see: +# https://docusaurus.io/docs/next/markdown-features/toc#heading-ids +# Unfortunately, it is not compatible with the markdown linter yet. +link-fragments: false # Do not always require language specifiers with fenced code blocks since they # are not part of the Markdown spec. diff --git a/README.md b/README.md index 9e652576..baab28b8 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ in your `$PATH`. *NOTE: The rest of the README assumes the `oasis` binary is somewhere in your `$PATH`.* -## Running +## Quickstart You can interact with the Oasis CLI by invoking it from the command line as follows: @@ -57,7 +57,7 @@ subcommand as follows: ```bash oasis network set-default testnet -oasis paratime set-default testnet emerald +oasis paratime set-default testnet sapphire ``` To be able to sign transactions you will need to first create or import an @@ -82,7 +82,13 @@ To show the account's balance on the default network/ParaTime, run: oasis account show ``` +The `account` command also allows you to transfer tokens, deposit or withdraw to +and from ParaTimes, delegate your assets to validators etc. + +Check out the complete User's guide in [docs/README.md] and example invocations +of the CLI in `examples` folder to learn more. + ## Configuration -All configuration is stored in the `$XDG_CONFIG_HOME/oasis` directory (defaults -to `$HOME/.config/oasis`). +All configuration is stored in the `$XDG_CONFIG_HOME/oasis` directory (e.g. +`$HOME/.config/oasis` on Linux). diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..8ce6a0a2 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,45 @@ +--- +title: Oasis CLI +description: Powerful CLI for managing Oasis network, nodes, tokens and dapps +--- + +# Oasis Command Line Interface + +Oasis command-line interface (CLI) is a powerful all-in-one tool for +interacting with the Oasis Network. You can download the latest release +binaries from the [GitHub repository]. + +It boasts a number of handy features: + +- Flexible setup: + - supports Mainnet, Testnet, Localnet or any other Oasis network deployment + - consensus layer configuration with arbitrary token + - configuration of custom ParaTimes with arbitrary token + - connecting to remote (via TCP/IP) or local (Unix socket) Oasis node + instance +- Powerful wallet features: + - standard token operations (transfers, allowances, deposits, withdrawals and + balance queries) + - file-based wallet with password protection + - full Ledger hardware wallet support + - address book + - generation, signing and submitting transactions in non-interactive + (headless) mode + - offline transaction generation for air-gapped machines + - transaction encryption with X25519-Deoxys-II envelope + - support for Ed25519, Ethereum-compatible Secp256k1 and Sr25519 signature + schemes + - raw, BIP-44, ADR-8 and Ledger's legacy derivation paths +- Node operator features: + - Oasis node inspection and healthchecks + - network governance transactions + - staking reward schedule transactions +- Developer features: + - built-in testing accounts compatible with the Oasis test runner, the Oasis + CI and the official sapphire-dev and emerald-dev Docker images + - Oasis Wasm smart contract code deployment, instantiation, management and + calls + - debugging tools for deployed Wasm contracts + - inspection of blocks, transactions, results and events + +[GitHub repository]: https://github.com/oasisprotocol/cli/releases diff --git a/docs/account.md b/docs/account.md new file mode 100644 index 00000000..16fe6d25 --- /dev/null +++ b/docs/account.md @@ -0,0 +1,610 @@ +--- +title: Account +description: Using CLI for performing account-related tasks +--- + +# Account-related Tasks + +The `account` command is the home for most consensus and ParaTime-layer +on-chain transactions that are signed with one of your accounts such as: + +- getting the account balance including delegated assets, +- sending tokens, +- delegating or undelegating tokens to or from validators (*staking*), +- depositing and withdrawing tokens to or from a ParaTime, +- managing withdrawal beneficiaries of your accounts, +- validator utils such as entity registration, setting the commission schedule, + unfreezing your node and similar. + +## Network, ParaTime and Account Selectors {#npa} + +Before we dig into `account` subcommands, let's look at the three most common +selectors. + +### Network + +The `--network ` parameter specifies the [network] which the +Oasis CLI should connect to. + +For example: + +![code shell](../examples/account/show-testnet.in) + +![code](../examples/account/show-testnet.out) + +![code shell](../examples/account/show-mainnet.in) + +![code](../examples/account/show-mainnet.out) + +### ParaTime + +The `--paratime ` sets which [ParaTime] Oasis CLI should use. +If you do not want to use any ParaTime, for example to perform a consensus +layer operation, pass the `--no-paratime` flag explicitly. + +![code shell](../examples/account/show-no-paratime.in) + +![code](../examples/account/show-no-paratime.out) + +### Account + +The `--account ` specifies which account in your wallet the +Oasis CLI should use to sign the transaction with. + +![code shell](../examples/account/transfer-eth.y.in) + +![code](../examples/account/transfer-eth.y.out) + +![code shell](../examples/account/transfer-eth2.y.in) + +![code](../examples/account/transfer-eth2.y.out) + +:::tip + +You can also set **the default [network][network-set-default], +[ParaTime][paratime-set-default] or [account][wallet-set-default] to use**, if +no network, ParaTime or account selectors are provided. + +::: + +[network]: ./network.md +[paratime]: ./paratime.md +[network-set-default]: ./network.md#set-default +[paratime-set-default]: ./paratime.md#set-default +[wallet-set-default]: ./wallet.md#set-default + +## Show the Balance of an Account {#show} + +The `account show [address]` command prints the balance, delegated assets +and other validator information corresponding to: + +- a given address, +- the name of the [address book entry] or +- the name of one of the accounts in your wallet. + +The address is looked up both on the consensus layer and the ParaTime, if +selected. + +Running the command without arguments will show you the balance +of your default account on the default network and ParaTime: + +![code shell](../examples/account/show.in) + +![code](../examples/account/show.out) + +You can also pass the name of the account in your wallet or the name stored in +your address book: + +![code shell](../examples/account/show-named.in) + +![code](../examples/account/show-named.out) + +Or, you can check the balance of an arbitrary account address by passing the +native or Ethereum-compatible addresses. + +![code shell](../examples/account/show-oasis.in) + +![code](../examples/account/show-oasis.out) + +![code shell](../examples/account/show-eth.in) + +![code](../examples/account/show-eth.out) + +To also include any staked assets in the balance, pass the `--show-delegations` +flag. For example: + +![code shell](../examples/account/show-delegations.in.static) + +![code](../examples/account/show-delegations.out.static) + +Let's look more closely at the figures above. The account's **nonce** is the +incremental number starting from 0 that must be unique for each account's +transaction. In our case, the nonce is 32. This means there have been that many +transactions made with this account as the source. The next transaction should +have nonce equal to 32. + +We can see that the total account's **balance** on the consensus layer is \~973 +tokens: + +- \~951 tokens can immediately be transferred. +- \~16.3 tokens (15,000,000,0000 shares) are staked (delegated). +- \~5.4 tokens are debonding and will be available for spending in the epoch + 26558. +- up to \~270 tokens are [allowed](#allow) to be transferred to accounts + `oasis1qqczuf3x6glkgjuf0xgtcpjjw95r3crf7y2323xd` and + `oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx` without the signature of the + account above. + +Separately, you can notice there are \~7 tokens currently [deposited](#deposit) +in Sapphire. + +:::info + +The `--show-delegations` flag is not enabled by default, because account +delegations are not indexed on-chain. This means that the endpoint needs +to scan block by block to retrieve this information and takes some time +often leading to the timeout on public endpoints due to denial-of-service +protection. + +::: + +Next, let's look at how the account of a validator typically looks like. For +example: + +![code shell](../examples/account/show-delegations-validator.in.static) + +![code](../examples/account/show-delegations-validator.out.static) + +We can see there is a total of \~1833 tokens delegated to this validator. One +delegation was done by the account itself and then there are five more +delegators. Sometimes, we also refer to accounts with delegated assets to it as +*escrow accounts*. + +Next, we can see a *commission schedule*. A validator can charge commission for +tokens that are delegated to it in form of the commission schedule **rate +steps** (7%, 11%, 14% and 18% activated on epochs 15883, 15994, 16000 and 16134 +respectively) and the commission schedule **rate bound steps** (0-10% on +epoch 15883 and then 0-20% activated on epoch 15993). For more details, see the +[account amend-commission-schedule](./account#amend-commission-schedule) +command. + +An escrow account may also accumulate one or more **stake claims** as seen +above. The network ensures that all claims are satisfied at any given point. +Adding a new claim is only possible if **all of the existing claims plus the +new claim can be satisfied**. + +We can observe that the stake accumulator currently has the following claims: + +- The `registry.RegisterEntity` claim is for registering an entity. It needs to + satisfy the global threshold for + [registering the `entity`][show-native-token]. + +- The `registry.RegisterNode.LAdHWnCkjFR5NUkFHVpfGuKFfZW1Cqjzu6wTFY6v2JI=` + claim is for registering the validator node with the public key + `LAdHWnCkjFR5NUkFHVpfGuKFfZW1Cqjzu6wTFY6v2JI=`. The claim needs to satisfy the + [`node-validator`][show-native-token] global staking threshold parameter. + +- The `registry.RegisterNode.xk58fx5ys6CSO33ngMQkgOL5UUHSgOSt0QbqWGGuEF8=` + claim is for registering the three compute nodes with the public key + `xk58fx5ys6CSO33ngMQkgOL5UUHSgOSt0QbqWGGuEF8==`. The claim needs to satisfy + three [`node-compute`][show-native-token] global staking threshold parameters. + +For more details on registering entities, nodes and ParaTimes, see the +[Oasis Core Registry service][oasis-core-registry]. + +[address book entry]: ./addressbook.md +[show-native-token]: ./network#show-native-token + +:::info + +[Network and ParaTime](#npa) selectors are available for the +`account show` command. + +::: + +## Transfer {#transfer} + +Use `account transfer ` command to transfer funds between two +accounts on the consensus layer or between two accounts inside the same +ParaTime. + +The following command will perform a token transfer inside default ParaTime: + +![code shell](../examples/account/transfer-named.y.in) + +![code](../examples/account/transfer-named.y.out) + +Consensus layer token transfers: + +![code shell](../examples/account/transfer-named-no-paratime.y.in) + +![code](../examples/account/transfer-named-no-paratime.y.out) + +:::info + +[Network, ParaTime and account](#npa) selectors are available for the +`account transfer` command. + +::: + +## Allowance {#allow} + +`account allow ` command makes your funds withdrawable by +a 3rd party beneficiary at consensus layer. For example, instead of paying your +partner for a service directly, you can ask for their address and enable +**them** to withdraw the amount which you agreed on from your account. This is a +similar mechanism to how payment checks were used in the past. + +![code shell](../examples/account/allow.y.in) + +![code](../examples/account/allow.y.out) + +The allowance command uses relative amount. For example, if your run the +above command 3 times, Logan will be allowed to withdraw 30 ROSE. + +:::tip + +To reduce the allowed amount or completely **disallow** the withdrawal, use the +negative amount. To avoid flag ambiguity in the shell, you will first need to +pass all desired flags and parameters except the negative amount, then append +`--` to mark the end of options, and finally append the negative amount. + +![code shell](../examples/account/allow-negative.in.static) + +![code](../examples/account/allow-negative.out.static) + +::: + +The allowance transaction is also required if you want to deposit funds from +your consensus account to a ParaTime. The ParaTime will **withdraw** the amount +from your consensus account and fund your ParaTime account with the same +amount deducted by the deposit fee. Oasis CLI can derive the address of the +ParaTime beneficiary, if you use `paratime:` as the beneficiary +address. + +![code shell](../examples/account/allow-paratime.y.in) + +![code](../examples/account/allow-paratime.y.out) + +:::info + +[Network and account](#npa) selectors are available for the `account allow` +command. + +::: + +## Deposit Tokens to a ParaTime {#deposit} + +`account deposit [address]` will deposit funds from your consensus +account to the target address inside the selected ParaTime. + +![code shell](../examples/account/deposit-named.y.in) + +![code](../examples/account/deposit-named.y.out) + +If no address is provided, the deposit will be made to the address +corresponding to your consensus account inside the ParaTime. + +![code shell](../examples/account/deposit.y.in) + +![code](../examples/account/deposit.y.out) + +Currently, deposit transactions are free of charge, hence the `--gas-price 0` +parameter to avoid spending unnecessary gas fees. Also, keep in +mind that **deposit and withdrawal fees are always paid by your ParaTime +account.** If it doesn't contain any ROSE, you will not able to cover the fees. + +You can also make a deposit to an account with arbitrary address inside a +ParaTime. For example, let's deposit to some native address inside the +ParaTime: + +![code shell](../examples/account/deposit-oasis.y.in) + +![code](../examples/account/deposit-oasis.y.out) + +Or to some address in the Ethereum format: + +![code shell](../examples/account/deposit-eth.y.in) + +![code](../examples/account/deposit-eth.y.out) + +:::info + +[Network, ParaTime and account](#npa) selectors are available for the +`account deposit` command. + +::: + +## Withdraw Tokens from the ParaTime {#withdraw} + +`account withdraw [to]` will withdraw funds from your ParaTime account +to a consensus address: + +![code shell](../examples/account/withdraw-named.y.in) + +![code](../examples/account/withdraw-named.y.out) + +If the address is not provided, the address of the account inside ParaTime will +be used as a consensus address: + +![code shell](../examples/account/withdraw.y.in) + +![code](../examples/account/withdraw.y.out) + +:::caution + +Withdrawal transactions are not free of charge and the fee will be deducted +**from your ParaTime balance**. + +::: + +Similar to the [`account deposit`](#deposit) command, you can also specify an +arbitrary Oasis address which you want to withdraw your tokens to. + +![code shell](../examples/account/withdraw-oasis.y.in) + +![code](../examples/account/withdraw-oasis.y.out) + +:::caution + +You cannot use the destination address of your `secp256k1` account or any other +Ethereum-formatted address for the withdrawal, because this signature scheme is +not supported on the consensus layer! + +::: + +:::info + +[Network, ParaTime and account](#npa) selectors are available for the +`account withdraw` command. + +::: + +## Delegate Tokens to a Validator {#delegate} + +To stake your tokens on the consensus layer, run +`account delegate `. This will delegate the specified amount of +tokens to a validator. + +![code shell](../examples/account/delegate.y.in) + +![code](../examples/account/delegate.y.out) + +Once your tokens are staked, they are converted into *shares* since the number +of tokens may change over time based on the +[staking reward schedule][token-metrics] or if your validator is subject to +[slashing]. The number of shares on the other hand will remain constant. Also, +shares are always interpreted as a whole number, whereas the amount of tokens is +usually a rational number and may lead to rounding errors when managing your +delegations. + +To find out how many shares did you delegate, run [`account show`](#show) and +look for the `shares` under the active delegations section: + +:::info + +[Network, ParaTime and account](#npa) selectors are available for the +`account delegate` command. + +::: + +[token-metrics]: https://github.com/oasisprotocol/docs/blob/main/docs/general/oasis-network/token-metrics-and-distribution.mdx#staking-incentives +[slashing]: https://github.com/oasisprotocol/docs/blob/main/docs/general/manage-tokens/terminology.md#slashing + +## Undelegate Tokens from the Validator {#undelegate} + +To reclaim your delegated assets, use `account undelegate `. You +will need to specify the **number of shares instead of tokens** and the +validator address you want to reclaim your assets from. + +![code shell](../examples/account/undelegate.y.in) + +![code](../examples/account/undelegate.y.out) + +After submitting the transaction, a [debonding period] will +commence. After the period has passed, the network will automatically move your +assets back to your account. Note that during the debonding period, your +assets may still be [slashed][slashing]. + +:::info + +[Network, ParaTime and account](#npa) selectors are available for the +`account undelegate` command. + +::: + +[debonding period]: ./network.md#show + +## Advanced + +### Public Key to Address {#from-public-key} + +`account from-public-key ` converts the Base64-encoded public key +to the [Oasis native address](../terminology.md#address). + +![code shell](../examples/account/from-public-key.in) + +![code](../examples/account/from-public-key.out) + +This command is most often used by the network validators for converting the +public key of their entity to a corresponding address. You can find your +entity's ID in the `id` field of the `entity.json` file. + +:::tip + +Oasis consensus transactions hold the public key of the signer instead of their +*from* address. This command can be used for debugging to determine the +signer's staking address on the network. + +::: + +### Non-Interactive Mode {#y} + +Add `-y` flag to any operation, if you want to use Oasis CLI in +non-interactive mode. This will answer "yes to all" for yes/no questions +and for all other prompts it will keep the proposed default values. + +### Output Transaction to File {#output-file} + +You can use `--output-file ` parameter to save a transaction to +a JSON file instead of immediately broadcasting it to the network. Afterwards, +use the [`transaction`] command to verify and submit the transaction. + +[`transaction`]: ./transaction.md + +### Do Not Sign the Transaction {#unsigned} + +If you wish to *prepare* a transaction to be signed by a specific account in +the future, use the `--unsigned` flag. This will cause Oasis CLI to skip the +signing and broadcasting steps. The transaction will be printed to the +standard output instead. + +You can also use [`--output-file`] to store the transaction to a file. This +setup is ideal when you want to sign a transaction with the +[offline/air-gapped machine] machine: + +1. First, generate an unsigned transaction on a networked machine, +2. copy it over to an air-gapped machine, +3. [sign it][transaction-sign] on the air-gapped machine, +4. copy it over to the networked machine, +5. [broadcast the transaction][transaction-submit] on the networked machine. + +[`--output-file`]: #output-file +[transaction-sign]: ./transaction.md#sign +[transaction-submit]: ./transaction.md#submit +[offline/air-gapped machine]: https://en.wikipedia.org/wiki/Air_gap_\(networking\) + +### Offline Mode {#offline} + +To generate a transaction without accessing the network and also without +broadcasting it, add `--offline` flag. In this case Oasis CLI will require that +you provide all necessary transaction details (e.g. [account nonce](#nonce), +[gas limit](#gas-limit), [gas price](#gas-price)) which would otherwise be +automatically obtained from the network. Oasis CLI will print the transaction to +the standard output for you to examine. Use [`--output-file`](#output-file), if +you wish to save the transaction to the file and submit it to the network +afterwards by using the [`transaction submit`][transaction-submit] command. + +### Account's Nonce {#nonce} + +`--nonce ` will override the detection of the account's nonce used +to sign the transaction with the specified one. + +### Gas Price {#gas-price} + +`--gas-price ` sets the transaction's price per gas unit in +base units. + +### Gas Limit {#gas-limit} + +`--gas-limit ` sets the maximum amount of gas that can be spend by the +transaction. + +### Entity Management {#entity} + +#### Register your Entity {#entity-register} + +In order for validators to become part of the validator set and/or the compute +committee, they first need to register as an entity inside the network's +registry. Use the `account entity register ` command to register +your entity and provide a JSON file with the Entity descriptor. You can use the +[`network show`][network-show-id-entities] command to see existing entities and +then examine specific ones to see how entity descriptors of the currently +registered entities look like. + +[network-show-id-entities]: ./network.md#show-id-entities +[oasis-core-registry]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/consensus/services/registry.md#entities-and-nodes + +![code shell](../examples/account/entity-register.y.in) + +![code](../examples/account/entity-register.y.out) + +:::info + +[Network and account](#npa) selectors are available for the +`account entity register` command. + +::: + +#### Deregister Your Entity {#entity-deregister} + +To remove an entity from the network's registry, invoke +`account entity deregister`. No additional arguments are required since each +account can only deregister their own entity, if one exists in the registry. + +![code shell](../examples/account/entity-deregister.y.in) + +![code](../examples/account/entity-deregister.y.out) + +:::info + +[Network and account](#npa) selectors are available for the +`account entity deregister` command. + +::: + +### Change Your Commission Schedule {#amend-commission-schedule} + +Validators can use `account amend-commission-schedule` to add or remove +their commission bounds and rates at consensus layer. Rate bounds can be +defined by using the `--bounds //` parameter. +Actual rates which can be subject to change every epoch can be defined with the +`--rates /` parameter. Rates are specified in milipercents +(100% = 100000m%). The new commission schedule will replace any previous +schedules. + +![code shell](../examples/account/amend-commission-schedule.y.in) + +![code](../examples/account/amend-commission-schedule.y.out) + +To learn more on commission rates read the section inside the Oasis Core +[Staking service][staking-service-commission-schedule] chapter. + +:::info + +[Network and account](#npa) selectors are available for the +`account amend-commission-schedule` command. + +::: + +[staking-service-commission-schedule]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/consensus/services/staking.md#amend-commission-schedule + +### Unfreeze Your Node {#node-unfreeze} + +Once the validators, based on their stake, get elected into the validator set, +it is important that their nodes are actively participating in proposing new +blocks and submitting votes for other proposed blocks. For regular node +upgrades and maintenance, the validators should follow the +[Shutting Down a Node] instructions. Nevertheless, if the network froze your +node, the only way to unfreeze it is to execute the `account node-unfreeze` + +![code shell](../examples/account/node-unfreeze.y.in) + +![code](../examples/account/node-unfreeze.y.out) + +:::info + +[Network and account](#npa) selectors are available for the +`account node-unfreeze` command. + +::: + +[Shutting Down a Node]: https://github.com/oasisprotocol/docs/blob/main/docs/node/run-your-node/maintenance/shutting-down-a-node.md + +### Burn Tokens {#burn} + +`account burn ` command will permanently destroy the amount of tokens +in your account and remove them from circulation. This command should not be +used on public networks since not only no one will be able to access burnt +assets anymore, but will also permanently remove the tokens from circulation. + +![code shell](../examples/account/burn.y.in) + +![code](../examples/account/burn.y.out) + +:::info + +[Network and account](#npa) selectors are available for the `account burn` +command. + +::: diff --git a/docs/addressbook.md b/docs/addressbook.md new file mode 100644 index 00000000..d5084aea --- /dev/null +++ b/docs/addressbook.md @@ -0,0 +1,86 @@ +--- +title: Address book +description: Storing your blockchain contacts for future use +--- + +# Address Book + +If you repeatedly transfer tokens to the same recipients or if you just want to +store an arbitrary address for future use, you can use the `addressbook` +command to **name the address and store it in your address book**. Entries +in your address book are behaving similarly to the +[accounts stored in your wallet][wallet], for example when checking the balance +of the account or sending tokens to. Of course, you cannot sign any +transactions with the address stored in your address book since you do not +possess the private key of that account. Both the Oasis native and the +Ethereum-compatible addresses can be stored. + +:::info + +The name of the address book entry may not clash with any of the account names +in your wallet. The Oasis CLI will prevent you from doing so. + +::: + +[wallet]: wallet.md + +## Add a New Entry {#add} + +Use `addressbook add
` to name the address and store it in your +address book. + +![code shell](../examples/addressbook/00-add-oasis.in) + +![code shell](../examples/addressbook/01-add-eth.in) + +Then, you can for example use the entry name in you address book to send the +tokens to. In this case, we're sending `2.5 TEST` to `meghan` on Sapphire +Testnet: + +![code shell](../examples/addressbook/02-transfer.y.in) + +![code](../examples/addressbook/02-transfer.y.out) + +## List Entries {#list} + +You can list all entries in your address book by invoking `addressbook list`. + +![code shell](../examples/addressbook/03-list.in) + +![code](../examples/addressbook/03-list.out) + +## Show Entry Details {#show} + +You can check the details such as the native Oasis address of the Ethereum +account or simply check, if an entry exists in the address book, by running +`addressbook show `: + +![code shell](../examples/addressbook/04-show-eth.in) + +![code](../examples/addressbook/04-show-eth.out) + +![code shell](../examples/addressbook/05-show-oasis.in) + +![code](../examples/addressbook/05-show-oasis.out) + +## Rename an Entry {#rename} + +You can always rename the entry in your address book by using +`addressbook rename `: + +![code shell](../examples/addressbook/06-rename.in) + +![code shell](../examples/addressbook/07-list.in) + +![code](../examples/addressbook/07-list.out) + +## Remove an Entry {#remove} + +To delete an entry from your address book invoke +`addressbook remove `. + +![code shell](../examples/addressbook/09-remove.in) + +![code shell](../examples/addressbook/10-list.in) + +![code](../examples/addressbook/10-list.out) diff --git a/docs/network.md b/docs/network.md new file mode 100644 index 00000000..80cf6be2 --- /dev/null +++ b/docs/network.md @@ -0,0 +1,306 @@ +--- +title: Network +description: Managing Mainnet, Testnet or Localnet endpoints +--- + +# Manage Your Oasis Networks + +The `network` command is used to manage the Mainnet, Testnet or Localnet +endpoints Oasis CLI will be connecting to. + +The `network` command is commonly used: + +- on network upgrades, because the chain domain separation context is changed + due to a new [genesis document], +- when setting up a local `oasis-node` instance instead of relying on public + gRPC endpoints, +- when running a private Localnet with `oasis-net-runner`, +- when examining network properties such as the native token, the network + registry, the validator set and others. + +Oasis CLI supports both **remote endpoints via the secure gRPC protocol** and +**local Unix socket endpoints**. + +:::tip + +When running the Oasis CLI for the first time, it will automatically configure +the current Mainnet and Testnet endpoints. + +::: + +[genesis document]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/consensus/genesis.md#genesis-documents-hash + +## Add a Network {#add} + +Invoke `network add ` to add a new +endpoint with a specific chain domain separation context and a gRPC address. + +For TCP/IP endpoints, run: + +![code shell](../examples/network/add-tcpip.in.static) + +![code](../examples/network/add-tcpip.out.static) + +For Unix sockets, use: + +![code shell](../examples/network/add-unix.in.static) + +![code](../examples/network/add-unix.out.static) + +## Add a Local Network {#add-local} + +`network add-local ` command can be used if you are +running a local instance of `oasis-node`. In this case, Oasis CLI will +autodetect the native token symbol and decimal places, the chain domain +separation context and registered ParaTimes. + +``` +oasis network add-local testnet_local unix:/serverdir_testnet/internal.sock +``` + +## List Networks {#list} + +Invoke `network list` to list all configured networks. + +![code shell](../examples/network/00-list.in) + +![code](../examples/network/00-list.out) + +The [default network](#set-default) is marked with the `(*)` sign. + +## Remove a Network {#remove} + +Use `network remove ` to remove the given network configuration including +all dependant ParaTimes. + +![code shell](../examples/network/01-remove.in) + +## Set Default Network {#set-default} + +To change the default network for future Oasis CLI operations, use +`network set-default `. + +![code shell](../examples/network/02-list.in) + +![code](../examples/network/02-list.out) + +![code shell](../examples/network/03-set-default.in) + +![code shell](../examples/network/04-list.in) + +![code](../examples/network/04-list.out) + +## Change a Network's RPC Endpoint {#set-rpc} + +To change the RPC address of the already configured network, run +`network set-rpc `: + +![code shell](../examples/network-set-rpc/00-list.in) + +![code](../examples/network-set-rpc/00-list.out) + +![code shell](../examples/network-set-rpc/01-set-rpc.in) + +![code shell](../examples/network-set-rpc/02-list.in) + +![code](../examples/network-set-rpc/02-list.out) + +## Advanced + +### Governance Operations {#governance} + +`network governance` command is aimed towards validators for proposing +or voting on-chain for network upgrades or changes to other crucial network +parameters. + +#### `list` {#governance-list} + +Use `network list` to view all past and still active governance proposals. +Each proposal has its unique subsequent ID, a submitter, an epoch when the +proposal was created and when it closes and a state. + +![code shell](../examples/network-governance/list.in) + +![code](../examples/network-governance/list.out) + +#### `show` {#governance-show} + +`network governance show ` shows detailed information on +past or opened governance proposals on the consensus layer. + +![code shell](../examples/network-governance/show.in.static) + +![code](../examples/network-governance/show.out.static) + +:::info + +Governance proposals are not indexed and an endpoint may take some time to +respond. If you encounter timeouts, consider setting up your own gRPC endpoint! + +::: + +#### `cast-vote` {#governance-cast-vote} + +`network governance cast-vote { yes | no | abstain }` is used +to submit your vote on the governance proposal. The vote can either be `yes`, +`no` or `abstein`. + +![code shell](../examples/network-governance/cast-vote.in.static) + +![code](../examples/network-governance/cast-vote.out.static) + +#### `create-proposal` {#governance-create-proposal} + +To submit a new governance proposal use `network governance create-proposal`. +The following proposal types are currently supported: + +- `upgrade `: Network upgrade proposal. Provide a JSON file + containing the upgrade descriptor. +- `cancel-upgrade `: Cancel network proposed upgrade. Provide the + ID of the network upgrade proposal you wish to cancel. + +### Show Network Properties {#show} + +`network show` shows the network property stored in the registry, scheduler, +genesis document or on chain. + +By passing `--height ` with a block number, you can obtain a +historic value of the property. + +The command expects one of the following parameters: + +#### `entities` {#show-entities} + +Shows all registered entities in the network registry. See the +[`account entity`] command, if you want to register or update your own entity. + +[`account entity`]: ./account.md#entity + +:::info + +This call is not enabled on public Oasis gRPC endpoints. You will have to run +your own client node to enable this functionality. + +::: + +#### `nodes` {#show-nodes} + +Shows all registered nodes in the network registry. See the [`account entity`], +to add a node to your entity. + +:::info + +This call is not enabled on public Oasis gRPC endpoints. You will have to run +your own client node to enable this functionality. + +::: + +#### `paratimes` {#show-paratimes} + +Shows all registered ParaTimes in the network registry. + +#### `validators` {#show-validators} + +Shows all IDs of the nodes in the validator set. + +#### `native-token` {#show-native-token} + +Shows information of the network's native tokens such as its symbol, the number +of decimal points, total supply, debonding period and staking thresholds. + +![code shell](../examples/network-show/native-token.in.static) + +![code](../examples/network-show/native-token.out.static) + +We can see that the token's name is ROSE and that 1 token corresponds to 10^9 +(i.e. one billion) base units. + +Next, we can observe that the **total supply** is 10 billion tokens and that +about 1.3 billion tokens are in the **common pool**. + +**Staking thresholds** are important for the network validators. They show +the minimum staked amount required to become an active validator for the entity +and all node kinds (validator, compute, key manager nodes). At time of writing, +this was 100 tokens. For example, if you wanted to register an entity running a +validator and a compute node, you would need to stake (i.e. *escrow*) at least +300 tokens. + +:::info + +Each runtime may also require a **minimum ParaTime-specific escrow** for +running a compute node. Use the [`network show id`](#show-id) +command and pass a corresponding Paratime ID to see it. + +::: + +The `runtime-` fields show you the required staked amount for +[**registering a new ParaTime**](./paratime.md#register) of any kind (compute, +key manager) was 50,000 tokens at time of writing. + +#### `gas-costs` {#show-gas-costs} + +Shows minimum gas costs for each consensus transaction. + +![code shell](../examples/network-show/gas-costs.in) + +![code](../examples/network-show/gas-costs.out) + +Above, we can see that the [maximum amount of gas](./network.md#gas-limit) our +transaction can spend must be set to at least 1000 **gas units**, otherwise it +will be rejected by the network. + +#### `` {#show-id} + +The provided ID can be one of the following: + +- If the [ParaTime ID] is provided, Oasis CLI shows ParaTime information stored + in the network's registry. + + For example, at time of writing information on Sapphire stored in the Mainnet + registry were as follows: + + ![code shell](../examples/network-show/id-paratime.in.static) + + ![code json](../examples/network-show/id-paratime.out.static) + + Network validators may be interested in the **ParaTime staking threshold** + stored inside the `thresholds` field. In the example above, the amount to run + a Sapphire compute node on the Mainnet is 5,000,000 tokens and should be + considered on top of the consensus-layer validator staking thresholds + obtained by the [`network show native-token`](#show-native-token) command. + +- If the entity ID is provided, Oasis CLI shows information on the entity and + its corresponding nodes in the network registry. For example: + + ![code shell](../examples/network-show/id-entity.in) + + ![code json](../examples/network-show/id-entity.out) + +- If the node ID is provided, Oasis CLI shows detailed information of the node + such as the Oasis Core software version, the node's role, supported + ParaTimes, trusted execution environment support and more. For example: + + ![code shell](../examples/network-show/id-node.in.static) + + ![code json](../examples/network-show/id-node.out.static) + +[ParaTime ID]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/runtime/identifiers.md + +### Status of the Network's Endpoint {#status} + +`network status` will connect to the gRPC endpoint and request extensive status +report from the Oasis Core node. Node operators will find important information +in the report such as: + +- the last proposed consensus block, +- whether the node's storage is synchronized with the network, +- the Oasis Core software version, +- connected peers, +- similar information as above for each ParaTime, if the node is running it. + +At time of writing, the following status of the official gRPC endpoint for +Mainnet was reported: + +![code shell](../examples/network/status.in.static) + +![code json](../examples/network/status.out.static) diff --git a/docs/paratime.md b/docs/paratime.md new file mode 100644 index 00000000..55cb6661 --- /dev/null +++ b/docs/paratime.md @@ -0,0 +1,203 @@ +--- +title: ParaTime +description: Managing ParaTimes +--- + +# Managing Your ParaTimes + +The `paratime` command lets you manage your ParaTime configurations bound to a +specific [network]. If you are a ParaTime developer, the command allows you to +register a new ParaTime into the public network's registry. The command +also supports examining specific block and a transaction inside the ParaTime +and printing different validator-related statistics. + +:::tip + +When running the Oasis CLI for the first time, it will automatically configure +official Oasis ParaTimes running on the [Mainnet] and [Testnet] networks. + +::: + +## Add a ParaTime {#add} + +Invoke `paratime add ` to add a new ParaTime to your Oasis +CLI configuration. Beside the name of the corresponding network and the unique +ParaTime name inside that network, you will also need to provide the +[ParaTime ID]. This is a unique identifier of the ParaTime on the network, and +it remains the same even when the network and ParaTime upgrades occur. You can +always check the IDs of the official Oasis ParaTimes on the respective +[Mainnet] and [Testnet] pages. + +Each ParaTime also has a native token denomination symbol defined with specific +number of decimal places which you will need to specify. + +```shell +oasis paratime add testnet sapphire2 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6d +``` + +``` +? Description: +? Denomination symbol: TEST +? Denomination decimal places: 18 +``` + +:::danger Decimal places of the native and ParaTime token may differ! + +Emerald and Sapphire use **18 decimals** for compatibility with +Ethereum tooling. The Oasis Mainnet and Testnet consensus layer tokens and the +token native to Cipher have **9 decimals**. + +Configuring the wrong number of decimal places will lead to incorrect amount +of tokens to be deposited, withdrawn or transferred from or into the ParaTime! + +::: + +:::tip + +If you configured your network with the [`network add-local`] command, then all +registered ParaTimes of that network will be detected and added to your Oasis +CLI config automatically. + +::: + +[network]: ./network.md +[`network add-local`]: ./network.md#add-local +[ParaTime ID]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/runtime/identifiers.md +[Mainnet]: https://github.com/oasisprotocol/docs/blob/main/docs/node/mainnet/README.md +[Testnet]: https://github.com/oasisprotocol/docs/blob/main/docs/node/testnet/README.md + +## List ParaTimes {#list} + +Invoke `paratime list` to list all configured ParaTimes across the networks. + +For example, at time of writing this section the following ParaTimes were +preconfigured by the Oasis CLI: + +![code shell](../examples/paratime/00-list.in) + +![code](../examples/paratime/00-list.out) + +The [default ParaTime](#set-default) for each network is marked with the `(*)` +sign. + +:::info + +ParaTimes on this list are configured inside your Oasis CLI instance. They +may not actually exist on the network. + +::: + +## Remove a ParaTime {#remove} + +To remove a configuration of a ParaTime for a specific network, use +`paratime remove `. For example, let's remove the +[previously added](#add) ParaTime: + +![code shell](../examples/paratime-remove/00-list.in) + +![code](../examples/paratime-remove/00-list.out) + +![code shell](../examples/paratime-remove/01-remove.in) + +![code shell](../examples/paratime-remove/02-list.in) + +![code](../examples/paratime-remove/02-list.out) + +## Set Default ParaTime {#set-default} + +To change the default ParaTime for Oasis CLI transactions on the specific +network, use `paratime set-default `. + +For example, to set the Cipher ParaTime default on the Testnet, run: + +![code shell](../examples/paratime/01-set-default.in) + +![code shell](../examples/paratime/02-list.in) + +![code](../examples/paratime/02-list.out) + +## Show {#show} + +Use `paratime show ` providing the block round to print its header and +other information. + +![code shell](../examples/paratime-show/show.in) + +![code](../examples/paratime-show/show.out) + +To show the details of the transaction stored inside the block including the +transaction status and any emitted events, pass the transaction index in the +block or its hash: + +![code shell](../examples/paratime-show/show-tx.in) + +![code](../examples/paratime-show/show-tx.out) + +Encrypted transactions can also be examined, although the data chunk will be +encrypted: + +![code shell](../examples/paratime-show/show-tx-encrypted.in) + +![code](../examples/paratime-show/show-tx-encrypted.out) + +## Advanced + +### Register a New ParaTime {#register} + +ParaTime developers may add a new ParaTime to the network's registry by +invoking the `paratime register ` command and providing a JSON file +with the ParaTime descriptor. You can use the +[`network show`][network-show-id] command passing the ParaTime ID to +see how descriptors of the currently registered ParaTimes look like. + +To learn more about registering your own ParaTime, check the +[Oasis Core Registry service]. + +[network-show-id]: ./network.md#show-id +[Oasis Core Registry service]: https://github.com/oasisprotocol/oasis-core/blob/master/docs/consensus/services/registry.md#register-runtime + +### Statistics {#statistics} + +`paratime statistics [ []]` will examine the voting +details for a range of blocks. First, it will print you aggregated statistics +showing you the number of successful rounds in that range, epoch transitions +and also anomalies such as the proposer timeouts, failed rounds and +discrepancies. Then, it will print out detailed validator per-entity +statistics for that range of blocks. + +The passed block number should be enumerated based on the round +inside the ParaTime. The start round can be one of the following: + +- If no round given, the validation of the last block will be examined. +- If a negative round number `N` is passed, the last `N` blocks will be + examined. +- If `0` is given, the oldest block available to the Oasis endpoint will be + considered as a starting block. +- A positive number will be considered as a start round. + +At time of writing, the following statistics was available: + +![code shell](../examples/paratime/statistics.in.static) + +![code](../examples/paratime/statistics.out.static) + +To extend statistics to, say 5 last blocks, you can run: + +![code shell](../examples/paratime/statistics-negative.in.static) + +![code](../examples/paratime/statistics-negative.out.static) + +For further analysis, you can easily export entity statistics to a CSV file by +passing the `--output-file` parameter and the file name: + +```shell +oasis paratime statistics -o stats.csv +``` + +:::info + +The analysis of the range of blocks may require some time or even occasionally +fail due to denial-of-service protection. If you encounter such issues, +consider setting up your own gRPC endpoint! + +::: diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 00000000..bca28cac --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,78 @@ +# Setup + +## Download and Run + +Download the latest release [here][cli-releases] and extract it to your +favorite application folder. + +:::info + +Oasis is currently providing official amd64 for Linux and ARM builds for MacOS. +If you want to run it on another platform, you will have to +[build it from source][cli-source]. + +::: + +:::info + +We suggest that you update your system path to include a directory containing +the `oasis` binary or create a symbolic link to `oasis` in your +system path, so you can access it globally. + +::: + +Run the Oasis CLI by typing `oasis`. + +![code](../examples/setup/first-run.out) + +When running the Oasis CLI for the first time, it will generate a configuration +file and populate it with the current Mainnet and Testnet networks. It will also +configure all [ParaTimes supported by the Oasis Foundation][paratimes]. + +## Configuration + +The configuration folder of Oasis CLI is located: + +- on Windows: + - `%USERPROFILE%\AppData\Roaming\oasis\` +- on macOS: + - `/Users/$USER/Library/Application Support/oasis/` +- on Linux: + - `$HOME/.config/oasis/` + +There, you will find `cli.toml` which contains the configuration of the +networks, ParaTimes and your wallet. Additionally, each file-based account in +your wallet will have a separate, password-encrypted JSON file in the same +folder named after the name of the account with the `.wallet` extension. + +## Multiple Profiles + +You can utilize multiple profiles of your Oasis CLI. To create a new profile, +move your existing configuration folder to another place, for example: + +```shell +mv $HOME/.config/oasis $HOME/.config/oasis_dev +``` + +Then, invoke `oasis` with arbitrary command to set up a fresh configuration +folder under `~/.config/oasis`. For example: + +![code shell](../examples/setup/wallet-list.in) + +![code](../examples/setup/wallet-list.out) + +Now you can switch between the `oasis_dev` and the new profile by passing +`--config` parameter pointing to `cli.toml` in the desired configuration folder. + +![code shell](../examples/setup/wallet-list-config.in.static) + +![code](../examples/setup/wallet-list-config.out.static) + +## Back Up Your Wallet + +To back up your complete Oasis CLI configuration including your wallet, archive +the configuration folder containing `cli.toml` and `.wallet` files. + +[cli-releases]: https://github.com/oasisprotocol/cli/releases +[cli-source]: https://github.com/oasisprotocol/cli +[paratimes]: https://github.com/oasisprotocol/docs/blob/main/docs/dapp/README.mdx diff --git a/docs/transaction.md b/docs/transaction.md new file mode 100644 index 00000000..539fddb1 --- /dev/null +++ b/docs/transaction.md @@ -0,0 +1,128 @@ +--- +title: Transaction +description: Using CLI to submit or decode a transaction +--- + +# Transaction Tools + +The `transaction` command offers convenient tools for processing raw +consensus or ParaTime transactions stored in a JSON file: + +- decoding and displaying the transaction, +- verifying transaction's signature, +- signing the transaction, +- broadcasting the transaction. + +## Decode, Verify and Show a Transaction {#show} + +To show the transaction, invoke `transaction show ` and provide +a filename containing a previously generated transaction by `oasis-node` or the +Oasis CLI's [`--output-file`][account-output-file] parameter. + +[account-output-file]: ./account.md#output-file + +For example, let's take the following transaction transferring `1.0 TEST` from +`test:alice` to `test:bob` on Testnet consensus layer and store it to +`testtx.json`: + +![code json](../examples/transaction/testtx.json "testtx.json") + +We can decode and verify the transaction as follows: + +![code shell](../examples/transaction/show.in) + +![code](../examples/transaction/show.out) + +Since the signature also includes the [chain domain separation context], it +will be invalid on other networks such as Mainnet and Oasis CLI will mark it as +`[INVALID SIGNATURE]`: + +![code shell](../examples/transaction/show-invalid.in) + +![code](../examples/transaction/show-invalid.out) + +A similar approach is suitable for ParaTime transactions. Take the following +transaction which transfers `1.0 TEST` from `test:alice` to `test:bob` inside +Sapphire ParaTime on Testnet and save it as `testtx2.json`: + +![code json](../examples/transaction/testtx2.json "testtx2.json") + +Oasis CLI will be able to verify the transaction only for the exact network and +ParaTime combination since both are included inside the chain domain separation +context of a ParaTime transaction signature. + +![code shell](../examples/transaction/show-paratime-tx.in) + +![code](../examples/transaction/show-paratime-tx.out) + +## Sign a Transaction {#sign} + +To sign a [previously unsigned transaction][unsigned] transaction or to append +another signature to the transaction (*multisig*), run +`transaction sign `. + +For example, let's transfer `1.0 TEST` from `test:alice` to `test:bob` on +Testnet consensus layer, but don't sign it and store it to +`testtx_unsigned.json`: + +![code json](../examples/transaction/testtx_unsigned.json + "testtx_unsigned.json") + +Comparing this transaction to [`testtx.json`](#show) which was signed, we can +notice that the transaction is not wrapped inside the `untrusted_raw_value` +envelope with the `signature` field. + +Decoding unsigned transaction gives us similar output: + +![code shell](../examples/transaction/show-unsigned.in) + +![code](../examples/transaction/show-unsigned.out) + +Finally, let's sign the transaction: + +![code shell](../examples/transaction/sign.y.in) + +![code](../examples/transaction/sign.y.out) + +We can also use [`--output-file`][account-output-file] here and store the +signed transaction back to another file instead of showing it. + +:::info + +[Network and Account][npa] selectors are available for the `transaction sign` +command. + +::: + +[npa]: ./account.md#npa +[unsigned]: ./account.md#unsigned + +## Submit a Transaction {#submit} + +Invoking `transaction submit ` will broadcast the consensus or +ParaTime transaction to the selected network or ParaTime. If the transaction +hasn't been signed yet, Oasis CLI will first sign it with the selected account +in your wallet and then broadcast it. + +```shell +oasis tx submit testtx.json --network testnet --no-paratime +``` + +``` +Broadcasting transaction... +Transaction executed successfully. +Transaction hash: a81a1dcd203bba01761a55527f2c44251278110a247e63a12f064bf41e07f13a +``` + +```shell +oasis tx submit testtx2.json --network testnet --paratime sapphire +``` + +``` +Broadcasting transaction... +Transaction included in block successfully. +Round: 946461 +Transaction hash: 25f0b2a92b6171969e9cd41d047bc20b4e2307c3a329ddef41af73df69d95b5d +``` + +[chain domain separation context]: ../../../core/crypto.md#chain-domain-separation diff --git a/docs/wallet.md b/docs/wallet.md new file mode 100644 index 00000000..d5ed8832 --- /dev/null +++ b/docs/wallet.md @@ -0,0 +1,405 @@ +--- +title: Wallet +description: Manage accounts in your CLI wallet +--- + +# Managing Accounts in Your Wallet + +The `wallet` command is used to manage accounts in your wallet. The wallet +can contain file-based accounts which are stored along your Oasis CLI +configuration, or a reference to an account stored on your hardware wallet. + +The following encryption algorithms and derivation paths are supported by the +Oasis CLI for your accounts: + +- `ed25519-adr8`: [Ed25519] keypair using the [ADR-8] derivation path in order + to obtain a private key from the mnemonic. This is the default setting + suitable for accounts on the Oasis consensus layer and Cipher. +- `secp256k1-bip44`: [Secp256k1] Ethereum-compatible keypair using [BIP-44] + with ETH coin type to derive a private key. This setting is + used for accounts living on EVM-compatible ParaTimes such as Sapphire or + Emerald. The same account can be imported into Metamask and other Ethereum + wallets. +- `ed25519-legacy`: [Ed25519] keypair using a legacy 5-component derivation + path. This is the preferred setting for Oasis accounts stored on a hardware + wallet like Ledger. It is called legacy, because it was first implemented + before the [ADR-8] was standardized. +- `sr25510-adr8`: [Sr25519] keypair using the [ADR-8] derivation path. This is + an alternative signature scheme for signing ParaTime transactions. +- `ed25519-raw`, `secp256k1-raw` and `sr25519-raw`: Respective Ed25519, + Secp256k1 and Sr25519 keypairs imported directly from Base32 or Hex-encoded + private keys. No key derivation is involved. + +:::tip + +For compatibility with Ethereum, each `secp256k1` account corresponds to two +addresses: + +- 20-byte hex-encoded Ethereum-compatible address, e.g. + `0xDCbF59bbcC0B297F1729adB23d7a5D721B481BA9` +- Bech32-encoded Oasis native address, e.g. + `oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl`. + +There exists a [mapping][eth-oasis-address-mapping] from the Ethereum address +to the native Oasis address as in the example above, but **there is no reverse +mapping**. + +::: + +[ADR-8]: ../../../adrs/0008-standard-account-key-generation.md +[BIP-44]: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki +[Ed25519]: https://en.wikipedia.org/wiki/EdDSA +[Secp256k1]: https://en.bitcoin.it/wiki/Secp256k1 +[Sr25519]: https://wiki.polkadot.network/docs/learn-cryptography +[eth-oasis-address-mapping]: https://github.com/oasisprotocol/oasis-sdk/blob/c36a7ee194abf4ca28fdac0edbefe3843b39bf69/client-sdk/go/types/address.go#L135-L142 + +## Create an Account {#create} + +The `wallet create ` command is used add a new account into your Oasis +CLI wallet by: + +- generating a new mnemonic and storing it into a file-based wallet, or +- creating a reference to an account stored on your hardware wallet. + +By default, a password-encrypted file-based wallet will be used for storing the +private key. You will have to enter the password for this account each time to +access use it for signing the transactions (e.g. to send tokens). The account +address is public and can be accessed without entering the passphrase. + +```shell +oasis wallet create oscar +``` + +``` +? Choose a new passphrase: +? Repeat passphrase: +``` + +:::tip + +The first account you create or import will become your **default account**. +This means it will automatically be selected as a source for sending funds or +calling smart contracts unless specified otherwise by using `--account ` +flag. You can always [change the default account](#set-default) later. + +::: + +To use your hardware wallet, add `--kind ledger` parameter and Oasis CLI will +store a reference to an account on your hardware wallet: + +```shell +oasis wallet create logan --kind ledger +``` + +A specific account kind (`ed25519-adr8`, `secp256k1-bip44`) and the derivation +path number can be passed with `--file.algorithm` and `--file.number` or +`--ledger.algorithm` and `--ledger.number` respectively. For example: + +```shell +oasis wallet create lenny --kind ledger --ledger.algorithm secp256k1-bip44 --ledger.number 3 +``` + +:::tip + +When creating a hardware wallet account, Oasis CLI will: + +1. obtain the public key of the account from your hardware wallet, +2. compute the corresponding native address, and +3. store the Oasis native address into the Oasis CLI. + +If you try to open the same account with a different Ledger device or +reset your Ledger with a new mnemonic, Oasis CLI will abort because the address +of the account obtained from the new device will not match the one stored in +your config. + +``` +oasis wallet show logan +Error: address mismatch after loading account (expected: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl got: oasis1qzdyu09x7hs5nqa0sjgy5jtmz3j5f99ccq0aezjk) +``` + +::: + +## Import an Existing Keypair or a Mnemonic {#import} + +If you already have a mnemonic or a raw private key, you can import it +as a new account by invoking `wallet import`. You will be asked +interactively to select an account kind (`mnemonic` or `private key`), +encryption algorithm (`ed25519` or `secp256k1`) and then provide either the +mnemonic with the derivation number, or the raw private key in the corresponding +format. + +Importing an account with a mnemonic looks like this: + +```shell +oasis wallet import eugene +``` + +``` +? Kind: mnemonic +? Algorithm: secp256k1-bip44 +? Key number: 0 +? Mnemonic: [Enter 2 empty lines to finish]man ankle mystery favorite tone number ice west spare marriage control lucky life together neither + +? Mnemonic: +man ankle mystery favorite tone number ice west spare marriage control lucky life together neither +? Choose a new passphrase: +? Repeat passphrase: +``` + +Let's make another Secp256k1 account and entering a hex-encoded raw private key: + +```shell +oasis wallet import emma +``` + +``` +oasis wallet import emma +? Kind: private key +? Algorithm: secp256k1-raw +? Private key (hex-encoded): [Enter 2 empty lines to finish]4811ebbe4f29f32a758f6f7bad39deb97ea67f07350637e31c75795dc679262a + +? Private key (hex-encoded): +4811ebbe4f29f32a758f6f7bad39deb97ea67f07350637e31c75795dc679262a +? Choose a new passphrase: +? Repeat passphrase: +``` + +## List Accounts Stored in Your Wallet {#list} + +You can list all available accounts in your wallet with `wallet list`: + +![code shell](../examples/wallet/00-list.in) + +![code](../examples/wallet/00-list.out) + +Above, you can see the native Oasis addresses of all local accounts. The +[default account](#set-default) has a special `(*)` sign next to its name. + +## Show Account Configuration Details {#show} + +To verify whether an account exists in your wallet, use `wallet show `. +This will print the account's native address and the public key which requires +entering your account's password. + +```shell +oasis wallet show oscar +``` + +``` +Unlock your account. +? Passphrase: +Name: oscar +Public Key: Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= +Native address: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e +``` + +For `secp256k1` accounts Ethereum's hex-encoded address will also be printed. + +```shell +oasis wallet show eugene +``` + +``` +Unlock your account. +? Passphrase: +Name: eugene +Public Key: ArEjDxsPfDvfeLlity4mjGzy8E/nI4umiC8vYQh+eh/c +Ethereum address: 0xBd16C6bF701a01DF1B5C11B14860b6bDbE776669 +Native address: oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +``` + +Showing an account stored on your hardware wallet will require connecting it to +your computer: + +```shell +oasis wallet show logan +``` + +``` +Name: logan +Public Key: l+cuboPsOeuY1+kYlROrpmKgiiELmXSw9xl0WEg8cWE= +Native address: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl +``` + +## Export the Account's Secret {#export} + +You can obtain the secret material of a file-based account such as the mnemonic +or the private key by running `wallet export `. + +For example: + +```shell +oasis wallet export oscar +``` + +``` +WARNING: Exporting the account will expose secret key material! +Unlock your account. +? Passphrase: +Name: oscar +Public Key: Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8= +Native address: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e +Export: +promote easily runway junior saddle gold flip believe wet example amount believe habit mixed pistol lemon increase moon rail mail fiction miss clip asset +``` + +The same goes for Secp256k1 accounts: + +```shell +oasis wallet export eugene +``` + +``` +WARNING: Exporting the account will expose secret key material! +Unlock your account. +? Passphrase: +Name: eugene +Public Key: ArEjDxsPfDvfeLlity4mjGzy8E/nI4umiC8vYQh+eh/c +Ethereum address: 0xBd16C6bF701a01DF1B5C11B14860b6bDbE776669 +Native address: oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +Export: +man ankle mystery favorite tone number ice west spare marriage control lucky life together neither +``` + +```shell +oasis wallet export emma +``` + +``` +WARNING: Exporting the account will expose secret key material! +Unlock your account. +? Passphrase: +Name: emma +Public Key: Az8B2UpSUET0E3n9XMzr+HBvviQKcRvz6C6bJtRFWNYG +Ethereum address: 0xeEbE22411f579682F6f9D68f4C19B3581bCb576b +Native address: oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh +Export: +4811ebbe4f29f32a758f6f7bad39deb97ea67f07350637e31c75795dc679262a +``` + +Trying to export an account stored on your hardware wallet will only +export its public key: + +```shell +oasis wallet export lenny +``` + +``` +WARNING: Exporting the account will expose secret key material! +Name: lenny +Public Key: AhhT2TUkEZ7rMasLBvHcsGj4SUO7Iw36ELEpL0evZDV1 +Ethereum address: 0x95e5e3C1BDD92cd4A0c14c62480DB5867946281D +Native address: oasis1qrmw4rhvp8ksj3yx6p2ftnkz864muc3re5jlgall +Export: +``` + +## Renaming the Account {#rename} + +To rename an account, run `wallet rename `. + +For example: + +![code shell](../examples/wallet/01-rename.in) + +![code shell](../examples/wallet/02-list.in) + +![code](../examples/wallet/02-list.out) + +## Deleting an Account {#remove} + +To irreversibly delete the account from your wallet use `wallet remove `. +For file-based accounts this will delete the file containing the private key +from your disk. For hardware wallet accounts this will delete the Oasis CLI +reference, but the private keys will remain intact on your hardware wallet. + +For example, let's delete `lenny` account: + +![code shell](../examples/wallet/00-list.in) + +![code](../examples/wallet/00-list.out) + +```shell +oasis wallet remove lenny +``` + +``` +WARNING: Removing the account will ERASE secret key material! +WARNING: THIS ACTION IS IRREVERSIBLE! +? Enter 'I really want to remove account lenny' (without quotes) to confirm removal: I really want to remove account lenny +``` + +```shell +oasis wallet list +``` + +``` +oasis wallet list +ACCOUNT KIND ADDRESS +emma file (secp256k1-raw) oasis1qph93wnfw8shu04pqyarvtjy4lytz3hp0c7tqnqh +eugene file (secp256k1-bip44:0) oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz +logan ledger (ed25519-legacy:0) oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl +oscar (*) file (ed25519-raw) oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e +``` + +## Set Default Account {#set-default} + +To change your default account, use `wallet set-default ` and the +name of the desired default account. + +![code shell](../examples/wallet/00-list.in) + +![code](../examples/wallet/00-list.out) + +![code shell](../examples/wallet/04-set-default.in) + +![code shell](../examples/wallet/05-list.in) + +![code](../examples/wallet/05-list.out) + +## Advanced + +### Remote Signer for `oasis-node` {#remote-signer} + +You can bind the account in your Oasis CLI wallet with a local instance of +`oasis-node`. To do this, use +`wallet remote-signer `, pick the account you wish +to expose and provide a path to the new unix socket: + +```shell +oasis wallet remote-signer oscar /datadir/oasis-oscar.socket +``` + +``` +Unlock your account. +? Passphrase: +Address: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e +Node Args: + --signer.backend=remote \ + --signer.remote.address=unix:/datadir/oasis-oscar.socket + +*** REMOTE SIGNER READY *** +``` + +### Test Accounts {#test-accounts} + +Oasis CLI comes with the following hardcoded test accounts: + +- `test:alice`: Ed25519 test account by Oasis core tests +- `test:bob`: Ed25519 test account by Oasis core tests +- `test:charlie`: Secp256k1 test account +- `test:cory`: Ed25519 account used by `oasis-net-runner` +- `test:dave`: Secp256k1 test account +- `test:erin`: Sr25519 test account +- `test:frank`: Sr25519 test account + +:::danger Do not use these accounts on public networks + +Private keys for these accounts are well-known. Do not fund them on public +networks, because anyone can drain them! + +::: + +We suggest that you use these accounts for Localnet development or for +reproducibility when you report bugs to the Oasis core team. You can access the +private key of a test account the same way as you would for ordinary accounts +by running `wallet export`. diff --git a/examples/README.md b/examples/README.md index 8682af49..5bbea02b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -12,7 +12,7 @@ Each example is stored inside its own folder. The folder contains: - input and output artifacts - `config` folder containing custom config file to be used for the scenario. -## Invocation files +## Invocation Files Invocation files have `.in` extension and they will be executed in alphabetic order. This is important, if you have destructive operations (e.g @@ -59,7 +59,7 @@ as the corresponding invocation file, but having `.out` extension instead of Scenarios should be designed in a way that the output files remain equal unless a different behavior of the Oasis CLI is expected. -## Static examples +## Static Examples If you do not want the example to be executed, but you simply want to store Oasis CLI execution snippets for example to be included in the documentation,