CLI commands

Help

ironfish help displays all the commands and topics you can use with the Iron Fish CLI. To get additional info about a specific command or a specific topic, type ironfish [topic/command] help.

E.g. for a topic:

ironfish wallet --help

E.g. for a command:

ironfish wallet:send --help

Node

start

Starts the full node

ironfish start

To start a full node with a different port and a different data directory

ironfish start --port=9034 --datadir=~/.ironfish2/

stop

Stops the full node

ironfish stop

status

Prints out:

  • the status of your node (started / stopped)
  • the syncing status of your node and syncing stats
  • the networking status of your node (and networking stats)
ironfish status

To see live updates:

ironfish status -f

reset

Deletes your chain and wallet state. This will permanently delete your accounts, so back them up first if necessary.

ironfish reset

Config

config:show

Prints out the content of your config file

ironfish config:show

config:edit

Opens the config file with your default code editor

ironfish config:edit

Note: you need to set the editor config or the default editor environment variable for this command to work. E.g. for Vscode at the config level: ironfish config:set editor "/Applications/Visual Studio Code.app/Contents/MacOS/Electron" E.g. for Vscode at the environment level: export EDITOR="/Applications/Visual Studio Code.app/Contents/MacOS/Electron"

config:set

Sets the config value for the key.

E.g.

config:set enableMetrics "true"

Note: the list of configuration options is available here

config:get

Displays the configuration value for your node

E.g.

config:get enableMetrics

Miners

miners:start

Starts a miner and subscribes to new blocks for the node. The node has to be synced with the network for the miner to start mining.

ironfish miners:start

Join a mining pool.

ironfish miners:start -p <ip-address-of-pool>

miners:pool:start

Starts a mining pool with the name set in the poolName configuration option.

ironfish miners:pool:start

Start a pool with disabled payouts.

ironfish miners:pool:start --no-payouts

miners:mined

List mined block hashes

ironfish miners:mined [START] [STOP]

Optional arguments: [START] and [STOP] are either positive numbers that indicate the starting and stopping blocks or are negative to count backwards from the head of the chain.

Networking

peers

Displays the list of peers connected to the node.

ironfish peers

Displays the list of peers with live update.

ironfish peers -f

peers:show

Displays info about a peer

ironfish peers:show [IDENTITY]

Wallet / Accounts

wallet:create

Creating a new account with interactive mode

ironfish wallet:create

Creating a new account in command line

ironfish wallet:create MyNewAccount

wallet:address

Gets the current account's public key

ironfish wallet:address

Gets a specific account's public key

ironfish wallet:address MyNewAccount

wallet:balance

Gets the current account's balance

ironfish wallet:balance

wallet:balances

Gets the current account's balance for all assets

ironfish wallet:balances

Gets a specific account's public key

ironfish wallet:balance -a MyNewAccount

wallet:notes

Gets the current account's notes

ironfish wallet:notes

Gets a specific account's notes

ironfish wallet:notes -a MyNewAccount

wallet:transactions

Gets the current account's transactions

ironfish wallet:transactions

Gets a specific account's transactions

ironfish wallet:transactions -a MyNewAccount

wallet:send

Sending a new transaction with interactive mode

ironfish wallet:send

Creating a new transaction in command line

ironfish wallet:send -a 2 -t 997c5...c52ed

wallet:mint

Mint a new asset with interactive mode

ironfish wallet:mint

Mint a new asset in command line

ironfish wallet:mint -i 618c0...b29b4 -a 1000

wallet:burn

Burn an asset with interactive mode

ironfish wallet:burn

Burn an asset in command line

ironfish wallet:burn -i 618c0...b29b4 -a 1000

Faucet

faucet

Connects to the Iron Fish faucet to get test funds

ironfish faucet

Chain

chain:export

Export a part of the chain database to JSON

ironfish chain:export [START] [STOP]

Optional arguments: [START] and [STOP] are either positive numbers that indicate the starting and stopping blocks or are negative to count backwards from the head of the chain.

chain:forks

Try to detect forks that are being mined

ironfish chain:forks

chain:repair

Rebuild the main chain to fix corruption

ironfish chain:repair

chain:show

Shows the heaviest head and tail of the node's chain. Includes the last ten blocks in the chain.

ironfish chain:show [START] [STOP]

Optional arguments: [START] and [STOP] are either positive numbers that indicate the starting and stopping blocks or are negative to count backwards from the head of the chain.

chain:download

Downloads and imports a snapshot of the chain database

ironfish chain:download

Blocks

blocks:show

Show the block header of a requested hash

ironfish blocks:show [HASH]

Workers

workers:status

Shows the status of the worker pool

ironfish workers:status