Commands
Command tree overview:
internal/interface-adapters/cli/README.md
This document describes all available CLI commands for the three wallet types: Watch Wallet, Keygen Wallet, and Sign Wallet.
Watch Wallet Commands
Watch Wallet operates online and manages public keys only. It creates unsigned transactions, sends signed transactions, and monitors transaction status.
Import Commands
watch import address
Imports addresses generated by Keygen Wallet.
Options:
--file <path>- Path to the CSV file containing addresses to import--rescan- Run blockchain rescan when importing addresses (default: false)
Example:
watch import address --file data/address/btc/address.csv --rescanCreate Commands
watch create deposit
Creates an unsigned deposit transaction file for client accounts. This transaction aggregates coins sent to client addresses into cold wallet addresses managed offline.
Options:
--fee <float>- Adjustment fee (default: 0)
Example:
watch create deposit --fee 0.0001watch create payment
Creates an unsigned payment transaction file for payment accounts. This transaction sends coins to user-specified addresses based on withdrawal requests.
Options:
--fee <float>- Adjustment fee (default: 0)
Example:
watch create payment --fee 0.0001watch create transfer
Creates an unsigned transaction for transferring coins between internal accounts.
Options:
--account1 <string>- Sender account name--account2 <string>- Receiver account name--amount <float>- Amount to send. If 0, all coins are sent--fee <float>- Adjustment fee (default: 0)
Example:
watch create transfer --account1 deposit --account2 payment --amount 0.001 --fee 0.0001watch create db
Creates payment_request table with dummy data for development use.
Note: This command is deprecated. Use SQL queries with shell scripts instead.
Send Commands
watch send
Sends a signed transaction to the blockchain network.
Options:
--file <path>- Path to the signed transaction file
Example:
watch send --file data/tx/btc/tx_signed_1234567890.jsonMonitor Commands
watch monitor senttx
Monitors sent transactions for a specific account.
Options:
--account <string>- Account name to monitor
Example:
watch monitor senttx --account depositwatch monitor balance
Monitors balance for addresses.
Options:
--num <uint64>- Confirmation number (default: 6)
Example:
watch monitor balance --num 6API Commands
API commands are coin-specific and dynamically configured based on the --coin flag.
Bitcoin/Bitcoin Cash API (watch api with --coin btc or --coin bch)
watch api balance- Get balance for an account--account <string>- Account name
watch api estimatefee- Estimate transaction feewatch api getnetworkinfo- Get network informationwatch api getaddressinfo- Get address information--address <string>- Address to query
watch api listunspent- List unspent transaction outputs--account <string>- Account name--num <int64>- Confirmation number (-1 for all)
watch api logging- Get logging informationwatch api unlocktx- Unlock locked transactions for unspent outputswatch api validateaddress- Validate a Bitcoin address--address <string>- Address to validate
Ethereum API (watch api with --coin eth)
watch api clientversion- Get client versionwatch api nodeinfo- Get node informationwatch api syncing- Get synchronization statuswatch api netversion- Get network version
Ripple API (watch api with --coin xrp)
watch api sendcoin- Send coins from faucet (for testing)--address <string>- Receiver address--amount <float>- Amount to send
Keygen Wallet Commands
Keygen Wallet operates offline as a cold wallet. It generates keys, creates multisig addresses, and provides the first signature for multisig transactions.
Create Commands
keygen create seed
Creates a seed for the wallet. If --seed is provided, it will be stored instead of generating a new one.
Options:
--seed <string>- Seed value to store (development use only)
Example:
keygen create seedkeygen create key
Creates a single key for debugging purposes.
Example:
keygen create keykeygen create hdkey
Creates HD (Hierarchical Deterministic) keys based on BIP32/BIP44 standards.
Options:
--keynum <uint64>- Number of HD keys to generate (default: 0)--account <string>- Target account name--keypair- Generate keypair for XRP (default: false)
Example:
keygen create hdkey --keynum 10 --account depositkeygen create multisig
Creates a multisig address based on account settings.
Options:
--account <string>- Target account name
Example:
keygen create multisig --account depositExport Commands
keygen export address
Exports generated public key addresses as a CSV file for import into Watch Wallet.
Options:
--account <string>- Target account name
Example:
keygen export address --account depositImport Commands
keygen import privkey
Imports generated private keys from the database into the Keygen Wallet.
Options:
--account <string>- Target account name
Example:
keygen import privkey --account depositkeygen import fullpubkey
Imports full public keys generated by Sign Wallet. These are used to create multisig addresses.
Options:
--file <path>- Path to the full-pubkey CSV file
Example:
keygen import fullpubkey --file data/fullpubkey/btc/fullpubkey_sign1.csvSign Commands
keygen sign signature
Signs an unsigned transaction. This provides the first signature for multisig addresses.
Options:
--file <path>- Path to the unsigned transaction file
Example:
keygen sign signature --file data/tx/btc/tx_unsigned_1234567890.jsonAPI Commands
API commands are coin-specific and dynamically configured based on the --coin flag.
Bitcoin/Bitcoin Cash API (keygen api with --coin btc or --coin bch)
keygen api encryptwallet- Encrypts the wallet with a passphrase--passphrase <string>- Passphrase for encryption
keygen api walletpassphrase- Stores the wallet decryption key in memory--passphrase <string>- Passphrase to unlock the wallet
keygen api walletpassphrasechange- Changes the wallet passphrase--old <string>- Old passphrase--new <string>- New passphrase
keygen api walletlock- Locks the wallet by removing the encryption key from memorykeygen api dumpwallet- Dumps all wallet keys in a human-readable format--file <string>- Output file name
keygen api importwallet- Imports keys from a wallet dump file--file <string>- Wallet dump file path
Ethereum API (keygen api with --coin eth)
keygen api importrawkey- Imports a raw private key--key <string>- Private key to import--pass <string>- Passphrase for the key
Sign Wallet Commands
Sign Wallet operates offline as a cold wallet. It provides subsequent signatures (2nd, 3rd, etc.) for multisig transactions. Each authorization operator uses their own Sign Wallet instance.
Create Commands
sign create seed
Creates a seed for the authorization account wallet. If --seed is provided, it will be stored instead of generating a new one.
Options:
--seed <string>- Seed value to store (development use only)
Example:
sign create seedsign create hdkey
Creates HD keys for the authorization account.
Example:
sign create hdkeyExport Commands
sign export fullpubkey
Exports full public key addresses as a CSV file for import into Keygen Wallet. These are used to create multisig addresses.
Example:
sign export fullpubkeyImport Commands
sign import privkey
Imports generated private keys for the authorization account into the database.
Example:
sign import privkeySign Commands
sign sign signature
Signs a transaction that has already been signed by Keygen Wallet (or other Sign Wallets). This provides subsequent signatures for multisig addresses.
Options:
--file <path>- Path to the signed transaction file
Example:
sign sign signature --file data/tx/btc/tx_signed1_1234567890.jsonAPI Commands
API commands are coin-specific and dynamically configured based on the --coin flag.
Bitcoin/Bitcoin Cash API (sign api with --coin btc or --coin bch)
sign api encryptwallet- Encrypts the wallet with a passphrase--passphrase <string>- Passphrase for encryption
sign api walletpassphrase- Stores the wallet decryption key in memory--passphrase <string>- Passphrase to unlock the wallet
sign api walletpassphrasechange- Changes the wallet passphrase--old <string>- Old passphrase--new <string>- New passphrase
sign api walletlock- Locks the wallet by removing the encryption key from memory
Ethereum API (sign api with --coin eth)
sign api clientversion- Get client versionsign api nodeinfo- Get node informationsign api syncing- Get synchronization statussign api netversion- Get network version
Global Flags
See Global Flags in the CLI README.