Skip to content

Commit

Permalink
feat: Add account entity init docs and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Nov 13, 2023
1 parent ccdbf68 commit 3c478c7
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 10 deletions.
23 changes: 23 additions & 0 deletions docs/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 path to the file containing your entity descriptor as well as register it in
the network registry. Use `account entity init` to generate the entity
descriptor file containing the public key of the selected account.

![code shell](../examples/account/entity-init.in.static)

![code json](../examples/account/entity-init.out.static)

By default, the file content will be printed to the 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](#account) 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
Expand Down
2 changes: 1 addition & 1 deletion examples/account/allow-paratime.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Method: staking.Allow
Body:
Beneficiary: oasis1qqczuf3x6glkgjuf0xgtcpjjw95r3crf7y2323xd
Amount change: +10.0 TEST
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1278
Expand Down
2 changes: 1 addition & 1 deletion examples/account/allow.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Method: staking.Allow
Body:
Beneficiary: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl
Amount change: +10.0 TEST
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1278
Expand Down
2 changes: 1 addition & 1 deletion examples/account/amend-commission-schedule.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Body:
(2) start: epoch 335000
minimum rate: 0.9%
maximum rate: 1.9%
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1361
Expand Down
2 changes: 1 addition & 1 deletion examples/account/burn.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ You are about to sign the following transaction:
Method: staking.Burn
Body:
Amount: 2.5 TEST
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1235
Expand Down
2 changes: 1 addition & 1 deletion examples/account/delegate.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Method: staking.AddEscrow
Body:
To: oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk
Amount: 20.0 TEST
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1271
Expand Down
2 changes: 1 addition & 1 deletion examples/account/entity-deregister.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ You are about to sign the following transaction:
Method: registry.DeregisterEntity
Body:
{}
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1231
Expand Down
1 change: 1 addition & 0 deletions examples/account/entity-init-o.y.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oasis account entity init -o entity.json
Empty file.
1 change: 1 addition & 0 deletions examples/account/entity-init.in.static
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oasis account entity init
5 changes: 5 additions & 0 deletions examples/account/entity-init.out.static
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "Bx6gOixnxy15tCs09ua5DcKyX9uo2Forb32O6Hyjoc8=",
"nodes": [],
"v": 2
}
2 changes: 1 addition & 1 deletion examples/account/entity-register.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Body:
"signature": "DAwn+N8hKmQMbZda/fFJSEgErDAAdebXLfIPOpqUkJowJLUAL+nfrUMz5SVkKc0TnqQOavoSAVFz1yoRJ3QuBA=="
}
}
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 2471
Expand Down
2 changes: 1 addition & 1 deletion examples/account/node-unfreeze.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Body:
{
"node_id": "fasTG3pMOwLfFA7JX3R8Kxw1zFflqeY6NP/cpjcFu5I="
}
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1274
Expand Down
2 changes: 1 addition & 1 deletion examples/account/show.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Address: oasis1qp87hflmelnpqhzcqcw8rhzakq4elj7jzv090p3e

=== CONSENSUS LAYER (testnet) ===
Nonce: 1
Nonce: 2

Total: 0.0 TEST
Available: 0.0 TEST
Expand Down
2 changes: 1 addition & 1 deletion examples/account/undelegate.y.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Method: staking.ReclaimEscrow
Body:
From: oasis1qpkl3vykn9mf4xcq9eevmey4ffrzf0ajtcpvd7sk
Shares: 20000000000
Nonce: 1
Nonce: 2
Fee:
Amount: 0.0 TEST
Gas limit: 1275
Expand Down

0 comments on commit 3c478c7

Please sign in to comment.