Skip to content

Commit 7d2788c

Browse files
committed
docs: Replace oasis-node CLI with oasis CLI docs
1 parent 21b32ed commit 7d2788c

12 files changed

Lines changed: 208 additions & 37 deletions

File tree

docs/general/manage-tokens/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For your own security and peace of mind, please only use wallets that are listed
2525
findSidebarItem('/general/manage-tokens/terminology'),
2626
findSidebarItem('/general/manage-tokens/staking-and-delegating'),
2727
findSidebarItem('/general/manage-tokens/oasis-wallets/'),
28-
findSidebarItem('/general/manage-tokens/advanced/oasis-cli-tools/'),
28+
findSidebarItem('/general/manage-tokens/cli/'),
2929
findSidebarItem('/general/manage-tokens/holding-rose-tokens/custody-providers'),
3030
findSidebarItem('/general/manage-tokens/holding-rose-tokens/bitpie-wallet'),
3131
findSidebarItem('/general/manage-tokens/holding-rose-tokens/ledger-wallet'),

docs/general/manage-tokens/advanced/oasis-cli-tools/setup.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ To run a command that requires a connection to an online Oasis node (i.e. the `s
1111

1212
Here are some examples of Oasis Node CLI commands that need a connection to an online Oasis node:
1313

14-
* `oasis-node stake info`: Shows general staking information.
15-
* `oasis-node stake list`: Lists all accounts with positive balance.
16-
* `oasis-node stake account info`: Shows detailed information for an account.
17-
* `oasis-node consensus submit_tx`: Submits a pre-generated transaction to the network.
14+
1815

1916
## Local commands
2017

docs/general/manage-tokens/advanced/oasis-cli-tools/transfer-tokens.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ Escrow Account:
8282
...
8383
```
8484

85-
We can observe that both, the general account and the escrow account (actively bounded and debonding), have a balance of 0 tokens.
85+
We can observe that both, the general account and the escrow account (actively
86+
bounded and debonding), have a balance of 0 tokens.
8687

8788
## Generate a Transfer Transaction
8889

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

docs/general/manage-tokens/advanced/oasis-cli-tools/deposit-withdraw-tokens-to-from-paratime.mdx renamed to docs/general/manage-tokens/cli/acccounts.mdx

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
import DocCard from '@theme/DocCard';
22
import {findSidebarItem} from '@site/src/sidebarUtils';
33

4-
# Deposit/Withdraw Tokens to/from ParaTime
4+
# Account transactions
55

6-
To perform ParaTime deposits or withdrawals using a command line interface, you will need `oasis` executable which is part of the [Oasis CLI](https://github.com/oasisprotocol/oasis-sdk/tree/main/cli). `oasis` is supplemental to `oasis-node` and supports ParaTime-related operations such as deposits, withdrawals, transfers and manipulation of the smart contracts, in contrast to `oasis-node` which only supports consensus layer features.
6+
## Transfer
77

8-
We will assume that your already have an Oasis wallet with some ROSE and that you want to Deposit or Withdraw ROSE to or from Emerald ParaTime running on the Mainnet network.
8+
TODO
99

10-
:::info
11-
12-
At time of writing, no precompiled `oasis` binaries are available. You will need to clone the [`oasis-sdk` git repository](https://github.com/oasisprotocol/oasis-sdk/) and compile the tool yourself. The process is straight forward - just follow the [Readme](https://github.com/oasisprotocol/oasis-sdk/blob/main/cli/README.md).
13-
14-
:::
15-
16-
:::info
17-
18-
This chapter describes the command line interface for depositing and withdrawing ROSE which is tailored toward advanced users such as node operators. If you are interested in the end-user wallets with a graphical user interface, consult the [How to Transfer ROSE into a ParaTime](../../how-to-transfer-rose-into-paratime.mdx) chapter.
19-
20-
:::
21-
22-
## Import your wallet
23-
24-
To sign any transaction you will need to import an Oasis wallet. Prepare your base64-encoded private key or the BIP39 mnemonic of your Oasis account and run:
25-
26-
```
27-
oasis wallet import <SOME_WALLET_NAME>
28-
```
29-
30-
Follow the interactive instructions that will guide you through the import procedure. If this is the first time you are running `oasis`, the imported wallet will become your default wallet and transactions will be signed with the key stored in this wallet, if not otherwise specified with the `--wallet` parameter.
31-
32-
## Configure Allowance
10+
## Allowance
3311

3412
In order to deposit ROSE to a ParaTime, you will first need to grant the ParaTime access to your Oasis account on the consensus layer. The following command allows Emerald to access up to 100 ROSE stored on your Oasis account which you will deposit afterwards:
3513

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Setup
2+
3+
## Download and Run
4+
5+
Download the latest release [here][cli-releases] and extract it to your
6+
favorite application folder.
7+
8+
:::info
9+
10+
Oasis is currently providing official builds for x86 Linux only. If you want
11+
to run it on another platform, you will have to [build it from source][cli-source].
12+
13+
:::
14+
15+
Run the Oasis CLI by typing `oasis`.
16+
17+
:::info
18+
19+
We suggest that you move into or put a symbolic link to `oasis` binary in your
20+
system path, so you can access it globally.
21+
22+
:::
23+
24+
Running Oasis CLI for the first time will generate a configuration file and
25+
populate it with the current Mainnet and Testnet networks. It will also
26+
configure all [Oasis-supported ParaTimes][paratimes].
27+
28+
## Configuration
29+
30+
The configuration folder of Oasis CLI is located:
31+
32+
- on Windows:
33+
- `%USERPROFILE%\AppData\Roaming\Oasis\`
34+
- on macOS:
35+
- `/Users/$USER/Library/Application Support/Oasis/`
36+
- on Linux:
37+
- `$HOME/.config/oasis/`
38+
39+
There, you will find `cli.toml` which contains configuration of the networks,
40+
ParaTimes and your wallet. Additionally, each file-based account in your wallet
41+
will have a separate, password-encrypted `.toml` file in the same folder named
42+
after the name of the account.
43+
44+
[cli-releases]: https://github.com/oasisprotocol/cli/releases
45+
[cli-source]: https://github.com/oasisprotocol/cli
46+
[paratimes]: ../../../dapp/README.mdx
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Wallet Management
2+
3+
`oasis wallet` command is used to manage your file-based or hardware wallet
4+
accounts. Oasis CLI supports the following account kinds:
5+
6+
- `ed25519-adr8`: Ed25519 keypair using [ADR-8] derivation path to obtain
7+
a private key from mnemonic. This is the default setting suitable for
8+
accounts on the Oasis consensus layer.
9+
- `secp256k1-bip44`: Secp256k1 Ethereum-compatible keypair using [BIP-44]
10+
with ETH coin type to derive a private key. This setting is
11+
used for accounts living on EVM-compatible ParaTimes. The same account can
12+
be imported into Metamask and other Ethereum wallets.
13+
- `ed25519-legacy`: Ed25519 keypair using a legacy 5-component derivation path.
14+
This is the preferred kind for Oasis accounts stored on
15+
a hardware wallet like Ledger. It is called legacy, because it was
16+
implemented before [ADR-8] was standardized.
17+
- `ed25519-raw` and `secp256k1-raw`: Ed25519 and Secp256k1 respective keypairs
18+
imported directly from Base32 or Hex-encoded private key. These kinds
19+
do not use a derivation path.
20+
21+
:::tip
22+
23+
For compatibility with Ethereum, each `secp256k1` account has two addresses:
24+
25+
- 20-byte hex-encoded Ethereum-compatible address, e.g. `0xDCbF59bbcC0B297F1729adB23d7a5D721B481BA9`
26+
- Bech32-encoded Oasis native address, e.g. `oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl`.
27+
28+
There exists a mapping from Ethereum address to the native Oasis address as in
29+
the example above, but there is no reverse mapping.
30+
31+
:::
32+
33+
[ADR-8]: ../../../adrs/0008-standard-account-key-generation.md
34+
[BIP-44]: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
35+
36+
## Create or Import wallet
37+
38+
`oasis wallet create` will generate a new mnemonic and derive a keypair for
39+
you. For optimal security, you can connect your Ledger wallet and create an
40+
account which uses a private key stored on the hardware wallet.
41+
42+
If you already have a mnemonic or a raw private key, you can import it
43+
as a new account by running `oasis wallet import`. You will then need to
44+
provide a mnemonic or the raw private key in the corresponding format.
45+
46+
## View wallets
47+
48+
You can list all available wallets with `oasis wallet list`:
49+
50+
```
51+
$ oasis wallet list
52+
ACCOUNT KIND ADDRESS
53+
emerald_test file (secp256k1-raw) oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl
54+
john file (ed25519-raw) oasis1qrec770vrek0a9a5lcrv0zvt22504k68svq7kzve
55+
oasis_hackathon file (ed25519-adr8:0) oasis1qptx7ytle3xlccyvk9w27f47jq4pfqxrug2dzwtv
56+
sapphire_test file (secp256k1-raw) oasis1qpupfu7e2n6pkezeaw0yhj8mcem8anj64ytrayne
57+
sapphire_tictactoe1 file (secp256k1-bip44:0) oasis1qqd333zt6lrx734szrcay2cjzek9uumlf5rrmmr7
58+
sapphire_tictactoe2 file (secp256k1-bip44:1) oasis1qrk58a6j2qn065m6p06jgjyt032f7qucy5wqeqpt
59+
```
60+
61+
Above, you can see native Oasis addresses of all local accounts. You can see
62+
the public key of an account and for `secp256k1` accounts their Ethereum
63+
addresses by using `oasis wallet show`:
64+
65+
```
66+
$ oasis wallet show emerald_test
67+
Unlock your account.
68+
? Passphrase:
69+
Name: emerald_test
70+
Public Key: A8JDpTiCnrq+zFUsAHrHY/xuFVsyt48sC1Srkp62r7Yx
71+
Ethereum address: 0xDCbF59bbcC0B297F1729adB23d7a5D721B481BA9
72+
Native address: oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl
73+
```
74+
75+
To print the account's mnemonic or the private key, run `oasis wallet export`:
76+
77+
```
78+
$ oasis wallet export emerald_test
79+
WARNING: Exporting the account will expose secret key material!
80+
Unlock your account.
81+
? Passphrase:
82+
Name: eth_0
83+
Public Key: A8JDpTiCnrq+zFUsAHrHY/xuFVsyt48sC1Srkp62r7Yx
84+
Ethereum address: 0xDCbF59bbcC0B297F1729adB23d7a5D721B481BA9
85+
Native address: oasis1qq3agel5x07pxz08ns3d2y7sjrr3xf9paquhhhzl
86+
Export:
87+
0x0b5e6994430f9d3a5b6619b97e6af146b88f06457372764b36cdcff10c1c64f8
88+
```
89+
90+
## Test wallets
91+
92+
Oasis CLI comes with the following hardcoded testing accounts:
93+
94+
- `test:alice`: Ed25519 test account by Oasis core tests
95+
- `test:bob`: Ed25519 test account by Oasis core tests
96+
- `test:charlie`: Secp256k1 test account
97+
- `test:cory`: Ed25519 account used by `oasis-net-runner`
98+
- `test:dave`: Secp256k1 test account
99+
- `test:erin`: Sr25519 test account
100+
- `test:frank`: Sr25519 test account
101+
102+
Those accounts are often used for your Localnet development or when
103+
reporting bugs to oasis-core team for reproducibility. You can access the
104+
private key of a test account the same way as you would for ordinary accounts
105+
by running `oasis wallet export` command.
106+
107+
[oasis-core]: https://github.com/oasisprotocol/oasis-core

docs/general/manage-tokens/holding-rose-tokens/ledger-wallet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,4 @@ Ledger is supported by the Oasis CLI. Follow the instructions in the
158158
[Nano S Plus]: https://support.ledger.com/hc/en-us/articles/4445777839901-Update-Ledger-Nano-S-Plus-firmware
159159
[BIP 39]: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
160160
[Oasis Wallets]: ../oasis-wallets/README.mdx
161-
[Oasis CLI Tools]: ../advanced/oasis-cli-tools/README.md
161+
[Oasis CLI Tools]: ../cli/README.md

docs/general/manage-tokens/how-to-transfer-rose-into-paratime.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ learn how to use Oasis CLI instead.
198198

199199
:::
200200

201-
[Oasis CLI]: advanced/oasis-cli-tools/deposit-withdraw-tokens-to-from-paratime.mdx
201+
[Oasis CLI]: cli/deposit-withdraw.mdx
202202

203203
### Verifying ParaTime deposits and withdrawals
204204

@@ -233,5 +233,5 @@ addresses, Token Transfers, Contract Calls, etc.), you have to use the
233233
findSidebarItem('/dapp/emerald/writing-dapps-on-emerald'),
234234
findSidebarItem('/dapp/sapphire/quickstart'),
235235
findSidebarItem('/dapp/cipher/'),
236-
findSidebarItem('/general/manage-tokens/advanced/oasis-cli-tools/deposit-withdraw-tokens-to-from-paratime')
236+
findSidebarItem('/general/manage-tokens/cli/deposit-withdraw')
237237
]} />

docs/node/run-your-node/paratime-node.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ No manual node registration is necessary.
179179

180180
:::info
181181

182-
ParaTime rewards for running the compute node will be sent to your entity address **inside the ParaTime**. To access the rewards on the consensus layer, you will need to withdraw them first. Read the [Deposit/Withdraw Tokens to/from ParaTime](../../general/manage-tokens/advanced/oasis-cli-tools/deposit-withdraw-tokens-to-from-paratime.mdx) chapter to learn more.
182+
ParaTime rewards for running the compute node will be sent to your entity address **inside the ParaTime**. To access the rewards on the consensus layer, you will need to withdraw them first. Read the [Deposit/Withdraw Tokens to/from ParaTime](../../general/manage-tokens/cli/deposit-withdraw.mdx) chapter to learn more.
183183

184184
:::
185185

0 commit comments

Comments
 (0)