Skip to content

Commit 997a42d

Browse files
committed
Add AddressBook chapter
1 parent a7e6376 commit 997a42d

File tree

7 files changed

+164
-34
lines changed

7 files changed

+164
-34
lines changed

docs/general/manage-tokens/cli/account.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Account: lenny
213213
a 3rd party beneficiary at consensus layer. For example, instead of paying your
214214
partner for a service directly, you can ask for their address and enable **them**
215215
to withdraw the amount which you agreed on from your account. This is a similar
216-
mechanism to how cheques were used in the past.
216+
mechanism to how payment checks were used in the past.
217217

218218
```
219219
$ oasis account allow lenny 10 --account oscar
@@ -573,7 +573,7 @@ save the transaction to a file and submit it to the network by using the
573573

574574
[`transaction`]: ./transaction.md
575575

576-
## Commission schedule change
576+
### Commission schedule change
577577

578578
Validators can use `account amend-commission-schedule` to add or remove
579579
their commission bounds and rates at consensus layer. Rate bounds can be
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: Address book operations
3+
description: Storing your blockchain contacts for future use
4+
---
5+
6+
# `addressbook`
7+
8+
If you repeatedly transfer tokens to the same recipients or if you just want to
9+
store an arbitrary address for future use, you can use the `addressbook`
10+
command to **name the address and store it in your address book**. Entries
11+
in your address book are behaving similarly to the
12+
[accounts stored in your wallet][wallet], for example when checking the balance
13+
of the account or sending tokens to. Of course, you cannot sign any
14+
transactions with the address stored in your address book since you do not
15+
possess the private key of that account. Both the Oasis native and the
16+
17+
:::info
18+
19+
The name of the address book entry may not clash with any of the account names
20+
in your wallet. The Oasis CLI will prevent you from doing so.
21+
22+
:::
23+
24+
[wallet]: wallet.md
25+
26+
## Add entry
27+
28+
Use `addressbook add <name> <address>` to name the address and store it in your
29+
address book.
30+
31+
```
32+
$ oasis addressbook add mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
33+
$ oasis addressbook add meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
34+
```
35+
36+
Then, you can for example use the entry name in you address book to send the
37+
tokens to. In this case, we're sending `2.5 TEST` to `meghan` on Sapphire
38+
Testnet:
39+
40+
```
41+
$ oasis account transfer 2.5 meghan
42+
Unlock your account.
43+
? Passphrase:
44+
You are about to sign the following transaction:
45+
Format: plain
46+
Method: accounts.Transfer
47+
Body:
48+
To: meghan (oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega)
49+
Amount: 2.5 TEST
50+
Authorized signer(s):
51+
1. ArEjDxsPfDvfeLlity4mjGzy8E/nI4umiC8vYQh+eh/c (secp256k1eth)
52+
Nonce: 0
53+
Fee:
54+
Amount: 0.5002316 TEST
55+
Gas limit: 5002316
56+
(gas price: 0.0000001 TEST per gas unit)
57+
58+
Network: testnet
59+
ParaTime: sapphire
60+
Account: eugene
61+
```
62+
63+
## List entries
64+
65+
You can list all entries in your address book by invoking `addressbook list`.
66+
67+
```
68+
$ oasis addressbook list
69+
NAME ADDRESS
70+
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
71+
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
72+
```
73+
74+
## Show entry
75+
76+
You can check the details such as the native Oasis address of the Ethereum
77+
account or simply check, if an entry exists in the address book, by running
78+
`addressbook show <name>`:
79+
80+
```
81+
$ oasis addressbook show meghan
82+
Name: meghan
83+
Ethereum address: 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
84+
Native address: oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega
85+
86+
$ oasis addressbook show mike
87+
Name: mike
88+
Native address: oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
89+
```
90+
91+
## Rename entry
92+
93+
You can always rename the entry in your address book by using
94+
`addressbook rename <old_name> <new_name>`:
95+
96+
```
97+
$ oasis addressbook list
98+
NAME ADDRESS
99+
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
100+
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
101+
102+
$ oasis addressbook rename mike mark
103+
104+
$ oasis addressbook list
105+
NAME ADDRESS
106+
mark oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
107+
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
108+
```
109+
110+
## Remove entry
111+
112+
To delete an entry from your address book use `addressbook remove <name>`.
113+
114+
```
115+
$ oasis addressbook list
116+
NAME ADDRESS
117+
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
118+
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
119+
120+
$ oasis addressbook remove mike
121+
122+
$ oasis addressbook list
123+
NAME ADDRESS
124+
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
125+
```

docs/general/manage-tokens/cli/network.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ $ oasis network add-local testnet_local unix:/serverdir_testnet/internal.sock
5252

5353
## List networks
5454

55-
Invoke `network ls` to list all registered networks.
55+
Invoke `network list` to list all registered networks.
5656

5757
```
58-
$ oasis network ls
58+
$ oasis network list
5959
NAME CHAIN CONTEXT RPC
6060
localhost_mainnet b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock
6161
localhost_testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a unix:/serverdir_testnet/internal.sock
@@ -69,11 +69,11 @@ The default network is marked with `(*)` sign.
6969

