Skip to content

JSON RPC

MathxH Chen edited this page Sep 11, 2020 · 18 revisions

JSON-RPC Document

Introduction

This is the detailed BigBang JSON-RPC commands document, includes format, params, examples, errors and so on.

command line format:

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

System

  • help: List commands, or get help for a command.
  • stop: Stop bigbang server.
  • version: Get bigbang server version.

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.

Blockchain & TxPool

Wallet

Util

  • 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.
  • gettxfee: Return TxFee for vchData Hex data
  • 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.

Mint


help

Usage:

        help ("command")

List commands, or get help for a command.

Arguments:

 "command"                              (string, optional) command name

Request:

 "param" :
 {
   "command": ""                        (string, optional) command name
 }

Response:

 "result": "help"                       (string, required) help info

Examples:

>> bigbang-cli help

>> bigbang-cli help getpeercount

Errors:

	none

stop

Usage:

        stop

Stop bigbang server.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result": "result"                     (string, required) stop result

Examples:

>> bigbang-cli stop
<< bigbang server stopping

>> curl -d '{"id":1,"method":"stop","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":"bigbang server stopping"}

Errors:

	none

version

Usage:

        version

Get bigbang server version.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result": "version"                    (string, required) bigbang version

Examples:

>> bigbang-cli version
<< Bigbang server version is v0.1.0

>> curl -d '{"id":0,"method":"version","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":"Bigbang server version is v0.1.0"}

Errors:

	none

getpeercount

Usage:

        getpeercount

Return the number of connections to other nodes.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result": count                        (int, required) peer count

Examples:

>> bigbang-cli getpeercount
<< 0

>> curl -d '{"id":3,"method":"getpeercount","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":3,"jsonrpc":"2.0","result":0}

Errors:

	none

listpeer

Usage:

        listpeer

Return data about each connected network node.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result" :
   [
     "peer":                            (object, required) 
     {
       "address": "",                   (string, required) peer address
       "services": "",                  (string, required) service
       "lastsend": "",                  (string, required) last send time(utc)
       "lastrecv": "",                  (string, required) last receive time(utc)
       "conntime": "",                  (string, required) active time(utc)
       "pingtime": 0,                   (int, required) ping pong time
       "version": "",                   (string, required) version
       "subver": "",                    (string, required) sub version
       "inbound": true|false,           (bool, required) accept multiple connection or not
       "height": 0,                     (int, required) starting height
       "banscore": 0                    (int, required) ban score
     }
   ]

Examples:

>> bigbang-cli listpeer
<< [{"address":"113.105.146.22","services":"NODE_NETWORK,NODE_DELEGATED","lastsend":"2019-10-25 03:11:09","lastrecv":"2019-10-25 03:11:09","conntime":"2019-10-25 03:05:23","version":"0.1.0","subver":"/Bigbang:0.9.2/Protocol:0.1.0/9be9a865898c5cea90c716c17603cf3f0f185a5b","inbound":false,"height":31028,"banscore":true}]

>> curl -d '{"id":40,"method":"listpeer","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":40,"jsonrpc":"2.0","result":[{"address":"113.105.146.22","services":"NODE_NETWORK,NODE_DELEGATED","lastsend":"2019-10-25 03:11:09","lastrecv":"2019-10-25 03:11:09","conntime":"2019-10-25 03:05:23","version":"0.1.0","subver":"/Bigbang:0.9.2/Protocol:0.1.0/9be9a865898c5cea90c716c17603cf3f0f185a5b","inbound":false,"height":31028,"banscore":true}]}

Errors:

	none

addnode

Usage:

        addnode <"node">

Attempt to add a node into the addnode list.

Arguments:

 "node"                                 (string, required) node host:port

Request:

 "param" :
 {
   "node": ""                           (string, required) node host:port
 }

Response:

 "result": "result"                     (string, required) add node result

Examples:

>> bigbang-cli addnode 113.105.146.22
<< Add node successfully: 113.105.146.22

>> curl -d '{"id":3,"method":"addnode","jsonrpc":"2.0","params":{"node":"113.105.146.22:9901"}}' http://127.0.0.1:9902
<< {"id":3,"jsonrpc":"2.0","result":"Add node successfully: 113.105.146.22:9901"}

Errors:

* {"code":-206,"message":"Failed to add node."}

removenode

Usage:

        removenode <"node">

Attempt to remove a node from the addnode list.

Arguments:

 "node"                                 (string, required) node host:port

Request:

 "param" :
 {
   "node": ""                           (string, required) node host:port
 }

Response:

 "result": "result"                     (string, required) remove node result

Examples:

>> bigbang-cli removenode 113.105.146.22
<< Remove node successfully: 113.105.146.22

>> curl -d '{"id":67,"method":"removenode","jsonrpc":"2.0","params":{"node":"113.105.146.22:9901"}}' http://127.0.0.1:9902
<< {"id":67,"jsonrpc":"2.0","result":"Remove node successfully: 113.105.146.22:9901"}

Errors:

* {"code":-206,"message":"Failed to remove node."}

getforkcount

Usage:

        getforkcount

Return the number of forks.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result": count                        (int, required) fork count

Examples:

>> bigbang-cli getforkcount
<< 1

>> curl -d '{"id":69,"method":"getforkcount","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":69,"jsonrpc":"2.0","result":1}

Errors:

	none

listfork

Usage:

        listfork (-a|-noa*all*)

If true, list of all forks, or subscribed forks

Arguments:

 -a|-noa*all*                           (bool, optional, default=false) list all forks or not

Request:

 "param" :
 {
   "all": true|false                    (bool, optional, default=false) list all forks or not
 }

Response:

 "result" :
   [
     "profile":                         (object, required) fork profile info
     {
       "fork": "",                      (string, required) fork id with hex system
       "name": "",                      (string, required) fork name
       "symbol": "",                    (string, required) fork symbol
       "amount": 0.0,                   (double, required) amount
       "reward": 0.0,                   (double, required) mint reward
       "halvecycle": 0,                 (uint, required) halve cycle: 0: fixed reward, >0: blocks of halve cycle
       "isolated": true|false,          (bool, required) is isolated
       "private": true|false,           (bool, required) is private
       "enclosed": true|false,          (bool, required) is enclosed
       "owner": ""                      (string, required) owner's address
     }
   ]

Examples:

>> bigbang-cli listfork
<< [{"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","name":"BigBang Network","symbol":"BIG","amount":100000000.000000,"reward":15,"halvecycle":0,"isolated":true,"private":false,"enclosed":false,"owner":"1mjw7aa0s7v9sv7x3thvcexxzjz4tq82j5qc12dy29ktqy84haa0j7dwb"}]

>> {"id":69,"method":"listfork","jsonrpc":"2.0","params":{}}
<< {"id":69,"jsonrpc":"2.0","result":[{"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","name":"BigBang Network","symbol":"BIG","amount":100000000.000000,"reward":15,"halvecycle":0,"isolated":true,"private":false,"enclosed":false,"owner":"1mjw7aa0s7v9sv7x3thvcexxzjz4tq82j5qc12dy29ktqy84haa0j7dwb"}]}

Errors:

	none

getgenealogy

Usage:

        getgenealogy (-f="fork")

Return the list of ancestry and subline.

Arguments:

 -f="fork"                              (string, optional) fork hash

Request:

 "param" :
 {
   "fork": ""                           (string, optional) fork hash
 }

Response:

 "result" :
 {
   [
     "ancestry":                        (object, required) ancestry
     {
       "parent": "",                    (string, required) parent fork hash
       "height": 0                      (int, required) parent origin height
     }
   ]
   [
     "subline":                         (object, required) subline
     {
       "sub": "",                       (string, required) sub fork hash
       "height": 0                      (int, required) sub origin height
     }
   ]
 }

Examples:

>> bigbang-cli getgenealogy
<< {"ancestry":[],"subline":[]}

>> curl -d '{"id":75,"method":"getgenealogy","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":75,"jsonrpc":"2.0","result":{"ancestry":[],"subline":[]}}

>> bigbang-cli getgenealogy 1
<< {"code":-6,"message":"Unknown fork"}

>> curl -d '{"id":1,"method":"getgenealogy","jsonrpc":"2.0","params":{"fork":"1"}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","error":{"code":-6,"message":"Unknown fork"}}

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}

getblocklocation

Usage:

        getblocklocation <"block">

Return the location with given block.

Arguments:

 "block"                                (string, required) block hash

Request:

 "param" :
 {
   "block": ""                          (string, required) block hash
 }

Response:

 "result" :
 {
   "fork": "",                          (string, required) fork hash
   "height": 0                          (int, required) block height
 }

Examples:

>> bigbang-cli getblocklocation 609a797ca28042d562b11355038c516d65ba30b91c7033d83c61b81aa8c538e3
<< {"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","height":1}

>> curl -d '{"id":6,"method":"getblocklocation","jsonrpc":"2.0","params":{"block":"609a797ca28042d562b11355038c516d65ba30b91c7033d83c61b81aa8c538e3"}}' http://127.0.0.1:9902
<< {"id":6,"jsonrpc":"2.0","result":{"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","height":1}}

Errors:

* {"code":-6,"message":"Unknown block."}

getblockcount

Usage:

        getblockcount (-f="fork")

Return the number of blocks in the given fork, includes extended block and vacant block

Arguments:

 -f="fork"                              (string, optional) fork hash

Request:

 "param" :
 {
   "fork": ""                           (string, optional) fork hash
 }

Response:

 "result": count                        (int, required) block count

Examples:

>> bigbang-cli getblockcount
<< 32081

>> curl -d '{"id":4,"method":"getblockcount","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":4,"jsonrpc":"2.0","result":32081}

>> bigbang-cli getblockcount -f=a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0
<< 32081

>> curl -d '{"id":5,"method":"getblockcount","jsonrpc":"2.0","params":{"fork":"0"}}' http://127.0.0.1:9902
<< {"id":5,"jsonrpc":"2.0","result":32081}

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}

getblockhash

Usage:

        getblockhash <height> (-f="fork")

Return a list of block hash in fork at specific height.
First of the list is the main block hash, others are extended blocks hash in order.

Arguments:

 height                                 (int, required) block height
 -f="fork"                              (string, optional) fork hash

Request:

 "param" :
 {
   "height": 0,                         (int, required) block height
   "fork": ""                           (string, optional) fork hash
 }

Response:

 "result" :
   [
     "hash": ""                         (string, required) one block hash
   ]

Examples:

>> bigbang-cli getblockhash 0
<< ["a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0"]

>> curl -d '{"id":37,"method":"getblockhash","jsonrpc":"2.0","params":{"height":0}}' http://127.0.0.1:9902
<< {"id":37,"jsonrpc":"2.0","result":["a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0"]}

>> bigbang-cli getblockhash 0 -f=a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}
* {"code":-6,"message":"Block number out of range."}

getblock

Usage:

        getblock <"block">

Return details of a block with given block-hash.

Arguments:

 "block"                                (string, required) block hash

Request:

 "param" :
 {
   "block": ""                          (string, required) block hash
 }

Response:

 "result" :
 {
   "hash": "",                          (string, required) block hash
   "hashPrev": "",                      (string, required) block prev hash
   "version": 0,                        (uint, required) version
   "type": "",                          (string, required) block type
   "time": 0,                           (uint, required) block time
   "fork": "",                          (string, required) fork hash
   "height": 0,                         (uint, required) block height
   "txmint": "",                        (string, required) transaction mint hash
   [
     "tx": ""                           (string, required) transaction hash
   ]
   "prev": ""                           (string, optional) previous block hash
 }

Examples:

>> bigbang-cli getblock ca49b8d07ac2849c455a813dd967bb0b306b48406d787259f4ddb8f6a0e0cf4c
<< {"hash":"ca49b8d07ac2849c455a813dd967bb0b306b48406d787259f4ddb8f6a0e0cf4c","version":1,"type":"primary-pow","time":1538138566,"prev":"47b86e794e7ce0546def4fe3603d58d9cc9fc87eeee676bd15ae90e45ab51f8a","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","height":31296,"txmint":"3d4ed629c594b924d72480e29a332ca91915be685c85940a8c501f8248269e29","tx":[]}

>> curl -d '{"id":10,"method":"getblock","jsonrpc":"2.0","params":{"block":"ca49b8d07ac2849c455a813dd967bb0b306b48406d787259f4ddb8f6a0e0cf4c"}}' http://127.0.0.1:9902
<< {"id":10,"jsonrpc":"2.0","result":{"hash":"ca49b8d07ac2849c455a813dd967bb0b306b48406d787259f4ddb8f6a0e0cf4c","version":1,"type":"primary-pow","time":1538138566,"prev":"47b86e794e7ce0546def4fe3603d58d9cc9fc87eeee676bd15ae90e45ab51f8a","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","height":31296,"txmint":"3d4ed629c594b924d72480e29a332ca91915be685c85940a8c501f8248269e29","tx":[]}}

Errors:

* {"code":-6,"message":"Unknown block."}

getblockdetail

Usage:

        getblockdetail <"block">

Return details of a block with given block-hash.

Arguments:

 "block"                                (string, required) block hash

Request:

 "param" :
 {
   "block": ""                          (string, required) block hash
 }

Response:

 "result" :
 {
   "hash": "",                          (string, required) block hash
   "hashPrev": "",                      (string, required) block prev hash
   "version": 0,                        (uint, required) version
   "type": "",                          (string, required) block type
   "time": 0,                           (uint, required) block time
   "bits": 0,                           (uint, required) nBits
   "fork": "",                          (string, required) fork hash
   "height": 0,                         (uint, required) block height
   "txmint":                            (object, required) transaction mint data
   {
     "txid": "",                        (string, required) transaction hash
     "version": 0,                      (uint, required) version
     "type": "",                        (string, required) transaction type
     "time": 0,                         (uint, required) transaction timestamp
     "lockuntil": 0,                    (uint, required) unlock time
     "anchor": "",                      (string, required) anchor hash
     "blockhash": "",                   (string, required) which block tx located in
     [
       "vin":                           (object, required) vin struct
       {
         "txid": "",                    (string, required) pre-vout transaction hash
         "vout": 0                      (uint, required) pre-vout number
       }
     ]
     "sendfrom": "",                    (string, required) send from address
     "sendto": "",                      (string, required) send to address
     "amount": 0.0,                     (double, required) amount
     "txfee": 0.0,                      (double, required) transaction fee
     "data": "",                        (string, required) data
     "sig": "",                         (string, required) sign
     "fork": "",                        (string, required) fork hash
     "confirmations": 0                 (int, optional) confirmations
   }
   [
     "tx":                              (object, required) transaction data
     {
       "txid": "",                      (string, required) transaction hash
       "version": 0,                    (uint, required) version
       "type": "",                      (string, required) transaction type
       "time": 0,                       (uint, required) transaction timestamp
       "lockuntil": 0,                  (uint, required) unlock time
       "anchor": "",                    (string, required) anchor hash
       "blockhash": "",                 (string, required) which block tx located in
       [
         "vin":                         (object, required) vin struct
         {
           "txid": "",                  (string, required) pre-vout transaction hash
           "vout": 0                    (uint, required) pre-vout number
         }
       ]
       "sendfrom": "",                  (string, required) send from address
       "sendto": "",                    (string, required) send to address
       "amount": 0.0,                   (double, required) amount
       "txfee": 0.0,                    (double, required) transaction fee
       "data": "",                      (string, required) data
       "sig": "",                       (string, required) sign
       "fork": "",                      (string, required) fork hash
       "confirmations": 0               (int, optional) confirmations
     }
   ]
   "prev": ""                           (string, optional) previous block hash
 }

Examples:

