Mintlayer Wallet CLI Commands
This page lists all commands available in the interactive wallet-cli REPL. Type help inside the wallet to see the list at any time, or help <command> for details on a specific command.
As of v1.4.5, commands use a nested grammar: a group word comes first, followed by the action (for example wallet create, staking create-pool, peer connect). The previous flat spellings (wallet-create, staking-create-pool, ...) keep working, but they are hidden from help and tab completion. Inside the wallet, the legacy command prints the full list of flat names with their nested equivalents. See the v1.4.5 upgrade guide for details.
Commands are grouped by function. Commands marked with (cold) are available without a node connection (using --cold-wallet).
Table of Contents
Wallet Management
| Command | Description |
|---|
| wallet create | Create a new wallet. This will create a new file without scanning the blockchain. |
| wallet recover | Recover a wallet. This will create a new wallet file and scan the blockchain for associated transactions. |
| wallet open | Open an existing wallet file. |
| wallet close | Close the currently opened wallet file. |
| wallet info | (cold) Obtain certain information about the wallet, such as the number of accounts and their names. |
| wallet encrypt | (cold) Encrypts the private keys with a new password, expects the wallet to be unlocked. |
| wallet decrypt | (cold) Completely and totally remove any existing encryption, expects the wallet to be unlocked. Warning: After this, your wallet file will be USABLE BY ANYONE without a password. |
| wallet unlock | (cold) Unlocks the private keys for usage. |
| wallet lock | (cold) Locks the private keys so they can't be used until they are unlocked again. |
| wallet show-seed-phrase | (cold) Show the seed phrase for the loaded wallet if it has been stored. |
| wallet purge-seed-phrase | (cold) Delete the seed phrase from the loaded wallet's database, if it has been stored. |
| wallet set-lookahead-size | (cold) Set the lookahead size for key generation. |
| wallet-rescan | Rescan the blockchain and re-detect all operations related to the selected account in this wallet. |
| wallet-sync | Force the wallet to scan the remaining blocks from node until the tip is reached. |
wallet-rescan and wallet-sync are exceptions: they have no nested spelling and keep their flat names. The four wallet management commands above are also available in cold wallet mode (--cold-wallet) through their flat spellings (wallet-create, wallet-recover, wallet-open, wallet-close); cold wallets do not accept the nested grammar.
Accounts
| Command | Description |
|---|
| account create | Creates a new account with an optional name. |
| account rename | Renames the selected account with an optional name. If the name is not specified, it will remove any existing name for the account. |
| account select | Switch to a given wallet account. |
| account balance | Get the total balance in the selected account in this wallet. See available options to include more categories, like locked coins. |
| account utxos | Lists all the utxos owned by this account. |
| account show-xpub | (cold) Shows the account's extended public key. |
Addresses
| Command | Description |
|---|
| address new | (cold) Generate a new unused address. |
| address list | (cold) Show receive-addresses with their usage state. |
| address qr | (cold) Creates a QR code of the provided address. |
| address reveal-public-key | (cold) Reveal the public key behind the specified "public key hash" address in address encoding. Use --format hex for the hex-encoded form. |
| send | Send a given coin amount to a given address. The wallet will automatically calculate the required fees. |
| address sweep | Sweep all spendable coins or tokens from the specified (or all) addresses to the given destination address. |
| data deposit | Deposit arbitrary data on the blockchain as a hex-encoded payload. |
Standalone Addresses
Standalone addresses are watch-only or independently-managed addresses added to the wallet without deriving them from the wallet's seed.
Staking and Pools
A minimum pledge of 40,000 TML is required to create a staking pool.
Delegations
| Command | Description |
|---|
| delegation create | Create a delegation to a given pool id and the owner address/destination. |
| delegation list | List delegation ids controlled by the selected account in this wallet, with their balances. |
| delegation stake | Send coins to a delegation id to be staked. |
| delegation withdraw | Send coins from a delegation id (that you own) to stop staking them. Note that stopping the delegation requires a lock period. |
| delegation sweep | Sweep all the coins from a delegation to a given address. The wallet will automatically calculate the required fees. |
Tokens and NFTs
Orders
| Command | Description |
|---|
| order create | Create an order for exchanging one currency for another. |
| order fill | Fill an order (partially or fully) with the asked currency. |
| order freeze | Freeze an order to prevent further fills. |
| order conclude | Conclude an order and withdraw accumulated funds. |
| order list-own | List orders whose conclude key is owned by the selected account. |
| order list-all-active | List all active (non-concluded, non-frozen) orders, with optional currency filters. |
Transactions
| Command | Description |
|---|
| utxo-spend | Spend a specific UTXO, moving its funds to a given address. (This command keeps its flat name.) |
| transaction compose | Compose a new transaction from the specified outputs and selected utxos. |
| transaction create-from-cold-input | Creates a transaction that spends from a specific address, and returns the change to the same address (unless one is specified), without signature. |
| transaction sign | (cold) Signs transaction inputs that are not yet signed. |
| transaction abandon | Abandon an unconfirmed transaction in the wallet database, and make the consumed inputs available to be used again. |
| transaction list-pending | List the pending transactions that can be abandoned. |
| transaction list-by-address | List transactions owned by this account that have already been included in a block, with an optional address filter. |
| transaction get | Get a transaction from the wallet, if present. |
| transaction get-raw | Get a transaction from the wallet, if present, as hex encoded raw transaction. |
| transaction get-signed-raw | Get a signed transaction from the wallet, if present, as hex encoded raw transaction. |
| transaction inspect | Print the summary of a transaction. |
HTLC
Challenge Signing
| Command | Description |
|---|
| challenge sign | (cold) Signs a challenge with a private key corresponding to the provided address. Pass --hex to sign a hex-encoded message. |
| challenge verify | (cold) Verifies a signed challenge against an address. Pass --hex to verify a hex-encoded message. |
Node
These commands interact with the connected Mintlayer node.
Info and Control
| Command | Description |
|---|
| node version | Obtain the node version. |
| node shutdown | Shutdown the node. |
| node p2p | Enable or disable p2p networking in the node. |
| node chainstate-info | Returns the current node's chainstate information (block height and more). |
| node best-block | Returns the best block id, height, and timestamp. Pass --id, --height, or --timestamp to show a subset. |
| node block-id | Get the block id of the block at a given height. |
| node block | Get a block by its id, represented as hex encoded bytes. |
| node submit-block | Submit a block to be included in the chain. |
| node submit-transaction | Submits a transaction to mempool, and if it is valid, broadcasts it to the network. |
| node generate-block | Generate a block with the given transactions to the specified reward destination (regtest only). Asks for confirmation first. |
node-generate-blocks (plural, regtest only) also keeps its flat name.
Peers
Interactive Wizards
The wizard command interactively collects the arguments of a complex command, shows a summary, and prints the resulting command line. It is only available on an interactive terminal. See the wizards and scripting guide for details.
| Command | Builds the command line for |
|---|
wizard token-issue | token issue |
wizard nft-issue | token nft issue |
wizard pool-create | staking create-pool |
wizard order-create | order create |
wizard htlc-create | htlc create |
REPL and Miscellaneous
| Command | Description |
|---|
| config broadcast | Configure broadcasting to Mempool to yes or no. When set to no, transactions are returned as hex instead of being submitted automatically; use node submit-transaction to broadcast manually. |
| version | (cold) Print the version of the wallet software and possibly the git commit hash, if found. |
| exit | (cold) Exit the wallet. |
| rpc-shutdown-and-exit | Shutdown the RPC interface or the remote wallet it is connected to and exit the wallet. |
| history print | (cold) Print command history in the wallet for this execution. |
| history clear | (cold) Clear command history for this execution. |
| clear | (cold) Clear screen. |
help | (cold) Print this message or the help of the given subcommand(s). |
legacy | (cold) Print the list of legacy flat command names with their nested equivalents. |
Legacy flat names
Every flat spelling from versions before v1.4.5 keeps working. The most common mappings:
| Flat name (legacy) | Nested name (current) |
|---|
wallet-create / wallet-recover / wallet-open | wallet create / wallet recover / wallet open |
address-new / address-show / address-qrcode | address new / address list / address qr |
address-send | send |
address-sweep-spendable | address sweep |
address-deposit-data | data deposit |
account-extended-public-key-as-hex | account show-xpub |
account-sign-raw-transaction | transaction sign |
standalone-add-watch-only-address | address standalone add |
staking-create-pool | staking create-pool |
staking-sweep-delegation | delegation sweep |
token-issue-new / token-nft-issue-new | token issue / token nft issue |
htlc-create-transaction | htlc create |
node-connect-to-peer etc. | peer connect etc. |
node-best-block-id / -height / -timestamp | node best-block --id / --height / --timestamp |
challenge-sign-plain / challenge-sign-hex | challenge sign / challenge sign --hex |
wallet-encrypt-private-keys / wallet-disable-private-keys-encryption | wallet encrypt / wallet decrypt |
config-broadcast | config broadcast |
Run legacy inside the wallet for the complete table, or see the v1.4.5 upgrade guide.