7070
## Removing network
7171

72-
Use `network rm <name>` to remove the given network configuration including all
72+
Use `network remove <name>` to remove the given network configuration including all
7373
dependant ParaTimes.
7474

7575
```
76-
$ oasis network rm localhost_testnet
76+
$ oasis network remove localhost_testnet
7777
WARNING: Network 'localhost_testnet' contains 2 paratimes.
7878
? Are you sure you want to remove the network? Yes
7979
```
@@ -84,7 +84,7 @@ To change the default network for future Oasis CLI operations, use
8484
`network set-default <name>`.
8585

8686
```
87-
$ oasis network ls
87+
$ oasis network list
8888
NAME CHAIN CONTEXT RPC
8989
localhost_mainnet b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock
9090
localhost_testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a unix:/serverdir_testnet/internal.sock
@@ -95,7 +95,7 @@ testnet_alt 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba461
9595
9696
$ oasis network set-default localhost_mainnet
9797
98-
$ oasis network ls
98+
$ oasis network list
9999
NAME CHAIN CONTEXT RPC
100100
localhost_mainnet (*) b11b369e0da5bb230b220127f5e7b242d385ef8c6f54906243f30af63c815535 unix:/serverdir_mainnet/internal.sock
101101
localhost_testnet 50304f98ddb656620ea817cc1446c401752a05a249b36c9b90dba4616829977a unix:/serverdir_testnet/internal.sock

docs/general/manage-tokens/cli/paratime.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ of tokens to be deposited, withdrawn or transferred inside the ParaTime!
4646

4747
## List ParaTimes
4848

49-
You can invoke `paratime ls` to see all configured ParaTimes on all networks.
49+
You can invoke `paratime list` to see all configured ParaTimes on all networks.
5050

5151
```
52-
$ oasis paratime ls
52+
$ oasis paratime list
5353
NETWORK PARATIME ID
5454
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
5555
mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb
@@ -74,10 +74,10 @@ They may not exist on the network.
7474
## Remove ParaTime
7575

7676
To remove a configuration of a ParaTime for a specific network, use
77-
`paratime rm <network> <name>`.
77+
`paratime remove <network> <name>`.
7878