>> bigbang-cli getblockdetail 0000497da49cf85b3f7faabe13716534b6dfd9e287b109356cb6bcb8c795f0d7
<< {"hash":"0000497da49cf85b3f7faabe13716534b6dfd9e287b109356cb6bcb8c795f0d7","hashPrev":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0","version":1,"type":"primary-pow","time":1576134143,"bits":36,"fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","height":18813,"txmint":{"txid":"5df1e5ffc3bea8bb3e86f822e5072aa2843242f1889f3cdc5559f7201569079a","version":1,"type":"work","time":1576134143,"lockuntil":0,"anchor":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0","vin":[],"sendfrom":"000000000000000000000000000000000000000000000000000000000","sendto":"20g075m4mh5trbkdy8vbh74n9h7t3npe7tewpnvsfb19p57jnyf3kdh45","amount":1153.000800,"txfee":0.000000,"data":"","sig":"","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},"tx":[{"txid":"5df1e5eb943a31136951da3afb491d4d6f4e3aeba5cfca9c4ef5ca00c30920b8","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e2d022709018117f93273ca192308776586916ba21ee7e513fe04fab9b2f","vout":0},{"txid":"5df1dee3e78e4526f90d15cdcc8e96fedfe1103eca7065772f2ac2bc41d4ad8f","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1xjzjhz5w0an635wngt5qyx8xbg9x2vg0wzkz1a9hx5c97w0b9k0wbzjt","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f99612f76c34f85b16bee2dd3c06e7cb876fb1ef7d6f7d2160de2d3fd9beb75c9b19e90ed9c46053ce81106e1e37717ad175489f30045180be1a2cc7ae524f790e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5eb90ce47fceb3ace5e463f88db7ec98769e2a77571f5bc4b7e957aa69f","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb943a31136951da3afb491d4d6f4e3aeba5cfca9c4ef5ca00c30920b8","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1c23w26d19h6sntvktzfycpgwfge4efy3zghdjc93mnxbptdw7yqwbwgy","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f9374f46f5caf72e9488a168a64c21744d3160b67d168376420945f9375dfda5a5967678db5f32e26ea17e990f9d00890ae0cc4b72ed0ed8a12f80c2aa6de40700","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5eb8208741b33a708a72a29a7380843789975e000dcc74eb31f857b691e","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e1ea583124fa957a4c995cdea702bbdea2e832f8b0fe9a2d1d32578b8869","vout":0},{"txid":"5df1e5eb90ce47fceb3ace5e463f88db7ec98769e2a77571f5bc4b7e957aa69f","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"11nf1cnwft7f2yhr3qnbx9qxsc0b75y4gn7v1rd1qza8khzjdv7623gmm","amount":999.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f95b134de0889f32099b50f354d754b34b4cebdfab6eaa150f0de465967c020a3f140713591b1faf03d4112fa0924a796aca54be26fb8091ba472e8e0632e7c600","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5eb17690dbeae0609370f87c30b490eaf123500fdd55f961780415d5d22","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb8208741b33a708a72a29a7380843789975e000dcc74eb31f857b691e","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1eenpdhcyk5y3ma5pjzf3gp2drq344mc7vcdep170zmbafg5317ae044h","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f977497144b8d4fc40250ecfc7e007d03f1d6293decd0bb115a0b5939a92314282edce494dde0b992e2b503a1f9f50ae00f6f8bc850fd4cbd5e32771f54bea470f","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5eb3000e640a2bea70acdc4f994fb05c8a36e54480e5cdc0ccc578f9cc0","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e3e1bd39f2188ce116039c8af172b9a6b4a4ae464bef5734b496540d9db4","vout":0},{"txid":"5df1e5eb17690dbeae0609370f87c30b490eaf123500fdd55f961780415d5d22","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1q6xgeqaa9hzy19qhhfpmg7hhee05bnq6ha7ph2kvb1d2w6b8qe8hffcy","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f969d47d443711312df441072eca89c3cea44197bec0a7b709ad9d533684f051081c94ed71bea935a8f2eb224cf3a4cb6fa0c79e8925e68a6b8ff35a3fe196a80f","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5ebb45d6713d5048b73780a2e5e9e36a10c5b432bb409ff930b116ffef1","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb3000e640a2bea70acdc4f994fb05c8a36e54480e5cdc0ccc578f9cc0","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1mp11457nha6830emx3mkv4r2zvtg6aebsacdd72x8gzkpqrpvcn6ygd9","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f9c517184e60c41bde9d504d48a02f815a6de60889175d0307b5810336d1c0eacc63978ff83338a5c7546c6e16d76336ac9c436f95cf9dc9e06928e3df80a7a00e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5eb169ec81721b49ca9325b80afd950a685067aa003ae83b8d6d0d982b0","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e337d09b7d286885cd69c0da98c7d04cf740221019d70bcbbb313a159d2a","vout":0},{"txid":"5df1e5ebb45d6713d5048b73780a2e5e9e36a10c5b432bb409ff930b116ffef1","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1a2fse94fpjepygypmn7qwg8jv8jt2nybqdp2me317tn3t7qy20m9gqmt","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f98b71bda06c23d650ed07d3a0c743689583df2c7f0c26be9c8a75b26e20d3cdafd2bfc6653ce519bd2164ae5f1301b65a220b1a7a34fb0676850f26fcf567c30e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15},{"txid":"5df1e5ebf4b068ad6775a68cb27a95abea0ee058b1d7c356e46fa04e006b255e","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb169ec81721b49ca9325b80afd950a685067aa003ae83b8d6d0d982b0","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"161pk1rj8qkxmbwfcw4131b9qmxqcby7975vhe81h6k3wczg8r7dw7xg2","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f959d19b18b937ef40516e051d8e36a86d86291f2fb2f4db30ba465eb076154b294b0024ab95267f353f095053bd0160999eaeb902c7add7bf11f54ebce1166202","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":15}],"prev":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0"}

>> curl -d '{"id":10,"method":"getblockdetail","jsonrpc":"2.0","params":{"block":"0000497da49cf85b3f7faabe13716534b6dfd9e287b109356cb6bcb8c795f0d7"}}' http://127.0.0.1:9902
<< {"id":10,"jsonrpc":"2.0","result":{"hash":"0000497da49cf85b3f7faabe13716534b6dfd9e287b109356cb6bcb8c795f0d7","hashPrev":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0","version":1,"type":"primary-pow","time":1576134143,"bits":36,"fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","height":18813,"txmint":{"txid":"5df1e5ffc3bea8bb3e86f822e5072aa2843242f1889f3cdc5559f7201569079a","version":1,"type":"work","time":1576134143,"lockuntil":0,"anchor":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0","vin":[],"sendfrom":"000000000000000000000000000000000000000000000000000000000","sendto":"20g075m4mh5trbkdy8vbh74n9h7t3npe7tewpnvsfb19p57jnyf3kdh45","amount":1153.000800,"txfee":0.000000,"data":"","sig":"","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},"tx":[{"txid":"5df1e5eb943a31136951da3afb491d4d6f4e3aeba5cfca9c4ef5ca00c30920b8","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e2d022709018117f93273ca192308776586916ba21ee7e513fe04fab9b2f","vout":0},{"txid":"5df1dee3e78e4526f90d15cdcc8e96fedfe1103eca7065772f2ac2bc41d4ad8f","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1xjzjhz5w0an635wngt5qyx8xbg9x2vg0wzkz1a9hx5c97w0b9k0wbzjt","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f99612f76c34f85b16bee2dd3c06e7cb876fb1ef7d6f7d2160de2d3fd9beb75c9b19e90ed9c46053ce81106e1e37717ad175489f30045180be1a2cc7ae524f790e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5eb90ce47fceb3ace5e463f88db7ec98769e2a77571f5bc4b7e957aa69f","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb943a31136951da3afb491d4d6f4e3aeba5cfca9c4ef5ca00c30920b8","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1c23w26d19h6sntvktzfycpgwfge4efy3zghdjc93mnxbptdw7yqwbwgy","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f9374f46f5caf72e9488a168a64c21744d3160b67d168376420945f9375dfda5a5967678db5f32e26ea17e990f9d00890ae0cc4b72ed0ed8a12f80c2aa6de40700","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5eb8208741b33a708a72a29a7380843789975e000dcc74eb31f857b691e","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e1ea583124fa957a4c995cdea702bbdea2e832f8b0fe9a2d1d32578b8869","vout":0},{"txid":"5df1e5eb90ce47fceb3ace5e463f88db7ec98769e2a77571f5bc4b7e957aa69f","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"11nf1cnwft7f2yhr3qnbx9qxsc0b75y4gn7v1rd1qza8khzjdv7623gmm","amount":999.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f95b134de0889f32099b50f354d754b34b4cebdfab6eaa150f0de465967c020a3f140713591b1faf03d4112fa0924a796aca54be26fb8091ba472e8e0632e7c600","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5eb17690dbeae0609370f87c30b490eaf123500fdd55f961780415d5d22","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb8208741b33a708a72a29a7380843789975e000dcc74eb31f857b691e","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1eenpdhcyk5y3ma5pjzf3gp2drq344mc7vcdep170zmbafg5317ae044h","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f977497144b8d4fc40250ecfc7e007d03f1d6293decd0bb115a0b5939a92314282edce494dde0b992e2b503a1f9f50ae00f6f8bc850fd4cbd5e32771f54bea470f","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5eb3000e640a2bea70acdc4f994fb05c8a36e54480e5cdc0ccc578f9cc0","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e3e1bd39f2188ce116039c8af172b9a6b4a4ae464bef5734b496540d9db4","vout":0},{"txid":"5df1e5eb17690dbeae0609370f87c30b490eaf123500fdd55f961780415d5d22","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1q6xgeqaa9hzy19qhhfpmg7hhee05bnq6ha7ph2kvb1d2w6b8qe8hffcy","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f969d47d443711312df441072eca89c3cea44197bec0a7b709ad9d533684f051081c94ed71bea935a8f2eb224cf3a4cb6fa0c79e8925e68a6b8ff35a3fe196a80f","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5ebb45d6713d5048b73780a2e5e9e36a10c5b432bb409ff930b116ffef1","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb3000e640a2bea70acdc4f994fb05c8a36e54480e5cdc0ccc578f9cc0","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1mp11457nha6830emx3mkv4r2zvtg6aebsacdd72x8gzkpqrpvcn6ygd9","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f9c517184e60c41bde9d504d48a02f815a6de60889175d0307b5810336d1c0eacc63978ff83338a5c7546c6e16d76336ac9c436f95cf9dc9e06928e3df80a7a00e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5eb169ec81721b49ca9325b80afd950a685067aa003ae83b8d6d0d982b0","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e337d09b7d286885cd69c0da98c7d04cf740221019d70bcbbb313a159d2a","vout":0},{"txid":"5df1e5ebb45d6713d5048b73780a2e5e9e36a10c5b432bb409ff930b116ffef1","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"1a2fse94fpjepygypmn7qwg8jv8jt2nybqdp2me317tn3t7qy20m9gqmt","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f98b71bda06c23d650ed07d3a0c743689583df2c7f0c26be9c8a75b26e20d3cdafd2bfc6653ce519bd2164ae5f1301b65a220b1a7a34fb0676850f26fcf567c30e","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63},{"txid":"5df1e5ebf4b068ad6775a68cb27a95abea0ee058b1d7c356e46fa04e006b255e","version":1,"type":"token","time":1576134123,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df1e5eb169ec81721b49ca9325b80afd950a685067aa003ae83b8d6d0d982b0","vout":1}],"sendfrom":"20g07atym1beahmdk267hkqrgvhw1x0gj3bwth8q7yxcyfgcbszbpqgsr","sendto":"161pk1rj8qkxmbwfcw4131b9qmxqcby7975vhe81h6k3wczg8r7dw7xg2","amount":499.999900,"txfee":0.000100,"data":"","sig":"64f1a77bd0e00f8023ffa2f7e0a76eb795414d9a57eb2f4ce5e9cc730c8103c501e1cbd24fa95312b81d2dc5ef6f60c39a9485819d4fa11bcfdde5f99151c8a4f959d19b18b937ef40516e051d8e36a86d86291f2fb2f4db30ba465eb076154b294b0024ab95267f353f095053bd0160999eaeb902c7add7bf11f54ebce1166202","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":63}],"prev":"0000497c07f9b1309dd48aa729ef8cea91dd2610b9e93fe6d5a210d035a7d6f0"}}

Errors:

* {"code":-6,"message":"Unknown block."}

gettxpool

Usage:

        gettxpool (-f="fork") (-d|-nod*detail*)

If detail==0, return the count and total size of txs for given fork.
Otherwise,return all transaction ids and sizes in memory pool for given fork.

Arguments:

 -f="fork"                              (string, optional) fork hash
 -d|-nod*detail*                        (bool, optional, default=false) get detail or not

Request:

 "param" :
 {
   "fork": "",                          (string, optional) fork hash
   "detail": true|false                 (bool, optional, default=false) get detail or not
 }

Response:

 "result" :
 {
   (if detail=false)
   "count": 0,                          (uint, optional) transaction pool count
   (if detail=false)
   "size": 0,                           (uint, optional) transaction total size
   (if detail=true)
   [
     "pool":                            (object, required) pool struct
     {
       "hex": "",                       (string, required) tx pool hex
       "size": 0                        (uint, required) tx pool size
     }
   ]
 }

Examples:

>> bigbang-cli gettxpool
<< {"count":0,"size":0}

>> curl -d '{"id":11,"method":"gettxpool","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":11,"jsonrpc":"2.0","result":{"count":0,"size":0}}

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}

gettransaction

Usage:

        gettransaction <"txid"> (-s|-nos*serialized*)

Get transaction information

Arguments:

 "txid"                                 (string, required) transaction hash
 -s|-nos*serialized*                    (bool, optional, default=false) If serialized=0, return an Object with information about <txid>.
                                        If serialized is non-zero, return a string that is
                                        serialized, hex-encoded data for <txid>.

Request:

 "param" :
 {
   "txid": "",                          (string, required) transaction hash
   "serialized": true|false             (bool, optional, default=false) If serialized=0, return an Object with information about <txid>.
                                        If serialized is non-zero, return a string that is
                                        serialized, hex-encoded data for <txid>.
 }

Response:

 "result" :
 {
   (if serialized=true)
   "serialization": "",                 (string, optional) transaction hex data
   (if serialized=false)
   "transaction":                       (object, optional) transaction data
   {
     "txid": "",                        (string, required) transaction hash
     "version": 0,                      (uint, required) version
     "type": "",                        (string, required) transaction type
     "time": 0,                         (uint, required) transaction timestamp
     "lockuntil": 0,                    (uint, required) unlock time
     "anchor": "",                      (string, required) anchor hash
     "blockhash": "",                   (string, required) which block tx located in
     [
       "vin":                           (object, required) vin struct
       {
         "txid": "",                    (string, required) pre-vout transaction hash
         "vout": 0                      (uint, required) pre-vout number
       }
     ]
     "sendfrom": "",                    (string, required) send from address
     "sendto": "",                      (string, required) send to address
     "amount": 0.0,                     (double, required) amount
     "txfee": 0.0,                      (double, required) transaction fee
     "data": "",                        (string, required) data
     "sig": "",                         (string, required) sign
     "fork": "",                        (string, required) fork hash
     "confirmations": 0                 (int, optional) confirmations
   }
 }

Examples:

