Command line interface

Commands

help

Displays a summary of all available CLI commands of Lisk Core.

Lisk blockchain application platform

VERSION
  lisk-core/3.0.0-beta.2 darwin-x64 node-v12.18.4

USAGE
  $ lisk-core [COMMAND]

TOPICS
  account      Commands relating to Lisk Core accounts.
  block        Commands relating to Lisk Core blocks.
  blockchain   Commands relating to Lisk Core blockchain data.
  config       Commands relating to Lisk Core node configuration.
  forger-info  Commands relating to Lisk Core forger-info data.
  forging      Commands relating to Lisk Core forging.
  node         Commands relating to Lisk Core node.
  passphrase   Commands relating to Lisk Core passphrases.
  sdk          Commands relating to Lisk SDK development.
  transaction  Commands relating to Lisk Core transactions.

COMMANDS
  hash-onion  Create hash onions to be used by the forger.
  help        display help for lisk-core
  start       Start Lisk Core Node.

start

Starts the Lisk Core node.

USAGE
  $ lisk-core start

OPTIONS
  -c, --config=config                                                        File path to a custom config. Environment variable "LISK_CONFIG_FILE" can also be used.
  -d, --data-path=data-path                                                  Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
  -l, --log=trace|debug|info|warn|error|fatal                                File log level. Environment variable "LISK_FILE_LOG_LEVEL" can also be used.
  -n, --network=network                                                      [default: mainnet] Default network config to use. Environment variable "LISK_NETWORK" can also be used.
  -p, --port=port                                                            Open port for the peer to peer incoming connections. Environment variable "LISK_PORT" can also be used.
  --api-ws                                                                   Enable websocket communication for api-client.
  --api-ws-port=api-ws-port                                                  Port to be used for api-client websocket.
  --console-log=trace|debug|info|warn|error|fatal                            Console log level. Environment variable "LISK_CONSOLE_LOG_LEVEL" can also be used.
  --enable-forger-plugin                                                     Enable Forger Plugin. Environment variable "LISK_ENABLE_FORGER_PLUGIN" can also be used.
  --enable-http-api-plugin                                                   Enable HTTP API Plugin. Environment variable "LISK_ENABLE_HTTP_API_PLUGIN" can also be used.
  --enable-ipc                                                               Enable IPC communication. This will also load up plugins in child process and communicate over IPC.
  --enable-monitor-plugin                                                    Enable Monitor Plugin. Environment variable "LISK_ENABLE_MONITOR_PLUGIN" can also be used.

  --enable-report-misbehavior-plugin                                         Enable ReportMisbehavior Plugin. Environment variable "LISK_ENABLE_REPORT_MISBEHAVIOR_PLUGIN" can also be
                                                                             used.

  --forger-plugin-port=forger-plugin-port                                    Port to be used for Forger Plugin. Environment variable "LISK_FORGER_PLUGIN_PORT" can also be used.

  --forger-plugin-whitelist=forger-plugin-whitelist                          List of IPs in comma separated value to allow the connection. Environment variable
                                                                             "LISK_FORGER_PLUGIN_WHITELIST" can also be used.

  --http-api-plugin-port=http-api-plugin-port                                Port to be used for HTTP API Plugin. Environment variable "LISK_HTTP_API_PLUGIN_PORT" can also be used.

  --http-api-plugin-whitelist=http-api-plugin-whitelist                      List of IPs in comma separated value to allow the connection. Environment variable
                                                                             "LISK_HTTP_API_PLUGIN_WHITELIST" can also be used.

  --monitor-plugin-port=monitor-plugin-port                                  Port to be used for Monitor Plugin. Environment variable "LISK_MONITOR_PLUGIN_PORT" can also be used.

  --monitor-plugin-whitelist=monitor-plugin-whitelist                        List of IPs in comma separated value to allow the connection. Environment variable
                                                                             "LISK_MONITOR_PLUGIN_WHITELIST" can also be used.

  --overwrite-config                                                         Overwrite network configs if they exist already

  --report-misbehavior-plugin-port=report-misbehavior-plugin-port            Port to be used for ReportMisbehavior Plugin. Environment variable "LISK_REPORT_MISBEHAVIOR_PLUGIN_PORT" can
                                                                             also be used.

  --report-misbehavior-plugin-whitelist=report-misbehavior-plugin-whitelist  List of IPs in comma separated value to allow the connection. Environment variable
                                                                             "LISK_REPORT_MISBEHAVIOR_PLUGIN_WHITELIST" can also be used.

  --seed-peers=seed-peers                                                    Seed peers to initially connect to in format of comma separated "ip:port". IP can be DNS name or IPV4 format.
                                                                             Environment variable "LISK_SEED_PEERS" can also be used.

EXAMPLES
  start
  start --network dev --data-path ./data --log debug

hash-onion

Creates hash onions to be used by a delegate.

USAGE
  $ lisk-core hash-onion

OPTIONS
  -c, --count=count        [default: 1000000] Total number of hashes to produce
  -d, --distance=distance  [default: 1000] Distance between each hashes
  -o, --output=output      Output file path