7979
```
80-
$ oasis paratime ls
80+
$ oasis paratime list
8181
NETWORK PARATIME ID
8282
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
8383
mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb
@@ -89,9 +89,9 @@ testnet emerald 000000000000000000000000000000000000000000000000
8989
testnet sapphire (*) 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6c
9090
testnet sapphire2 000000000000000000000000000000000000000000000000a6d1e3ebf60dff6d
9191
92-
$ oasis paratime rm testnet sapphire2
92+
$ oasis paratime remove testnet sapphire2
9393
94-
$ oasis paratime ls
94+
$ oasis paratime list
9595
NETWORK PARATIME ID
9696
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
9797
mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb
@@ -109,7 +109,7 @@ To change the default ParaTime for Oasis CLI transactions on the specific
109109
network, use `paratime set-default <network> <name>`.
110110

111111
```
112-
$ oasis paratime ls
112+
$ oasis paratime list
113113
NETWORK PARATIME ID
114114
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
115115
mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb
@@ -122,9 +122,9 @@ testnet sapphire (*) 000000000000000000000000000000000000000000000000
122122
123123
$ oasis paratime set-default testnet cipher
124124
125-
$ oasis paratime ls
125+
$ oasis paratime list
126126
NETWORK PARATIME ID
127-
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
127+
localnet sapphire (*) 8000000000000000000000000000000000000000000000000000000000000000
128128
mainnet cipher 000000000000000000000000000000000000000000000000e199119c992377cb
129129
mainnet emerald (*) 000000000000000000000000000000000000000000000000e2eaa99fc008f87f
130130
mainnet fancyruntime 000000000000000000000000000000000000000000000000e199119c992377cb

docs/general/manage-tokens/cli/transaction.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: Transaction operations
33
description: Using CLI to submit or decode a transaction
44
---
55

6-
# `tx`
6+
# `transaction`
77

8-
Use `tx` command for raw transaction operations such as decoding, verifying,
8+
Use `transaction` command for raw transaction operations such as decoding, verifying,
99
signing or simply broadcasting the transaction stored in a JSON file.
1010

1111
## Verifying a transaction
1212

13-
To show the transaction, invoke `tx show <filename.json>` and provide a
14-
filename containing a previously generated transaction by `oasis-node` or the
13+
To show the transaction, invoke `transaction show <filename.json>` and provide
14+
a filename containing a previously generated transaction by `oasis-node` or the
1515
Oasis CLI's [`--offline` flag][offline-mode].
1616

1717
[offline-mode]: ./account.mdx#offline-mode
@@ -33,7 +33,7 @@ For example, let's take the following transaction transferring `1.0 TEST` from
3333
We can decode and verify the transaction as follows:
3434

3535
```
36-
$ oasis tx show testtx.json --network testnet
36+
$ oasis transaction show testtx.json --network testnet
3737
Hash: bd312d0faf8b7399b8b92b07cb6b40b418995875551341fa8540503322c5b70a
3838
Signer: NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE=
3939
(signature: k51gq/PyDHCjm2vEMMpePnnTOaFUddRadfrP8UmgzMz1G0JDr+1lRH9lsg04+2krpmMYs7TOgX55+RVJ5a+LDw==)
@@ -57,7 +57,7 @@ will be invalid on other networks such as Mainnet and Oasis CLI will mark it as
5757
`[INVALID SIGNATURE]`:
5858

5959
```
60-
$ oasis tx show testtx.json --network mainnet
60+
$ oasis transaction show testtx.json --network mainnet
6161
Hash: bd312d0faf8b7399b8b92b07cb6b40b418995875551341fa8540503322c5b70a
6262
Signer: NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE=
6363
(signature: k51gq/PyDHCjm2vEMMpePnnTOaFUddRadfrP8UmgzMz1G0JDr+1lRH9lsg04+2krpmMYs7TOgX55+RVJ5a+LDw==)
@@ -97,7 +97,7 @@ ParaTime combination since both are included inside the chain domain separation
9797
context of a ParaTime transaction signature.
9898