>> bigbang-cli gettransaction 5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03
<< {"transaction":{"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","version":1,"type":"token","time":1576046641,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df088912a5a607904d8c69670a8b704c5739e847d2002c862f6b0cd712b797a","vout":0}],"sendfrom":"1n56xmva8131c4q0961anv5wdzfqtdctyg9e53fxp65f1jyhbtkfbxz6q","sendto":"1mkeeh3zeeejsvknz5d0bm78k81s585jbj5kf0rxjx3ah6ngh33b1erg9","amount":162.260000,"txfee":0.100000,"data":"","sig":"d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":1597}}

>> curl -d '{"id":13,"method":"gettransaction","jsonrpc":"2.0","params":{"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","serialized":false}}' http://127.0.0.1:9902
<< {"id":13,"jsonrpc":"2.0","result":{"transaction":{"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","version":1,"type":"token","time":1576046641,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df088912a5a607904d8c69670a8b704c5739e847d2002c862f6b0cd712b797a","vout":0}],"sendfrom":"1n56xmva8131c4q0961anv5wdzfqtdctyg9e53fxp65f1jyhbtkfbxz6q","sendto":"1mkeeh3zeeejsvknz5d0bm78k81s585jbj5kf0rxjx3ah6ngh33b1erg9","amount":162.260000,"txfee":0.100000,"data":"","sig":"d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","confirmations":1631}}}

>> bigbang-cli gettransaction -s 5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03
<< {"serialization":"010000003190f05d00000000701af4705c5e6fcb04efc3ca3c851c1e4d8948e10923025f54bea9b000000000017a792b71cdb0f662c802207d849e73c504b7a87096c6d80479605a2a9188f05d0001a4dce88fee73a59dcebf2b40ba1d13407254164b9166f063b2e8d513561118d620e4ab0900000000a0860100000000000040d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000"}

>> curl -d '{"id":13,"method":"gettransaction","jsonrpc":"2.0","params":{"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","serialized":true}}' http://127.0.0.1:9902
<< {"id":13,"jsonrpc":"2.0","result":{"serialization":"010000003190f05d00000000701af4705c5e6fcb04efc3ca3c851c1e4d8948e10923025f54bea9b000000000017a792b71cdb0f662c802207d849e73c504b7a87096c6d80479605a2a9188f05d0001a4dce88fee73a59dcebf2b40ba1d13407254164b9166f063b2e8d513561118d620e4ab0900000000a0860100000000000040d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000"}}

Errors:

* {"code":-6,"message":"No information available about transaction."}

sendtransaction

Usage:

        sendtransaction <"txdata">

Submit raw transaction (serialized, hex-encoded) to local node and network.

Arguments:

 "txdata"                               (string, required) transaction binary data

Request:

 "param" :
 {
   "txdata": ""                         (string, required) transaction binary data
 }

Response:

 "result": "data"                       (string, required) transaction raw data

Examples:

>> bigbang-cli sendtransaction 01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a0860100000000000212348182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e0182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052ed494d90cd96c252446b4a10459fea8c06186154b2bee2ce2182556e9ba40e7e69ddae2501862e4251bba2abf11c90d6f1fd0dec48a1419e81bb8c7d922cf3e03
<< 0a1b944071970589aa524a6f4e40e0b50bab9a64feefc292867692bbf35442a6

>> curl -d '{"id":9,"method":"sendtransaction","jsonrpc":"2.0","params":{"txdata":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a0860100000000000212348182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e0182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052ed494d90cd96c252446b4a10459fea8c06186154b2bee2ce2182556e9ba40e7e69ddae2501862e4251bba2abf11c90d6f1fd0dec48a1419e81bb8c7d922cf3e03"}}' http://127.0.0.1:9902
<< {"id":9,"jsonrpc":"2.0","result":"0a1b944071970589aa524a6f4e40e0b50bab9a64feefc292867692bbf35442a6"}

Errors:

* {"code":-8,"message":"TX decode failed"}
* {"code":-10,"message":"Tx rejected : xxx"}

getforkheight

Usage:

        getforkheight (-f="fork")

Return the number of height in the given fork.

Arguments:

 -f="fork"                              (string, optional) fork hash

Request:

 "param" :
 {
   "fork": ""                           (string, optional) fork hash
 }

Response:

 "result": height                       (int, required) fork height

Examples:

>> bigbang-cli getforkheight
<< 32081

>> curl -d '{"id":4,"method":"getforkheight","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":4,"jsonrpc":"2.0","result":32081}

>> bigbang-cli getforkheight -f=a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}

getvotes

Usage:

        getvotes <"address">

Get votes

Arguments:

 "address"                              (string, required) delegate template address or vote template address

Request:

 "param" :
 {
   "address": ""                        (string, required) delegate template address or vote template address
 }

Response:

 "result": votes                        (double, required) number of votes

Examples:

>> bigbang-cli getvotes 20m04f7cbzcgqjtj6arnv65s9ap8f1setyezt34kg2q9vdvd1tgspy5r0
<< 70000000.000000

>> curl -d '{"id":1,"method":"getvotes","jsonrpc":"2.0","params":{"address":"20m04f7cbzcgqjtj6arnv65s9ap8f1setyezt34kg2q9vdvd1tgspy5r0"}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":70000000.000000}

Errors:

* {"code" : -6, "message" : "Invalid address"}
* {"code" : -32603, "message" : "Not a delegate template address"}
* {"code" : -32603, "message" : "Vote template address not imported"}
* {"code" : -32603, "message" : "Query failed"}

listdelegate

Usage:

        listdelegate (-n=count)

List delegate

Arguments:

 -n=count                               (uint, optional, default=0) list count, default 0 is all

Request:

 "param" :
 {
   "count": 0                           (uint, optional, default=0) list count, default 0 is all
 }

Response:

 "result" :
   [
     "delegate":                        (object, required) 
     {
       "address": "",                   (string, required) delegate address
       "votes": 0.0                     (double, required) number of votes
     }
   ]

Examples:

>> bigbang-cli listdelegate
<< {"address":"20m01802pgptaswc5b2dq09kmj10ns88bn69q0msrnz64mtypx4xm5sff","votes":100002000.000000}

>> curl -d '{"id":1,"method":"listdelegate","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":"{"address":"20m01802pgptaswc5b2dq09kmj10ns88bn69q0msrnz64mtypx4xm5sff","votes":100002000.000000}"}

Errors:

* {"code" : -32603, "message" : "Query failed"}

listkey

Usage:

        listkey

Return Object that has pubkey as keys, associated status as values.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result" :
   [
     "pubkey":                          (object, required) public key info
     {
       "key": "",                       (string, required) public key with hex system
       "version": 0,                    (int, required) public key version
       "public": true|false,            (bool, required) is only public key or not in wallet
       "locked": true|false,            (bool, required) public key locked
       "timeout": 0                     (int, optional) public key timeout locked
     }
   ]

Examples:

>> bigbang-cli listkey
<< [{"key":"3d266a564ec85f3385babf615b1d7eeb01b3e4456d35174732bb9ec0fa8c8f4f","version": 1,"locked": true},{"key":"58e148d9e8610a6504c26ed346d15920c4d832cf0f03ecb8a016e0d0ec838b1b","version": 1,"locked": true}]

>> curl -d '{"id":43,"method":"listkey","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":43,"jsonrpc":"2.0","result":[{"key":"3d266a564ec85f3385babf615b1d7eeb01b3e4456d35174732bb9ec0fa8c8f4f","version": 1,"locked": true},{"key":"58e148d9e8610a6504c26ed346d15920c4d832cf0f03ecb8a016e0d0ec838b1b","version": 1,"locked": true}]}

Errors:

	none

getnewkey

Usage:

        getnewkey <"passphrase">

Return a new pubkey for receiving payments.

Arguments:

 "passphrase"                           (string, required) passphrase

Request:

 "param" :
 {
   "passphrase": ""                     (string, required) passphrase
 }

Response:

 "result": "pubkey"                     (string, required) public key

Examples:

>> bigbang-cli getnewkey 123
<< f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9

>> curl -d '{"id":7,"method":"getnewkey","jsonrpc":"2.0","params":{"passphrase":"123"}}' http://127.0.0.1:9902
<< {"id":7,"jsonrpc":"2.0","result":"f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9"}

Errors:

* {"code":-6,"message":"Passphrase must be nonempty"}
* {"code":-401,"message":"Failed add new key."}

encryptkey

Usage:

        encryptkey <"pubkey"> <-new="passphrase"> <-old="oldpassphrase">

Changes the passphrase for <oldpassphrase> to <passphrase>

Arguments:

 "pubkey"                               (string, required) public key
 -new="passphrase"                      (string, required) passphrase of key
 -old="oldpassphrase"                   (string, required) old passphrase of key

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) public key
   "passphrase": "",                    (string, required) passphrase of key
   "oldpassphrase": ""                  (string, required) old passphrase of key
 }

Response:

 "result": "result"                     (string, required) encrypt key result

Examples:

>> encryptkey f4c3babec11363be80e7b6aa1d803d63206a11f36fc99b874b63a262110a0add -new=456 -old=123
<< Encrypt key successfully: f4c3babec11363be80e7b6aa1d803d63206a11f36fc99b874b63a262110a0add

>> curl -d '{"id":5,"method":"encryptkey","jsonrpc":"2.0","params":{"pubkey":"f4c3babec11363be80e7b6aa1d803d63206a11f36fc99b874b63a262110a0add","passphrase":"456","oldpassphrase":"123"}}' http://127.0.0.1:9902
<< {"id":5,"jsonrpc":"2.0","result":"Encrypt key successfully: f4c3babec11363be80e7b6aa1d803d63206a11f36fc99b874b63a262110a0add"}

Errors:

* {"code":-6,"message":"Passphrase must be nonempty"}
* {"code":-6,"message":"Old passphrase must be nonempty"}
* {"code":-4,"message":"Unknown key"}
* {"code":-406,"message":"The passphrase entered was incorrect."}

lockkey

Usage:

        lockkey <"pubkey">

Removes the encryption key from memory, locking the key.
After calling this method, you will need to call unlockkey again.
before being able to call any methods which require the key to be unlocked.

Arguments:

 "pubkey"                               (string, required) pubkey or pubkey address

Request:

 "param" :
 {
   "pubkey": ""                         (string, required) pubkey or pubkey address
 }

Response:

 "result": "result"                     (string, required) lock key result

Examples:

>> bigbang-cli lockkey 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882
<< Lock key successfully: 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882

>> curl -d '{"id":1,"method":"lockkey","jsonrpc":"2.0","params":{"pubkey":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882"}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":"Lock key successfully: 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882"}

Errors:

* {"code":-4,"message":"Unknown key"}
* {"code":-6,"message":"This method only accepts pubkey or pubkey address as parameter rather than template address you supplied."}
* {"code":-401,"message":"Failed to lock key"}

unlockkey

Usage:

        unlockkey <"pubkey"> <"passphrase"> (-t=timeout)

If (timeout) > 0,stores the wallet decryption key in memory for (timeout) seconds.
before being able to call any methods which require the key to be locked.

Arguments:

 "pubkey"                               (string, required) pubkey or pubkey address
 "passphrase"                           (string, required) passphrase
 -t=timeout                             (int, optional) auto unlock timeout

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) pubkey or pubkey address
   "passphrase": "",                    (string, required) passphrase
   "timeout": 0                         (int, optional) auto unlock timeout
 }

Response:

 "result": "result"                     (string, required) unlock key result

Examples:

>> bigbang-cli unlockkey d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07 1234
<< Unlock key successfully: d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07

>> curl -d '{"id":13,"method":"unlockkey","jsonrpc":"2.0","params":{"pubkey":"d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07","passphrase":"1234"}}' http://127.0.0.1:9902
<< {"id":13,"jsonrpc":"2.0","result":"Unlock key successfully: d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07"}

>> bigbang-cli unlockkey f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9 123 10
<< Unlock key successfully: f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9

>> curl -d '{"id":15,"method":"unlockkey","jsonrpc":"2.0","params":{"pubkey":"f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9","passphrase":"123","timeout":10}}' http://127.0.0.1:9902
<< {"id":15,"jsonrpc":"2.0","result":"Unlock key successfully: f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9"}

Errors:

* {"code":-6,"message":"Passphrase must be nonempty"}
* {"code":-4,"message":"Unknown key"}
* {"code":-409,"message":"Key is already unlocked"}
* {"code":-406,"message":"The passphrase entered was incorrect."}

importprivkey

Usage:

        importprivkey <"privkey"> <"passphrase"> (-s|-nos*synctx*)

Add a private key to your wallet.

Arguments:

 "privkey"                              (string, required) private key
 "passphrase"                           (string, required) passphrase
 -s|-nos*synctx*                        (bool, optional, default=true) sync tx or not

Request:

 "param" :
 {
   "privkey": "",                       (string, required) private key
   "passphrase": "",                    (string, required) passphrase
   "synctx": true|false                 (bool, optional, default=true) sync tx or not
 }

Response:

 "result": "pubkey"                     (string, required) public key with hex number system

Examples:

>> bigbang-cli importprivkey feb51e048380c0ade1cdb60b25e9f3e05cd4507553a97faadc8a94771fcb1a5b 123
<< d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07

>> curl -d '{"id":9,"method":"importprivkey","jsonrpc":"2.0","params":{"privkey":"feb51e048380c0ade1cdb60b25e9f3e05cd4507553a97faadc8a94771fcb1a5b","passphrase":"123"}}' http://127.0.0.1:9902
<< {"id":9,"jsonrpc":"2.0","result":"d716e72ce58e649a57d54751a7707e325b522497da3a69ae8301a2cbec391c07"}

Errors:

* {"code":-6,"message":"Invalid private key"}
* {"code":-6,"message":"Passphrase must be nonempty"}
* {"code":-401,"message":"Failed to add key"}
* {"code":-401,"message":"Failed to sync wallet tx"}

importpubkey

Usage:

        importpubkey <"pubkey">

Add a public key to your wallet.

Arguments:

 "pubkey"                               (string, required) private key

Request:

 "param" :
 {
   "pubkey": ""                         (string, required) private key
 }

Response:

 "result": "address"                    (string, required) address of public key

Examples:

>> bigbang-cli importpubkey 73f3b3d8545b60e58deb791c4da33089a40d7c6156a89e76e00ac0be2a9924d5
<< 1tmj9janyr05e0xmyn1b62z0dmj4k18td3hwyq3f5c1dn9p5kydsjpvrm

>> curl -d '{"id":31,"method":"importpubkey","jsonrpc":"2.0","params":{"pubkey":"73f3b3d8545b60e58deb791c4da33089a40d7c6156a89e76e00ac0be2a9924d5"}' http://127.0.0.1:9902
<< {"id":31,"jsonrpc":"2.0","result":"73f3b3d8545b60e58deb791c4da33089a40d7c6156a89e76e00ac0be2a9924d5"}

Errors:

* {"code":-6,"message":"Template id is not allowed"}
* {"code":-401,"message":"Failed to add key"}
* {"code":-401,"message":"Failed to sync wallet tx"}

importkey

Usage:

        importkey <"pubkey"> (-s|-nos*synctx*)

Reveal the serialized key corresponding to <pubkey>.

Arguments:

 "pubkey"                               (string, required) public key data
 -s|-nos*synctx*                        (bool, optional, default=true) sync tx or not

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) public key data
   "synctx": true|false                 (bool, optional, default=true) sync tx or not
 }

Response:

 "result": "pubkey"                     (string, required) public key with hex number system

Examples:

>> bigbang-cli importkey 642e19a647f9f2b795b8edf97c849ab1866855c9ac6b59d4cf2d9e63d23639de010000002f63a31bed90496a03bb58269e77b98751aa902be47ecbf9ac3adef221cbdcf6ecfba5a9c86e92323fb5af7a2df3f805caaf5dd80caf630e5eb206f0
<< de3936d2639e2dcfd4596bacc9556886b19a847cf9edb895b7f2f947a6192e64

>> curl -d '{"id":3,"method":"importkey","jsonrpc":"2.0","params":{"pubkey":"642e19a647f9f2b795b8edf97c849ab1866855c9ac6b59d4cf2d9e63d23639de010000002f63a31bed90496a03bb58269e77b98751aa902be47ecbf9ac3adef221cbdcf6ecfba5a9c86e92323fb5af7a2df3f805caaf5dd80caf630e5eb206f0"}}' http://127.0.0.1:9902
<< {"id":3,"jsonrpc":"2.0","result":"de3936d2639e2dcfd4596bacc9556886b19a847cf9edb895b7f2f947a6192e64"}

Errors:

* {"code":-32602,"message":"Failed to verify serialized key"}
* {"code":-32602,"message":"Can't import the key with empty passphrase"}
* {"code":-401,"message":"Failed to add key"}
* {"code":-401,"message":"Failed to sync wallet tx"}

exportkey

Usage:

        exportkey <"pubkey">

Reveal the serialized key corresponding to <pubkey>.

Arguments:

 "pubkey"                               (string, required) public key

Request:

 "param" :
 {
   "pubkey": ""                         (string, required) public key
 }

Response:

 "result": "pubkey"                     (string, required) public key with binary system

Examples:

>> bigbang-cli exportkey de3936d2639e2dcfd4596bacc9556886b19a847cf9edb895b7f2f947a6192e64
<< 642e19a647f9f2b795b8edf97c849ab1866855c9ac6b59d4cf2d9e63d23639de010000002f63a31bed90496a03bb58269e77b98751aa902be47ecbf9ac3adef221cbdcf6ecfba5a9c86e92323fb5af7a2df3f805caaf5dd80caf630e5eb206f0

>> curl -d '{"id":13,"method":"exportkey","jsonrpc":"2.0","params":{"pubkey":"de3936d2639e2dcfd4596bacc9556886b19a847cf9edb895b7f2f947a6192e64"}}' http://127.0.0.1:9902
<< {"id":13,"jsonrpc":"2.0","result":"642e19a647f9f2b795b8edf97c849ab1866855c9ac6b59d4cf2d9e63d23639de010000002f63a31bed90496a03bb58269e77b98751aa902be47ecbf9ac3adef221cbdcf6ecfba5a9c86e92323fb5af7a2df3f805caaf5dd80caf630e5eb206f0"}

Errors:

* {"code":-4,"message":"Unknown key"}
* {"code":-401,"message":"Failed to export key"}

addnewtemplate

Usage:

        addnewtemplate <"type"> <{delegate}>|<{vote}>|<{fork}>|<{mint}>|<{multisig}>|<{weighted}>|<{exchange}>|<{payment}> (*synctx*)

Return encoded address for the given template id.

Arguments:

 "type"                                 (string, required) template type
  (if type=delegate)
 {delegate}                             (object, required) a delegate template
  (if type=vote)
 {vote}                                 (object, required) a vote template
  (if type=fork)
 {fork}                                 (object, required) a new fork template
  (if type=mint)
 {mint}                                 (object, required) a mint template
  (if type=multisig)
 {multisig}                             (object, required) a multiple sign template
  (if type=weighted)
 {weighted}                             (object, required) a weighted multiple sign template
  (if type=exchange)
 {exchange}                             (object, required) a exchange template
  (if type=payment)
 {payment}                              (object, required) a payment template
 *synctx*                               (bool, optional, default=true) sync tx or not

