split wallet staking commands (#6168)
* split wallet staking commands * elide real home * unit->UNIT for usage * unit->UNIT, don't try to run SUBCOMMANDS: ;) * more fixup * fixups * actually check * shellcheck * preserve #6158 after rebase * fixup * test * too hard * remove test
This commit is contained in:
34
book/build-cli-usage.sh
Executable file
34
book/build-cli-usage.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
usage=$(cargo -q run -p solana-cli -- -C ~/.foo --help | sed 's|'"$HOME"'|~|g')
|
||||
|
||||
out=${1:-src/api-reference/cli.md}
|
||||
|
||||
cat src/api-reference/.cli.md > "$out"
|
||||
|
||||
section() {
|
||||
declare mark=${2:-"###"}
|
||||
declare section=$1
|
||||
read -r name rest <<<"$section"
|
||||
|
||||
printf '%s %s
|
||||
' "$mark" "$name"
|
||||
printf '```text
|
||||
%s
|
||||
```
|
||||
|
||||
' "$section"
|
||||
}
|
||||
|
||||
section "$usage" >> "$out"
|
||||
|
||||
in_subcommands=0
|
||||
while read -r subcommand rest; do
|
||||
[[ $subcommand == "SUBCOMMANDS:" ]] && in_subcommands=1 && continue
|
||||
if ((in_subcommands)); then
|
||||
section "$(cargo -q run -p solana-cli -- help "$subcommand" | sed 's|'"$HOME"'|~|g')" "####" >> "$out"
|
||||
fi
|
||||
done <<<"$usage">>"$out"
|
177
book/src/api-reference/.cli.md
Normal file
177
book/src/api-reference/.cli.md
Normal file
@@ -0,0 +1,177 @@
|
||||
# solana CLI
|
||||
|
||||
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
|
||||
|
||||
## Examples
|
||||
|
||||
### Get Pubkey
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana address
|
||||
|
||||
// Return
|
||||
<PUBKEY>
|
||||
```
|
||||
|
||||
### Airdrop SOL/Lamports
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana airdrop 2
|
||||
|
||||
// Return
|
||||
"2.00000000 SOL"
|
||||
|
||||
// Command
|
||||
$ solana airdrop 123 --lamports
|
||||
|
||||
// Return
|
||||
"123 lamports"
|
||||
```
|
||||
|
||||
### Get Balance
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana balance
|
||||
|
||||
// Return
|
||||
"3.00050001 SOL"
|
||||
```
|
||||
|
||||
### Confirm Transaction
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana confirm <TX_SIGNATURE>
|
||||
|
||||
// Return
|
||||
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
|
||||
```
|
||||
|
||||
### Deploy program
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana deploy <PATH>
|
||||
|
||||
// Return
|
||||
<PROGRAM_ID>
|
||||
```
|
||||
|
||||
### Unconditional Immediate Transfer
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
```
|
||||
|
||||
### Post-Dated Transfer
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
|
||||
```
|
||||
|
||||
_`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's private key_
|
||||
|
||||
### Authorized Transfer
|
||||
|
||||
A third party must send a signature to unlock the lamports.
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
|
||||
```
|
||||
|
||||
### Post-Dated and Authorized Transfer
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
|
||||
```
|
||||
|
||||
### Multiple Witnesses
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY> \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
|
||||
```
|
||||
|
||||
### Cancelable Transfer
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY> \
|
||||
--cancelable
|
||||
|
||||
// Return
|
||||
{signature: <TX_SIGNATURE>, processId: <PROCESS_ID>}
|
||||
```
|
||||
|
||||
### Cancel Transfer
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana cancel <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
```
|
||||
|
||||
### Send Signature
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana send-signature <PUBKEY> <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
```
|
||||
|
||||
### Indicate Elapsed Time
|
||||
|
||||
Use the current system time:
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
```
|
||||
|
||||
Or specify some other arbitrary timestamp:
|
||||
|
||||
```bash
|
||||
// Command
|
||||
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
```
|
||||
|
||||
## Usage
|
@@ -175,12 +175,13 @@ $ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### solana-cli
|
||||
```text
|
||||
solana 0.12.0
|
||||
solana-cli 0.20.0
|
||||
Blockchain, Rebuilt for Scale
|
||||
|
||||
USAGE:
|
||||
solana [FLAGS] [OPTIONS] [SUBCOMMAND]
|
||||
solana [OPTIONS] <SUBCOMMAND>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -194,13 +195,13 @@ OPTIONS:
|
||||
SUBCOMMANDS:
|
||||
address Get your public key
|
||||
airdrop Request lamports
|
||||
authorize-voter Authorize a new vote signing keypair for the given vote account
|
||||
balance Get your balance
|
||||
cancel Cancel a transfer
|
||||
claim-storage-reward Redeem storage reward credits
|
||||
cluster-version Get the version of the cluster entrypoint
|
||||
confirm Confirm transaction by signature
|
||||
create-replicator-storage-account Create a replicator storage account
|
||||
create-stake-account Create a stake account
|
||||
create-storage-mining-pool-account Create mining pool account
|
||||
create-validator-storage-account Create a validator storage account
|
||||
create-vote-account Create a vote account
|
||||
@@ -222,12 +223,18 @@ SUBCOMMANDS:
|
||||
show-stake-account Show the contents of a stake account
|
||||
show-storage-account Show the contents of a storage account
|
||||
show-vote-account Show the contents of a vote account
|
||||
stake-authorize-staker Authorize a new stake signing keypair for the given stake account
|
||||
stake-authorize-withdrawer Authorize a new withdraw signing keypair for the given stake account
|
||||
uptime Show the uptime of a validator, based on epoch voting history
|
||||
validator-info Publish/get Validator info on Solana
|
||||
vote-authorize-voter Authorize a new vote signing keypair for the given vote account
|
||||
vote-authorize-withdrawer Authorize a new withdraw signing keypair for the given vote account
|
||||
withdraw-stake Withdraw the unstaked lamports from the stake account
|
||||
```
|
||||
|
||||
#### solana-address
|
||||
```text
|
||||
solana-address
|
||||
solana-address
|
||||
Get your public key
|
||||
|
||||
USAGE:
|
||||
@@ -243,19 +250,20 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-airdrop
|
||||
```text
|
||||
solana-airdrop
|
||||
Request a batch of lamports
|
||||
solana-airdrop
|
||||
Request lamports
|
||||
|
||||
USAGE:
|
||||
solana airdrop [OPTIONS] <AMOUNT> [unit]
|
||||
solana airdrop [OPTIONS] <AMOUNT> [UNIT]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
--drone-host <HOST> Drone host to use [default: the --url host]
|
||||
--drone-port <PORT> Drone port to use [default: 9900]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
@@ -263,33 +271,12 @@ OPTIONS:
|
||||
|
||||
ARGS:
|
||||
<AMOUNT> The airdrop amount to request (default unit SOL)
|
||||
<unit> Specify unit to use for request and balance display [possible values: SOL, lamports]
|
||||
<UNIT> Specify unit to use for request and balance display [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
#### solana-balance
|
||||
```text
|
||||
solana-authorize-voter
|
||||
Authorize a new vote signing keypair for the given vote account
|
||||
|
||||
USAGE:
|
||||
solana authorize-voter [OPTIONS] <VOTE ACCOUNT PUBKEY> <CURRENT VOTER KEYPAIR FILE> <NEW VOTER PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account in which to set the authorized voter
|
||||
<CURRENT VOTER KEYPAIR FILE> Keypair file for the currently authorized vote signer
|
||||
<NEW VOTER PUBKEY> New vote signer to authorize
|
||||
```
|
||||
|
||||
```text
|
||||
solana-balance
|
||||
solana-balance
|
||||
Get your balance
|
||||
|
||||
USAGE:
|
||||
@@ -309,8 +296,9 @@ ARGS:
|
||||
<PUBKEY> The public key of the balance to check
|
||||
```
|
||||
|
||||
#### solana-cancel
|
||||
```text
|
||||
solana-cancel
|
||||
solana-cancel
|
||||
Cancel a transfer
|
||||
|
||||
USAGE:
|
||||
@@ -329,8 +317,9 @@ ARGS:
|
||||
<PROCESS ID> The process id of the transfer to cancel
|
||||
```
|
||||
|
||||
#### solana-claim-storage-reward
|
||||
```text
|
||||
solana-claim-storage-reward
|
||||
solana-claim-storage-reward
|
||||
Redeem storage reward credits
|
||||
|
||||
USAGE:
|
||||
@@ -350,8 +339,9 @@ ARGS:
|
||||
<STORAGE ACCOUNT PUBKEY> Storage account address to redeem credits for
|
||||
```
|
||||
|
||||
#### solana-cluster-version
|
||||
```text
|
||||
solana-cluster-version
|
||||
solana-cluster-version
|
||||
Get the version of the cluster entrypoint
|
||||
|
||||
USAGE:
|
||||
@@ -367,8 +357,9 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-confirm
|
||||
```text
|
||||
solana-confirm
|
||||
solana-confirm
|
||||
Confirm transaction by signature
|
||||
|
||||
USAGE:
|
||||
@@ -387,8 +378,9 @@ ARGS:
|
||||
<SIGNATURE> The transaction signature to confirm
|
||||
```
|
||||
|
||||
#### solana-create-replicator-storage-account
|
||||
```text
|
||||
solana-create-replicator-storage-account
|
||||
solana-create-replicator-storage-account
|
||||
Create a replicator storage account
|
||||
|
||||
USAGE:
|
||||
@@ -404,34 +396,64 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STORAGE ACCOUNT OWNER PUBKEY>
|
||||
<STORAGE ACCOUNT PUBKEY>
|
||||
<STORAGE ACCOUNT OWNER PUBKEY>
|
||||
<STORAGE ACCOUNT PUBKEY>
|
||||
```
|
||||
|
||||
#### solana-create-stake-account
|
||||
```text
|
||||
solana-create-storage-mining-pool-account
|
||||
Create mining pool account
|
||||
solana-create-stake-account
|
||||
Create a stake account
|
||||
|
||||
USAGE:
|
||||
solana create-storage-mining-pool-account [OPTIONS] <STORAGE ACCOUNT PUBKEY> <AMOUNT> [unit]
|
||||
solana create-stake-account [OPTIONS] <STAKE ACCOUNT> <AMOUNT> [UNIT]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
|
||||
--authorized-staker <PUBKEY> Public key of authorized staker (defaults to wallet)
|
||||
--authorized-withdrawer <PUBKEY> Public key of the authorized withdrawer (defaults to wallet)
|
||||
-C, --config <PATH> Configuration file to use [default:
|
||||
~/.config/solana/wallet/config.yml]
|
||||
--custodian <PUBKEY> Identity of the custodian (can withdraw before lockup expires)
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
--lockup <SLOT> The slot height at which this account will be available for withdrawal
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT> Address of the stake account to fund (pubkey or keypair)
|
||||
<AMOUNT> The amount of send to the vote account (default unit SOL)
|
||||
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
#### solana-create-storage-mining-pool-account
|
||||
```text
|
||||
solana-create-storage-mining-pool-account
|
||||
Create mining pool account
|
||||
|
||||
USAGE:
|
||||
solana create-storage-mining-pool-account [OPTIONS] <STORAGE ACCOUNT PUBKEY> <AMOUNT> [UNIT]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STORAGE ACCOUNT PUBKEY> Storage mining pool account address to fund
|
||||
<AMOUNT> The amount to assign to the storage mining pool account (default unit SOL)
|
||||
<unit> Specify unit to use for request [possible values: SOL, lamports]
|
||||
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
#### solana-create-validator-storage-account
|
||||
```text
|
||||
solana-create-validator-storage-account
|
||||
solana-create-validator-storage-account
|
||||
Create a validator storage account
|
||||
|
||||
USAGE:
|
||||
@@ -447,39 +469,45 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STORAGE ACCOUNT OWNER PUBKEY>
|
||||
<STORAGE ACCOUNT PUBKEY>
|
||||
<STORAGE ACCOUNT OWNER PUBKEY>
|
||||
<STORAGE ACCOUNT PUBKEY>
|
||||
```
|
||||
|
||||
#### solana-create-vote-account
|
||||
```text
|
||||
solana-create-vote-account
|
||||
solana-create-vote-account
|
||||
Create a vote account
|
||||
|
||||
USAGE:
|
||||
solana create-vote-account [OPTIONS] <VOTE ACCOUNT PUBKEY> <VALIDATOR PUBKEY> <LAMPORTS>
|
||||
solana create-vote-account [OPTIONS] <VOTE ACCOUNT PUBKEY> <VALIDATOR PUBKEY> <AMOUNT> [UNIT]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
--commission <NUM> The commission taken on reward redemption (0-255), default: 0
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
--authorized-voter <PUBKEY> Public key of the authorized voter (defaults to vote account)
|
||||
--authorized-withdrawer <PUBKEY> Public key of the authorized withdrawer (defaults to wallet)
|
||||
--commission <NUM> The commission taken on reward redemption (0-255), default: 0
|
||||
-C, --config <PATH> Configuration file to use [default:
|
||||
~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account address to fund
|
||||
<VALIDATOR PUBKEY> Validator that will vote with this account
|
||||
<LAMPORTS> The amount of lamports to send to the vote account
|
||||
<AMOUNT> The amount of send to the vote account (default unit SOL)
|
||||
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
#### solana-deactivate-stake
|
||||
```text
|
||||
solana-deactivate-stake
|
||||
solana-deactivate-stake
|
||||
Deactivate the delegated stake from the stake account
|
||||
|
||||
USAGE:
|
||||
solana deactivate-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <PUBKEY>
|
||||
solana deactivate-stake [OPTIONS] <STAKE ACCOUNT> <VOTE ACCOUNT>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -491,35 +519,35 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the stake account, for signing the delegate transaction.
|
||||
<PUBKEY> The vote account to which the stake is currently delegated
|
||||
<STAKE ACCOUNT> Stake account to be deactivated.
|
||||
<VOTE ACCOUNT> The vote account to which the stake is currently delegated
|
||||
```
|
||||
|
||||
#### solana-delegate-stake
|
||||
```text
|
||||
solana-delegate-stake
|
||||
solana-delegate-stake
|
||||
Delegate stake to a vote account
|
||||
|
||||
USAGE:
|
||||
solana delegate-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <VOTE ACCOUNT PUBKEY> <AMOUNT> [unit]
|
||||
solana delegate-stake [OPTIONS] <STAKE ACCOUNT> <VOTE ACCOUNT>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the new stake account
|
||||
<VOTE ACCOUNT PUBKEY> The vote account to which the stake will be delegated
|
||||
<AMOUNT> The amount to delegate (default unit SOL)
|
||||
<unit> Specify unit to use for request [possible values: SOL, lamports]
|
||||
<STAKE ACCOUNT> Stake account to delegate
|
||||
<VOTE ACCOUNT> The vote account to which the stake will be delegated
|
||||
```
|
||||
|
||||
#### solana-deploy
|
||||
```text
|
||||
solana-deploy
|
||||
solana-deploy
|
||||
Deploy a program
|
||||
|
||||
USAGE:
|
||||
@@ -538,8 +566,9 @@ ARGS:
|
||||
<PATH TO PROGRAM> /path/to/program.o
|
||||
```
|
||||
|
||||
#### solana-fees
|
||||
```text
|
||||
solana-fees
|
||||
solana-fees
|
||||
Display current cluster fees
|
||||
|
||||
USAGE:
|
||||
@@ -555,8 +584,9 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-get
|
||||
```text
|
||||
solana-get
|
||||
solana-get
|
||||
Get wallet config settings
|
||||
|
||||
USAGE:
|
||||
@@ -575,8 +605,9 @@ ARGS:
|
||||
<CONFIG_FIELD> Return a specific config setting [possible values: url, keypair]
|
||||
```
|
||||
|
||||
#### solana-get-slot
|
||||
```text
|
||||
solana-get-slot
|
||||
solana-get-slot
|
||||
Get current slot
|
||||
|
||||
USAGE:
|
||||
@@ -592,8 +623,9 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-get-transaction-count
|
||||
```text
|
||||
solana-get-transaction-count
|
||||
solana-get-transaction-count
|
||||
Get current transaction count
|
||||
|
||||
USAGE:
|
||||
@@ -609,21 +641,34 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-help
|
||||
```text
|
||||
solana-pay
|
||||
solana-help
|
||||
Prints this message or the help of the given subcommand(s)
|
||||
|
||||
USAGE:
|
||||
solana help [subcommand]...
|
||||
|
||||
ARGS:
|
||||
<subcommand>... The subcommand whose help message to display
|
||||
```
|
||||
|
||||
#### solana-pay
|
||||
```text
|
||||
solana-pay
|
||||
Send a payment
|
||||
|
||||
USAGE:
|
||||
solana pay [FLAGS] [OPTIONS] <PUBKEY> <AMOUNT> [--] [unit]
|
||||
solana pay [FLAGS] [OPTIONS] <PUBKEY> <AMOUNT> [--] [UNIT]
|
||||
|
||||
FLAGS:
|
||||
--cancelable
|
||||
--cancelable
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default:
|
||||
/Users/tyeraeulberg/.config/solana/wallet/config.yml]
|
||||
~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
--after <DATETIME> A timestamp after which transaction will execute
|
||||
@@ -631,13 +676,14 @@ OPTIONS:
|
||||
--require-signature-from <PUBKEY>... Any third party signatures required to unlock the lamports
|
||||
|
||||
ARGS:
|
||||
<PUBKEY> The public key of recipient
|
||||
<PUBKEY> The pubkey of recipient
|
||||
<AMOUNT> The amount to send (default unit SOL)
|
||||
<unit> Specify unit to use for request [possible values: SOL, lamports]
|
||||
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
#### solana-ping
|
||||
```text
|
||||
solana-ping
|
||||
solana-ping
|
||||
Submit transactions sequentially
|
||||
|
||||
USAGE:
|
||||
@@ -648,8 +694,7 @@ FLAGS:
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default:
|
||||
~/.config/solana/wallet/config.yml]
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-c, --count <NUMBER> Stop after submitting count transactions
|
||||
-i, --interval <SECONDS> Wait interval seconds between submitting the next transaction [default: 2]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
@@ -657,12 +702,13 @@ OPTIONS:
|
||||
-t, --timeout <SECONDS> Wait up to timeout seconds for transaction confirmation [default: 10]
|
||||
```
|
||||
|
||||
#### solana-redeem-vote-credits
|
||||
```text
|
||||
solana-redeem-vote-credits
|
||||
solana-redeem-vote-credits
|
||||
Redeem credits in the stake account
|
||||
|
||||
USAGE:
|
||||
solana redeem-vote-credits [OPTIONS] <STAKING ACCOUNT PUBKEY> <VOTE ACCOUNT PUBKEY>
|
||||
solana redeem-vote-credits [OPTIONS] <STAKE ACCOUNT> <VOTE ACCOUNT>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -674,12 +720,13 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKING ACCOUNT PUBKEY> Staking account address to redeem credits for
|
||||
<VOTE ACCOUNT PUBKEY> The vote account to which the stake was previously delegated.
|
||||
<STAKE ACCOUNT> Address of the stake account in which to redeem credits
|
||||
<VOTE ACCOUNT> The vote account to which the stake is currently delegated.
|
||||
```
|
||||
|
||||
#### solana-send-signature
|
||||
```text
|
||||
solana-send-signature
|
||||
solana-send-signature
|
||||
Send a signature to authorize a transfer
|
||||
|
||||
USAGE:
|
||||
@@ -695,12 +742,13 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<PUBKEY> The public key of recipient
|
||||
<PUBKEY> The pubkey of recipient
|
||||
<PROCESS ID> The process id of the transfer to authorize
|
||||
```
|
||||
|
||||
#### solana-send-timestamp
|
||||
```text
|
||||
solana-send-timestamp
|
||||
solana-send-timestamp
|
||||
Send a timestamp to unlock a transfer
|
||||
|
||||
USAGE:
|
||||
@@ -717,12 +765,13 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<PUBKEY> The public key of recipient
|
||||
<PUBKEY> The pubkey of recipient
|
||||
<PROCESS ID> The process id of the transfer to unlock
|
||||
```
|
||||
|
||||
#### solana-set
|
||||
```text
|
||||
solana-set
|
||||
solana-set
|
||||
Set a wallet config setting
|
||||
|
||||
USAGE:
|
||||
@@ -738,8 +787,9 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
```
|
||||
|
||||
#### solana-show-account
|
||||
```text
|
||||
solana-show-account
|
||||
solana-show-account
|
||||
Show the contents of an account
|
||||
|
||||
USAGE:
|
||||
@@ -757,19 +807,21 @@ OPTIONS:
|
||||
-o, --output <FILE> Write the account data to this file
|
||||
|
||||
ARGS:
|
||||
<ACCOUNT PUBKEY> Account public key
|
||||
<ACCOUNT PUBKEY> Account pubkey
|
||||
```
|
||||
|
||||
#### solana-show-stake-account
|
||||
```text
|
||||
solana-show-stake-account
|
||||
solana-show-stake-account
|
||||
Show the contents of a stake account
|
||||
|
||||
USAGE:
|
||||
solana show-stake-account [OPTIONS] <STAKE ACCOUNT PUBKEY>
|
||||
solana show-stake-account [FLAGS] [OPTIONS] <STAKE ACCOUNT>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
-h, --help Prints help information
|
||||
--lamports Display balance in lamports instead of SOL
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
@@ -777,11 +829,12 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT PUBKEY> Stake account public key
|
||||
<STAKE ACCOUNT> Address of the stake account to display
|
||||
```
|
||||
|
||||
#### solana-show-storage-account
|
||||
```text
|
||||
solana-show-storage-account
|
||||
solana-show-storage-account
|
||||
Show the contents of a storage account
|
||||
|
||||
USAGE:
|
||||
@@ -797,15 +850,38 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STORAGE ACCOUNT PUBKEY> Storage account public key
|
||||
<STORAGE ACCOUNT PUBKEY> Storage account pubkey
|
||||
```
|
||||
|
||||
#### solana-show-vote-account
|
||||
```text
|
||||
solana-show-vote-account
|
||||
solana-show-vote-account
|
||||
Show the contents of a vote account
|
||||
|
||||
USAGE:
|
||||
solana show-vote-account [OPTIONS] <VOTE ACCOUNT PUBKEY>
|
||||
solana show-vote-account [FLAGS] [OPTIONS] <VOTE ACCOUNT PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
--lamports Display balance in lamports instead of SOL
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account pubkey
|
||||
```
|
||||
|
||||
#### solana-stake-authorize-staker
|
||||
```text
|
||||
solana-stake-authorize-staker
|
||||
Authorize a new stake signing keypair for the given stake account
|
||||
|
||||
USAGE:
|
||||
solana stake-authorize-staker [OPTIONS] <STAKE ACCOUNT> <AUTHORIZE PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -817,11 +893,58 @@ OPTIONS:
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account public key
|
||||
<STAKE ACCOUNT> Stake account in which to set the authorized staker
|
||||
<AUTHORIZE PUBKEY> New authorized staker
|
||||
```
|
||||
|
||||
#### solana-stake-authorize-withdrawer
|
||||
```text
|
||||
solana-validator-info
|
||||
solana-stake-authorize-withdrawer
|
||||
Authorize a new withdraw signing keypair for the given stake account
|
||||
|
||||
USAGE:
|
||||
solana stake-authorize-withdrawer [OPTIONS] <STAKE ACCOUNT> <AUTHORIZE PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT> Stake account in which to set the authorized withdrawer
|
||||
<AUTHORIZE PUBKEY> New authorized withdrawer
|
||||
```
|
||||
|
||||
#### solana-uptime
|
||||
```text
|
||||
solana-uptime
|
||||
Show the uptime of a validator, based on epoch voting history
|
||||
|
||||
USAGE:
|
||||
solana uptime [FLAGS] [OPTIONS] <VOTE ACCOUNT PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
--aggregate Aggregate uptime data across span
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
--span <NUM OF EPOCHS> Number of recent epochs to examine
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account pubkey
|
||||
```
|
||||
|
||||
#### solana-validator-info
|
||||
```text
|
||||
solana-validator-info
|
||||
Publish/get Validator info on Solana
|
||||
|
||||
USAGE:
|
||||
@@ -842,26 +965,71 @@ SUBCOMMANDS:
|
||||
publish Publish Validator info on Solana
|
||||
```
|
||||
|
||||
#### solana-vote-authorize-voter
|
||||
```text
|
||||
solana-withdraw-stake
|
||||
Withdraw the unstaked lamports from the stake account
|
||||
solana-vote-authorize-voter
|
||||
Authorize a new vote signing keypair for the given vote account
|
||||
|
||||
USAGE:
|
||||
solana withdraw-stake [OPTIONS] <STAKE ACCOUNT KEYPAIR FILE> <DESTINATION PUBKEY> <AMOUNT> [unit]
|
||||
solana vote-authorize-voter [OPTIONS] <VOTE ACCOUNT PUBKEY> <NEW VOTER PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: /Users/tyeraeulberg/.config/solana/wallet/config.yml]
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT KEYPAIR FILE> Keypair file for the stake account, for signing the withdraw transaction.
|
||||
<DESTINATION PUBKEY> The account where the lamports should be transfered
|
||||
<AMOUNT> The amount to withdraw from the stake account (default unit SOL)
|
||||
<unit> Specify unit to use for request [possible values: SOL, lamports]
|
||||
<VOTE ACCOUNT PUBKEY> Vote account in which to set the authorized voter
|
||||
<NEW VOTER PUBKEY> New vote signer to authorize
|
||||
```
|
||||
|
||||
#### solana-vote-authorize-withdrawer
|
||||
```text
|
||||
solana-vote-authorize-withdrawer
|
||||
Authorize a new withdraw signing keypair for the given vote account
|
||||
|
||||
USAGE:
|
||||
solana vote-authorize-withdrawer [OPTIONS] <VOTE ACCOUNT PUBKEY> <NEW WITHDRAWER PUBKEY>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<VOTE ACCOUNT PUBKEY> Vote account in which to set the authorized withdrawer
|
||||
<NEW WITHDRAWER PUBKEY> New withdrawer to authorize
|
||||
```
|
||||
|
||||
#### solana-withdraw-stake
|
||||
```text
|
||||
solana-withdraw-stake
|
||||
Withdraw the unstaked lamports from the stake account
|
||||
|
||||
USAGE:
|
||||
solana withdraw-stake [OPTIONS] <STAKE ACCOUNT> <DESTINATION ACCOUNT> <AMOUNT> [UNIT]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-C, --config <PATH> Configuration file to use [default: ~/.config/solana/wallet/config.yml]
|
||||
-u, --url <URL> JSON RPC URL for the solana cluster
|
||||
-k, --keypair <PATH> /path/to/id.json
|
||||
|
||||
ARGS:
|
||||
<STAKE ACCOUNT> Stake account from which to withdraw
|
||||
<DESTINATION ACCOUNT> The account to which the lamports should be transfered
|
||||
<AMOUNT> The amount to withdraw from the stake account (default unit SOL)
|
||||
<UNIT> Specify unit to use for request [possible values: SOL, lamports]
|
||||
```
|
||||
|
||||
|
@@ -10,15 +10,22 @@ First create a stake account keypair with `solana-keygen`:
|
||||
$ solana-keygen new -o ~/validator-config/stake-keypair.json
|
||||
```
|
||||
|
||||
and use the cli's `delegate-stake` command to stake your validator with 42 lamports:
|
||||
and use the cli's `create-stake-account` and `delegate-stake` commands to stake your validator with 42 lamports:
|
||||
|
||||
```bash
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json 42 lamports
|
||||
$ solana create-stake-account ~/validator-config/stake-keypair.json 42 lamports
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour or more for the change to fully take effect.
|
||||
|
||||
Assuming your node is voting, now you're up and running and generating validator rewards. You'll want to periodically redeem/claim your rewards:
|
||||
Stakes can be re-delegated to another node at any time with the same command:
|
||||
|
||||
```bash
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/some-other-validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Assuming the node is voting, now you're up and running and generating validator rewards. You'll want to periodically redeem/claim your rewards:
|
||||
|
||||
```bash
|
||||
$ solana redeem-vote-credits ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
@@ -37,4 +44,3 @@ The stake will cool down, deactivate over time. While cooling down, your stake w
|
||||
Note that a stake account may only be used once, so after deactivation, use the cli's `withdraw-stake` command to recover the previously staked lamports.
|
||||
|
||||
Be sure and redeem your credits before withdrawing all your lamports. Once the account is fully withdrawn, the account is destroyed.
|
||||
|
||||
|
Reference in New Issue
Block a user