9999
```
100-
$ oasis tx show testtx2.json --network testnet --paratime sapphire
100+
$ oasis transaction show testtx2.json --network testnet --paratime sapphire
101101
Hash: 3013be1ba6e1ef17921382f01b53f519174b2f35753d1fc37ad11bfc382f51f5
102102
Signer(s):
103103
1. NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE=
@@ -145,7 +145,7 @@ ParaTime: emerald
145145

146146
## Submitting a transaction
147147

148-
Invoking `tx submit <filename.json>` will broadcast the consensus or a ParaTime
148+
Invoking `transaction submit <filename.json>` will broadcast the consensus or a ParaTime
149149
transaction to the selected network or a ParaTime. If the transaction hasn't
150150
been signed yet, Oasis CLI will first sign it with the selected account in your
151151
wallet and then broadcast it.

docs/general/manage-tokens/cli/wallet.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ man ankle mystery favorite tone number ice west spare marriage control lucky lif
101101

102102
## List wallets
103103

104-
You can list all available accounts in your wallets with `wallet ls`:
104+
You can list all available accounts in your wallets with `wallet list`:
105105

106106
```
107-
$ oasis wallet ls
107+
$ oasis wallet list
108108
ACCOUNT KIND ADDRESS
109109
emerald_test file (secp256k1-raw) oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl
110110
eugene file (secp256k1-bip44:0) oasis1qrvzxld9rz83wv92lvnkpmr30c77kj2tvg0pednz
@@ -197,33 +197,37 @@ Native address: oasis1qpl4axynedmdrrgrg7dpw3yxc4a8crevr5dkuksl
197197

198198
## Renaming account
199199

200-
To rename your account, run `wallet mv <old_name> <new_name>`:
200+
To rename your account, run `wallet rename <old_name> <new_name>`:
201201

202202
```
203203
$ oasis wallet list
204204
ACCOUNT KIND ADDRESS
205205
lenny ledger (ed25519-legacy:0) oasis1qzdyu09x7hs5nqa0sjgy5jtmz3j5f99ccq0aezjk
206-
$ oasis wallet mv lenny lester
206+
207+
$ oasis wallet rename lenny lester
208+
207209
$ oasis wallet list
208210
ACCOUNT KIND ADDRESS
209211
lester ledger (ed25519-legacy:0) oasis1qzdyu09x7hs5nqa0sjgy5jtmz3j5f99ccq0aezjk
210212
```
211213

212214
## Deleting account
213215

214-
To irreversibly delete the account from your wallet use `wallet rm <name>`. For
215-
file-based accounts this will delete the private key from your disk. For
216-
hardware wallet accounts this will delete the Oasis CLI reference, but
217-
the private keys will remain intact on your hardware wallet.
216+
To irreversibly delete the account from your wallet use `wallet remove <name>`.
217+
For file-based accounts this will delete the private key from your disk. For
218+
hardware wallet accounts this will delete the Oasis CLI reference, but the
219+
private keys will remain intact on your hardware wallet.
218220

219221
```
220222
$ oasis wallet list
221223
ACCOUNT KIND ADDRESS
222224
lester ledger (ed25519-legacy:0) oasis1qzdyu09x7hs5nqa0sjgy5jtmz3j5f99ccq0aezjk
223-
$ oasis wallet rm lester
225+
226+
$ oasis wallet remove lester
224227
WARNING: Removing the account will ERASE secret key material!
225228
WARNING: THIS ACTION IS IRREVERSIBLE!
226229
? Enter 'I really want to remove account lester' (without quotes) to confirm removal: I really want to remove account lester
230+
227231
$ oasis wallet list
228232
ACCOUNT KIND ADDRESS
229233
```

sidebarGeneral.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const sidebars = {
7676
'general/manage-tokens/cli/wallet',
7777
'general/manage-tokens/cli/account',
7878
'general/manage-tokens/cli/transaction',
79+
'general/manage-tokens/cli/addressbook',
7980
'general/manage-tokens/advanced/README',
8081
'general/manage-tokens/advanced/oasis-cli-tools/prerequisites',
8182
'general/manage-tokens/advanced/oasis-cli-tools/setup',

0 commit comments

Comments
 (0)