Request:

 "param" :
 {
   "type": "",                          (string, required) template type
   (if type=delegate)
   "delegate":                          (object, required) a delegate template
   {
     "delegate": "",                    (string, required) delegate public key
     "owner": ""                        (string, required) owner address
   }
   (if type=vote)
   "vote":                              (object, required) a vote template
   {
     "delegate": "",                    (string, required) delegate template address
     "owner": ""                        (string, required) owner address
   }
   (if type=fork)
   "fork":                              (object, required) a new fork template
   {
     "redeem": "",                      (string, required) redeem address
     "fork": ""                         (string, required) fork hash
   }
   (if type=mint)
   "mint":                              (object, required) a mint template
   {
     "mint": "",                        (string, required) mint public key
     "spent": ""                        (string, required) spent address
   }
   (if type=multisig)
   "multisig":                          (object, required) a multiple sign template
   {
     "required": 0,                     (int, required) required weight > 0
     [
       "key": ""                        (string, required) public key
     ]
   }
   (if type=weighted)
   "weighted":                          (object, required) a weighted multiple sign template
   {
     "required": 0,                     (int, required) required weight
     [
       "pubkey":                        (object, required) public key
       {
         "key": "",                     (string, required) public key
         "weight": 0                    (int, required) weight
       }
     ]
   }
   (if type=exchange)
   "exchange":                          (object, required) a exchange template
   {
     "addr_m": "",                      (string, required) addr_m
     "addr_s": "",                      (string, required) addr_s
     "height_m": 0,                     (int, required) height_m
     "height_s": 0,                     (int, required) height_s
     "fork_m": "",                      (string, required) fork_m hash
     "fork_s": ""                       (string, required) fork_s hash
   }
   (if type=payment)
   "payment":                           (object, required) a payment template
   {
     "business": "",                    (string, required) business
     "customer": "",                    (string, required) customer
     "height_exec": 0,                  (int, required) height_exec
     "height_end": 0,                   (int, required) height_end
     "amount": 0,                       (int, required) amount
     "pledge": 0                        (int, required) pledge
   }
   "synctx": true|false                 (bool, optional, default=true) sync tx or not
 }

Response:

 "result": "address"                    (string, required) address of template

Examples:

>> bigbang-cli addnewtemplate mint '{"mint": "e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9", "spent": "1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}'
<< 20g0b87qxcd52ceh9zmpzx0hy46pjfzdnqbkh8f4tqs4y0r6sxyzyny25

>> curl -d '{"id":1,"method":"addnewtemplate","jsonrpc":"2.0","params":{"type":"mint","mint":{"mint":"e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9","spent":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":"20g0b87qxcd52ceh9zmpzx0hy46pjfzdnqbkh8f4tqs4y0r6sxyzyny25"}

>> bigbang-cli addnewtemplate delegate '{"delegate":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","owner":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq"}'

>> bigbang-cli addnewtemplate fork '{"redeem":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0"}'

>> bigbang-cli addnewtemplate multisig '{"required": 1, "pubkeys": ["2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882", "f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9"]}'

>> bigbang-cli addnewtemplate weighted '{"required": 1, "pubkeys": [{"key":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882", "weight": 1},{"key": "f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9", "weight": 2}]}'

Errors:

* {"code":-6,"message":"Invalid parameters,failed to make template"}
* {"code":-401,"message":"Failed to add template"}
* {"code":-6,"message":"Invalid parameter, missing weight"}
* {"code":-6,"message":"Invalid parameter, missing redeem address"}
* {"code":-6,"message":"Invalid parameter, missing spent address"}
* {"code":-6,"message":"Invalid parameter, missing owner address"}
* {"code":-6,"message":"template type error. type: xxx"}

importtemplate

Usage:

        importtemplate <"data"> (-s|-nos*synctx*)

Return encoded address for the given template.

Arguments:

 "data"                                 (string, required) template data
 -s|-nos*synctx*                        (bool, optional, default=true) sync tx or not

Request:

 "param" :
 {
   "data": "",                          (string, required) template data
   "synctx": true|false                 (bool, optional, default=true) sync tx or not
 }

Response:

 "result": "address"                    (string, required) address of template

Examples:

>> bigbang-cli importtemplate 0100010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e01b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f402
<< 21w2040000000000000000000000000000000000000000000000epcek

>> curl -d '{"id":52,"method":"importtemplate","jsonrpc":"2.0","params":{"data":"0100010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e01b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f402"}}' http://127.0.0.1:9902
<< {"id":52,"jsonrpc":"2.0","result":"21w2040000000000000000000000000000000000000000000000epcek"}

Errors:

* {"code":-6,"message":"Invalid parameters,failed to make template"}
* {"code":-401,"message":"Failed to add template"}
* {"code":-401,"message":"Failed to sync wallet tx"}

exporttemplate

Usage:

        exporttemplate <"address">

Return encoded address for the given template.

Arguments:

 "address"                              (string, required) template address

Request:

 "param" :
 {
   "address": ""                        (string, required) template address
 }

Response:

 "result": "data"                       (string, required) data of template

Examples:

>> bigbang-cli exporttemplate 2040fpytdr4k5h8tk0nferr7zb51tkccrkgqf341s6tg05q9xe6hth1m
<< 0100010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e01b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f402

>> curl -d '{"id":25,"method":"exporttemplate","jsonrpc":"2.0","params":{"address":"2040fpytdr4k5h8tk0nferr7zb51tkccrkgqf341s6tg05q9xe6hth1m4"}}' http://127.0.0.1:9902
<< {"id":25,"jsonrpc":"2.0","result":"0100010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e01b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f402"}

Errors:

* {"code":-6,"message":"Invalid address"}
* {"code":-401,"message":"Unkown template"}

validateaddress

Usage:

        validateaddress <"address">

Return information about <address>.

Arguments:

 "address"                              (string, required) wallet address

Request:

 "param" :
 {
   "address": ""                        (string, required) wallet address
 }

Response:

 "result" :
 {
   "isvalid": true|false,               (bool, required) is valid
   (if isvalid=true)
   "addressdata":                       (object, required) address data
   {
     "address": "",                     (string, required) wallet address
     "ismine": true|false,              (bool, required) is mine
     "type": "",                        (string, required) type, pubkey or template
     (if type=pubkey)
     "pubkey": "",                      (string, required) public key
     (if type=template)
     "template": "",                    (string, required) template type name
     (if type=template && ismine=true)
     "templatedata":                    (object, required) template data
     {
       "type": "",                      (string, required) template type
       "hex": "",                       (string, required) temtplate data
       (if type=delegate)
       "delegate":                      (object, required) delegate template struct
       {
         "delegate": "",                (string, required) delegate public key
         "owner": ""                    (string, required) owner address
       }
       (if type=vote)
       "vote":                          (object, required) vote template struct
       {
         "delegate": "",                (string, required) delegate template address
         "owner": ""                    (string, required) owner address
       }
       (if type=fork)
       "fork":                          (object, required) fork template struct
       {
         "redeem": "",                  (string, required) redeem address
         "fork": ""                     (string, required) fork hash
       }
       (if type=mint)
       "mint":                          (object, required) mint template struct
       {
         "mint": "",                    (string, required) mint public key
         "spent": ""                    (string, required) spent address
       }
       (if type=multisig)
       "multisig":                      (object, required) multisig template struct
       {
         "required": 0,                 (int, required) required weight
         [
           "key": ""                    (string, required) public key
         ]
       }
       (if type=exchange)
       "exchange":                      (object, required) exchange template struct
       {
         "spend_m": "",                 (string, required) spend_m
         "spend_s": "",                 (string, required) spend_s
         "height_m": 0,                 (int, required) height m
         "height_s": 0,                 (int, required) height s
         "fork_m": "",                  (string, required) fork m
         "fork_s": ""                   (string, required) fork s
       }
       (if type=payment)
       "payment":                       (object, required) a payment template
       {
         "business": "",                (string, required) business
         "customer": "",                (string, required) customer
         "height_exec": 0,              (int, required) height_exec
         "height_end": 0,               (int, required) height_end
         "amount": 0,                   (int, required) amount
         "pledge": 0                    (int, required) pledge
       }
       (if type=weighted)
       "weighted":                      (object, required) weighted template struct
       {
         "required": 0,                 (int, required) required weight
         [
           "pubkey":                    (object, required) public key
           {
             "key": "",                 (string, required) public key
             "weight": 0                (int, required) weight
           }
         ]
       }
     }
   }
 }

Examples:

>> bigbang-cli validateaddress 20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26
<< {"isvalid":true,"addressdata":{"address":"20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26","ismine":true,"type":"template","template":"mint"}}

>> curl -d '{"id":2,"method":"validateaddress","jsonrpc":"2.0","params":{"address":"20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26"}}' http://127.0.0.1:9902
<< {"id":2,"jsonrpc":"2.0","result":{"isvalid":true,"addressdata":{"address":"20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26","ismine":true,"type":"template","template":"mint"}}}

>> bigbang-cli validateaddress 123
<< {"isvalid":false}

>> curl -d '{"id":3,"method":"validateaddress","jsonrpc":"2.0","params":{"address":"123"}}' http://127.0.0.1:9902
<< {"id":3,"jsonrpc":"2.0","result":{"isvalid":false}}

Errors:

	none

resyncwallet

Usage:

        resyncwallet ("address")

If (address) is not specified, resync wallet's tx for each address.
If (address) is specified, resync wallet's tx for the address.

Arguments:

 "address"                              (string, optional) tx address

Request:

 "param" :
 {
   "address": ""                        (string, optional) tx address
 }

Response:

 "result": "result"                     (string, required) resync wallet result

Examples:

>> bigbang-cli resyncwallet
<< Resync wallet successfully.

>> curl -d '{"id":38,"method":"resyncwallet","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":38,"jsonrpc":"2.0","result":"Resync wallet successfully."}

>> bigbang-cli resyncwallet 1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq

Errors:

* {"code":-6,"message":"Invalid address"}
* {"code":-401,"message":"Failed to resync wallet tx"}

getbalance

Usage:

        getbalance (-f="fork") (-a="address")

Get balance of address.
If (address) is not specified, return the balance for wallet's each address.
If (address) is specified, return the balance in the address.

Arguments:

 -f="fork"                              (string, optional) fork hash
 -a="address"                           (string, optional) wallet address

Request:

 "param" :
 {
   "fork": "",                          (string, optional) fork hash
   "address": ""                        (string, optional) wallet address
 }

Response:

 "result" :
   [
     "balance":                         (object, required) balance info
     {
       "address": "",                   (string, required) wallet address
       "avail": 0.0,                    (double, required) balance available amount
       "locked": 0.0,                   (double, required) locked amount
       "unconfirmed": 0.0               (double, required) unconfirmed amount
     }
   ]

Examples:

>> bigbang-cli getbalance
<< [{"address":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","avail":30.00000000,"locked":0.00000000,"unconfirmed":0.00000000}]

>> curl -d '{"id":1,"method":"getbalance","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":[{"address":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","avail":30.00000000,"locked":0.00000000,"unconfirmed":0.00000000}]}

>> bigbang-cli getbalance -a=20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm
<< [{"address":"20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm","avail":58.99990000,"locked":0.00000000,"unconfirmed":13.99990000}]

>> curl -d '{"id":20,"method":"getbalance","jsonrpc":"2.0","params":{"address":"20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm"}}' http://127.0.0.1:9902
<< {"id":20,"jsonrpc":"2.0","result":[{"address":"20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm","avail":58.99990000,"locked":0.00000000,"unconfirmed":13.99990000}]}

Errors:

* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}
* {"code":-6,"message":"Invalid address"}

listtransaction

Usage:

        listtransaction (-n=count) (-o=offset) (-f="fork") (-a="address")

If (offset) < 0,return last (count) transactions,
If (offset) >= 0,return up to (count) most recent transactions skipping the first (offset) transactions.

Arguments:

 -n=count                               (uint, optional) transaction count. If not set, return 10 tx
 -o=offset                              (int, optional) query offset. If not set, from 0
 -f="fork"                              (string, optional) fork hash. If not set, return all local fork 10 tx
 -a="address"                           (string, optional) from address or sendto address

Request:

 "param" :
 {
   "count": 0,                          (uint, optional) transaction count. If not set, return 10 tx
   "offset": 0,                         (int, optional) query offset. If not set, from 0
   "fork": "",                          (string, optional) fork hash. If not set, return all local fork 10 tx
   "address": ""                        (string, optional) from address or sendto address
 }

Response:

 "result" :
   [
     "transaction":                     (object, required) wallet transaction data
     {
       "txid": "",                      (string, required) transaction hash
       "fork": "",                      (string, required) fork hash
       "type": "",                      (string, required) transaction type
       "time": 0,                       (uint, required) transaction timestamp
       "send": true|false,              (bool, required) is from me
       "to": "",                        (string, required) to address
       "amount": 0.0,                   (double, required) transaction amount
       "fee": 0.0,                      (double, required) transaction fee
       "lockuntil": 0,                  (uint, required) lockuntil
       "blockheight": 0,                (int, optional) block height
       "from": ""                       (string, optional) from address
     }
   ]

Examples:

>> bigbang-cli listtransaction
<< [{"txid":"4a8e6035b575699cdb25d45beadd49f18fb1303f57ec55493139e65d811e74ff","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":31296,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0},{"txid":"0aa6954236382a6c1c46cce7fa3165b4d1718f5e03ca67cd5fe831616a9000da","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":31297,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0}]

>> curl -d '{"id":2,"method":"listtransaction","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":2,"jsonrpc":"2.0","result":[{"txid":"4a8e6035b575699cdb25d45beadd49f18fb1303f57ec55493139e65d811e74ff","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":31296,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0},{"txid":"0aa6954236382a6c1c46cce7fa3165b4d1718f5e03ca67cd5fe831616a9000da","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":31297,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0}]}

>> bigbang-cli listtransaction 1 -1
<< [{"txid":"5a1b7bf5e32a77ecb3c53782a8e06f2b12bdcb73b677d6f89b6f82f85f14373a","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":32086,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0}]

>> curl -d '{"id":0,"method":"listtransaction","jsonrpc":"2.0","params":{"count":1,"offset":-1}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":[{"txid":"5a1b7bf5e32a77ecb3c53782a8e06f2b12bdcb73b677d6f89b6f82f85f14373a","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","blockheight":32086,"type":"work","time":1547916097,"send":false,"to":"20g098nza351f53wppg0kfnsbxqf80h3x8fwp9vdmc98fbrgbv6mtjagy","amount":15.00000000,"fee":0.00000000,"lockuntil":0}]}

>> listtransaction -n=1 -o=-1

Errors:

* {"code":-6,"message":"Negative, zero or out of range count"}
* {"code":-401,"message":"Failed to list transactions"}

sendfrom

Usage:

        sendfrom <"from"> <"to"> <$amount$> ($txfee$) (-f="fork") (-d="data") (-sm="sign_m") (-ss="sign_s") (-td="sendtodata")

<amount> and <txfee> are real and rounded to the nearest 0.000001
Return transaction id

Arguments:

 "from"                                 (string, required) from address
 "to"                                   (string, required) to address
 $amount$                               (double, required) amount
 $txfee$                                (double, optional) transaction fee
 -f="fork"                              (string, optional) fork hash
 -d="data"                              (string, optional) output data
 -sm="sign_m"                           (string, optional) exchange sign m
 -ss="sign_s"                           (string, optional) exchange sign s
 -td="sendtodata"                       (string, optional) If the 'to' address of transaction is a template, this option allows to save the template hex data. The hex data is equal output of RPC 'exporttemplate'

Request:

 "param" :
 {
   "from": "",                          (string, required) from address
   "to": "",                            (string, required) to address
   "amount": 0.0,                       (double, required) amount
   "txfee": 0.0,                        (double, optional) transaction fee
   "fork": "",                          (string, optional) fork hash
   "data": "",                          (string, optional) output data
   "sign_m": "",                        (string, optional) exchange sign m
   "sign_s": "",                        (string, optional) exchange sign s
   "sendtodata": ""                     (string, optional) If the 'to' address of transaction is a template, this option allows to save the template hex data. The hex data is equal output of RPC 'exporttemplate'
 }

Response:

 "result": "transaction"                (string, required) transaction hash

Examples:

>> bigbang-cli sendfrom 20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm 1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q 1
<< 01a9f3bb967f24396293903c856e99896a514756a220266afa347a8b8c7f0038

>> curl -d '{"id":18,"method":"sendfrom","jsonrpc":"2.0","params":{"from":"20g0944xkyk8ybcmzhpv86vb5777jn1sfrdf3svzqn9phxftqth8116bm","to":"1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q","amount":1.00000000}}' http://127.0.0.1:9902
<< {"id":18,"jsonrpc":"2.0","result":"01a9f3bb967f24396293903c856e99896a514756a220266afa347a8b8c7f0038"}

>> bigbang-cli sendfrom 20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26 1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q 1 0.1 -f=a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0
<< 8f92969642024234481e104481f36145736b465ead2d52a6657cf38bd52bdf59

>> curl -d '{"id":53,"method":"sendfrom","jsonrpc":"2.0","params":{"from":"20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26","to":"1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q","amount":1.00000000,"txfee":0.10000000,"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0"}}' http://127.0.0.1:9902
<< {"id":53,"jsonrpc":"2.0","result":"8f92969642024234481e104481f36145736b465ead2d52a6657cf38bd52bdf59"}

>> bigbang-cli sendfrom 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h 12.345 1 -sm='1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103' -ss='a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c' -f='92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f'
<< 8f92969642024234481e104481f36145736b465ead2d52a6657cf38bd52bdf59

>> curl -d '{"id":53,"method":"sendfrom","jsonrpc":"2.0","params":{"from":"20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3","to":"1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h","amount":12.345000,"txfee":1.00000000,"sm":"1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103", "ss":"a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c","fork":"92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f"}}' http://127.0.0.1:9902
<< {"id":53,"jsonrpc":"2.0","result":"5ce79ba78b44f8710710c8e35b8d3b725c2f994d4038b74fda84f0b061c01a76"}

Errors:

* {"code":-6,"message":"Invalid from address"}
* {"code":-6,"message":"Invalid to address"}
* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}
* {"code":-401,"message":"Failed to create transaction"}
* {"code":-401,"message":"Failed to sign transaction"}
* {"code":-401,"message":"The signature is not completed"}
* {"code":-10,"message":"Tx rejected : xxx"}

