diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 25ab4e27d4..93eb170fa9 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -36,6 +36,9 @@ * [Troubleshooting](running-validator/validator-troubleshoot.md) * [FAQ](running-validator/validator-faq.md) * [Running an Archiver](running-archiver.md) +* [Paper Wallet](paper-wallet/README.md) + * [Creating and Using a Seed Phrase](paper-wallet/keypair.md) + * [Paper Wallet Usage](paper-wallet/usage.md) * [API Reference](api-reference/README.md) * [Transaction](api-reference/transaction-api.md) * [Instruction](api-reference/instruction-api.md) diff --git a/book/src/paper-wallet/README.md b/book/src/paper-wallet/README.md new file mode 100644 index 0000000000..5e4e389167 --- /dev/null +++ b/book/src/paper-wallet/README.md @@ -0,0 +1,29 @@ +# Paper Wallet + +This document describes how to create and use a paper wallet with the Solana CLI +tools. + +{% hint style="info" %} +We do not intend to advise on how to *securely* create or manage paper wallets. +Please research the security concerns carefully. +{% endhint %} + +## Overview + +Solana provides a key generation tool to derive keys from BIP39 compliant seed +phrases. Solana CLI commands for running a validator and staking tokens all +support keypair input via seed phrases. + +To learn more about the BIP39 standard, visit the Bitcoin BIPs Github repository +[here](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). + +## Installation + +The tools used in this guide can all be installed by following the +[Installing the Validator Software](running-validator/validator-software.md) +guide. After installation, you will have access to the `solana`, +`solana-keygen`, and `solana-validator` tools. + +{% page-ref page="paper-wallet/keypair.md" %} + +{% page-ref page="paper-wallet/usage.md" %} diff --git a/book/src/paper-wallet/keypair.md b/book/src/paper-wallet/keypair.md new file mode 100644 index 0000000000..9a85c1b1d4 --- /dev/null +++ b/book/src/paper-wallet/keypair.md @@ -0,0 +1,65 @@ +# Creating a Paper Wallet + +Using the `solana-keygen` tool, it is possible to generate new seed phrases as +well as derive a keypair from an existing seed phrase and (optional) passphrase. +The seed phrase and passphrase can be used together as a paper wallet. As long +as you keep your seed phrase and passphrase stored safely, you can use them to +access your account. + +{% hint style="info" %} +For more information about how seed phrases work, review this +[Bitcoin Wiki page](https://en.bitcoin.it/wiki/Seed_phrase). +{% endhint %} + +## Seed Phrase Generation + +Generating a new keypair can be done using the `solana-keygen new` command. The +command will generate a random seed phrase, ask you to enter an optional +passphrase, and then will display the derived public key and the generated seed +phrase for your paper wallet. + +```bash +solana-keygen new --no-outfile +``` + +{% hint style="warning" %} +If `--no-outfile` is **not** specified, the default behavior is to write the +keypair to `~/.config/solana/id.json` +{% endhint %} + +For full usage details run: + +```bash +solana-keygen new --help +``` + +## Public Key Derivation + +Public keys can be derived from a seed phrase and a passphrase if you choose to +use one. This is useful for using using an offline-generated seed phrase to +derive a valid public key. The `solana-keygen pubkey` command will walk you +through entering your seed phrase and a passphrase if you chose to use one. + +```bash +solana-keygen pubkey ASK +``` + +{% hint style="info" %} +Note that you could potentially use different passphrases for the same seed +phrase. Each unique passphrase will yield a different keypair. +{% endhint %} + +The `solana-keygen` tool assumes the use of the BIP39 standard English word +list. If you chose to deviate from the word list or used a different language +for your seed phrase, you can still derive a valid public key but will need to +explicitly skip seed phrase validation. + +```bash +solana-keygen pubkey ASK --skip-seed-phrase-validation +``` + +For full usage details run: + +```bash +solana-keygen pubkey --help +``` diff --git a/book/src/paper-wallet/usage.md b/book/src/paper-wallet/usage.md new file mode 100644 index 0000000000..5df7e5e2b1 --- /dev/null +++ b/book/src/paper-wallet/usage.md @@ -0,0 +1,11 @@ +# Paper Wallet Usage + +Solana commands can be run without ever saving a keypair to disk on a machine. If avoiding writing a private key to disk is a security concern of yours, you've come to the right place. + +{% hint style="warning" %} +Even using this secure input method, it's still possible that a private key gets written to disk by unencrypted memory swaps. It is the user's responsibility to protect against this scenario. +{% endhint %} + +--- + +{% page-ref page="api-reference/cli.md" %}