X-Cash Wallet (CLI)
Use X-Cash CLI Wallet (xcash-wallet-cli) to interact with a wallet through the terminal
Wallet uses your private keys to compute your total balance, retrieve your transactions history, and sign transactions.
However, wallet does not store the blockchain and does not directly participate in the p2p network.
Ilustration of the 1.5.0 CLI Wallet displaying an unconfirmed balance
Wallet connects to a full node to scan the blockchain for your transaction outputs and to send your transactions out to the network. The full node can be either local (same computer) or remote.
The best practice is to run the full node on the same computer as the wallet (or within your home network) and the connection happens over HTTP.
Any transaction leaving the wallet is already blinded by all X-Cash privacy features. This means plain text HTTP communication isn't an issue on its own even if you connect to a remote node.
However, connecting to a remote node has other nuanced trade-offs, such as easiness of use and faster syncing. This happens at the cost of a potential privacy reduction and limited reliability. It is recommended to fully familiarize with the limits of using a remote node vs. a local node before attempting in doing so.
./xcash-wallet-cli [options] [command]
Go to directory where you unpacked X-Cash.
Run the daemon and wait until it syncs up with the network (may take up to a few days depending on your last block height, network speed and CPU available load):
In a separate terminal window, run the wallet:
./xcash-wallet-cli --generate-new-wallet XCashExampleWallet
Wallet depends on a full node for all non-local operations. The following options define how to connect to
Wallet files are created and seek in current directory. This is rarely what you want. Use
--wallet-fileand similar options to control this.
Log files are created in the same directory as
--log-fileto specify the location.
Commands are used interactively in the
You can also run a one-off command by providing it as a commandline parameter. This is rarely useful though. For automation prefer
The CLI wallet has built-in help for individual commands - we will not attempt to reproduce that. Instead we focus on grouping commands so you can quickly find what you are looking for. Use
help command_nameto learn more.
help- list all commands
help <command>- show help for individual command
version- show version of the xcash-wallet-cli binary
account- total balance; list accounts with respective balances
balance detail- within the current account, list addresses with respective balances
To perform on-chain transaction you should used the function transfer:
transfer [<tx_privacy_settings>] [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <address> <amount> [<payment_id>]
You can also move the entire balance by using the
sweep_allcommand with the same parameters (except the amount) as the
transfercommand. If you leave
sweep_allblank with no parameters it will send a tx back to your wallet. This is helpful in reducing unspents for voting.
Open the wallet file in the
xcash-wallet-cliand once the wallet is fully synchronize, type the command:
delegates public addressor
status- show if synced up to the blockchain height
fee- show current fee-per-byte and full node's mempool (the backlog of transactions depending on the priority)
wallet_info- show wallet file path, standard address, type and network
seed- show raw mnemonic seed
encrypted_seed- create mnemonic seed encrypted with the passphrase; you will need to remember or store the passphrase separately; restoring will not be possible without the passphrase
spendkey- show secret spend key and public spend key
viewkey- show secret view key and public view key
check_reserve_proof- prove the balance
check_spend_proof- prove you made the payment
verify <filename> <address> <signature>- prove ownership of the address; allows to verify the file was signed by the owner of specific X-Cash address
These allow to learn and verify transaction's private key
r. This was useful to create a proof of payment but got superseded by
check_tx_key <txid> <txkey> <address>
set_tx_key <txid> <tx_key>
unspent_outputs- show a list of, and a histogram of unspent outputs (indivisible pieces of your total balance)
import_key_images <file>- used to inform the view-only wallet about outgoing transactions so it can calculate the real balance; normally view-only wallets only learn about incoming transactions, not outgoing
export_outputs <file>- export a set of outputs owned by this wallet to a