createtransaction

Usage:

        createtransaction <"from"> <"to"> <$amount$> ($txfee$) (-f="fork") (-d="data")

<amount> and <txfee> are real and rounded to the nearest 0.000001.
Return serialized tx.

Arguments:

 "from"                                 (string, required) from address
 "to"                                   (string, required) to address
 $amount$                               (double, required) amount
 $txfee$                                (double, optional) transaction fee
 -f="fork"                              (string, optional) fork hash
 -d="data"                              (string, optional) output data

Request:

 "param" :
 {
   "from": "",                          (string, required) from address
   "to": "",                            (string, required) to address
   "amount": 0.0,                       (double, required) amount
   "txfee": 0.0,                        (double, optional) transaction fee
   "fork": "",                          (string, optional) fork hash
   "data": ""                           (string, optional) output data
 }

Response:

 "result": "transaction"                (string, required) transaction data

Examples:

>> bigbang-cli createtransaction 20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26 1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q 1 0.1 -f=a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0 -d=12345
<< 01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a08601000000000002123400

>> curl -d '{"id":59,"method":"createtransaction","jsonrpc":"2.0","params":{"from":"20g0753dp5b817d7v0hbag6a4neetzfdgbcyt2pkx93hrzn97epzbyn26","to":"1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q","amount":1.00000000,"txfee":0.10000000,"fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","data":"12345"}}' http://127.0.0.1:9902
<< {"id":59,"jsonrpc":"2.0","result":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a08601000000000002123400"}

Errors:

* {"code":-6,"message":"Invalid from address"}
* {"code":-6,"message":"Invalid to address"}
* {"code":-6,"message":"Invalid fork"}
* {"code":-6,"message":"Unknown fork"}
* {"code":-401,"message":"Failed to create transaction"}

signtransaction

Usage:

        signtransaction <"txdata"> (-td="sendtodata")

Return json object with keys:
hex : raw transaction with signature(s) (hex-encoded string)
completed : true if transaction has a completed set of signature (false if not)

Arguments:

 "txdata"                               (string, required) transaction data(hex string)
 -td="sendtodata"                       (string, optional) If the 'to' address of transaction is a template, this option allows to save the template hex data. The hex data is equal output of RPC 'exporttemplate'

Request:

 "param" :
 {
   "txdata": "",                        (string, required) transaction data(hex string)
   "sendtodata": ""                     (string, optional) If the 'to' address of transaction is a template, this option allows to save the template hex data. The hex data is equal output of RPC 'exporttemplate'
 }

Response:

 "result" :
 {
   "hex": "",                           (string, required) hex of transaction data
   "completed": true|false              (bool, required) transaction completed or not
 }

Examples:

>> bigbang-cli signtransaction 01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a08601000000000002123400
<< {"hex":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a0860100000000000212348182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e0182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052ed494d90cd96c252446b4a10459fea8c06186154b2bee2ce2182556e9ba40e7e69ddae2501862e4251bba2abf11c90d6f1fd0dec48a1419e81bb8c7d922cf3e03","complete":true}

>> curl -d '{"id":62,"method":"signtransaction","jsonrpc":"2.0","params":{"txdata":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a08601000000000002123400"}}' http://127.0.0.1:9902
<< {"id":62,"jsonrpc":"2.0","result":{"hex":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a0860100000000000212348182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e0182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052ed494d90cd96c252446b4a10459fea8c06186154b2bee2ce2182556e9ba40e7e69ddae2501862e4251bba2abf11c90d6f1fd0dec48a1419e81bb8c7d922cf3e03","complete":true}}

Errors:

* {"code":-8,"message":"TX decode failed"}
* {"code":-401,"message":"Failed to sign transaction"}

signmessage

Usage:

        signmessage <"pubkey"> <"message"> (-a="addr")

Sign a message with the private key of an pubkey

Arguments:

 "pubkey"                               (string, required) public key
 "message"                              (string, required) message to be signed
 -a="addr"                              (string, optional) address signed

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) public key
   "message": "",                       (string, required) message to be signed
   "addr": ""                           (string, optional) address signed
 }

Response:

 "result": "signature"                  (string, required) signature of message

Examples:

>> bigbang-cli signmessage 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882 123456
<< 045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707

>> curl -d '{"id":4,"method":"signmessage","jsonrpc":"2.0","params":{"pubkey":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","message":"123456"}}' http://127.0.0.1:9902
<< {"id":4,"jsonrpc":"2.0","result":"045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707"}

Errors:

* {"code":-4,"message":"Unknown key"}
* {"code":-405,"message":"Key is locked"}
* {"code":-401,"message":"Failed to sign message"}

listaddress

Usage:

        listaddress

List all of the addresses from pub keys and template ids

Arguments:

	none

Request:

 "param" : {}

Response:

 "result" :
   [
     "addressdata":                     (object, required) address data
     {
       "type": "",                      (string, required) type, pubkey or template
       "address": "",                   (string, required) public key or template address
       (if type=pubkey)
       "pubkey": "",                    (string, required) public key
       (if type=template)
       "template": "",                  (string, required) template type name
       (if type=template)
       "templatedata":                  (object, required) template data
       {
         "type": "",                    (string, required) template type
         "hex": "",                     (string, required) temtplate data
         (if type=delegate)
         "delegate":                    (object, required) delegate template struct
         {
           "delegate": "",              (string, required) delegate public key
           "owner": ""                  (string, required) owner address
         }
         (if type=vote)
         "vote":                        (object, required) vote template struct
         {
           "delegate": "",              (string, required) delegate template address
           "owner": ""                  (string, required) owner address
         }
         (if type=fork)
         "fork":                        (object, required) fork template struct
         {
           "redeem": "",                (string, required) redeem address
           "fork": ""                   (string, required) fork hash
         }
         (if type=mint)
         "mint":                        (object, required) mint template struct
         {
           "mint": "",                  (string, required) mint public key
           "spent": ""                  (string, required) spent address
         }
         (if type=multisig)
         "multisig":                    (object, required) multisig template struct
         {
           "required": 0,               (int, required) required weight
           [
             "key": ""                  (string, required) public key
           ]
         }
         (if type=exchange)
         "exchange":                    (object, required) exchange template struct
         {
           "spend_m": "",               (string, required) spend_m
           "spend_s": "",               (string, required) spend_s
           "height_m": 0,               (int, required) height m
           "height_s": 0,               (int, required) height s
           "fork_m": "",                (string, required) fork m
           "fork_s": ""                 (string, required) fork s
         }
         (if type=payment)
         "payment":                     (object, required) a payment template
         {
           "business": "",              (string, required) business
           "customer": "",              (string, required) customer
           "height_exec": 0,            (int, required) height_exec
           "height_end": 0,             (int, required) height_end
           "amount": 0,                 (int, required) amount
           "pledge": 0                  (int, required) pledge
         }
         (if type=weighted)
         "weighted":                    (object, required) weighted template struct
         {
           "required": 0,               (int, required) required weight
           [
             "pubkey":                  (object, required) public key
             {
               "key": "",               (string, required) public key
               "weight": 0              (int, required) weight
             }
           ]
         }
       }
     }
   ]

Examples:

>> bigbang-cli listaddress
<< [{"type":"pubkey","address":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","pubkey":"182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e"},{"type":"template","address":"208043ht3c51qztrdfa0f3349pe2m8ajjw1mdb2py68fbckaa2s24tq55","template":"multisig","templatedata":{"type":"multisig","hex":"0200010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052eb9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f4","multisig":{"sigsrequired":1,"addresses":["1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q"]}}},{"type":"template","address":"20g0b87qxcd52ceh9zmpzx0hy46pjfzdnqbkh8f4tqs4y0r6sxyzyny25","template":"mint","templatedata":{"type":"mint","hex":"0400f9b4af95bec6c5d504366245e0420bc3c5c78cd05ea68e4ad85a4d770e77e3e801f9b4af95bec6c5d504366245e0420bc3c5c78cd05ea68e4ad85a4d770e77e3e8","mint":{"mint":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1","spent":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}}}]

>> curl -d '{"id":1,"method":"listaddress","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":[{"type":"pubkey","address":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","pubkey":"182e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052e"},{"type":"template","address":"208043ht3c51qztrdfa0f3349pe2m8ajjw1mdb2py68fbckaa2s24tq55","template":"multisig","templatedata":{"type":"multisig","hex":"0200010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052eb9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f4","multisig":{"sigsrequired":1,"addresses":["1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","1q71vfagprv5hqwckzbvhep0d0ct72j5j2heak2sgp4vptrtc2btdje3q"]}}},{"type":"template","address":"20g0b87qxcd52ceh9zmpzx0hy46pjfzdnqbkh8f4tqs4y0r6sxyzyny25","template":"mint","templatedata":{"type":"mint","hex":"0400f9b4af95bec6c5d504366245e0420bc3c5c78cd05ea68e4ad85a4d770e77e3e801f9b4af95bec6c5d504366245e0420bc3c5c78cd05ea68e4ad85a4d770e77e3e8","mint":{"mint":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1","spent":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}}}]}

Errors:

	none

exportwallet

Usage:

        exportwallet <"path">

Export all of keys and templates from wallet to a specified file in JSON format.

Arguments:

 "path"                                 (string, required) save file path

Request:

 "param" :
 {
   "path": ""                           (string, required) save file path
 }

Response:

 "result": "result"                     (string, required) export result

Examples:

>> bigbang-cli exportwallet /Users/Loading/a.txt
<< Wallet file has been saved at: /Users/Loading/a.txt

>> {"id":4,"method":"exportwallet","jsonrpc":"2.0","params":{"path":"/Users/Loading/a.txt"}}
<< {"id":4,"jsonrpc":"2.0","result":"Wallet file has been saved at: /Users/Loading/a.txt"}

Errors:

* {"code":-6,"message":"Invalid template address"}
* {"code":-401,"message":"Must be an absolute path."}
* {"code":-401,"message":"Cannot export to a folder."}
* {"code":-401,"message":"File has been existed."}
* {"code":-401,"message":"Failed to create directories."}
* {"code":-401,"message":"Failed to export key"}
* {"code":-401,"message":"Unkown template"}
* {"code":-401,"message":"filesystem_error"}

importwallet

Usage:

        importwallet <"path">

Import keys and templates from an archived file to the wallet in JSON format.

Arguments:

 "path"                                 (string, required) save file path

Request:

 "param" :
 {
   "path": ""                           (string, required) save file path
 }

Response:

 "result": "result"                     (string, required) export result

Examples:

>> bigbang-cli importwallet /Users/Loading/a.txt
<< Imported 0 keys and 0 templates.

>> {"id":5,"method":"importwallet","jsonrpc":"2.0","params":{"path":"/Users/Loading/a.txt"}}
<< {"id":5,"jsonrpc":"2.0","result":"Imported 0 keys and 0 templates."}

Errors:

* {"code":-6,"message":"Invalid parameters,failed to make template"}
* {"code":-401,"message":"Must be an absolute path."}
* {"code":-401,"message":"File has been existed."}
* {"code":-401,"message":"Filesystem_error - failed to read."}
* {"code":-401,"message":"Wallet file exported is invalid, check it and try again."}
* {"code":-401,"message":"Data format is not correct, check it and try again."}
* {"code":-401,"message":"Failed to add key"}
* {"code":-401,"message":"Failed to sync wallet tx"}
* {"code":-401,"message":"Failed to add template"}
* {"code":-32602,"message":"Failed to verify serialized key"}
* {"code":-32602,"message":"Can't import the key with empty passphrase"}

makeorigin

Usage:

        makeorigin <"prev"> <"owner"> <$amount$> <"name"> <"symbol"> <$reward$> <halvecycle> (-i|-noi*isolated*) (-p|-nop*private*) (-e|-noe*enclosed*)

Return hex-encoded block.

Arguments:

 "prev"                                 (string, required) prev block hash
 "owner"                                (string, required) owner address
 $amount$                               (double, required) amount
 "name"                                 (string, required) unique fork name
 "symbol"                               (string, required) fork symbol
 $reward$                               (double, required) mint reward
 halvecycle                             (uint, required) halve cycle: 0: fixed reward, >0: blocks of halve cycle
 -i|-noi*isolated*                      (bool, optional, default=true) is isolated
 -p|-nop*private*                       (bool, optional, default=false) is private
 -e|-noe*enclosed*                      (bool, optional, default=false) is enclosed

Request:

 "param" :
 {
   "prev": "",                          (string, required) prev block hash
   "owner": "",                         (string, required) owner address
   "amount": 0.0,                       (double, required) amount
   "name": "",                          (string, required) unique fork name
   "symbol": "",                        (string, required) fork symbol
   "reward": 0.0,                       (double, required) mint reward
   "halvecycle": 0,                     (uint, required) halve cycle: 0: fixed reward, >0: blocks of halve cycle
   "isolated": true|false,              (bool, optional, default=true) is isolated
   "private": true|false,               (bool, optional, default=false) is private
   "enclosed": true|false               (bool, optional, default=false) is enclosed
 }

Response:

 "result" :
 {
   "hash": "",                          (string, required) block hash
   "hex": ""                            (string, required) block data hex
 }

Examples:

>> bigbang-cli makeorigin a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0 1p2e0yjz5y1ga705csrzpsp1wre1vjqepkbwnpchyx2vay86wf01pz3qs 1500 test-fork POW 1.0 0
<< {"hash" : "327ec1ffabeae75295401ec69591f845e6025c24d31ae07d9f6e9dec3462bd7a","hex" : "010000ffc06f585ac0afdc176980a0a1ebe849d09b51e4b4c1dd46fb939579d71bdc55809d6f3da600000000000000000000000000000000000000000000000000000000000000004c8001000000e109746573742d666f726be203504f574301a46400000000000000a540420f0000000000e62101b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803010000010000000000000000000000000000000000000000000000000000000000000000000000000001b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803002f685900000000000000000000000009746573742d666f726b000040f253de866a5357b5a11e493162885f4b8a34e94279e29b8354b237aaec650af420b61d24721b4e5e3a4096e9370c77f7dad6c05ced6eedcb2229958671620c05"}

>> curl -d '{"id":4,"method":"makeorigin","jsonrpc":"2.0","params":{"prev":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","owner":"1p2e0yjz5y1ga705csrzpsp1wre1vjqepkbwnpchyx2vay86wf01pz3qs","amount":1500,"name":"test-fork","symbol":"POW","reward":1,"halvecycle":0,"isolated":true,"private":false,"enclosed":false}}' http://127.0.0.1:9902
<< {"id":4,"jsonrpc":"2.0","result":{"hash":"327ec1ffabeae75295401ec69591f845e6025c24d31ae07d9f6e9dec3462bd7a","hex":"010000ffc06f585ac0afdc176980a0a1ebe849d09b51e4b4c1dd46fb939579d71bdc55809d6f3da600000000000000000000000000000000000000000000000000000000000000004c8001000000e109746573742d666f726be203504f574301a46400000000000000a540420f0000000000e62101b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803010000010000000000000000000000000000000000000000000000000000000000000000000000000001b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803002f685900000000000000000000000009746573742d666f726b000040f253de866a5357b5a11e493162885f4b8a34e94279e29b8354b237aaec650af420b61d24721b4e5e3a4096e9370c77f7dad6c05ced6eedcb2229958671620c05"}}

