Skip to content

Commit

Permalink
docs: update guide with pcli init
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Oct 30, 2023
1 parent 41b25c0 commit 236afc1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 45 deletions.
5 changes: 1 addition & 4 deletions docs/guide/src/pcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ This section describes how to use `pcli`, the command line client for Penumbra:

Penumbra is a private blockchain, so the public chain state does not reveal any
private user data. By default, `pcli` includes a _view service_ that
synchronizes with the chain and scans with a viewing key. However, it's also
possible to run the view service as a standalone `pclientd` daemon:

- [Using `pcli` with `pclientd`](./pcli/pclientd.md) describes how to use `pcli` with `pclientd`.
synchronizes with the chain and scans with a viewing key.

### Please submit any feedback and bug reports

Expand Down
30 changes: 0 additions & 30 deletions docs/guide/src/pcli/pclientd.md

This file was deleted.

36 changes: 26 additions & 10 deletions docs/guide/src/pcli/wallet.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
# Generating a Wallet

On first installation of `pcli`, you will need to generate a fresh wallet to use with Penumbra. You
should see something like this:
On first installation of `pcli`, you will need to generate a fresh wallet to use with Penumbra.

The `pcli init` command will generate a configuration file. To generate a new wallet, try:
```bash
$ cargo run --quiet --release --bin pcli keys generate


YOUR PRIVATE SEED PHRASE: [...]
$ cargo run --quiet --release --bin pcli init soft-kms generate
YOUR PRIVATE SEED PHRASE:
[SEED PHRASE]
Save this in a safe place!
DO NOT SHARE WITH ANYONE!
Saving backup wallet to /home/$USER/.local/share/penumbra-testnet-archive/.../custody.json
Writing generated configs to [PATH TO PCLI DATA]
```
This uses the `soft-kms` backend, which saves the generated spend key in the config file.

Alternatively, to import an existing wallet, try
```bash
$ cargo run --quiet --release --bin pcli init soft-kms import-phrase
Enter seed phrase:
Writing generated configs to [PATH TO PCLI DATA]
```

Penumbra's design automatically creates many (`u64::MAX`) publicly unlinkable addresses which all
correspond to your own wallet. When you first created your wallet above, `pcli` initialized all
of your wallet addresses, which you can view like this:
Penumbra's design automatically creates `2^32` (four billion) numbered accounts
controlled by your wallet.

To generate the address for a numbered account, use `pcli view address`:
```bash
$ cargo run --quiet --release --bin pcli view address 0
penumbrav2t1...
```
You can also run `pcli view address` on an address to see which account it corresponds to:
```bash
$ cargo run --quiet --release --bin pcli view address penumbrav2t1...
Address is viewable with this full viewing key. Account index is 0.
```

Addresses are opaque and do not reveal account information. Only you, or someone
who has your viewing key, can decrypt the account information from the address.

### Getting testnet tokens on the [Discord] in the `#testnet-faucet` channel

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/src/pclientd/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To initialize `pclientd` in view mode, run
```
cargo run --release --bin pclientd -- init --view FULL_VIEWING_KEY
```
The `FULL_VIEWING_KEY` can be obtained with `pcli keys export full-viewing-key`.
The `FULL_VIEWING_KEY` can be obtained from the `config.toml` generated by `pcli init`.

To initialize `pclientd` in custody mode, run
```
Expand Down

0 comments on commit 236afc1

Please sign in to comment.