EXAMPLE
  hash-onion --count=1000000 --distance=2000

Topics

account

Commands relating to Lisk Core accounts.

USAGE
  $ lisk-core account:COMMAND

COMMANDS
  account:create    Return randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address.
  account:get       Get account information for a given address.
  account:show      Show account information for a given passphrase.
  account:validate  Validate base32 address.

block

Commands relating to Lisk Core blocks.

USAGE
  $ lisk-core block:COMMAND

COMMANDS
  block:get  Get block information for a given id or height.

blockchain

Commands relating to Lisk Core blockchain data.

USAGE
  $ lisk-core blockchain:COMMAND

COMMANDS
  blockchain:download  Download snapshot from <URL>.
  blockchain:export    Export to <FILE>.
  blockchain:hash      Generate SHA256 hash from <PATH>.
  blockchain:import    Import from <FILE>.
  blockchain:reset     Reset the blockchain data.

config

Commands relating to Lisk Core node configuration.

USAGE
  $ lisk-core config:COMMAND

COMMANDS
  config:show  Show application config.

forger-info

Commands relating to Lisk Core forger-info data.

USAGE
  $ lisk-core forger-info:COMMAND

COMMANDS
  forger-info:export  Export to <FILE>.
  forger-info:import  Import from <FILE>.

forging

Commands relating to Lisk Core forging.

USAGE
  $ lisk-core forging:COMMAND

COMMANDS
  forging:disable  Disable forging for given delegate address.
  forging:enable   Enable forging for given delegate address.
  forging:config   Generate delegate forging config for given passphrase and password.
  forging:status   Get forging information for the locally running node.

forging:config

lisk-core forging:config --help
Generate delegate forging config for given passphrase and password.

USAGE
  $ lisk-core forging:config

OPTIONS
  -c, --count=count            [default: 1000000] Total number of hashes to produce
  -d, --distance=distance      [default: 1000] Distance between each hashes
  -o, --output=output          Output file path

  -p, --passphrase=passphrase  Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
                               	Examples:
                               	- --passphrase='my secret passphrase' (should only be used where security is not important)

  -w, --password=password      Specifies a source for your secret password. Command will prompt you for input if this option is not set.
                               	Examples:
                               	- --password=pass:password123 (should only be used where security is not important)

  --pretty                     Prints JSON in pretty format rather than condensed.

EXAMPLES
  forging:config
  forging:config --password your_password
  forging:config --passphrase your_passphrase --password your_password --pretty
  forging:config --count=1000000 --distance=2000 --output /tmp/forging_config.json

node

Commands relating to Lisk Core node.

USAGE
  $ lisk-core node:COMMAND

COMMANDS
  node:info  Get node information from a running application.

passphrase

Commands relating to Lisk Core passphrases.

USAGE
  $ lisk-core passphrase:COMMAND

COMMANDS
  passphrase:decrypt  Decrypt secret passphrase using the password provided at the time of encryption.
  passphrase:encrypt  Encrypt secret passphrase using password.

sdk

Commands relating to Lisk SDK development.

USAGE
  $ lisk-core sdk:COMMAND

COMMANDS
  sdk:link  Symlink specific SDK folder during development.

transaction

Commands relating to Lisk Core transactions.

USAGE
  $ lisk-core transaction:COMMAND

COMMANDS
  transaction:create  Create transaction which can be broadcasted to the network. Note: fee and amount should be in Beddows!!
  transaction:get     Get transaction from local node by ID.
  transaction:send    Send transaction to the local node.
  transaction:sign    Sign encoded transaction.

Config file structure

The configuration for Lisk Core is stored in ~/.lisk/lisk-core/config. Each network uses a separate configuration.

~/.lisk/lisk-core/config/devnet/config.json
{
    "rpc": {
      "enable": false,
      "mode": "ipc",
      "port": 8080,
    },
    "networkVersion": "2.0",
    "label": "devnet",
    "genesisConfig": {
        "blockTime": 10,
        "communityIdentifier": "Lisk",
        "maxPayloadLength": 15360,
        "bftThreshold": 68,
        "minFeePerByte": 1000,
        "baseFees": [
            {
                "moduleID": 5,
                "assetID": 0,
                "baseFee": "1000000000"
            }
        ],
        "rewards": {
            "milestones": ["500000000", "400000000", "300000000", "200000000", "100000000"],
            "offset": 2160,
            "distance": 3000000
        },
        "minRemainingBalance": "5000000",
        "activeDelegates": 101,
        "standbyDelegates": 2,
        "delegateListRoundOffset": 2
    },
    "logger": {
        "fileLogLevel": "debug",
        "consoleLogLevel": "info"
    },
    "network": {
        "port": 5000,
        "seedPeers": [
            {
                "ip": "127.0.0.1",
                "port": 5000
            }
        ]
    },
    "forging": {
        "force": true,
        "waitThreshold": 2,
        "delegates": [],
        "defaultPassword": "elephant tree paris dragon chair galaxy"
    },
    "plugins": {}
}