>> bigbang-cli makeorigin a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0 1p2e0yjz5y1ga705csrzpsp1wre1vjqepkbwnpchyx2vay86wf01pz3qs 1500 test-fork POW 1.0 0 -i -nop -e
<< {"hash":"ade2a8f61082cc0b8e98581e013c52126989d5c15e5c4c6b882f76c98bc68025","hex":"010000ffc06f585ac0afdc176980a0a1ebe849d09b51e4b4c1dd46fb939579d71bdc55809d6f3da600000000000000000000000000000000000000000000000000000000000000004c8001000000e109746573742d666f726be203504f574305a46400000000000000a540420f0000000000e62101b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803010000010000000000000000000000000000000000000000000000000000000000000000000000000001b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803002f685900000000000000000000000009746573742d666f726b00004078bbc21e237d727a58de54e14a19d0244e9dd27ce7d55dfca891158913068185f3dc5b98d4e11500b7512bc8d0e8aa136b34f22f16c16be45e9650e15253980e"}

>> {"id":2,"method":"makeorigin","jsonrpc":"2.0","params":{"prev":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0","owner":"1p2e0yjz5y1ga705csrzpsp1wre1vjqepkbwnpchyx2vay86wf01pz3qs","amount":1500,"name":"test-fork","symbol":"POW","reward":1,"halvecycle":0,"isolated":true,"private":false,"enclosed":true}}
<< {"id":2,"jsonrpc":"2.0","result":{"hash":"ade2a8f61082cc0b8e98581e013c52126989d5c15e5c4c6b882f76c98bc68025","hex":"010000ffc06f585ac0afdc176980a0a1ebe849d09b51e4b4c1dd46fb939579d71bdc55809d6f3da600000000000000000000000000000000000000000000000000000000000000004c8001000000e109746573742d666f726be203504f574305a46400000000000000a540420f0000000000e62101b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803010000010000000000000000000000000000000000000000000000000000000000000000000000000001b09c0f4be5f060a380acce3f6cd83cc383b95dd69af95b323ee8b6af20dc7803002f685900000000000000000000000009746573742d666f726b00004078bbc21e237d727a58de54e14a19d0244e9dd27ce7d55dfca891158913068185f3dc5b98d4e11500b7512bc8d0e8aa136b34f22f16c16be45e9650e15253980e"}}

Errors:

* {"code":-4,"message":"Owner' address should be pubkey address"}
* {"code":-4,"message":"Unknown key"}
* {"code":-6,"message":"Unknown prev block"}
* {"code":-6,"message":"Invalid owner"}
* {"code":-6,"message":"Invalid amount"}
* {"code":-6,"message":"Invalid name or symbol"}
* {"code":-6,"message":"Prev block should not be extended/vacant block"}
* {"code":-405,"message":"Key is locked"}
* {"code":-401,"message":"Failed to sign message"}

verifymessage

Usage:

        verifymessage <"pubkey"> <"message"> <"sig"> (-a="addr")

Verify a signed message

Arguments:

 "pubkey"                               (string, required) public key
 "message"                              (string, required) message to be verified
 "sig"                                  (string, required) sign
 -a="addr"                              (string, optional) address signed

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) public key
   "message": "",                       (string, required) message to be verified
   "sig": "",                           (string, required) sign
   "addr": ""                           (string, optional) address signed
 }

Response:

 "result": result                       (bool, required) message verified result.

Examples:

>> bigbang-cli verifymessage 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882 123456 045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707
<< true

>> curl -d '{"id":5,"method":"verifymessage","jsonrpc":"2.0","params":{"pubkey":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","message":"123456","sig":"045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707"}}' http://127.0.0.1:9902
<< {"id":5,"jsonrpc":"2.0","result":true}

>> bigbang-cli verifymessage 2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882 12345 045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707
<< false

>> curl -d '{"id":6,"method":"verifymessage","jsonrpc":"2.0","params":{"pubkey":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","message":"12345","sig":"045977f8c07e6d846d6055357f36a70c16c071cb85115e3ffb498e171a9ac3f4aed1292203a0c8e42c4becafad3ced0d9874abd2a8b788fda9f07099a1e71707"}}' http://127.0.0.1:9902
<< {"id":6,"jsonrpc":"2.0","result":false}

Errors:

* {"code":-6,"message":"Invalid pubkey"}
* {"code":-6,"message":"Invalid message"}
* {"code":-6,"message":"Invalid sig"}

makekeypair

Usage:

        makekeypair

Make a public/private key pair.

Arguments:

	none

Request:

 "param" : {}

Response:

 "result" :
 {
   "privkey": "",                       (string, required) private key
   "pubkey": ""                         (string, required) public key
 }

Examples:

>> bigbang-cli makekeypair
<< {"privkey":"833a5d51d2db84debc0eb3a40d7d41b2723452d211d7e81ce489a95ef48b2324","pubkey":"e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9"}

>> curl -d '{"id":42,"method":"makekeypair","jsonrpc":"2.0","params":{}}' http://127.0.0.1:9902
<< {"id":42,"jsonrpc":"2.0","result":{"privkey":"833a5d51d2db84debc0eb3a40d7d41b2723452d211d7e81ce489a95ef48b2324","pubkey":"e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9"}}

Errors:

	none

getpubkeyaddress

Usage:

        getpubkeyaddress <"pubkey"> (-r="reversal")

Return encoded address for the given public key.

Arguments:

 "pubkey"                               (string, required) public key
 -r="reversal"                          (string, optional) reversal get address pubkey

Request:

 "param" :
 {
   "pubkey": "",                        (string, required) public key
   "reversal": ""                       (string, optional) reversal get address pubkey
 }

Response:

 "result": "address"                    (string, required) address of public key

Examples:

>> bigbang-cli getpubkeyaddress e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9
<< 1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1

