Skip to main content

Mintlayer Wallet CLI Guide

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.

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-create(cold) Create a new wallet. This will create a new file without scanning the blockchain.
wallet-recover(cold) Recover a wallet. This will create a new wallet file and scan the blockchain for associated transactions.
wallet-open(cold) Open an existing wallet file.
wallet-close(cold) 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-private-keys(cold) Encrypts the private keys with a new password, expects the wallet to be unlocked.
wallet-disable-private-keys-encryption(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-private-keys(cold) Unlocks the private keys for usage.
wallet-lock-private-keys(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.

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-extended-public-key-as-hex(cold) Shows the account's extended public key.
account-sign-raw-transaction(cold) Signs transaction inputs that are not yet signed.

Addresses

CommandDescription
address-new(cold) Generate a new unused address.
address-show(cold) Show receive-addresses with their usage state.
address-qrcode(cold) Creates a QR code of the provided address.
address-reveal-public-key-as-hex(cold) Reveal the public key behind the specified "public key hash" address as a hex encoded string.
address-reveal-public-key-as-address(cold) Reveal the public key behind the specified "public key hash" address in address encoding.
address-sendSend a given coin amount to a given address. The wallet will automatically calculate the required fees.
address-sweep-spendableSweep all spendable coins or tokens from the specified (or all) addresses to the given destination address.
address-deposit-dataStore data on the blockchain.

Standalone Addresses

Standalone addresses are watch-only or independently-managed addresses added to the wallet without deriving them from the wallet's seed.

CommandDescription
standalone-address-show(cold) Show added standalone addresses with their labels.
standalone-address-details(cold) Show standalone address details.
standalone-address-label-rename(cold) Add, rename or delete a label to an already added standalone address.
standalone-add-watch-only-address(cold) Add a new standalone watch-only address not derived from the selected account's key chain.
standalone-add-private-key-from-hex(cold) Add a new standalone private key not derived from the selected account's key chain.
standalone-add-multisig(cold) Add a new standalone multi-signature address.
standalone-multisig-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-block-idsList 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.
staking-sweep-delegationSweep all the coins from a delegation to a given address. The wallet will automatically calculate the required fees.

Delegations

CommandDescription
delegation-createCreate a delegation to a given pool id and the owner address/destination.
delegation-list-idsList 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.

Tokens and NFTs

CommandDescription
token-issue-newIssue a new fungible token.
token-nft-issue-newIssue 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.
transaction-composeCompose a new transaction from the specified outputs and selected utxos.
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-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-inspectPrint the summary of a transaction.

HTLC

CommandDescription
htlc-create-transactionCreate 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-plain(cold) Signs a challenge with a private key corresponding to the provided address.
challenge-verify-plain(cold) Verifies a signed challenge against an address.

Node

These commands interact with the connected Mintlayer node.

Info and Control

CommandDescription
node-versionObtain the node version.
node-shutdownShutdown the node.
node-enable-p2p-networkingEnable or disable p2p networking in the node.
node-chainstate-infoReturns the current node's chainstate information (block height and more).
node-best-block-idReturns the current best block id.
node-best-block-heightReturns the current best block height.
node-best-block-timestampReturns the current best block timestamp.
node-block-idGet the block id of the block at a given height.
node-get-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.

Peers

CommandDescription
node-peer-countGet the number of connected peers in the node.
node-list-connected-peersList connected peers in the node.
node-list-reserved-peersList reserved peers in the node.
node-add-reserved-peerAdd a reserved peer in the node.
node-remove-reserved-peerRemove a reserved peer in the node.
node-connect-to-peerConnect to a remote peer in the node.
node-disconnect-peerDisconnect a remote peer in the node.
node-list-banned-peersList banned peers in the node.
node-ban-peer-addressBan an address in the node for the specified duration.
node-unban-peer-addressUnban an address in the node.
node-list-discouraged-peersList discouraged peers in the node.
node-undiscourage-peer-addressUndiscourage an address in the node.

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.
screen-clear(cold) Clear screen.
help(cold) Print this message or the help of the given subcommand(s).