Skip to content

Command Line Tool

Hantao Sun edited this page Apr 22, 2020 · 5 revisions

Command Line Tool Document

Introduction

This is BigBang command line tool manual, includes command and options.

  • bigbang client launch a RPC client. It supports command and console models.
    • Type bigbang-cli COMMAND to launch the command model, and exit while return.
    • Type bigbang-cli to launch the console model, and then type commands one by one.
  • bigbang server launch a bigbang blockchain node on P2P.
  • bigbang miner launch a miner of POW. It depends on a bigbang server.

bigbang client

Usage:
        bigbang-cli (OPTIONS) COMMAND

Run bigbang RPC client

Options:
  -help                                 Get more information
  -daemon                               Run server in background
  -debug                                Run in debug mode
  -datadir=<path>                       Root directory of resources
  -conf=<file>                          Configuration file name
  -testnet                              Use the test network
  -nowallet                             Launch server without wallet
  -version                              Get bigbang version
  -purge                                Purge database and blockfile
  -checkrepair                          Check and repair database
  -onlycheck                            Only check database and blockfile
  -blocknotify                          Execute command when the best block changes (%s in cmd is replaced by block hash)
  -logfilesize=<size>                   Log file size(M) (default: 10M)
  -loghistorysize=<size>                Log history size(M) (default: 2048M)
  -rpcport=port                         Listen for JSON-RPC connections on <port> (default: 9902 or testnet: 9904))
  -rpclisten                            Accept RPC IPv4 and IPv6 connections (default: 0)
  -rpclisten4                           Accept RPC IPv4 connections (default: 0)
  -rpclisten6                           Accept RPC IPv6 connections (default: 0)
  -rpcuser=<user>                       <user> name for JSON-RPC connections
  -rpcpassword=<password>               <password> for JSON-RPC connections
  -rpcssl                               Use OpenSSL (https) for JSON-RPC connections or not (default false)
  -norpcsslverify                       Verify SSL or not (default yes)
  -rpccafile=<file.crt>                 SSL CA file name (default ca.crt)
  -rpccertfile=<file.crt>               Server certificate file (default: server.crt)
  -rpcpkfile=<file.pem>                 Server private key (default: server.pem)
  -rpcciphers=<ciphers>                 Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
  -statdata                             Enable statistical data or not (default false)
  -rpclog                               Enable write RPC log (default true)
  -rpchost=<ip>                         Send commands to node running on <ip> (default: 127.0.0.1)
  -rpctimeout=<time>                    Connection timeout <time> seconds (default: 120)

