Skip to content

Commit a4667fc

Browse files
committed
feat(docs): Add User's guide
1 parent 3d95bd7 commit a4667fc

10 files changed

Lines changed: 1276 additions & 8 deletions

File tree

.markdownlint.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ line-length:
1010
# Line length checking is not strict by default.
1111
strict: true
1212
line_length: 80
13-
# Allow longer lines for code blocks.
14-
code_block_line_length: 100
13+
# Code blocks for examples are imported directly from the command output
14+
# and do not have sensible max line length.
15+
code_blocks: false
16+
17+
# Front matter title (shown in the menu and doccards) may differ from the one
18+
# on the actual page.
19+
single-title:
20+
front_matter_title: ""
21+
22+
# Docusaurus uses custom {#some-title} syntax to define fragments (anchors), see:
23+
# https://docusaurus.io/docs/next/markdown-features/toc#heading-ids
24+
# Unfortunately, it is not compatible with the markdown linter yet.
25+
link-fragments: false
1526

1627
# Do not always require language specifiers with fenced code blocks since they
1728
# are not part of the Markdown spec.

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ in your `$PATH`.
3131
*NOTE: The rest of the README assumes the `oasis` binary is somewhere in your
3232
`$PATH`.*
3333

34-
## Running
34+
## Quickstart
3535

3636
You can interact with the Oasis CLI by invoking it from the command line as
3737
follows:
@@ -57,7 +57,7 @@ subcommand as follows:
5757

5858
```bash
5959
oasis network set-default testnet
60-
oasis paratime set-default testnet emerald
60+
oasis paratime set-default testnet sapphire
6161
```
6262

6363
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:
8282
oasis account show
8383
```
8484

85+
The `account` command also allows you to transfer tokens, deposit or withdraw to
86+
and from ParaTimes, delegate your assets to validators etc.
87+
88+
Check out the complete User's guide in [docs/README.md] and example invocations
89+
of the CLI in `examples` folder to learn more.
90+
8591
## Configuration
8692

87-
All configuration is stored in the `$XDG_CONFIG_HOME/oasis` directory (defaults
88-
to `$HOME/.config/oasis`).
93+
All configuration is stored in the `$XDG_CONFIG_HOME/oasis` directory (e.g.
94+
`$HOME/.config/oasis` on Linux).

docs/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Oasis CLI
3+
description: Powerful CLI for managing Oasis network, nodes, tokens and dapps
4+
---
5+
6+
# Oasis Command Line Interface
7+
8+
Oasis command-line interface (CLI) is a powerful all-in-one tool for
9+
interacting with the Oasis Network. You can download the latest release
10+
binaries from the [GitHub repository].
11+
12+
It boasts a number of handy features:
13+
14+
- Flexible setup:
15+
- supports Mainnet, Testnet, Localnet or any other Oasis network deployment
16+
- consensus layer configuration with arbitrary token
17+
- configuration of custom ParaTimes with arbitrary token
18+
- connecting to remote (via TCP/IP) or local (Unix socket) Oasis node
19+
instance
20+
- Powerful wallet features:
21+
- standard token operations (transfers, allowances, deposits, withdrawals and
22+
balance queries)
23+
- file-based wallet with password protection
24+
- full Ledger hardware wallet support
25+
- address book
26+
- generation, signing and submitting transactions in non-interactive
27+
(headless) mode
28+
- offline transaction generation for air-gapped machines
29+
- transaction encryption with X25519-Deoxys-II envelope
30+
- support for Ed25519, Ethereum-compatible Secp256k1 and Sr25519 signature
31+
schemes
32+
- raw, BIP-44, ADR-8 and Ledger's legacy derivation paths
33+
- Node operator features:
34+
- Oasis node inspection and healthchecks
35+
- network governance transactions
36+
- staking reward schedule transactions
37+
- Developer features:
38+
- built-in testing accounts compatible with the Oasis test runner, the Oasis
39+
CI and the official sapphire-dev and emerald-dev Docker images
40+
- Oasis Wasm smart contract code deployment, instantiation, management and
41+
calls
42+
- debugging tools for deployed Wasm contracts
43+
- inspection of blocks, transactions, results and events
44+
45+
[GitHub repository]: https://github.com/oasisprotocol/cli/releases

docs/addressbook.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Address book
3+
description: Storing your blockchain contacts for future use
4+
---
5+
6+
# Address Book
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+
Ethereum-compatible addresses can be stored.
17+
18+
:::info
19+
20+
The name of the address book entry may not clash with any of the account names
21+
in your wallet. The Oasis CLI will prevent you from doing so.
22+
23+
:::
24+
25+
[wallet]: wallet.md
26+
27+
## Add a New Entry {#add}
28+
29+
Use `addressbook add <name> <address>` to name the address and store it in your
30+
address book.
31+
32+
![code shell](../examples/addressbook/00-add-oasis.in)
33+
34+
![code shell](../examples/addressbook/01-add-eth.in)
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+
![code shell](../examples/addressbook/02-transfer.y.in)
41+
42+
![code](../examples/addressbook/02-transfer.y.out)
43+
44+
## List Entries {#list}
45+
46+
You can list all entries in your address book by invoking `addressbook list`.
47+
48+
![code shell](../examples/addressbook/03-list.in)
49+
50+
![code](../examples/addressbook/03-list.out)
51+
52+
## Show Entry Details {#show}
53+
54+
You can check the details such as the native Oasis address of the Ethereum
55+
account or simply check, if an entry exists in the address book, by running
56+
`addressbook show <name>`:
57+
58+
![code shell](../examples/addressbook/04-show-eth.in)
59+
60+
![code](../examples/addressbook/04-show-eth.out)
61+
62+
![code shell](../examples/addressbook/05-show-oasis.in)
63+
64+
![code](../examples/addressbook/05-show-oasis.out)
65+
66+
## Rename an Entry {#rename}
67+
68+
You can always rename the entry in your address book by using
69+
`addressbook rename <old_name> <new_name>`:
70+
71+
![code shell](../examples/addressbook/06-rename.in)
72+
73+
![code shell](../examples/addressbook/07-list.in)
74+
75+
![code](../examples/addressbook/07-list.out)
76+
77+
## Remove an Entry {#remove}
78+
79+
To delete an entry from your address book invoke
80+
`addressbook remove <name>`.
81+
82+
![code shell](../examples/addressbook/09-remove.in)
83+
84+
![code shell](../examples/addressbook/10-list.in)
85+
86+
![code](../examples/addressbook/10-list.out)

0 commit comments

Comments
 (0)