Skip to main content

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​

CommandDescription
wallet createCreate a new wallet. This will create a new file without scanning the blockchain.
wallet recoverRecover a wallet. This will create a new wallet file and scan the blockchain for associated transactions.
wallet openOpen an existing wallet file.
wallet closeClose 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-rescanRescan the blockchain and re-detect all operations related to the selected account in this wallet.
wallet-syncForce 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​

CommandDescription
account createCreates a new account with an optional name.
account renameRenames the selected account with an optional name. If the name is not specified, it will remove any existing name for the account.
account selectSwitch to a given wallet account.
account balanceGet the total balance in the selected account in this wallet. See available options to include more categories, like locked coins.
account utxosLists all the utxos owned by this account.
account show-xpub(cold) Shows the account's extended public key.

Addresses​

CommandDescription
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.
sendSend a given coin amount to a given address. The wallet will automatically calculate the required fees.
address sweepSweep all spendable coins or tokens from the specified (or all) addresses to the given destination address.
data depositDeposit 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.

CommandDescription
address standalone list(cold) Show added standalone addresses with their labels.
address standalone details(cold) Show standalone address details.
address standalone rename-labelAdd, rename or delete a label to an already added standalone address.
address standalone addAdd a new standalone watch-only address not derived from the selected account's key chain.
address standalone add-private-keyAdd a new standalone private key not derived from the selected account's key chain.
address standalone add-multisigAdd a new standalone multi-signature address.
address standalone utxosLists all the utxos owned by multisig addresses watched by this account.

Staking and Pools​

A minimum pledge of 40,000 TML is required to create a staking pool.

CommandDescription
staking startStart staking, assuming there are staking pools in the selected account in this wallet.
staking stopStop staking, assuming there are staking pools staking currently in the selected account in this wallet.
staking statusShow the staking status for the currently selected account in this wallet.
staking pool-balanceObtain the balance of a staking pool.
staking list-poolsList ids of pools that are controlled by the selected account in this wallet.
staking list-owned-pools-for-decommissionList pools that can be decommissioned by the selected account in this wallet.
staking list-created-blocksList the blocks created by the selected account in this wallet through staking/mining/etc.
staking create-poolCreate a staking pool. The pool will be capable of creating blocks and gaining rewards, as well as taking delegations from other users.
staking decommission-poolDecommission a staking pool, given its id. This assumes that the decommission key is owned by the selected account in this wallet.
staking decommission-pool-requestCreate a request to decommission a pool. This assumes that the decommission key is owned by another wallet.
staking new-vrf-public-key(cold) Issue a new staking VRF (Verifiable Random Function) key for this account.
staking show-vrf-public-keys(cold) Show the issued staking VRF (Verifiable Random Function) keys for this account.
staking show-legacy-vrf-key(cold) Shows the legacy VRF key that uses an abandoned derivation mechanism.

Delegations​

CommandDescription
delegation createCreate a delegation to a given pool id and the owner address/destination.
delegation listList delegation ids controlled by the selected account in this wallet, with their balances.
delegation stakeSend coins to a delegation id to be staked.
delegation withdrawSend coins from a delegation id (that you own) to stop staking them. Note that stopping the delegation requires a lock period.
delegation sweepSweep all the coins from a delegation to a given address. The wallet will automatically calculate the required fees.

Tokens and NFTs​

CommandDescription
token issueIssue a new fungible token.
token nft issueIssue a new non-fungible token (NFT).
token change-authorityChange the authority address of a token.
token change-metadata-uriChange the metadata URI of a token.
token mintGiven a token that is already issued, mint new tokens and increase the circulating supply.
token unmintUnmint existing tokens and reduce the circulating supply.
token lock-supplyLock the circulating supply for the token. THIS IS IRREVERSIBLE.
token freezeFreeze the token, which forbids any operations with it (except for the optional unfreeze).
token unfreezeUnfreeze the token, making all operations available for it again.
token sendSend the given token amount to the given address.

