Rename solana-wallet program to just solana (#5604)
* Rename wallet/ to cli/ * Rename the solana-wallet crate to solana-cli * Rename solana-wallet program to solana * cargo fmt
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
- [Blockstreamer](blockstreamer.md)
|
||||
- [JSON RPC API](jsonrpc-api.md)
|
||||
- [JavaScript API](javascript-api.md)
|
||||
- [solana-wallet CLI](wallet.md)
|
||||
- [solana CLI](cli.md)
|
||||
|
||||
- [Accepted Design Proposals](proposals.md)
|
||||
- [Ledger Replication](ledger-replication-to-implement.md)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
## solana-wallet CLI
|
||||
## solana CLI
|
||||
|
||||
The [solana crate](https://crates.io/crates/solana) is distributed with a command-line interface tool
|
||||
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -8,7 +8,7 @@ The [solana crate](https://crates.io/crates/solana) is distributed with a comman
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet address
|
||||
$ solana address
|
||||
|
||||
// Return
|
||||
<PUBKEY>
|
||||
@@ -18,7 +18,7 @@ $ solana-wallet address
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet airdrop 123
|
||||
$ solana airdrop 123
|
||||
|
||||
// Return
|
||||
"Your balance is: 123"
|
||||
@@ -28,7 +28,7 @@ $ solana-wallet airdrop 123
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet balance
|
||||
$ solana balance
|
||||
|
||||
// Return
|
||||
"Your balance is: 123"
|
||||
@@ -38,7 +38,7 @@ $ solana-wallet balance
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet confirm <TX_SIGNATURE>
|
||||
$ solana confirm <TX_SIGNATURE>
|
||||
|
||||
// Return
|
||||
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
|
||||
@@ -48,7 +48,7 @@ $ solana-wallet confirm <TX_SIGNATURE>
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet deploy <PATH>
|
||||
$ solana deploy <PATH>
|
||||
|
||||
// Return
|
||||
<PROGRAM_ID>
|
||||
@@ -58,7 +58,7 @@ $ solana-wallet deploy <PATH>
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123
|
||||
$ solana pay <PUBKEY> 123
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
@@ -68,7 +68,7 @@ $ solana-wallet pay <PUBKEY> 123
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123 \
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
@@ -81,7 +81,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||
A third party must send a signature to unlock the lamports.
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123 \
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
// Return
|
||||
@@ -92,7 +92,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123 \
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
@@ -104,7 +104,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123 \
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY> \
|
||||
--require-signature-from <PUBKEY>
|
||||
|
||||
@@ -116,7 +116,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet pay <PUBKEY> 123 \
|
||||
$ solana pay <PUBKEY> 123 \
|
||||
--require-signature-from <PUBKEY> \
|
||||
--cancelable
|
||||
|
||||
@@ -128,7 +128,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet cancel <PROCESS_ID>
|
||||
$ solana cancel <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
@@ -138,7 +138,7 @@ $ solana-wallet cancel <PROCESS_ID>
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
||||
$ solana send-signature <PUBKEY> <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
@@ -149,7 +149,7 @@ $ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
||||
Use the current system time:
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID>
|
||||
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
@@ -159,7 +159,7 @@ Or specify some other arbitrary timestamp:
|
||||
|
||||
```sh
|
||||
// Command
|
||||
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
|
||||
// Return
|
||||
<TX_SIGNATURE>
|
||||
@@ -168,10 +168,10 @@ $ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
### Usage
|
||||
|
||||
```manpage
|
||||
solana-wallet 0.12.0
|
||||
solana 0.12.0
|
||||
|
||||
USAGE:
|
||||
solana-wallet [FLAGS] [OPTIONS] [SUBCOMMAND]
|
||||
solana [FLAGS] [OPTIONS] [SUBCOMMAND]
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -201,11 +201,11 @@ SUBCOMMANDS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-address
|
||||
solana-address
|
||||
Get your public key
|
||||
|
||||
USAGE:
|
||||
solana-wallet address
|
||||
solana address
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -213,11 +213,11 @@ FLAGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-airdrop
|
||||
solana-airdrop
|
||||
Request a batch of lamports
|
||||
|
||||
USAGE:
|
||||
solana-wallet airdrop <NUM>
|
||||
solana airdrop <NUM>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -228,11 +228,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-balance
|
||||
solana-balance
|
||||
Get your balance
|
||||
|
||||
USAGE:
|
||||
solana-wallet balance
|
||||
solana balance
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -240,11 +240,11 @@ FLAGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-cancel
|
||||
solana-cancel
|
||||
Cancel a transfer
|
||||
|
||||
USAGE:
|
||||
solana-wallet cancel <PROCESS_ID>
|
||||
solana cancel <PROCESS_ID>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -255,11 +255,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-confirm
|
||||
solana-confirm
|
||||
Confirm transaction by signature
|
||||
|
||||
USAGE:
|
||||
solana-wallet confirm <SIGNATURE>
|
||||
solana confirm <SIGNATURE>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -270,11 +270,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-deploy
|
||||
solana-deploy
|
||||
Deploy a program
|
||||
|
||||
USAGE:
|
||||
solana-wallet deploy <PATH>
|
||||
solana deploy <PATH>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -285,11 +285,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-fees
|
||||
solana-fees
|
||||
Display current cluster fees
|
||||
|
||||
USAGE:
|
||||
solana-wallet fees
|
||||
solana fees
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -297,11 +297,11 @@ FLAGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-get-transaction-count
|
||||
solana-get-transaction-count
|
||||
Get current transaction count
|
||||
|
||||
USAGE:
|
||||
solana-wallet get-transaction-count
|
||||
solana get-transaction-count
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -309,11 +309,11 @@ FLAGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-pay
|
||||
solana-pay
|
||||
Send a payment
|
||||
|
||||
USAGE:
|
||||
solana-wallet pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
|
||||
solana pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
|
||||
|
||||
FLAGS:
|
||||
--cancelable
|
||||
@@ -331,11 +331,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-send-signature
|
||||
solana-send-signature
|
||||
Send a signature to authorize a transfer
|
||||
|
||||
USAGE:
|
||||
solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
||||
solana send-signature <PUBKEY> <PROCESS_ID>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
@@ -347,11 +347,11 @@ ARGS:
|
||||
```
|
||||
|
||||
```manpage
|
||||
solana-wallet-send-timestamp
|
||||
solana-send-timestamp
|
||||
Send a timestamp to unlock a transfer
|
||||
|
||||
USAGE:
|
||||
solana-wallet send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
|
||||
solana send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
@@ -129,10 +129,10 @@ $ export STORAGE_IDENTITY=$(solana-keygen pubkey storage-keypair.json)
|
||||
```
|
||||
Then set up the storage accounts for your replicator by running:
|
||||
```bash
|
||||
$ solana-wallet --keypair replicator-keypair.json airdrop 100000
|
||||
$ solana-wallet --keypair replicator-keypair.json create-replicator-storage-account $REPLICATOR_IDENTITY $STORAGE_IDENTITY
|
||||
$ solana --keypair replicator-keypair.json airdrop 100000
|
||||
$ solana --keypair replicator-keypair.json create-replicator-storage-account $REPLICATOR_IDENTITY $STORAGE_IDENTITY
|
||||
```
|
||||
Note: Every time the testnet restarts, run the wallet steps to setup the replicator accounts again.
|
||||
Note: Every time the testnet restarts, run the steps to setup the replicator accounts again.
|
||||
|
||||
To start the replicator:
|
||||
```bash
|
||||
@@ -146,8 +146,8 @@ gossip network by running:
|
||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
```
|
||||
|
||||
Provide the **storage account pubkey** to the `solana-wallet show-storage-account` command to view
|
||||
Provide the **storage account pubkey** to the `solana show-storage-account` command to view
|
||||
the recent mining activity from your replicator:
|
||||
```bash
|
||||
$ solana-wallet --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
||||
$ solana --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
||||
```
|
||||
|
@@ -28,30 +28,30 @@ The vote pubkey for the validator can be found by running:
|
||||
$ solana-keygen pubkey ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Provide the **vote pubkey** to the `solana-wallet show-vote-account` command to view
|
||||
Provide the **vote pubkey** to the `solana show-vote-account` command to view
|
||||
the recent voting activity from your validator:
|
||||
```bash
|
||||
$ solana-wallet show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
$ solana show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
```
|
||||
|
||||
## Check Your Balance
|
||||
Your lamport balance should decrease by the transaction fee amount as your
|
||||
validator submits votes, and increase after serving as the leader:
|
||||
```bash
|
||||
$ solana-wallet balance
|
||||
$ solana balance
|
||||
```
|
||||
|
||||
## Check Slot Number
|
||||
After your validator boots, it may take some time to catch up with the cluster.
|
||||
Use the `get-slot` wallet command to view the current slot that the cluster is
|
||||
Use the `get-slot` command to view the current slot that the cluster is
|
||||
processing:
|
||||
```bash
|
||||
$ solana-wallet get-slot
|
||||
$ solana get-slot
|
||||
```
|
||||
|
||||
The current slot that your validator is processing can then been seen with:
|
||||
```bash
|
||||
$ solana-wallet --url http://127.0.0.1:8899 get-slot
|
||||
$ solana --url http://127.0.0.1:8899 get-slot
|
||||
```
|
||||
|
||||
Until your validator has caught up, it will not be able to vote successfully and
|
||||
|
@@ -2,15 +2,15 @@
|
||||
When your validator starts, it will have no stake, which means it will be
|
||||
ineligible to become leader.
|
||||
|
||||
Adding stake can be accomplished by using the `solana-wallet` CLI
|
||||
Adding stake can be accomplished by using the `solana` CLI
|
||||
|
||||
First create a stake account keypair with `solana-keygen`:
|
||||
```bash
|
||||
$ solana-keygen new -o ~/validator-config/stake-keypair.json
|
||||
```
|
||||
and use the wallet's `delegate-stake` command to stake your validator with 42 lamports:
|
||||
and use the cli's `delegate-stake` command to stake your validator with 42 lamports:
|
||||
```bash
|
||||
$ solana-wallet delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json 42
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json 42
|
||||
```
|
||||
|
||||
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour
|
||||
@@ -28,14 +28,14 @@ commission rate set in the vote account.
|
||||
|
||||
Stake can be deactivated by running:
|
||||
```bash
|
||||
$ solana-wallet deactivate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
$ solana deactivate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
The stake will cool down, deactivate over time. While cooling down, your stake will continue to earn
|
||||
rewards.
|
||||
|
||||
Note that a stake account may only be used once, so after deactivation, use the
|
||||
wallet's `withdraw-stake` command to recover the previously staked lamports.
|
||||
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.
|
||||
|
@@ -22,10 +22,10 @@ for more detail on cluster activity.
|
||||
Sanity check that you are able to interact with the cluster by receiving a small
|
||||
airdrop of lamports from the testnet drone:
|
||||
```bash
|
||||
$ solana-wallet set --url http://testnet.solana.com:8899
|
||||
$ solana-wallet get
|
||||
$ solana-wallet airdrop 123
|
||||
$ solana-wallet balance
|
||||
$ solana set --url http://testnet.solana.com:8899
|
||||
$ solana get
|
||||
$ solana airdrop 123
|
||||
$ solana balance
|
||||
```
|
||||
|
||||
Also try running following command to join the gossip network and view all the
|
||||
@@ -42,17 +42,17 @@ $ solana-keygen new -o ~/validator-keypair.json
|
||||
```
|
||||
|
||||
### Wallet Configuration
|
||||
You can set solana-wallet configuration to use your validator keypair for all
|
||||
You can set solana configuration to use your validator keypair for all
|
||||
following commands:
|
||||
```bash
|
||||
$ solana-wallet set --keypair ~/validator-keypair.json
|
||||
$ solana set --keypair ~/validator-keypair.json
|
||||
```
|
||||
|
||||
**All following solana-wallet commands assume you have set `--keypair` config to
|
||||
**All following solana commands assume you have set `--keypair` config to
|
||||
**your validator identity keypair.**
|
||||
If you haven't, you will need to add the `--keypair` argument to each command, like:
|
||||
```bash
|
||||
$ solana-wallet --keypair ~/validator-keypair.json airdrop 1000
|
||||
$ solana --keypair ~/validator-keypair.json airdrop 1000
|
||||
```
|
||||
(You can always override the set configuration by explicitly passing the
|
||||
`--keypair` argument with a command.)
|
||||
@@ -60,14 +60,14 @@ $ solana-wallet --keypair ~/validator-keypair.json airdrop 1000
|
||||
### Validator Start
|
||||
Airdrop yourself some lamports to get started:
|
||||
```bash
|
||||
$ solana-wallet airdrop 1000
|
||||
$ solana airdrop 1000
|
||||
```
|
||||
|
||||
Your validator will need a vote account. Create it now with the following
|
||||
commands:
|
||||
```bash
|
||||
$ solana-keygen new -o ~/validator-vote-keypair.json
|
||||
$ solana-wallet create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1
|
||||
$ solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1
|
||||
```
|
||||
|
||||
Then use one of the following commands, depending on your installation
|
||||
|
@@ -42,19 +42,19 @@ $ solana-install init 0.18.0
|
||||
If you are downloading pre-compiled binaries or building from source, simply choose the release matching your desired testnet.
|
||||
|
||||
### Validator Commands
|
||||
Solana CLI tools like solana-wallet and solana-validator-info point at
|
||||
Solana CLI tools like solana and solana-validator-info point at
|
||||
testnet.solana.com by default. Include a `--url` argument to point at a
|
||||
different testnet. For instance:
|
||||
```bash
|
||||
$ solana-wallet --url http://beta.testnet.solana.com:8899 balance
|
||||
$ solana --url http://beta.testnet.solana.com:8899 balance
|
||||
```
|
||||
|
||||
Solana-wallet includes `get` and `set` configuration commands to automatically
|
||||
The solana cli includes `get` and `set` configuration commands to automatically
|
||||
set the `--url` argument for future wallet commands.
|
||||
For example:
|
||||
```bash
|
||||
$ solana-wallet set --url http://beta.testnet.solana.com:8899
|
||||
$ solana-wallet balance # Same result as command above
|
||||
$ solana set --url http://beta.testnet.solana.com:8899
|
||||
$ solana balance # Same result as command above
|
||||
```
|
||||
(You can always override the set configuration by explicitly passing the `--url`
|
||||
argument with a command.)
|
||||
|
Reference in New Issue
Block a user