From c05c0ff8f4fb9f4ac635795fe3c0002fbdad896c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Fri, 10 Nov 2023 19:59:18 +0100 Subject: [PATCH] feat: Add account entity init docs and examples --- docs/account.md | 23 +++++++++++++++++++++++ examples/account/entity-init-o.y.in | 1 + examples/account/entity-init-o.y.out | 0 examples/account/entity-init.in.static | 1 + examples/account/entity-init.out.static | 5 +++++ 5 files changed, 30 insertions(+) create mode 100644 examples/account/entity-init-o.y.in create mode 100644 examples/account/entity-init-o.y.out create mode 100644 examples/account/entity-init.in.static create mode 100644 examples/account/entity-init.out.static diff --git a/docs/account.md b/docs/account.md index 653deba9..a95d09bb 100644 --- a/docs/account.md +++ b/docs/account.md @@ -519,6 +519,29 @@ transaction. ### Entity Management {#entity} +#### Initialize Entity {#entity-init} + +When setting up a validator node for the first time, you will need to provide +the entity file descriptor to the Oasis node as well as register it in the +network registry. Use `account entity init` to generate the file containing the +public key of the selected account. + +![code shell](../examples/account/entity-init.in.static) + +![code](../examples/account/entity-init.out.static) + +By default, the file content will be printed to standard output. You can use +`-o` parameter to store it to a file, for example: + +![code shell](../examples/account/entity-init-o.y.in) + +:::info + +[Account](#npa) selector is available for the +`account entity init` command. + +::: + #### Register your Entity {#entity-register} In order for validators to become part of the validator set and/or the compute diff --git a/examples/account/entity-init-o.y.in b/examples/account/entity-init-o.y.in new file mode 100644 index 00000000..5611e88e --- /dev/null +++ b/examples/account/entity-init-o.y.in @@ -0,0 +1 @@ +oasis account entity init -o entity.json diff --git a/examples/account/entity-init-o.y.out b/examples/account/entity-init-o.y.out new file mode 100644 index 00000000..e69de29b diff --git a/examples/account/entity-init.in.static b/examples/account/entity-init.in.static new file mode 100644 index 00000000..981c224c --- /dev/null +++ b/examples/account/entity-init.in.static @@ -0,0 +1 @@ +oasis account entity init diff --git a/examples/account/entity-init.out.static b/examples/account/entity-init.out.static new file mode 100644 index 00000000..7f10c096 --- /dev/null +++ b/examples/account/entity-init.out.static @@ -0,0 +1,5 @@ +{ + "id": "Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8=", + "nodes": [], + "v": 2 +}