Orders​

CommandDescription
order createCreate an order for exchanging one currency for another.
order fillFill an order (partially or fully) with the asked currency.
order freezeFreeze an order to prevent further fills.
order concludeConclude an order and withdraw accumulated funds.
order list-ownList orders whose conclude key is owned by the selected account.
order list-all-activeList all active (non-concluded, non-frozen) orders, with optional currency filters.

Transactions​

CommandDescription
utxo-spendSpend a specific UTXO, moving its funds to a given address. (This command keeps its flat name.)
transaction composeCompose a new transaction from the specified outputs and selected utxos.
transaction create-from-cold-inputCreates 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 abandonAbandon an unconfirmed transaction in the wallet database, and make the consumed inputs available to be used again.
transaction list-pendingList the pending transactions that can be abandoned.
transaction list-by-addressList transactions owned by this account that have already been included in a block, with an optional address filter.
transaction getGet a transaction from the wallet, if present.
transaction get-rawGet a transaction from the wallet, if present, as hex encoded raw transaction.
transaction get-signed-rawGet a signed transaction from the wallet, if present, as hex encoded raw transaction.
transaction inspectPrint the summary of a transaction.

HTLC​

CommandDescription
htlc createCreate a transaction with an HTLC output (without broadcasting).
htlc generate-secretGenerate a random HTLC secret.
htlc calc-secret-hashCompute the hash of an HTLC secret.

Challenge Signing​

CommandDescription
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​

CommandDescription
node versionObtain the node version.
node shutdownShutdown the node.
node p2pEnable or disable p2p networking in the node.
node chainstate-infoReturns the current node's chainstate information (block height and more).
node best-blockReturns the best block id, height, and timestamp. Pass --id, --height, or --timestamp to show a subset.
node block-idGet the block id of the block at a given height.
node blockGet a block by its id, represented as hex encoded bytes.
node submit-blockSubmit a block to be included in the chain.
node submit-transactionSubmits a transaction to mempool, and if it is valid, broadcasts it to the network.
node generate-blockGenerate 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​

CommandDescription
peer countGet the number of connected peers in the node.
peer listList connected peers in the node.
peer connectConnect to a remote peer in the node.
peer disconnectDisconnect a remote peer in the node.
peer reserved listList reserved peers in the node.
peer reserved addAdd a reserved peer in the node.
peer reserved removeRemove a reserved peer in the node.
peer bannedList banned peers in the node.
peer banBan an address in the node for the specified duration.
peer unbanUnban an address in the node.
peer discouragedList discouraged peers in the node.
peer undiscourageUndiscourage an address in the node.

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.

CommandBuilds the command line for
wizard token-issuetoken issue
wizard nft-issuetoken nft issue
wizard pool-createstaking create-pool
wizard order-createorder create
wizard htlc-createhtlc create

REPL and Miscellaneous​

CommandDescription
config broadcastConfigure 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-exitShutdown 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-openwallet create / wallet recover / wallet open
address-new / address-show / address-qrcodeaddress new / address list / address qr
address-sendsend
address-sweep-spendableaddress sweep
address-deposit-datadata deposit
account-extended-public-key-as-hexaccount show-xpub
account-sign-raw-transactiontransaction sign
standalone-add-watch-only-addressaddress standalone add
staking-create-poolstaking create-pool
staking-sweep-delegationdelegation sweep
token-issue-new / token-nft-issue-newtoken issue / token nft issue
htlc-create-transactionhtlc create
node-connect-to-peer etc.peer connect etc.
node-best-block-id / -height / -timestampnode best-block --id / --height / --timestamp
challenge-sign-plain / challenge-sign-hexchallenge sign / challenge sign --hex
wallet-encrypt-private-keys / wallet-disable-private-keys-encryptionwallet encrypt / wallet decrypt
config-broadcastconfig broadcast

Run legacy inside the wallet for the complete table, or see the v1.4.5 upgrade guide.