>> curl -d '{"id":44,"method":"getpubkeyaddress","jsonrpc":"2.0","params":{"pubkey":"e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9"}}' http://127.0.0.1:9902
<< {"id":44,"jsonrpc":"2.0","result":"1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}

Errors:

* {"code":-6,"message":"Invalid pubkey"}

gettemplateaddress

Usage:

        gettemplateaddress <"tid">

Return encoded address for the given template id.

Arguments:

 "tid"                                  (string, required) template id

Request:

 "param" :
 {
   "tid": ""                            (string, required) template id
 }

Response:

 "result": "address"                    (string, required) address of template

Examples:

>> bigbang-cli gettemplateaddress 2040fpytdr4k5h8tk0nferr7zb51tkccrkgqf341s6tg05q9xe6hth1m4
<< 21w2040000000000000000000000000000000000000000000000epcek

>> curl -d '{"id":53,"method":"gettemplateaddress","jsonrpc":"2.0","params":{"tid":"2040fpytdr4k5h8tk0nferr7zb51tkccrkgqf341s6tg05q9xe6hth1m4"}}' http://127.0.0.1:9902
<< {"id":53,"jsonrpc":"2.0","result":"21w2040000000000000000000000000000000000000000000000epcek"}

Errors:

* {"code":-6,"message":"Invalid tid"}

maketemplate

Usage:

        maketemplate <"type"> <{delegate}>|<{vote}>|<{fork}>|<{mint}>|<{multisig}>|<{weighted}>|<{exchange}>|<{payment}> (*synctx*)

Return encoded address for the given template id.

Arguments:

 "type"                                 (string, required) template type
  (if type=delegate)
 {delegate}                             (object, required) a delegate template
  (if type=vote)
 {vote}                                 (object, required) a vote template
  (if type=fork)
 {fork}                                 (object, required) a new fork template
  (if type=mint)
 {mint}                                 (object, required) a mint template
  (if type=multisig)
 {multisig}                             (object, required) a multiple sign template
  (if type=weighted)
 {weighted}                             (object, required) a weighted multiple sign template
  (if type=exchange)
 {exchange}                             (object, required) a exchange template
  (if type=payment)
 {payment}                              (object, required) a payment template
 *synctx*                               (bool, optional, default=true) sync tx or not

Request:

 "param" :
 {
   "type": "",                          (string, required) template type
   (if type=delegate)
   "delegate":                          (object, required) a delegate template
   {
     "delegate": "",                    (string, required) delegate public key
     "owner": ""                        (string, required) owner address
   }
   (if type=vote)
   "vote":                              (object, required) a vote template
   {
     "delegate": "",                    (string, required) delegate template address
     "owner": ""                        (string, required) owner address
   }
   (if type=fork)
   "fork":                              (object, required) a new fork template
   {
     "redeem": "",                      (string, required) redeem address
     "fork": ""                         (string, required) fork hash
   }
   (if type=mint)
   "mint":                              (object, required) a mint template
   {
     "mint": "",                        (string, required) mint public key
     "spent": ""                        (string, required) spent address
   }
   (if type=multisig)
   "multisig":                          (object, required) a multiple sign template
   {
     "required": 0,                     (int, required) required weight > 0
     [
       "key": ""                        (string, required) public key
     ]
   }
   (if type=weighted)
   "weighted":                          (object, required) a weighted multiple sign template
   {
     "required": 0,                     (int, required) required weight
     [
       "pubkey":                        (object, required) public key
       {
         "key": "",                     (string, required) public key
         "weight": 0                    (int, required) weight
       }
     ]
   }
   (if type=exchange)
   "exchange":                          (object, required) a exchange template
   {
     "addr_m": "",                      (string, required) addr_m
     "addr_s": "",                      (string, required) addr_s
     "height_m": 0,                     (int, required) height_m
     "height_s": 0,                     (int, required) height_s
     "fork_m": "",                      (string, required) fork_m hash
     "fork_s": ""                       (string, required) fork_s hash
   }
   (if type=payment)
   "payment":                           (object, required) a payment template
   {
     "business": "",                    (string, required) business
     "customer": "",                    (string, required) customer
     "height_exec": 0,                  (int, required) height_exec
     "height_end": 0,                   (int, required) height_end
     "amount": 0,                       (int, required) amount
     "pledge": 0                        (int, required) pledge
   }
   "synctx": true|false                 (bool, optional, default=true) sync tx or not
 }

Response:

 "result" :
 {
   "address": "",                       (string, required) address of template
   "hex": ""                            (string, required) template data hex string
 }

Examples:

>> bigbang-cli maketemplate multisig '{"required": 1, "pubkeys": ["2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882", "f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9"]}'
<< {"address":"208043ht3c51qztrdfa0f3349pe2m8ajjw1mdb2py68fbckaa2s24tq55","hex":"0200010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052eb9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f4"}

>> curl -d '{"id":54,"method":"maketemplate","jsonrpc":"2.0","params":{"type":"multisig","multisig":{"required":1,"pubkeys":["2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9"]}}}' http://127.0.0.1:9902
<< {"id":54,"jsonrpc":"2.0","result":{"address":"208043ht3c51qztrdfa0f3349pe2m8ajjw1mdb2py68fbckaa2s24tq55","hex":"0200010282e8a36441d116ce7a97f9a216d43a3dfc4280295874007b8ff5fd45eec9052eb9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f4"}}

>> bigbang-cli maketemplate delegate '{"delegate":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882","owner":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq"}'

>> bigbang-cli maketemplate fork '{"redeem":"1gbma6s21t4bcwymqz6h1dn1t7qy45019b1t00ywfyqymbvp90mqc1wmq","fork":"a63d6f9d8055dc1bd7799593fb46ddc1b4e4519bd049e8eba1a0806917dcafc0"}'

>> bigbang-cli maketemplate mint '{"mint": "e8e3770e774d5ad84a8ea65ed08cc7c5c30b42e045623604d5c5c6be95afb4f9", "spent": "1z6taz5dyrv2xa11pc92y0ggbrf2wf36gbtk8wjprb96qe3kqwfm3ayc1"}'

>> bigbang-cli maketemplate weighted '{"required": 1, "pubkeys": [{"key":"2e05c9ee45fdf58f7b007458298042fc3d3ad416a2f9977ace16d14164a3e882", "weight": 1},{"key": "f4124c636d37b1308ba95c14b2487134030d5817f7fa93f11bcbc616aab7c3b9", "weight": 2}]}'

Errors:

* {"code":-6,"message":"Invalid parameters, failed to make template"}
* {"code":-6,"message":"Invalid parameter, missing weight"}
* {"code":-6,"message":"Invalid parameter, missing redeem address"}
* {"code":-6,"message":"Invalid parameter, missing spent address"}
* {"code":-6,"message":"Invalid parameter, missing owner address"}
* {"code":-6,"message":"template type error. type: xxx"}

decodetransaction

Usage:

        decodetransaction <"txdata">

Return a JSON object representing the serialized, hex-encoded transaction.

Arguments:

 "txdata"                               (string, required) transaction raw data

Request:

 "param" :
 {
   "txdata": ""                         (string, required) transaction raw data
 }

Response:

 "result" :
 {
   "txid": "",                          (string, required) transaction hash
   "version": 0,                        (uint, required) version
   "type": "",                          (string, required) transaction type
   "time": 0,                           (uint, required) transaction timestamp
   "lockuntil": 0,                      (uint, required) unlock time
   "anchor": "",                        (string, required) anchor hash
   "blockhash": "",                     (string, required) which block tx located in
   [
     "vin":                             (object, required) vin struct
     {
       "txid": "",                      (string, required) pre-vout transaction hash
       "vout": 0                        (uint, required) pre-vout number
     }
   ]
   "sendfrom": "",                      (string, required) send from address
   "sendto": "",                        (string, required) send to address
   "amount": 0.0,                       (double, required) amount
   "txfee": 0.0,                        (double, required) transaction fee
   "data": "",                          (string, required) data
   "sig": "",                           (string, required) sign
   "fork": "",                          (string, required) fork hash
   "confirmations": 0                   (int, optional) confirmations
 }

Examples:

>> bigbang-cli decodetransaction 010000003190f05d00000000701af4705c5e6fcb04efc3ca3c851c1e4d8948e10923025f54bea9b000000000017a792b71cdb0f662c802207d849e73c504b7a87096c6d80479605a2a9188f05d0001a4dce88fee73a59dcebf2b40ba1d13407254164b9166f063b2e8d513561118d620e4ab0900000000a0860100000000000040d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000
<< {"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","version":1,"type":"token","time":1576046641,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df088912a5a607904d8c69670a8b704c5739e847d2002c862f6b0cd712b797a","vout":0}],"sendfrom":"1n56xmva8131c4q0961anv5wdzfqtdctyg9e53fxp65f1jyhbtkfbxz6q","sendto":"1mkeeh3zeeejsvknz5d0bm78k81s585jbj5kf0rxjx3ah6ngh33b1erg9","amount":162.260000,"txfee":0.100000,"data":"","sig":"d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70"}

>> curl -d '{"id":1,"method":"decodetransaction","jsonrpc":"2.0","params":{"txdata":"010000003190f05d00000000701af4705c5e6fcb04efc3ca3c851c1e4d8948e10923025f54bea9b000000000017a792b71cdb0f662c802207d849e73c504b7a87096c6d80479605a2a9188f05d0001a4dce88fee73a59dcebf2b40ba1d13407254164b9166f063b2e8d513561118d620e4ab0900000000a0860100000000000040d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000"}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":{"txid":"5df09031322f99db08a4747d652e0733f60c9b523a6a489b5f72e0031a2b2a03","version":1,"type":"token","time":1576046641,"lockuntil":0,"anchor":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70","vin":[{"txid":"5df088912a5a607904d8c69670a8b704c5739e847d2002c862f6b0cd712b797a","vout":0}],"sendfrom":"1n56xmva8131c4q0961anv5wdzfqtdctyg9e53fxp65f1jyhbtkfbxz6q","sendto":"1mkeeh3zeeejsvknz5d0bm78k81s585jbj5kf0rxjx3ah6ngh33b1erg9","amount":162.260000,"txfee":0.100000,"data":"","sig":"d6594d9215c58224f9707a84f773b00394561df0bba769a279dd065b98bc03a946928f8a6508a728eceff3e22d5181da16b78087c79b68532b31553bdc855000","fork":"00000000b0a9be545f022309e148894d1e1c853ccac3ef04cb6f5e5c70f41a70"}}

Errors:

* {"code":-8,"message":"TX decode failed"}
* {"code":-6,"message":"Unknown anchor block"}

gettxfee

Usage:

        gettxfee <"hexdata">

Return TxFee for vchData Hex data

Arguments:

 "hexdata"                              (string, required) Hex encoded vchData in transaction

Request:

 "param" :
 {
   "hexdata": ""                        (string, required) Hex encoded vchData in transaction
 }

Response:

 "result": txfee                        (double, required) transaction Fee

Examples:

>> bigbang-cli gettxfee feeda13f124bbc
<< 0.01

>> curl -d '{"id":1,"method":"gettxfee","jsonrpc":"2.0","params":{"hexdata":"feeda13f124bbc"}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":"0.01"}

Errors:

	none

listunspent

Usage:

        listunspent <"address"> (-f="fork") (-n=max) (-if="file")

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.

Arguments:

 "address"                              (string, required) address to receive the unspent
 -f="fork"                              (string, optional) fork hash
 -n=max                                 (uint, optional, default=10) maximum unspents(0 means unlimited)
 -if="file"                             (string, optional) input file containing list of multiple addresses

Request:

 "param" :
 {
   "address": "",                       (string, required) address to receive the unspent
   "fork": "",                          (string, optional) fork hash
   "max": 0,                            (uint, optional, default=10) maximum unspents(0 means unlimited)
   "file": ""                           (string, optional) input file containing list of multiple addresses
 }

Response:

 "result" :
 {
   [
     "addr":                            (object, required) 
     {
       "address": "",                   (string, required) address to list unspent
       [
         "unspent":                     (object, required) unspent data
         {
           "txid": "",                  (string, required) txid
           "out": 0,                    (uint, required) tx output point
           "amount": 0.0,               (double, required) amount
           "time": 0,                   (uint, required) time transaction made
           "lockuntil": 0               (uint, required) lockuntil
         }
       ]
       "sum": 0.0                       (double, required) sum of unspent amount
     }
   ]
   "total": 0.0                         (double, required) total of unspent amount for list of addresses
 }

Examples:

>> bigbang-cli listunspent 1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm -f=00000000beb6f9e2a8813f4778b26820a8649894de63624e65bc0ffa9562730b -n=1
<< {"unspents":[{"txid":"5dd4bb56b3d0aed9bb0e0a80d01ec1f70d7bd4d1fc200a48df330154b366ca8e","out":0,"amount":1000.000000,"time":1574222678,"lockuntil":0}],"sum":1000.000000}

>> bigbang-cli listunspent 20g075m4mh5trbkdy8vbh74n9h7t3npe7tewpnvsfb19p57jnyf3kdh45 -if=/home/oijen/addr10
<< {"addresses":[{"address":"1zbyhm9p0aa1wvebg3wch7xkhxsv5m9z32jsnjngpfnf7cgd778st8tds","unspents":[{"txid":"5de8bcce65733bbcfff18130de6f3f10cfd46ce94aa4775070f1634777029401","out":0,"amount":340.999900,"time":1575533774,"lockuntil":0},{"txid":"5e0423aadb07b4142abcf29e576e56d0eff594d5da18f6915155c1ece4c66309","out":0,"amount":11.999900,"time":1577329578,"lockuntil":0},{"txid":"5df7b69db367bfc7a9b40fea36e2459f99e214db9505a44f9dfa9052e1d6f411","out":0,"amount":10.999900,"time":1576515229,"lockuntil":0}],"sum":363.999700},{"address":"1z98n1sfbhtw3b5wrre69fh648e4res1g7r9bzcp0kf85hte75mv0zc01","unspents":[],"sum":0.000000},{"address":"1tbvg7cxbqg36rph6ymws856ms4j5e4cvbd4ssy0ejxn1h869g9hfwv4c","unspents":[],"sum":0.000000},{"address":"1j42adjfq37j9grmwsh4gnayfgg6kep59d78srpxg8zf8hdqv1yptjwzx","unspents":[{"txid":"5df58dcccb52641f3b9c090ba5760181a3999370137cc6b5bbacc30b7b4b5909","out":0,"amount":499.999900,"time":1576373708,"lockuntil":0},{"txid":"5df80dad00f53331757e19fae811308ec59d722ffb189958ecdb7cc4ad79b30d","out":0,"amount":499.999900,"time":1576537517,"lockuntil":0},{"txid":"5df7a4344d2d887c929cf6d08bf825bfacc14d8c86cf62ab3944caa142bc6c0f","out":0,"amount":499.999900,"time":1576510516,"lockuntil":0}],"sum":1499.999700},{"address":"1ztsgg3m6az2sm8t6ap6k3cw36z5ewd5sp05k7a62h6rqvpqp871aqpq6","unspents":[],"sum":0.000000},{"address":"1ny00y8whrser450hfw3d87h1p3emdeca4fq5xetddwfz9mb4e38ndxx0","unspents":[],"sum":0.000000},{"address":"1944eh1ysrjy1rgjyxcr9b0nvmbra2bmtm6v6kt1a3ag6wf07hfa0apgg","unspents":[],"sum":0.000000},{"address":"1rjcyqyzsf1p8b22fxdx79qwfcr7wzkx1n2xykc5chzd905jymbfd8j4n","unspents":[{"txid":"5df61f85cbe11a3ab7eedbc2929241aa10c27179ec0b4fef3cea9f803a9aad15","out":0,"amount":499.999900,"time":1576411013,"lockuntil":0},{"txid":"5e04142090815b50bf1688e5cbd3ceca550c8f2ad6e44d690fb7a5f21b478227","out":0,"amount":499.999900,"time":1577325600,"lockuntil":0},{"txid":"5dfa848c46ee3c4b3b468674433dad2b3d5531428e5b60ef3d827c020859f73a","out":0,"amount":499.999900,"time":1576699020,"lockuntil":0}],"sum":1499.999700},{"address":"1jvy4ys1yrz3rg6te1h70mt0t89v9d0pbr038d48wmyzyzvrxk7safdg2","unspents":[],"sum":0.000000},{"address":"1dq62d8y4fz20sfg63zzy4h4ayksswv1fgqjzvegde306bxxg5zygc27q","unspents":[{"txid":"5df31decea3f149fe53062fbdbc8ca4e42d54e348f9e3c482a1edfb0c5b34100","out":0,"amount":499.999900,"time":1576213996,"lockuntil":0},{"txid":"5df26e22ab57f87fa7f5ee931b09cdc550583ab7517afa18e5f68db1ee53fb02","out":0,"amount":499.999900,"time":1576168994,"lockuntil":0},{"txid":"5df235df6a0d575378361ba75560ffab8ee9c786a58e604f14c037d7ec2afd05","out":0,"amount":499.999900,"time":1576154591,"lockuntil":0}],"sum":1499.999700},{"address":"20g075m4mh5trbkdy8vbh74n9h7t3npe7tewpnvsfb19p57jnyf3kdh45","unspents":[{"txid":"5e032143eb0c23c13f2d422144f1337ecd467c2163c7758e5a00b4d6fbe7ba00","out":0,"amount":1153.000000,"time":1577263427,"lockuntil":0},{"txid":"5e046a5cae5ea2622a37ad737f53e9185b60ea010242191b75f276b8d50dc900","out":0,"amount":1153.000000,"time":1577347676,"lockuntil":0},{"txid":"5e0399615cb69be399d6b6fee2bc1aca10d9d4e222467f9eef76745334b8ad01","out":0,"amount":1153.000000,"time":1577294177,"lockuntil":0}],"sum":3459.000000}],"total":8322.998800}

>> curl -d '{"id":0,"method":"listunspent","jsonrpc":"2.0","params":{"address":"1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm","fork":"00000000beb6f9e2a8813f4778b26820a8649894de63624e65bc0ffa9562730b","max":1}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":{"unspents":[{"txid":"5dd4bb56b3d0aed9bb0e0a80d01ec1f70d7bd4d1fc200a48df330154b366ca8e","out":0,"amount":1000.000000,"time":1574222678,"lockuntil":0}],"sum":1000.000000}}

Errors:

* {"code":-401,"message":"Address as an argument should be provided."}
* {"code":-401,"message":"Acquiring unspent list failed."}

getwork

Usage:

        getwork <"spent"> <"privkey"> ("prev")

If (prev hash) is matched with the current primary chain,return true
If next block is not generated by proof-of-work,return false
Otherwise, return formatted proof-of-work parameters to work on:
"prevblockheight" : prevblock height
"prevblockhash" : prevblock hash
"prevblocktime" : prevblock timestamp
"algo" : proof-of-work algorithm: cryptonight=1,...
"bits" : proof-of-work difficulty nbits
"data" : work data

Arguments:

 "spent"                                (string, required) spent address
 "privkey"                              (string, required) private key
 "prev"                                 (string, optional) prev block hash

Request:

 "param" :
 {
   "spent": "",                         (string, required) spent address
   "privkey": "",                       (string, required) private key
   "prev": ""                           (string, optional) prev block hash
 }

Response:

 "result" :
 {
   (if prev is matched or block is not generated by POW)
   "result": true|false,                (bool, optional) result
   (if next block is generated by POW)
   "work":                              (object, optional) work data
   {
     "prevblockheight": 0,              (int, required) prev block height
     "prevblockhash": "",               (string, required) prev block hash
     "prevblocktime": 0,                (uint, required) prev block time
     "algo": 0,                         (int, required) algo
     "bits": 0,                         (int, required) bits
     "data": ""                         (string, required) work data
   }
 }

Examples:

>> bigbang-cli getwork 1pdr1knaaa4fzr846v89g3q2tzb8pbvbavbbft8xppkky0mqnmsq8gn5y ceae964a1119f110b0cff3614426dd692f8467a95cc2c276e523efc63c5e5031 7ee748e9a827d476d1b4ddb77dc8f9bad779f7b71593d5c5bf73b535e1cc2446
<< {"work":{"prevblockheight":23,"prevblockhash":"f734bb6bc12ab4058532113cfe6a3412d1036eae25f60a97ee1b17effc6e74de","prevblocktime":1538142032,"algo":1,"bits":25,"data":"01000100822fae5bde746efcef171bee970af625ae6e03d112346afe3c11328505b42ac16bbb34f74300000000000000000000000000000000000000000000000000000000000000000001190000000000000000000000000000000000000000000000000000000000000000"}}

>> curl -d '{"id":1,"method":"getwork","jsonrpc":"2.0","params":{"spent":"1pdr1knaaa4fzr846v89g3q2tzb8pbvbavbbft8xppkky0mqnmsq8gn5y","privkey":"ceae964a1119f110b0cff3614426dd692f8467a95cc2c276e523efc63c5e5031","prev":"7ee748e9a827d476d1b4ddb77dc8f9bad779f7b71593d5c5bf73b535e1cc2446"}}' http://127.0.0.1:9902
<< {"id":1,"jsonrpc":"2.0","result":{"work":{"prevblockheight":23,"prevblockhash":"f734bb6bc12ab4058532113cfe6a3412d1036eae25f60a97ee1b17effc6e74de","prevblocktime":1538142032,"algo":1,"bits":25,"data":"01000100822fae5bde746efcef171bee970af625ae6e03d112346afe3c11328505b42ac16bbb34f74300000000000000000000000000000000000000000000000000000000000000000001190000000000000000000000000000000000000000000000000000000000000000"}}}

Errors:

* {"code" : -32603, "message" : "The primary chain is invalid."}

submitwork

Usage:

        submitwork <"data"> <"spent"> <"privkey">

Attempt to construct and submit new block to network
Return hash of new block.

Arguments:

 "data"                                 (string, required) work data
 "spent"                                (string, required) spent address
 "privkey"                              (string, required) private key

Request:

 "param" :
 {
   "data": "",                          (string, required) work data
   "spent": "",                         (string, required) spent address
   "privkey": ""                        (string, required) private key
 }

Response:

 "result": "hash"                       (string, required) block hash

Examples:

>> bigbang-cli submitwork 01000100502fae5b4624cce135b573bfc5d59315b7f779d7baf9c87db7ddb4d176d427a8e948e77e43000000000000000000000000000000000000000000000000000000000000000000011acfff020000000000000000000000000000000000000000000000000000000000 1dj5qcjst7eh4tems36n1m500hhyba3vx436t4a8hgdm7r7jrdbf2yqp9 41a9f94395ced97d5066e2d099df4f1e2bd96057f9c38e8ea3f8a02eccd0a98e
<< f734bb6bc12ab4058532113cfe6a3412d1036eae25f60a97ee1b17effc6e74de

>> curl -d '{"id":2,"method":"submitwork","jsonrpc":"2.0","params":{"data":"01000100502fae5b4624cce135b573bfc5d59315b7f779d7baf9c87db7ddb4d176d427a8e948e77e43000000000000000000000000000000000000000000000000000000000000000000011acfff020000000000000000000000000000000000000000000000000000000000","spent":"1dj5qcjst7eh4tems36n1m500hhyba3vx436t4a8hgdm7r7jrdbf2yqp9","privkey":"41a9f94395ced97d5066e2d099df4f1e2bd96057f9c38e8ea3f8a02eccd0a98e"}}' http://127.0.0.1:9902
<< {"id":2,"jsonrpc":"2.0","result":"f734bb6bc12ab4058532113cfe6a3412d1036eae25f60a97ee1b17effc6e74de"}

Errors:

* {"code" : -4, "message" : "Invalid spent address"}
* {"code" : -4, "message" : "Invalid private key"}
* {"code" : -4, "message" : "Invalid mint template"}
* {"code" : -6, "message" : "Block rejected : operation failed"}
* {"code" : -6, "message" : "Block rejected : block proof-of-work is invalid"}

querystat

Usage:

        querystat <"type"> (-f="fork") (-b="begin") (-n=count)

Query statistical data

Arguments:

 "type"                                 (string, required) statistical type: maker: block maker, p2psyn: p2p synchronization
 -f="fork"                              (string, optional) fork hash (default all fork)
 -b="begin"                             (string, optional) begin time(HH:MM:SS) (default last count records)
 -n=count                               (uint, optional) get record count (default 20)

Request:

 "param" :
 {
   "type": "",                          (string, required) statistical type: maker: block maker, p2psyn: p2p synchronization
   "fork": "",                          (string, optional) fork hash (default all fork)
   "begin": "",                         (string, optional) begin time(HH:MM:SS) (default last count records)
   "count": 0                           (uint, optional) get record count (default 20)
 }

Response:

 "result": "stattable"                  (string, required) statistical data table
                                        1) maker: block maker
                                        -- time: statistical time, format: hh:mm:ss
                                        -- powblocks: number of POW blocks produced in one minute
                                        -- dposblocks: number of DPOS blocks produced in one minute
                                        -- tps: number of TX produced in one second
                                        2) p2psyn: p2p synchronization
                                        -- time: statistical time, format: hh:mm:ss
                                        -- recvblocks: number of synchronized receiving blocks in one minute
                                        -- recvtps: number of synchronized receiving TX in one second
                                        -- sendblocks: number of synchronized sending blocks in one minute
                                        -- sendtps: number of synchronized sending TX in one second

Examples:

>> bigbang-cli querystat maker -b=09:11:00 -n=2
<< time      blocktps  tps  
09:11:59  1       12     
09:12:59  1       22     