Commands:
  help                                  List commands, or get help for a command.
  stop                                  Stop bigbang server.
  version                               Get bigbang server version.
  signrawtransactionwithwallet          Sign a raw transaction with wallet
  sendrawtransaction                    Submit raw transaction (serialized, hex-encoded) with offline signature to current node and broadcast it to p2p network.
  getpeercount                          Return the number of connections to other nodes.
  listpeer                              Return data about each connected network node.
  addnode                               Attempt to add a node into the addnode list.
  removenode                            Attempt to remove a node from the addnode list.
  getforkcount                          Return the number of forks.
  listfork                              If true, list of all forks, or subscribed forks
  getgenealogy                          Return the list of ancestry and subline.
  getblocklocation                      Return the location with given block.
  getblockcount                         Return the number of blocks in the given fork, includes extended block and vacant block
  getblockhash                          Return a list of block hash in the fork at a specific height.
  getblock                              Return details of a block with given block-hash.
  getblockdetail                        Return details of a block with given block-hash.
  gettxpool                             Get transaction pool information
  gettransaction                        Get transaction information
  sendtransaction                       Submit raw transaction (serialized, hex-encoded) to local node and network.
  getforkheight                         Return the number of height in the given fork.
  getvotes                              Get votes
  listdelegate                          List delegate
  listkey                               Return Object that has pubkey as keys, associated status as values.
  getnewkey                             Return a new pubkey for receiving payments.
  encryptkey                            Changes the passphrase for <oldpassphrase> to <passphrase>
  lockkey                               Removes the encryption key from memory, locking the key.
  unlockkey                             Unlock the key.
  importprivkey                         Add a private key to your wallet.
  importpubkey                          Add a public key to your wallet.
  importkey                             Reveal the serialized key corresponding to <pubkey>.
  exportkey                             Reveal the serialized key corresponding to <pubkey>.
  addnewtemplate                        Return encoded address for the given template id.
  importtemplate                        Return encoded address for the given template.
  exporttemplate                        Return encoded address for the given template.
  validateaddress                       Return information about <address>.
  resyncwallet                          Resync wallet's transactions.
  getbalance                            Get balance of an address.
  listtransaction                       Return transactions list.
  sendfrom                              Send a transaction.
  createtransaction                     Create a transaction.
  signtransaction                       Sign a transaction.
  signmessage                           Sign a message with the private key of an pubkey
  listaddress                           List all of the addresses from pub keys and template ids
  exportwallet                          Export all of keys and templates from wallet to a specified file in JSON format.
  importwallet                          Import keys and templates from an archived file to the wallet in JSON format.
  makeorigin                            Return hex-encoded block.
  verifymessage                         Verify a signed message
  makekeypair                           Make a public/private key pair.
  getpubkeyaddress                      Return encoded address for the given public key.
  gettemplateaddress                    Return encoded address for the given template id.
  maketemplate                          Return encoded address for the given template id.
  decodetransaction                     Return a JSON object representing the serialized, hex-encoded transaction.
  listunspent                           Return a JSON object listing unspent utxo by user specifying arguments address, fork(optional, main fork by default), maximum unspents(optional, 3 by default) and an input file containing list of multiple addresses(optional, plain text file name must be absolute path, one line only contains one wallet address with maximum of 10,000 lines). You may specify one wallet address in RPC command line with or without a text file name, core wallet will return all unspent utxos in a single batch operation.
  getwork                               Get mint work
  submitwork                            Submit mint work
  querystat                             Query statistical data

COMMAND usage, to see JSON RPC

bigbang server

Usage:
        bigbang-server (OPTIONS)

Run bigbang server

