## solana-wallet CLI The [solana crate](https://crates.io/crates/solana) is distributed with a command-line interface tool ### Examples #### Get Pubkey ```sh // Command $ solana-wallet address // Return ``` #### Airdrop Tokens ```sh // Command $ solana-wallet airdrop 123 // Return "Your balance is: 123" ``` #### Get Balance ```sh // Command $ solana-wallet balance // Return "Your balance is: 123" ``` #### Confirm Transaction ```sh // Command $ solana-wallet confirm // Return "Confirmed" / "Not found" ``` #### Deploy program ```sh // Command $ solana-wallet deploy // Return ``` #### Unconditional Immediate Transfer ```sh // Command $ solana-wallet pay 123 // Return ``` #### Post-Dated Transfer ```sh // Command $ solana-wallet pay 123 \ --after 2018-12-24T23:59:00 --require-timestamp-from // Return {signature: , processId: } ``` *`require-timestamp-from` is optional. If not provided, the transaction will expect a timestamp signed by this wallet's secret key* #### Authorized Transfer A third party must send a signature to unlock the tokens. ```sh // Command $ solana-wallet pay 123 \ --require-signature-from // Return {signature: , processId: } ``` #### Post-Dated and Authorized Transfer ```sh // Command $ solana-wallet pay 123 \ --after 2018-12-24T23:59 --require-timestamp-from \ --require-signature-from // Return {signature: , processId: } ``` #### Multiple Witnesses ```sh // Command $ solana-wallet pay 123 \ --require-signature-from \ --require-signature-from // Return {signature: , processId: } ``` #### Cancelable Transfer ```sh // Command $ solana-wallet pay 123 \ --require-signature-from \ --cancelable // Return {signature: , processId: } ``` #### Cancel Transfer ```sh // Command $ solana-wallet cancel // Return ``` #### Send Signature ```sh // Command $ solana-wallet send-signature // Return ``` #### Indicate Elapsed Time Use the current system time: ```sh // Command $ solana-wallet send-timestamp // Return ``` Or specify some other arbitrary timestamp: ```sh // Command $ solana-wallet send-timestamp --date 2018-12-24T23:59:00 // Return ``` ### Usage ```manpage solana-wallet 0.11.0 USAGE: solana-wallet [OPTIONS] [SUBCOMMAND] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: -k, --keypair /path/to/id.json -n, --network Rendezvous with the network at this gossip entry point; defaults to 127.0.0.1:8001 --proxy Address of TLS proxy --port Optional rpc-port configuration to connect to non-default nodes --timeout Max seconds to wait to get necessary gossip from the network SUBCOMMANDS: address Get your public key airdrop Request a batch of tokens balance Get your balance cancel Cancel a transfer confirm Confirm transaction by signature deploy Deploy a program get-transaction-count Get current transaction count help Prints this message or the help of the given subcommand(s) pay Send a payment send-signature Send a signature to authorize a transfer send-timestamp Send a timestamp to unlock a transfer ``` ```manpage solana-wallet-address Get your public key USAGE: solana-wallet address FLAGS: -h, --help Prints help information -V, --version Prints version information ``` ```manpage solana-wallet-airdrop Request a batch of tokens USAGE: solana-wallet airdrop FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: The number of tokens to request ``` ```manpage solana-wallet-balance Get your balance USAGE: solana-wallet balance FLAGS: -h, --help Prints help information -V, --version Prints version information ``` ```manpage solana-wallet-cancel Cancel a transfer USAGE: solana-wallet cancel FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: The process id of the transfer to cancel ``` ```manpage solana-wallet-confirm Confirm transaction by signature USAGE: solana-wallet confirm FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: The transaction signature to confirm ``` ```manpage solana-wallet-deploy Deploy a program USAGE: solana-wallet deploy FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: /path/to/program.o ``` ```manpage solana-wallet-get-transaction-count Get current transaction count USAGE: solana-wallet get-transaction-count FLAGS: -h, --help Prints help information -V, --version Prints version information ``` ```manpage solana-wallet-pay Send a payment USAGE: solana-wallet pay [FLAGS] [OPTIONS] FLAGS: --cancelable -h, --help Prints help information -V, --version Prints version information OPTIONS: --after A timestamp after which transaction will execute --require-timestamp-from Require timestamp from this third party --require-signature-from ... Any third party signatures required to unlock the tokens ARGS: The pubkey of recipient The number of tokens to send ``` ```manpage solana-wallet-send-signature Send a signature to authorize a transfer USAGE: solana-wallet send-signature FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: The pubkey of recipient The process id of the transfer to authorize ``` ```manpage solana-wallet-send-timestamp Send a timestamp to unlock a transfer USAGE: solana-wallet send-timestamp [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information OPTIONS: --date Optional arbitrary timestamp to apply ARGS: The pubkey of recipient The process id of the transfer to unlock ```