>> curl -d '{"id":1,"method":"querystat","jsonrpc":"2.0","params":{"type":"maker","begin":"09:11:00","count":2}}' http://127.0.0.1:9902
<< {"id":0,"jsonrpc":"2.0","result":"time      blocktps  tps  
09:11:59  1       12     
09:12:59  1       22     "}

Errors:

* {"code" : -6, "message" : "Invalid type: is empty"}
* {"code" : -6, "message" : "Invalid type"}
* {"code" : -6, "message" : "Invalid fork"}
* {"code" : -6, "message" : "Invalid count"}
* {"code" : -32603, "message" : "query error"}

signrawtransactionwithwallet

Usage:

        signrawtransactionwithwallet <"addrIn"> <"txdata">

Return json object with keys:
hex : raw transaction with signature(s) (hex-encoded string)
completed : true if transaction has a completed set of signature (false if not)

Arguments:

 "addrIn"                               (string, required) hex address string of pubkey or templateid used to sign offline transaction
 "txdata"                               (string, required) raw transaction data(hex string)

Request:

 "param" :
 {
   "addrIn": "",                        (string, required) hex address string of pubkey or templateid used to sign offline transaction
   "txdata": ""                         (string, required) raw transaction data(hex string)
 }

Response:

 "result" :
 {
   "hex": "",                           (string, required) hex of transaction data
   "completed": true|false              (bool, required) transaction completed or not
 }

Examples:

>> bigbang-cli signrawtransactionwithwallet 20m0fetg8ypthr01xxyxmdxbr27bt0fp8j151d321w72ht9ywfkzxxnf5 01000000e0d2cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e8506000000000195a751b8eaef2e9a2337be86b4e892e15d723ff992501c82c5a6d2aa7bcbcc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f57c0cf6a000000000010270000000000000000
<< {"hex":"01000000e0d2cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e8506000000000195a751b8eaef2e9a2337be86b4e892e15d723ff992501c82c5a6d2aa7bcbcc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f57c0cf6a0000000000102700000000000000ee75b03705c7e9f66feed2338df515ee8826ff991258d0f9786203ce2d3445958d0202004bb6c84b2311f42905ea3749fe0ea2ae2ed79c950daa53d1dd899e99622c02030000000000000013f64ef0eb65bd1846bbe2835937868e8f76cc6ec1d15c18bfe41b5d6b38b3b5014eb8d334d9a93c1c51c31d300050fdf5fa8b9f6029af7354331b87a2300ec2c90106587926a76ffed40f884b39396fdbe4c0ca0a72e6499caecd130073117da5fb01014b4b4efd5425e102e7d13b089bb1c5387c877a4bd147251ad241a21246a443a9e46b18b24d8ae6a22faf6d6c79f3acd014e17f79491f42dd0f5d001d4a294b08","completed":false}

>> curl -d '{"id":62,"method":"signrawtransactionwithwallet","jsonrpc":"2.0","params":{"addrIn":"20m0fetg8ypthr01xxyxmdxbr27bt0fp8j151d321w72ht9ywfkzxxnf5","txdata":"01000000000000002b747e24738befccff4a05c21dba749632cb8eb410233fa110e3f58a779b4325010ef45be50157453a57519929052d0818c269dee60be98958d5ab65bc7e0919810001b9c3b7aa16c6cb1bf193faf717580d03347148b2145ca98b30b1376d634c12f440420f0000000000a08601000000000002123400"}}' http://127.0.0.1:9902
<< {"id":62,"jsonrpc":"2.0","result":{"hex":"01000000e0d2cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e8506000000000195a751b8eaef2e9a2337be86b4e892e15d723ff992501c82c5a6d2aa7bcbcc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f57c0cf6a0000000000102700000000000000fd2e0175b03705c7e9f66feed2338df515ee8826ff991258d0f9786203ce2d3445958d0202004bb6c84b2311f42905ea3749fe0ea2ae2ed79c950daa53d1dd899e99622c02030000000000000013f64ef0eb65bd1846bbe2835937868e8f76cc6ec1d15c18bfe41b5d6b38b3b5014eb8d334d9a93c1c51c31d300050fdf5fa8b9f6029af7354331b87a2300ec2c90106587926a76ffed40f884b39396fdbe4c0ca0a72e6499caecd130073117da5fb01054b4b4efd5425e102e7d13b089bb1c5387c877a4bd147251ad241a21246a443a9e46b18b24d8ae6a22faf6d6c79f3acd014e17f79491f42dd0f5d001d4a294b087f54c5679e286e77d07c6f9df1e3084daab9bb8accd5725b9146c4fe99f645c177e4d0079dacca1d85afb4f70044eb64e803054dbe150d7c4e6bb5c2bcc78007","completed":true}}

>> bigbang-cli signrawtransactionwithwallet 16g92n3v2p04htxgck0r3awk878d9x7gx60kp3wmc47wwdp6b491pxa9x 0100000065d5cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e85060000000001a4df918abd7a55a7296e22b6dbfd1be7fd09651003387456fa59d3d11f96cc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f5720aa44000000000010270000000000000000
<< {"hex":"0100000065d5cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e85060000000001a4df918abd7a55a7296e22b6dbfd1be7fd09651003387456fa59d3d11f96cc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f5720aa44000000000010270000000000000040844cfb574ada0ea0c37a76042c25b7fc82756deefc8a6150ef5babb54bf1ab3de3eba03cc3bc7ab74051ca5986ed83c2286fbcf0ab120ec4491425cef0d25502","completed":true}

>> curl -d '{"id":62,"method":"signrawtransactionwithwallet","jsonrpc":"2.0","params":{"addrIn":"16g92n3v2p04htxgck0r3awk878d9x7gx60kp3wmc47wwdp6b491pxa9x","txdata":"0100000065d5cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e85060000000001a4df918abd7a55a7296e22b6dbfd1be7fd09651003387456fa59d3d11f96cc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f5720aa44000000000010270000000000000000"}}' http://127.0.0.1:9902
<< {"id":62,"jsonrpc":"2.0","result":{"hex":"0100000065d5cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e85060000000001a4df918abd7a55a7296e22b6dbfd1be7fd09651003387456fa59d3d11f96cc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f5720aa44000000000010270000000000000040844cfb574ada0ea0c37a76042c25b7fc82756deefc8a6150ef5babb54bf1ab3de3eba03cc3bc7ab74051ca5986ed83c2286fbcf0ab120ec4491425cef0d25502","completed":true}}

Errors:

* {"code":-8,"message":"TX decode failed"}
* {"code":-401,"message":"Failed to sign offline transaction"}

sendrawtransaction

Usage:

        sendrawtransaction <"txdata">

Submit transaction raw data(serialized, hex-encoded) with offline signature using pubkey or template address.

Arguments:

 "txdata"                               (string, required) hex string of transaction binary data

Request:

 "param" :
 {
   "txdata": ""                         (string, required) hex string of transaction binary data
 }

Response:

 "result": "data"                       (string, required) txid: hash of transaction raw data

Examples:

>> bigbang-cli sendrawtransaction 01000000e0d2cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e8506000000000195a751b8eaef2e9a2337be86b4e892e15d723ff992501c82c5a6d2aa7bcbcc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f57c0cf6a0000000000102700000000000000fd2e0175b03705c7e9f66feed2338df515ee8826ff991258d0f9786203ce2d3445958d0202004bb6c84b2311f42905ea3749fe0ea2ae2ed79c950daa53d1dd899e99622c02030000000000000013f64ef0eb65bd1846bbe2835937868e8f76cc6ec1d15c18bfe41b5d6b38b3b5014eb8d334d9a93c1c51c31d300050fdf5fa8b9f6029af7354331b87a2300ec2c90106587926a76ffed40f884b39396fdbe4c0ca0a72e6499caecd130073117da5fb01054b4b4efd5425e102e7d13b089bb1c5387c877a4bd147251ad241a21246a443a9e46b18b24d8ae6a22faf6d6c79f3acd014e17f79491f42dd0f5d001d4a294b087f54c5679e286e77d07c6f9df1e3084daab9bb8accd5725b9146c4fe99f645c177e4d0079dacca1d85afb4f70044eb64e803054dbe150d7c4e6bb5c2bcc78007
<< 5eccd2e09fe34ae041d9a90d896759041b2bc2844f43ed6929889b53e826386b

>> curl -d '{"id":3,"method":"sendrawtransaction","jsonrpc":"2.0","params":{"txdata":"0100000065d5cc5e0000000091d2b15e9aeeb57483889873bd0aea1273c8e5bb8df436c2bd4e85060000000001a4df918abd7a55a7296e22b6dbfd1be7fd09651003387456fa59d3d11f96cc5e010139d9d6ac592bb962578d52aac4b0755e5fd59d2d10bb20914896047741205f5720aa44000000000010270000000000000040844cfb574ada0ea0c37a76042c25b7fc82756deefc8a6150ef5babb54bf1ab3de3eba03cc3bc7ab74051ca5986ed83c2286fbcf0ab120ec4491425cef0d25502"}}' http://127.0.0.1:19902
<< {"id":3,"jsonrpc":"2.0","result":"5eccd565e410131217f89ade75e3f89a5a17627edaa7da7638babc94e331ea49"}

Errors:

* {"code":-8,"message":"Raw tx decode failed"}
* {"code":-10,"message":"Tx rejected : xxx"}

Error Code

Standard JSON-RPC 2.0 errors

  • -32601: Method not found

  • -32602: Invalid params

  • -32603: Internal error

  • -32700: Parse error

General application defined errors

  • -1: std::exception thrown in command handling

  • -2: Server is in safe mode, and command

  • -3: Unexpected type was passed as parameter

  • -4: Invalid address or key

  • -5: Ran out of memory during operation

  • -6: Invalid, missing or duplicate parameter

  • -7: Database error

  • -8: Error parsing or validating structure in raw format

  • -9: General error during transaction or block submission

  • -10: Transaction or block was rejected by network rules

  • -11: Transaction already in chain

  • -12: Client still warming up

  • -13: Request id is missing when get response

P2P client errors

  • -201: Bitcoin is not connected
  • -202: Still downloading initial blocks
  • -203: Node is already added
  • -204: Node has not been added before
  • -205: Node to disconnect not found in connected nodes
  • -206: Invalid IP/Subnet
  • -207: No valid connection manager instance found

Wallet errors

  • -401: Unspecified problem with wallet (key not found etc.)
  • -402: Not enough funds in wallet or account
  • -403: Invalid account name
  • -404: Keypool ran out, call keypoolrefill first
  • -405: Enter the wallet passphrase with walletpassphrase first
  • -406: The wallet passphrase entered was incorrect
  • -407: Command given in wrong wallet encryption state (encrypting an //!< encrypted wallet etc.)
  • -408: Failed to encrypt the wallet
  • -409: Wallet is already unlocked
  • -410: Invalid label name
  • -411: Invalid passphrase

Workflow

Create Key

  • One key create

    1. getnewkey
  • Step by step create(Could receive private key) "txdata" (string, required) hex string of transaction binary data

    1. makekeypair

    2. importprivkey

Create Transaction

  1. If no key, Create Key

  2. If key is locked, unlockkey "txdata": "" (string, required) hex string of transaction binary data

  3. If no public key address, getpubkeyaddress

  4. Create transaction:

Create template

Create fork

  1. Create fork data: makeorigin, will return a new fork origin BLOCK HASH and a DATA
  2. Create fork template: Create template(type = "fork", fork = BLOCK HASH in step 1), will return a TEMPLATE ADDRESS
  3. Create transaction: Create Transaction(to = TEMPLATE ADDRESS in step 2, data = DATA in step 1)

Create DPOS

  1. Create a new key by getnewkey called DPOS OWNER KEY
  2. Create a pair of key by makekeypair called DPOS SIGNATURE KEY
  3. If DPOS OWNER KEY is locked, unlockkey
  4. Get address of DPOS OWNER KEY by getpubkeyaddress called DPOS OWNER ADDRESS
  5. In multiverse.conf or your custom config file, set mpvsskey = the private key of DPOS SIGNATURE KEY in step 2, mpvssaddress = DPOS OWNER ADDRESS in step 4(NOTICE: mpvsskey must not be the private key of mpvssaddress)
  6. Create delegate template: Create template(type = "delegate", delegate = the public key of DPOS SIGNATURE KEY in step 2, owner = DPOS OWNER ADDRESS in step 4), will return a TEMPLATE ADDRESS
  7. Create transaction: Create Transaction(from = DPOS OWNER ADDRESS in step 2, to = TEMPLATE ADDRESS in step 5, amount >= 2% of 300000000)

Create multisig

  1. Prepare at least two public key by Create Key or from other wallet, called KEY SET
  2. Create multisig template: Create template(type = "multisig", required = a number means how many weight of signature at least could send a transaction(the number is between 1 and min(255, the sum of KEY SET)), pubkeys = array of KEY SET in step 1), will return a TEMPLATE ADDRESS(NOTICE: the weight of every key in KEY SET is step 1)
  3. Send a transaction to the TEMPLATE ADDRESS like common transaction.
  4. Send a transaction from the TEMPLATE ADDRESS:
    4.1 Create a transaction by createtransaction(from = TEMPLATE ADDRESS), will return a TRANSACTION RAW DATA
    4.2 Ensure there exists at least one key of KEY SET in wallet, and unlocked. Sign the transaction by signtransaction(txdata = TRANSACTION RAW DATA), will return a SIGNED TRANSACTION RAW DATA and bool value COMPLATE means the sum of signed keys weight is equal or greater than required of template. 4.3 If COMPLATE is false, take SIGNED TRANSACTION RAW DATA as TRANSACTION RAW DATA to another wallet which exists another key of KEY SET to repeat from previous step. If COMPLATE is true, send transaction by sendtransaction(txdata = SIGNED TRANSACTION RAW DATA)

Create weighted-multisig

  1. like step 1 of Create multisig
  2. Create weighed template: Create template(type = "weighted", required like the step 2 of Create multisig, pubkeys = array of key(in KEY SET in step 1) and it's weighted(between [1, 255]), will return a TEMPLATE ADDRESS
  3. like step 3 of Create multisig
  4. like step 4 of Create multisig

Exchange tokens between two chains

  1. If no key, Create Key
  2. If key is locked, unlockkey
  3. If no public key address, getpubkeyaddress
  4. Create DPOS
  5. Create fork
  6. Create Exchange template: Create template(type = "Exchange", fork = BLOCK HASH in step 1), will return a TEMPLATE ADDRESS
 - Note
 * addr_m:Address of the main wallet participating in cross-chain transactions "1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm"  
 * addr_s:Another wallet address involved in cross-chain transactions "1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h"  
 * height_m:The locked block height on a specific fork of the Block Chain  
 * height_s:The locked block height on a specific fork of the Block Chain  
 * fork_m:The fork_m hash "92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f"  
 * fork_s:The fork_s hash "557384528669a894e14afe48725ef2b243f6dba3d0735b71effc21adf3bbc783" 
 >> bigbang addnewtemplate exchange "{\"addr_m\":\"1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm\",\"addr_s\":\"1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h\",\"height_m\":400,\"height_s\":410,\"fork_m\":\"92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f\",\"fork_s\":\"557384528669a894e14afe48725ef2b243f6dba3d0735b71effc21adf3bbc783\"}"  
 << 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3
  1. Transactors transfer money to the template address of cross-chain transactions,remember to take the fork parameter -f later to specify which branch chain to operate on
 >> bigbang sendfrom 1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 13.345 1 -f="92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f"  
 << 5ce76b63c1d8b3cc62db8b794c51988daa2b45b50043a0099c6975125e19ed05  
 >> bigbang sendfrom 1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 9.875 1 -f="557384528669a894e14afe48725ef2b243f6dba3d0735b71effc21adf3bbc783"  
 << 5ce76b9825f8a09616c709fc2298cde2ed95631d85e74659a38529c7d5174083
  1. Verify the Exchange template to see if the information is normal
 >> bigbang validateaddress 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3
  1. The exchange template address will be signed with the public key, and the wallet must be unlocked at this time, otherwise the signature is unsuccessful. -a represents the signature for the address.
 - the main signature
 >> bigbang signmessage da915f7d9e1b1f6ed99fd816ff977a7d1f17cc95ba0209eef770fb9d00638b49 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 -a
 << 1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103
 - the other signature
 >> bigbang signmessage 5a8c3b6c9c82508f47084f3d2b55ed29ffbf3ab4f5709f9fca2e6052ac191de2 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 -a
 << a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c
  1. Verify each other's signature and return true to indicate that the information is correc.-a represents the signature for the address.
 >> bigbang verifymessage 5a8c3b6c9c82508f47084f3d2b55ed29ffbf3ab4f5709f9fca2e6052ac191de2 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c -a  
 >> bigbang verifymessage da915f7d9e1b1f6ed99fd816ff977a7d1f17cc95ba0209eef770fb9d00638b49 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103 -a  
  1. Transfer Token from the exchange template to the specified wallet address
 * command:bigbang sendfrom "exchange templete address" "wallet address" "Tokens" "fees" "-sm:main signature" "-ss:the other signature" "-f:the fork of the trading object located"
 * note:When transferring tokens from the exchange template address, it should be noted that transaction costs need to be deducted from the template address balance. 
 
 - User m:
 >> bigbang sendfrom 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 1w8ehkb2jc0qcn7wze3tv8enzzwmytn9b7n7gghwfa219rv1vhhd82n6h 13.345 1 -sm="1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103" -ss="a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c" -f="92099485ffec67128fe4dbaca96ed8faf54ccc0b4760cd0d78a3d1e051a2498f" 
 << 5ce79ba78b44f8710710c8e35b8d3b725c2f994d4038b74fda84f0b061c01a76
 - User s:
 >> bigbang sendfrom 20r07rwj0032jssv0d3xaes1kq6z1cvjmz1jwhme0m1jf23vx48v683s3 1965p604xzdrffvg90ax9bk0q3xyqn5zz2vc9zpbe3wdswzazj7d144mm 8.875 1 -sm="1b8c6b0807472627cec2f77b2a33428539b64493f7f1b9f7be4dfbdee72f9aeb3b5763fa39ce5df2425d8d530698de9c1cea993bccfce6596901b6b8cb054103" -ss="a51a925a50a7101ca25c8165050b61421f9e54aad5b0cfb4a4947da82f5fb62fec8e96fb80bd697db33f391bf1f875179d446ac08829f85cf8fe6483ec9acf0c" -f="557384528669a894e14afe48725ef2b243f6dba3d0735b71effc21adf3bbc783"  
 << 5ce79c872d1aee489291fd97270639a4631014334feb37a5df7fcb27904c0b9f
Clone this wiki locally