Options:
  -help                                 Get more information
  -daemon                               Run server in background
  -debug                                Run in debug mode
  -datadir=<path>                       Root directory of resources
  -conf=<file>                          Configuration file name
  -testnet                              Use the test network
  -nowallet                             Launch server without wallet
  -version                              Get bigbang version
  -purge                                Purge database and blockfile
  -checkrepair                          Check and repair database
  -onlycheck                            Only check database and blockfile
  -blocknotify                          Execute command when the best block changes (%s in cmd is replaced by block hash)
  -logfilesize=<size>                   Log file size(M) (default: 10M)
  -loghistorysize=<size>                Log history size(M) (default: 2048M)
  -addfork=<forkid>                     Add a supported fork
  -addgroup=<forkid of group leader>    Add a supported fork group
  -mpvssaddress=<address>               mpvss address
  -mpvsskey=<key>                       mpvss key
  -cryptonightaddress=<address>         POW cryptonight address
  -cryptonightkey=<key>                 POW cryptonight key
  -listen                               Accept IPv4 and IPv6 connections from outside (default: 0)
  -listen4                              Accept IPv4 connections from outside (default: 0)
  -listen6                              Accept IPv6 connections from outside (default: 0)
  -listenaddressv4=<ip>                 listens for IPv4 addresses (default: 0.0.0.0)
  -listenaddressv6=<ip>                 listens for IPv6 addresses (default: ::)
  -port=<port>                          Listen for connections on <port> (default: 9901 or testnet: 9903)
  -gateway=<ip>:<port>                  The form of <ip>:<port> of address of gateway(<ip> can be IPv4 or IPv6, default <port>: 9901, IPv6 format: [ip]:port)
  -maxconnections=<n>                   Maintain at most <n> connections to peers (default: 125)
  -timeout=<n>                          Specify connection timeout (in milliseconds, 5 by default)
  -addnode=<address>:<port>             Add a node to connect to and attempt to keep the connection open(<address> can be IPv4 or IPv6 or domain name, default <port>: 9901, IPv6 format: [ip]:port)
  -connect=<address>:<port>             Connect only to the specified node(<address> can be IPv4 or IPv6 or domain name, default <port>: 9901, IPv6 format: [ip]:port)
  -confidentAddress=<address>           Trust node address(<address> can be IPv4 or IPv6)
  -dnseed=<address>:<port>              DNSeed address list(<address> can be IPv4 or IPv6 or domain name, default <port>: 9906, IPv6 format: [ip]:port)
  -rpcport=port                         Listen for JSON-RPC connections on <port> (default: 9902 or testnet: 9904))
  -rpclisten                            Accept RPC IPv4 and IPv6 connections (default: 0)
  -rpclisten4                           Accept RPC IPv4 connections (default: 0)
  -rpclisten6                           Accept RPC IPv6 connections (default: 0)
  -rpcuser=<user>                       <user> name for JSON-RPC connections
  -rpcpassword=<password>               <password> for JSON-RPC connections
  -rpcssl                               Use OpenSSL (https) for JSON-RPC connections or not (default false)
  -norpcsslverify                       Verify SSL or not (default yes)
  -rpccafile=<file.crt>                 SSL CA file name (default ca.crt)
  -rpccertfile=<file.crt>               Server certificate file (default: server.crt)
  -rpcpkfile=<file.pem>                 Server private key (default: server.pem)
  -rpcciphers=<ciphers>                 Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
  -statdata                             Enable statistical data or not (default false)
  -rpclog                               Enable write RPC log (default true)
  -rpcmaxconnections=<num>              Set max connections to <num> (default: 5)
  -rpcallowip=<ip>                      Allow JSON-RPC connections from specified <ip> address
  -chklvl=<n>                           Set storage check level (default: 0, range=0-3)
  -chkdpth=<n>                          Set storage check depth (default: 1440, range=0-n)

bigbang miner

Usage:
        bigbang-miner (OPTIONS)

Run bigbang miner

Options:
  -help                                 Get more information
  -daemon                               Run server in background
  -debug                                Run in debug mode
  -datadir=<path>                       Root directory of resources
  -conf=<file>                          Configuration file name
  -testnet                              Use the test network
  -nowallet                             Launch server without wallet
  -version                              Get bigbang version
  -purge                                Purge database and blockfile
  -checkrepair                          Check and repair database
  -onlycheck                            Only check database and blockfile
  -blocknotify                          Execute command when the best block changes (%s in cmd is replaced by block hash)
  -logfilesize=<size>                   Log file size(M) (default: 10M)
  -loghistorysize=<size>                Log history size(M) (default: 2048M)
  -rpcport=port                         Listen for JSON-RPC connections on <port> (default: 9902 or testnet: 9904))
  -rpclisten                            Accept RPC IPv4 and IPv6 connections (default: 0)
  -rpclisten4                           Accept RPC IPv4 connections (default: 0)
  -rpclisten6                           Accept RPC IPv6 connections (default: 0)
  -rpcuser=<user>                       <user> name for JSON-RPC connections
  -rpcpassword=<password>               <password> for JSON-RPC connections
  -rpcssl                               Use OpenSSL (https) for JSON-RPC connections or not (default false)
  -norpcsslverify                       Verify SSL or not (default yes)
  -rpccafile=<file.crt>                 SSL CA file name (default ca.crt)
  -rpccertfile=<file.crt>               Server certificate file (default: server.crt)
  -rpcpkfile=<file.pem>                 Server private key (default: server.pem)
  -rpcciphers=<ciphers>                 Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
  -statdata                             Enable statistical data or not (default false)
  -rpclog                               Enable write RPC log (default true)
  -rpchost=<ip>                         Send commands to node running on <ip> (default: 127.0.0.1)
  -rpctimeout=<time>                    Connection timeout <time> seconds (default: 120)
Clone this wiki locally