From 236afc1feec15a659e43b7a5120839930d7b257e Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Sun, 29 Oct 2023 19:41:56 -0700 Subject: [PATCH] docs: update guide with pcli init --- docs/guide/src/pcli.md | 5 +--- docs/guide/src/pcli/pclientd.md | 30 ----------------------- docs/guide/src/pcli/wallet.md | 36 ++++++++++++++++++++-------- docs/guide/src/pclientd/configure.md | 2 +- 4 files changed, 28 insertions(+), 45 deletions(-) delete mode 100644 docs/guide/src/pcli/pclientd.md diff --git a/docs/guide/src/pcli.md b/docs/guide/src/pcli.md index c247020c52..3c6ccc2df2 100644 --- a/docs/guide/src/pcli.md +++ b/docs/guide/src/pcli.md @@ -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 diff --git a/docs/guide/src/pcli/pclientd.md b/docs/guide/src/pcli/pclientd.md deleted file mode 100644 index b13bebf2dc..0000000000 --- a/docs/guide/src/pcli/pclientd.md +++ /dev/null @@ -1,30 +0,0 @@ -# Using `pcli` with `pclientd` - -First, export a viewing key from `pcli`: - -```shell -pcli keys export full-viewing-key -``` - -Next, use the FVK it prints to initialize the `pclientd` state: - -```shell -pclientd --home /path/to/state/dir init FVK_STRING -``` - -Finally, run - -```shell -pclientd --home /path/to/state/dir start -``` - -to start the view server, and invoke `pcli` with - -```shell -pcli -v 127.0.0.1:8081 q validator list -``` - -to use it instead of an in-process view service. - -**WARNING: the view service does not currently use transport encryption, so it should -not be used over a public network.** diff --git a/docs/guide/src/pcli/wallet.md b/docs/guide/src/pcli/wallet.md index 014c447914..50cc66cc11 100644 --- a/docs/guide/src/pcli/wallet.md +++ b/docs/guide/src/pcli/wallet.md @@ -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 diff --git a/docs/guide/src/pclientd/configure.md b/docs/guide/src/pclientd/configure.md index acf3fc905f..50f3097ea2 100644 --- a/docs/guide/src/pclientd/configure.md +++ b/docs/guide/src/pclientd/configure.md @@ -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 ```