Difference between revisions of "NodeCore CommandLine"

From Veriblock Wiki
Jump to: navigation, search
 
(63 intermediate revisions by 6 users not shown)
Line 5: Line 5:
 
== Overview ==
 
== Overview ==
  
The NodeCore CommandLine can access an instance of NodeCore
+
The NodeCore CommandLine (i.e. NC_CLI) can access an instance of NodeCore.
 +
 
 +
To run the NC_CLI, click on the nodecore-cli.bat (for windows) or nodecore-cli (for linux/mac).
 +
 
 +
Initially NC_CLI is not connected, so run the connect command to connect to a local instance (this will require running NodeCore (see: [[HowTo_run_NodeCore]]):
 +
 
 +
<pre>
 +
connect 127.0.0.1:10500
 +
</pre>
 +
 
 +
One can also auto-connect by passing the host:port via the command line, for example in windows:
 +
<pre>
 +
nodecore-cli.bat -connect 127.0.0.1:10500
 +
</pre>
 +
 
 +
=== Script with command file ===
 +
 
 +
Given an input.txt file, this will read each line of the input file as a command:
 +
 
 +
<pre>
 +
connect 127.0.0.1:10500
 +
getinfo
 +
quit
 +
</pre>
 +
 
 +
LINUX
 +
 
 +
<pre>
 +
#using pipe | instead of input redirection <
 +
cat input.txt | ./nodecore-cli
 +
</pre>
 +
 
 +
WINDOWS
 +
<pre>
 +
#from powershell
 +
./nodecore-cli < input.txt
 +
</pre>
 +
 
 +
=== Write output to file ===
 +
 
 +
Add the -o <myFile> to write the output to a JSON file:
 +
 
 +
<pre>
 +
getinfo -o myData.json
 +
</pre>
  
 
== Commands: Not Connected ==
 
== Commands: Not Connected ==
Line 32: Line 76:
 
#connect to an instance
 
#connect to an instance
 
connect 77.46.106.162:10500
 
connect 77.46.106.162:10500
 
 
</pre>
 
</pre>
  
Line 58: Line 101:
  
 
Standard quit command, exits the console
 
Standard quit command, exits the console
 +
 +
=== getdebuginfo ===
 +
 +
Collect information about the application for troubleshooting, this command will output a file "getdebuginfo.json" which will contain all the collected debug information, by default the file will be stored inside the network folder.
 +
 +
By default, the command will use mainnet as the <network> parameter, the nodecore folder which is inside the distributed package as the <nodecore_folder> parameter and the nodecore/bin/mainnet folder as the <network_data_folder> parameter.
 +
 +
 +
Syntax:
 +
 +
<pre>
 +
getdebuginfo <network (optional)> <network_data_folder(optional)> <nodecore_folder(optional)>
 +
</pre>
 +
 +
 +
Examples:
 +
 +
<pre>
 +
getdebuginfo testnet C:\nodecore_data\bin\testnet C:\nodecore_folder
 +
</pre>
  
 
== Commands: Connected ==
 
== Commands: Connected ==
Line 63: Line 126:
 
Once the CLI is connected to a NodeCore instance, then there are many other commands that can be run.
 
Once the CLI is connected to a NodeCore instance, then there are many other commands that can be run.
  
 +
=== abandontransactionsfromaddress ===
 +
 +
Allows you to abandon a transaction from an originating address
 +
 +
Syntax
 +
<pre>
 +
abandontransactionsfromaddress <your_originating_address>
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
(VBK_CLI rpc (127.0.0.1:10501)) > send 5 VGDavya9wLmU5EvKw2479VJT5HcfT9
 +
send 5 VGDavya9wLmU5EvKw2479VJT5HcfT9
 +
{
 +
  "txids": [
 +
    "DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517"
 +
  ]
 +
}
 +
 +
You may also find the following command(s) useful ('help' for syntax):
 +
  gethistory  (Gets transaction history for an address)
 +
  getbalance  (See the balances of all of your addresses)
 +
200 success (61.49 ms)
 +
 +
(VBK_CLI rpc (127.0.0.1:10501)) > sigindex
 +
sigindex
 +
{
 +
  "addresses": [
 +
    {
 +
      "pool_index": 7,
 +
      "address": "VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ",
 +
      "blockchain_index": 6
 +
    }
 +
  ]
 +
}
 +
 +
You may also find the following command(s) useful ('help' for syntax):
 +
  gethistory  (Gets transaction history for an address)
 +
  getbalance  (See the balances of all of your addresses)
 +
200 success (15.33 ms)
 +
 +
(VBK_CLI rpc (127.0.0.1:10501)) > abandontransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ 7
 +
abandontransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ 7
 +
[
 +
  {
 +
    "size": 65,
 +
    "txid": "DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517",
 +
    "data": "",
 +
    "type": "standard",
 +
    "fee": "0.00064000",
 +
    "timestamp": 1572552828,
 +
    "source_amount": "5.00064000",
 +
    "merkle_path": "",
 +
    "source_address": "VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ",
 +
    "bitcoin_transaction": "N/A",
 +
    "bitcoin_block_header_of_proof": "N/A",
 +
    "endorsed_block_header": "N/A",
 +
    "outputs": [
 +
      {
 +
        "address": "VGDavya9wLmU5EvKw2479VJT5HcfT9",
 +
        "amount": "5.00000000"
 +
      }
 +
    ]
 +
  }
 +
]
 +
</pre>
 +
 +
=== abandontransactionfromtxid ===
 +
Abandons a transaction from a txid
 +
 +
Syntax
 +
<pre>
 +
abandontransactionfromtxid <tx_id>
 +
</pre>
 +
 +
Example
 +
<pre>
 +
(VBK_CLI rpc (127.0.0.1:10501)) > send 1 VBm7xzvLRRqCigLnxKgAJzURzHzoPg
 +
send 1 VBm7xzvLRRqCigLnxKgAJzURzHzoPg
 +
{
 +
  "txids": [
 +
    "8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9"
 +
  ]
 +
}
 +
 +
You may also find the following command(s) useful ('help' for syntax):
 +
  gethistory  (Gets transaction history for an address)
 +
  getbalance  (See the balances of all of your addresses)
 +
200 success (147.4 ms)
 +
 +
(VBK_CLI rpc (127.0.0.1:10501)) > abandontransactionfromtxid 8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9
 +
abandontransactionfromtxid 8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9
 +
{
 +
  "abandonedTransactionsCount": 1,
 +
  "notFoundTransactionsCount": 0,
 +
  "abandonedTransactions": [
 +
    {
 +
      "size": 65,
 +
      "txid": "8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9",
 +
      "data": "",
 +
      "type": "standard",
 +
      "fee": "0.00064000",
 +
      "timestamp": 1572987896,
 +
      "source_amount": "1.00064000",
 +
      "merkle_path": "",
 +
      "source_address": "VFHjS8LsJgXpKvahHuWa1npAtGsJej",
 +
      "bitcoin_transaction": "N/A",
 +
      "bitcoin_block_header_of_proof": "N/A",
 +
      "endorsed_block_header": "N/A",
 +
      "outputs": [
 +
        {
 +
          "address": "VBm7xzvLRRqCigLnxKgAJzURzHzoPg",
 +
          "amount": "1.00000000"
 +
        }
 +
      ]
 +
    }
 +
  ],
 +
  "txidsNotAbandoned": []
 +
}
 +
 +
200 success (79.62 ms)
 +
</pre>
 +
 +
 +
=== addallowed ===
 +
 +
Adds an IP to the whitelist. See: [[NodeCore_Networking]]. See command [[NodeCore_CommandLine#clearallowed]]
 +
 +
Syntax
 +
<pre>
 +
addallowed <address>
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
addallowed 33.33.33.33
 +
 +
# This will update [[nodecore.properties]] file:
 +
# rpc.whitelist.addresses=33.33.33.33
 +
 +
#output
 +
rpc (127.0.0.1:10500) > {
 +
  "payload": {},
 +
  "success": true,
 +
  "messages": []
 +
}
 +
 +
</pre>
  
 
=== addnode ===
 
=== addnode ===
Line 77: Line 291:
 
<pre>
 
<pre>
 
# input
 
# input
addnode 93.130.33.180:6500
+
addnode 93.130.33.180:7501
  
 
#output (also run getpeerinfo to see the node added)
 
#output (also run getpeerinfo to see the node added)
Line 85: Line 299:
 
   "messages": []
 
   "messages": []
 
}
 
}
 +
</pre>
 +
 +
=== backupwallet ===
 +
 +
Backup the wallet of the NodeCore instance to the given folder. Copies multiple wallet-related files. Takes either a folder, or a specific file.
 +
 +
See: [[NodeCore_CommandLine#importwallet]], [[NodeCore_File_Structure]]
 +
 +
Syntax
 +
<pre>
 +
backupwallet <targetLocation>
 +
</pre>
 +
 +
Example: Folder
 +
 +
<pre>
 +
# input A
 +
backupwallet C:\Temp\myFolder
 +
 +
#copies
 +
# wallet_backup.dat
 +
# walletconfig_backup.dat
 +
 +
</pre>
 +
 +
Example: File
 +
 +
<pre>
 +
# input A
 +
backupwallet C:\Temp\myFolder\wallet.dat
 +
 +
#copies
 +
# wallet.dat
 +
# walletconfig.dat
 +
 +
</pre>
 +
 +
=== clearallowed ===
 +
 +
Clears the list of allowed addresses.  See command [[NodeCore_CommandLine#addallowed]].
 +
 +
Syntax
 +
<pre>
 +
clearallowed
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
clearallowed
 +
 +
# This will update [[nodecore.properties]] file:
 +
# rpc.whitelist.addresses=
 +
 +
#output
 +
rpc (127.0.0.1:10500) > {
 +
  "payload": {},
 +
  "success": true,
 +
  "messages": []
 +
}
 +
 +
</pre>
 +
 +
=== clearbannedpeers ===
 +
 +
Removes banned peers
 +
 +
<pre>
 +
(VBK_CLI rpc (127.0.0.1:10500)) > clearbannedpeers
 +
clearbannedpeers
 +
{}
 +
 +
200 success (47.27 ms)
 +
</pre>
 +
 +
=== clearpoolbans ===
 +
 +
<pre>
 +
clearpoolbans
 +
Clears the list of pool connections that have been banned
 +
</pre>
 +
 +
=== decryptwallet ===
 +
 +
See: [[Wallet_Encryption]]
 +
 +
<pre>
 +
decryptwallet
 +
Decrypts the wallet loaded in NodeCore
 
</pre>
 
</pre>
  
Line 90: Line 394:
  
 
Simply disconnects from the current NodeCore instance
 
Simply disconnects from the current NodeCore instance
 +
 +
=== drainaddress ===
 +
 +
<pre>
 +
drainaddress <sourceAddress> <destinationAddress>
 +
Fully drain all VBK from one address to another. The result of sourceAddress will be zero.
 +
</pre>
 +
 +
=== dumpprivatekey ===
 +
 +
See also: importprivatekey
 +
 +
<pre>
 +
dumpprivatekey <address>
 +
Gets private key for an address
 +
</pre>
 +
 +
Output:
 +
<pre>
 +
dumpprivatekey VD39ynwFyn7Zqf46HeSq3bbzq9q3U9
 +
{
 +
  "address": "VD39ynwFyn7Zqf46HeSq3bbzq9q3U9",
 +
  "private_key": "40303E931132A899A0924F02B0F0998917B9345175CF55CB31C79F7D429B66294B4B9E46E094A70432043223889429CF1017542205F91209FE077FC0F1C259F80BE42024315048DE18CF2B603FE226EB9201607E6CC020594C299F080FF7016F28C40F977116DC0629009C139810C41043A1280200284692E04B445E823F6789F5CA4369F6C983B80F900FE680E4B00890E799525C20406319"
 +
}
 +
</pre>
 +
 +
=== encryptwallet ===
 +
 +
See: [[Wallet_Encryption]]
 +
 +
<pre>
 +
encryptwallet
 +
Encrypts the wallet loaded in NodeCore with a passphrase
 +
</pre>
 +
 +
=== generatemultisigaddress ===
 +
 +
<pre>
 +
generatemultisigaddress <csvaddresses> <signatureThreshold>
 +
(Generates a multisig address from the provided standard addresses)
 +
</pre>
  
 
=== getblocktemplate ===
 
=== getblocktemplate ===
Line 231: Line 576:
 
</pre>
 
</pre>
  
 +
 +
=== getbalanceunlockschedule ===
 +
 +
See: [[VBK_Unlocking]]
 +
 +
Shows the schedule for unlocking coins.
 +
 +
<pre>
 +
getbalanceunlockschedule
 +
[
 +
  {
 +
    "address": "V7t4RfqkdJedmH3DG8EPdF6tnG6jdJ",
 +
    "totalBalance": "733.74304500",
 +
    "unlockedBalance": "733.74304500",
 +
    "lockedBalance": "0.00000000",
 +
    "schedule": []
 +
  }
 +
]
 +
</pre>
  
 
=== getblockfromindex ===
 
=== getblockfromindex ===
Line 342: Line 706:
  
  
 +
</pre>
 +
 +
=== getdiagnosticinfo ===
 +
 +
<pre>
 +
Returns diagnostic info about the NodeCore instance
 +
</pre>
 +
 +
<pre>
 +
(VBK_CLI rpc (127.0.0.1:10501)) > getdiagnosticinfo
 +
getdiagnosticinfo
 +
{
 +
  "nodecore_working_directory": "/root/nodecore/0.4.7/nodecore-0.4.7/bin",
 +
  "user_language": "en",
 +
  "java_runtime_name": "OpenJDK Runtime Environment",
 +
  "sun_boot_library_path": "/usr/lib/jvm/zulu-11/lib",
 +
  "java_runtime_version": "11.0.4+11-LTS",
 +
  "java_specification_version": "11",
 +
  "os_name": "Linux",
 +
  "os_arch": "amd64",
 +
  "os_version": "3.10.0-957.27.2.el7.x86_64",
 +
  "memory_total_gb": "0.67 GB",
 +
  "memory_max_gb": "6.00 GB",
 +
  "processor_count": "2",
 +
  "processor_type": "",
 +
  "datetime_now_utc": "2019-12-03 11:19:10.051-0500",
 +
  "nodecore_properties_source": "/root/VeriBlock/nodecore.properties",
 +
  "nodecore_properties_values": [
 +
    "rpc.bind.address: 127.0.0.1",
 +
    "bitcoin.configured: true",
 +
    "peer.external.hosts.testnet: 95.216.123.86:7501,94.130.147.194:7501,94.130.147.195:7501,95.216.53.162:7501",
 +
    "rpc.security.password.enabled: false",
 +
    "initial.bitcoin.height: 1579832",
 +
    "pool.standard.autostart: CPU",
 +
    "network: testnet",
 +
    "initial.bitcoin.merkle: c93a6ae864731e0fdcc225605d5577d0711cc606aee8eac3e8105372a8b64142",
 +
    "initial.bitcoin.previous: 00000000000002028556c35b288d3599fa1955eca6d80c29ebe25fdf58f23022",
 +
    "initial.bitcoin.version: 536870912",
 +
    "initial.bitcoin.timestamp: 1569610087",
 +
    "initial.bitcoin.nonce: 2015032031",
 +
    "peer.max.count: 50",
 +
    "initial.bitcoin.difficulty: 486604799",
 +
    "rpc.security.password: ********",
 +
    "rpc.whitelist.addresses: 192.168.0.10"
 +
  ],
 +
  "environment_variables": [
 +
    "NODECORE_LOG_PATH: "
 +
  ]
 +
}
 +
 +
200 success (60.91 ms)
 
</pre>
 
</pre>
  
 
=== gethistory ===
 
=== gethistory ===
  
Returns transaction history for specified address or the default if not.
+
Returns transaction history for specified address or the default if not (available only at NodeCore 4.8 or greater).
  
 
Syntax
 
Syntax
Line 450: Line 865:
 
     "estimated_hash_rate": 6,
 
     "estimated_hash_rate": 6,
 
     "number_of_blocks": 37532,
 
     "number_of_blocks": 37532,
     "transaction_fee": 121,
+
     "transaction_fee": "0.00000801",
 
     "last_block": {
 
     "last_block": {
 
       "coinbaseReward": 1000000000,
 
       "coinbaseReward": 1000000000,
Line 516: Line 931:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
Create multiple addresses at once
 +
 +
<pre>
 +
getnewaddress [count]
 +
Gets {count} new address from the wallet (default: 1)
 +
</pre>
 +
  
 
=== getpeerinfo ===
 
=== getpeerinfo ===
Line 617: Line 1,040:
 
}
 
}
  
 +
</pre>
 +
 +
=== getpoolinfo ===
 +
 +
Shows pool info if running a pool.
 +
 +
<pre>
 +
getpoolinfo
 +
{
 +
  "running": true,
 +
  "configuration": {
 +
    "solo": false,
 +
    "type": "GPU",
 +
    "pool_target": "00000000ffffffffffffffffffffffffffffffffffffffff",
 +
    "pool_address": "V4upDbv4ne6f88Pr8h5oHdok9Ezzzz",
 +
    "operator_address": "V4cP4AfoSomxYHfnCDN8tuWFstrgdw",
 +
    "operator_fee": 0.01,
 +
    "coinbase_comment": "myPoolCommentHere"
 +
  },
 +
  "stats": {
 +
    "current_round": 4536,
 +
    "mining_block_number": 55855,
 +
    "last_block_number": 55854,
 +
    "recent_hash_rate": "772.66 GH/s"
 +
  }
 +
}
 +
</pre>
 +
 +
 +
=== getpop ===
 +
 +
<pre>
 +
getpop [block]
 +
Gets the data VeriBlock wants Proof-of-Proof published to Bitcoin
 +
</pre>
 +
 +
=== getpopendorsementsinfo ===
 +
 +
Returns transaction history for specified address or the default if not.
 +
 +
<pre>
 +
getpopendorsementsinfo <address> [searchLength]
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
getpopendorsementsinfo V34RwWk5CEp5uE8L4SSpJWcwN29dKu
 +
 +
#output
 +
  "payload": [
 +
    {
 +
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
 +
      "endorsed_veriblock_block_hash": "0000000330089FE0A8335AEF138265D7F9A7E9EFC251001A",
 +
      "contained_in_veriblock_block_hash": "00000003028BD9FD9A3FD188BF2D70A4B99FC8BB43EC9786",
 +
      "veriblock_transaction_id": "E9E18AFB9212EC873B5D1E7A6AFE7727AF8D5FCC07C9CAA4DD39662C5C8EB1D2",
 +
      "bitcoin_transaction": "0100000001497856D96BCC107D844DE83F711A30101AAD1BF2EF68213CAAE72225C8E65A08000000006B4830450221009AD5105F19A1A03D48E69860659BEBAF456DF4A80D0A047C8A0F67C020A230C502203F6EFC440B2BC177A6CA91914E8CD881D4D60E496AC22AFE6704E9DA1DA9480D0121025EA042772B22B46E924C1EAFF3D24F369501D615ECF4063C2C6C97C820C107C7FFFFFFFF0208413900000000001976A914E9C0E8D5D4C74F427A4836C8E6E3A582E761958588AC0000000000000000536A4C50000000010000000019E1492ECF1943299294D1B72AB25E56AD2A5BDA0C28A9D3E1299F501DA61E9FE2081CE3DEAD8DFFDD6041125ADA3E9A044AE83904116460217C8C3562659235A15C85F155CA620C00000000",
 +
      "bitcoin_transaction_id": "1CA7C540AF39C6D11F40569AA549AA716B12AAF052A57D521ED41049C12A97B7",
 +
      "bitcoin_block_header": "00000020605C4627C7168F21B41CECF20DC8C4AC0C7F32C8B9CF186ACF00000000000000C232B26F9AFCCFDDCA7819A9FBF7B146FEC2B17E88968ADD318CD74279C878138540DA5A9B03031A4CDDF632",
 +
      "bitcoin_block_header_hash": "0000000000000107EB54ED752020E978BBAC7504659EC1745A61A1905E40B66F",
 +
      "reward": "28.00000000",
 +
      "finalized": true
 +
    },
 +
 +
</pre>
 +
 +
=== getprotectedchildren ===
 +
 +
Returns the children protected by PoP transactions in a particular VeriBlock block identified by the provided block hash.
 +
 +
The paradigm is "A parent protects children"
 +
 +
See: [[NodeCore_CommandLine#getprotectingparents]]
 +
 +
Syntax
 +
<pre>
 +
getprotectedchildren <blockhash> [searchLength]
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
getprotectedchildren 00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B 10000
 +
 +
#output
 +
  "payload": [
 +
    {
 +
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
 +
      "endorsed_veriblock_block_hash": "00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53",
 +
      "contained_in_veriblock_block_hash": "00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B",
 +
      "veriblock_transaction_id": "E25E8ECFFF3A3DB843167C066AC052AE42BE44EB528934EEE6ED8CF5219A17C3",
 +
      "bitcoin_transaction": "020000000129F1343830462940EC71F9A041FA3FF3FCBC87360AD891F1F93FDFC19E030E63010000006A473044022017ACFF98378B2865981C9E2D4D79AF27005B4FE4843EC7811BAEC12F0C40189602203087F1B456E6A7E794AE67A369D3214CEEC2AE0923AE9D73084FC7B25C474BBF0121029787960F4CE284F40F1C8953E2F8DDFC5E664088580588153E5FC7513AC88C7DFFFFFFFF020000000000000000536A4C500000000100000002666994A2AFEF035F53D0048991648A8304839BF07B1C3A9F5CE2071B1EE66E039F8E3477A2FD940FC87CE7A45ACE5178045F55BE585CA12F217C8C3562659235A15C85F155CA620CC0270900000000001976A914ABA57562278E5D543E33A20E5AE1B8427B51AD0988AC00000000",
 +
      "bitcoin_transaction_id": "840AD8CB3D5A64979220FA9CE9BE302FF644D294E0186CD14C876BE7B54C87E8",
 +
      "bitcoin_block_header": "00000020F0055E0D2B1D78409650AE4C23D9501EBDF3AA00D03B50014D0000000000000089ABCEA79221A9BCFF8BA8DF17719C23AB399D6B171CC5A2199878D76AB859C6B552CE5A9B03031ADD59C1A0",
 +
      "bitcoin_block_header_hash": "000000000000017CC389D86556814B198A4B9673E5D55CC846A6853B0C283279",
 +
      "reward": "28.00000000",
 +
      "finalized": true
 +
</pre>
 +
 +
=== getprotectingparents ===
 +
 +
Returns the pop endorsement information of parents protecting the provided block hash.
 +
 +
The paradigm is "A child can be protected by mulitple parents"
 +
 +
See: [[NodeCore_CommandLine#getprotectedchildren]]
 +
 +
Syntax
 +
<pre>
 +
getprotectingparents <blockhash> [searchLength]
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
getprotectingparents 00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53 10000
 +
 +
#output
 +
  "payload": [
 +
    {
 +
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
 +
      "endorsed_veriblock_block_hash": "00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53",
 +
      "contained_in_veriblock_block_hash": "00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B",
 +
      "veriblock_transaction_id": "E25E8ECFFF3A3DB843167C066AC052AE42BE44EB528934EEE6ED8CF5219A17C3",
 +
      "bitcoin_transaction": "020000000129F1343830462940EC71F9A041FA3FF3FCBC87360AD891F1F93FDFC19E030E63010000006A473044022017ACFF98378B2865981C9E2D4D79AF27005B4FE4843EC7811BAEC12F0C40189602203087F1B456E6A7E794AE67A369D3214CEEC2AE0923AE9D73084FC7B25C474BBF0121029787960F4CE284F40F1C8953E2F8DDFC5E664088580588153E5FC7513AC88C7DFFFFFFFF020000000000000000536A4C500000000100000002666994A2AFEF035F53D0048991648A8304839BF07B1C3A9F5CE2071B1EE66E039F8E3477A2FD940FC87CE7A45ACE5178045F55BE585CA12F217C8C3562659235A15C85F155CA620CC0270900000000001976A914ABA57562278E5D543E33A20E5AE1B8427B51AD0988AC00000000",
 +
      "bitcoin_transaction_id": "840AD8CB3D5A64979220FA9CE9BE302FF644D294E0186CD14C876BE7B54C87E8",
 +
      "bitcoin_block_header": "00000020F0055E0D2B1D78409650AE4C23D9501EBDF3AA00D03B50014D0000000000000089ABCEA79221A9BCFF8BA8DF17719C23AB399D6B171CC5A2199878D76AB859C6B552CE5A9B03031ADD59C1A0",
 +
      "bitcoin_block_header_hash": "000000000000017CC389D86556814B198A4B9673E5D55CC846A6853B0C283279",
 +
      "reward": "28.00000000",
 +
      "finalized": true
 +
    },
 +
 +
</pre>
 +
 +
=== getstateinfo ===
 +
 +
<pre>
 +
getstateinfo
 +
Returns blockchain, operating, and network state information
 +
</pre>
 +
 +
Example:
 +
 +
<pre>
 +
getstateinfo
 +
{
 +
  "blockchain_state": "LOADED",
 +
  "operating_state": "RUNNING",
 +
  "network_state": "CONNECTED",
 +
  "connected_peer_count": 8,
 +
  "current_sync_peer": "",
 +
  "network_height": 148816,
 +
  "local_blockchain_height": 148816,
 +
  "network_version": "TestNet",
 +
  "data_directory": "",
 +
  "program_version": "0.3.8",
 +
  "nodecore_starttime": 1541471711,
 +
  "wallet_cache_sync_height": 148816
 +
}
 +
</pre>
 +
 +
 +
 +
=== gettransaction ===
 +
 +
<pre>
 +
gettransaction <txId> [searchLength]
 +
Gets information regarding provided TxID
 +
</pre>
 +
 +
=== getwallettransactions ===
 +
 +
See: [[GetWalletTransactions_API]] for more usage details.
 +
 +
This requires the wallet cache be up to date (run getstateinfo to see how far along wallet cache is caught up). If you just imported a new wallet, it may take some time to rebuild that cache.
 +
 +
This returns data only for imported wallets that show up in getbalance [[NodeCore_CommandLine#getbalance]].
 +
 +
<pre>
 +
getwallettransactions <address> [type]
 +
Writes transaction history for an address to a local file. This could take a while.
 +
</pre>
 +
 +
See also: [[NodeCore_CommandLine#refreshwalletcache]] --> rebuilds the cache
 +
 +
Example:
 +
 +
<pre>
 +
getwallettransactions V4m6JbAs8VaEa3wwemJPgsPRY8ETdk
 +
Append to file: C:\outputs\V4m6JbAs8VaEa3wwemJPgsPRY8ETdk.csv
 +
Got page 1 with 100 rows, appended to file
 +
Got page 2 with 93 rows, appended to file
 +
"Wrote 193 wallet transactions to file C:\\outputs\V4m6JbAs8VaEa3wwemJPgsPRY8ETdk.csv"
 +
</pre>
 +
 +
=== importprivatekey ===
 +
 +
See also: dumpprivatekey
 +
 +
<pre>
 +
importprivatekey <privateKey>
 +
Imports the provided private key into NodeCore
 +
</pre>
 +
 +
Example of Private Key format:
 +
 +
<pre>
 +
{
 +
  "address": "VD39ynwFyn7Zqf46HeSq3bbzq9q3U9",
 +
  "private_key": "40303E931132A899A0924F02B0F0998917B9345175CF55CB31C79F7D429B66294B4B9E46E094A70432043223889429CF1017542205F91209FE077FC0F1C259F80BE42024315048DE18CF2B603FE226EB9201607E6CC020594C299F080FF7016F28C40F977116DC0629009C139810C41043A1280200284692E04B445E823F6789F5CA4369F6C983B80F900FE680E4B00890E799525C20406319"
 +
}
 +
</pre>
 +
 +
=== importwallet ===
 +
 +
Import a NodeCore wallet backup from the provided location. Expects an exact wallet file.
 +
 +
Run getbalance before and after the importwallet command to see the impact. Note that importwallet merges the addresses into the existing wallet, it does NOT overwrite them. If nodecore has wallet with address A, and one runs the importwallet command with a wallet.dat file containing B and C, then the final nodecore addresses from getbalance will show A, B, and C.
 +
 +
See: [[NodeCore_CommandLine#backupwallet]], [[NodeCore_File_Structure]]
 +
 +
Syntax
 +
<pre>
 +
importwallet <sourceLocation>
 +
</pre>
 +
 +
Example
 +
 +
<pre>
 +
# input
 +
importwallet C:\MyBackups\wallet_backup.dat
 +
 +
#output
 +
rpc (127.0.0.1:10500) > {
 +
  "payload": {},
 +
  "success": true,
 +
  "messages": []
 +
}
 +
</pre>
 +
 +
=== listbannedminers ===
 +
 +
<pre>
 +
listbannedminers
 +
Returns a list of UCP clients that are currently banned
 +
</pre>
 +
 +
=== listbannedpeers ===
 +
Lists banned peers
 +
<pre>
 +
(VBK_CLI rpc (127.0.0.1:10500)) > listbannedpeers
 +
listbannedpeers
 +
{
 +
  "banned_peers": []
 +
}
 +
</pre>
 +
 +
 +
=== listallowed ===
 +
 +
Returns a list of allowed whitelist addresses
 +
 +
<pre>
 +
listallowed
 +
</pre>
 +
 +
=== lockwallet ===
 +
 +
See: [[Wallet_Encryption]]
 +
 +
<pre>
 +
lockwallet
 +
Disables the temporary unlock on the NodeCore wallet
 +
</pre>
 +
 +
=== makeunsignedmultisigtx ===
 +
 +
<pre>
 +
makeunsignedmultisigtx <sourceAddress> <amount> <destinationAddress> [transactionFee] [signatureIndex]
 +
(Generates an unsigned multisig transaction)
 +
</pre>
 +
 +
=== rebroadcasttransactionfromtxid ===
 +
 +
Rebroadcasts the specified pending transaction and all dependent transactions
 +
 +
Syntax
 +
<pre>
 +
rebroadcasttransactionfromtxid <txId>
 +
</pre>
 +
 +
Example
 +
<pre>
 +
rebroadcasttransactionfromtxid DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517
 +
</pre>
 +
 +
=== rebroadcasttransactionsfromaddress ===
 +
 +
Rebroadcasts all pending transactions from a particular source address (optionally above a particular signature index), and all dependent transactions
 +
 +
Syntax
 +
<pre>
 +
rebroadcasttransactionsfromaddress <address> <index (optional)>
 +
</pre>
 +
 +
 +
Example
 +
<pre>
 +
rebroadcasttransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ
 +
</pre>
 +
 +
=== refreshwalletcache ===
 +
 +
See also: [[NodeCore_CommandLine#getwallettransactions]]
 +
 +
<pre>
 +
refreshwalletcache
 +
Rescans the blockchain for transactions belonging to imported wallets
 +
</pre>
 +
 +
=== removeallowed ===
 +
 +
<pre>
 +
removeallowed <address>
 +
Remove allowed addresses
 
</pre>
 
</pre>
  
Line 642: Line 1,393:
 
</pre>
 
</pre>
  
 +
=== restartpoolwebserver ===
 +
 +
<pre>
 +
restartpoolwebserver
 +
Restarts the built-in pool web server
 +
</pre>
  
 
=== send ===
 
=== send ===
  
 
Send coins to the specified address. Will automatically pick a source address that has sufficient coins.
 
Send coins to the specified address. Will automatically pick a source address that has sufficient coins.
 +
 +
Can return multiple Transactions if pulling from multiple addresses.
  
 
Syntax
 
Syntax
 
<pre>
 
<pre>
send <amount> <destinationAddress>
+
send <amount> <destinationAddress> <sourceAddress> <takeFeeFromOutputs>
 
</pre>
 
</pre>
 +
 +
Note: takeFeeFromOutputs is always false by default. If set to true the fee will be taken from the outputs.
 +
  
 
Examples:
 
Examples:
Line 657: Line 1,419:
 
send 1000 VE2TkS4er4JeZJRnPkSKUdSeaAew5E
 
send 1000 VE2TkS4er4JeZJRnPkSKUdSeaAew5E
  
#returns info for a specific command
+
#returns the VBK transaction ID
rpc (77.46.106.162:10500) > {
+
rpc (127.0.0.1:10500) > {
   "payload": {},
+
   "payload": {
 +
    "txids": [
 +
      "76796500882C927FF057BDA528C94BE883A06A1B6430655067ACF51F09A6E376",
 +
      "79AC6FFE176F068BBB0F5B4F79A2FD1AA92925CA9310FEC58236E220804B58DF"
 +
    ]
 +
  },
 
   "success": true,
 
   "success": true,
 
   "messages": []
 
   "messages": []
 
}
 
}
  
 +
</pre>
 +
 +
=== setdefaultaddress ===
 +
 +
Sets a new default address. This is what will show up when running getinfo
 +
 +
<pre>
 +
setdefaultaddress <address>
 +
(Sets the default address of a NodeCore instance)
 
</pre>
 
</pre>
  
 
=== settxfee ===
 
=== settxfee ===
  
Sets the transaction fee. You can view the transaction fee by running getinfo
+
Sets the transaction fee per byte. You can view the transaction fee by running getinfo
  
 
Syntax
 
Syntax
Line 677: Line 1,453:
 
Examples:
 
Examples:
 
<pre>
 
<pre>
#Set the transaction fee
+
#Set the transaction fee (since 0.4.9)
 +
settxfee 1000
 +
 
 +
#Set the transaction fee (prior to 0.4.9)
 
settxfee 0.00001000
 
settxfee 0.00001000
  
Line 687: Line 1,466:
 
}
 
}
  
 +
</pre>
 +
 +
=== signhexmessage ===
 +
 +
<pre>
 +
signhexmessage <address> <message>
 +
(Signs a hex-encoded message with the addresses private key)
 
</pre>
 
</pre>
  
  
 
=== sigindex ===
 
=== sigindex ===
 +
 +
See: [[Sigindex]]
  
 
Return the signature index for the specified address
 
Return the signature index for the specified address
Line 753: Line 1,541:
 
Syntax
 
Syntax
 
<pre>
 
<pre>
startpool
+
startpool <type>
 +
(Starts the built-in pool service in NodeCore)
 
</pre>
 
</pre>
  
Line 759: Line 1,548:
 
<pre>
 
<pre>
 
#start the UCP pool on an instance
 
#start the UCP pool on an instance
startpool
+
 
 +
#CPU
 +
startpool CPU
 +
 
 +
#GPU
 +
startpool GPU
  
 
#returns info for a specific command
 
#returns info for a specific command
Line 769: Line 1,563:
  
 
</pre>
 
</pre>
 +
 +
=== startsolopool ===
 +
 +
<pre>
 +
startsolopool [address]
 +
Starts the built-in pool service in NodeCore in solo mode
 +
</pre>
 +
 +
=== stopnodecore ===
 +
 +
Gracefully stops the connected instance of NodeCore. Very useful for remote instances.
 +
 +
An alternative is to CTRL+C NodeCore.
  
 
=== stoppool ===
 
=== stoppool ===
Line 790: Line 1,597:
 
}
 
}
  
 +
</pre>
 +
 +
=== submitmultisigtx ===
 +
 +
[[How_to_Submit_Multisig_Tx]]
 +
 +
 +
=== troubleshootpopbyaddress ===
 +
 +
<pre>
 +
Command: Troubleshoot PoP By Address
 +
 +
troubleshootpopbyaddress <onlyFailures> [searchLength] [address]
 +
(Returns a troubleshooting report of the PoP transaction(s) matching the provided address in the specified history)
 +
 +
Example:
 +
troubleshootpopbyaddress true 1000 VHPgy7kUNtkKFLdx3CyB6rAyHAhd7n
 +
 +
</pre>
 +
 +
=== unlockwallet===
 +
 +
See: [[Wallet_Encryption]]
 +
 +
<pre>
 +
Command: Unlock Wallet
 +
 +
unlockwallet
 +
Temporarily unlocks the NodeCore wallet
 
</pre>
 
</pre>
  

Latest revision as of 15:05, 28 September 2021

See: Main_Page

Overview

The NodeCore CommandLine (i.e. NC_CLI) can access an instance of NodeCore.

To run the NC_CLI, click on the nodecore-cli.bat (for windows) or nodecore-cli (for linux/mac).

Initially NC_CLI is not connected, so run the connect command to connect to a local instance (this will require running NodeCore (see: HowTo_run_NodeCore):

connect 127.0.0.1:10500

One can also auto-connect by passing the host:port via the command line, for example in windows:

nodecore-cli.bat -connect 127.0.0.1:10500

Script with command file

Given an input.txt file, this will read each line of the input file as a command:

connect 127.0.0.1:10500
getinfo
quit

LINUX

#using pipe | instead of input redirection <
cat input.txt | ./nodecore-cli

WINDOWS

#from powershell
./nodecore-cli < input.txt

Write output to file

Add the -o <myFile> to write the output to a JSON file:

getinfo -o myData.json

Commands: Not Connected

When first started, the command line is not connected.

clear

Standard command, clears the screen

connect

Connects to an instance of nodecore via gRPC, on port 10500.

If connected to a node, then many other commands are available.

Syntax:

connect <peer>

Examples:

#connect to an instance
connect 77.46.106.162:10500

help

Standard help command.

Syntax:

help [command]

Examples:

#returns list of available commands
help

#returns info for a specific command
help connect

quit

Standard quit command, exits the console

getdebuginfo

Collect information about the application for troubleshooting, this command will output a file "getdebuginfo.json" which will contain all the collected debug information, by default the file will be stored inside the network folder.

By default, the command will use mainnet as the <network> parameter, the nodecore folder which is inside the distributed package as the <nodecore_folder> parameter and the nodecore/bin/mainnet folder as the <network_data_folder> parameter.


Syntax:

getdebuginfo <network (optional)> <network_data_folder(optional)> <nodecore_folder(optional)>


Examples:

getdebuginfo testnet C:\nodecore_data\bin\testnet C:\nodecore_folder

Commands: Connected

Once the CLI is connected to a NodeCore instance, then there are many other commands that can be run.

abandontransactionsfromaddress

Allows you to abandon a transaction from an originating address

Syntax

abandontransactionsfromaddress <your_originating_address>

Example

(VBK_CLI rpc (127.0.0.1:10501)) > send 5 VGDavya9wLmU5EvKw2479VJT5HcfT9
send 5 VGDavya9wLmU5EvKw2479VJT5HcfT9
{
  "txids": [
    "DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517"
  ]
}

You may also find the following command(s) useful ('help' for syntax):
  gethistory  (Gets transaction history for an address)
  getbalance  (See the balances of all of your addresses)
200 success (61.49 ms)

(VBK_CLI rpc (127.0.0.1:10501)) > sigindex
sigindex
{
  "addresses": [
    {
      "pool_index": 7,
      "address": "VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ",
      "blockchain_index": 6
    }
  ]
}

You may also find the following command(s) useful ('help' for syntax):
  gethistory  (Gets transaction history for an address)
  getbalance  (See the balances of all of your addresses)
200 success (15.33 ms)

(VBK_CLI rpc (127.0.0.1:10501)) > abandontransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ 7
abandontransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ 7
[
  {
    "size": 65,
    "txid": "DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517",
    "data": "",
    "type": "standard",
    "fee": "0.00064000",
    "timestamp": 1572552828,
    "source_amount": "5.00064000",
    "merkle_path": "",
    "source_address": "VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ",
    "bitcoin_transaction": "N/A",
    "bitcoin_block_header_of_proof": "N/A",
    "endorsed_block_header": "N/A",
    "outputs": [
      {
        "address": "VGDavya9wLmU5EvKw2479VJT5HcfT9",
        "amount": "5.00000000"
      }
    ]
  }
]

abandontransactionfromtxid

Abandons a transaction from a txid

Syntax

abandontransactionfromtxid <tx_id>

Example

(VBK_CLI rpc (127.0.0.1:10501)) > send 1 VBm7xzvLRRqCigLnxKgAJzURzHzoPg
send 1 VBm7xzvLRRqCigLnxKgAJzURzHzoPg
{
  "txids": [
    "8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9"
  ]
}

You may also find the following command(s) useful ('help' for syntax):
  gethistory  (Gets transaction history for an address)
  getbalance  (See the balances of all of your addresses)
200 success (147.4 ms)

(VBK_CLI rpc (127.0.0.1:10501)) > abandontransactionfromtxid 8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9
abandontransactionfromtxid 8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9
{
  "abandonedTransactionsCount": 1,
  "notFoundTransactionsCount": 0,
  "abandonedTransactions": [
    {
      "size": 65,
      "txid": "8E92D93C83848FDF053C893881FDCBE082900D36A2DDE66F94902C3BED34A4F9",
      "data": "",
      "type": "standard",
      "fee": "0.00064000",
      "timestamp": 1572987896,
      "source_amount": "1.00064000",
      "merkle_path": "",
      "source_address": "VFHjS8LsJgXpKvahHuWa1npAtGsJej",
      "bitcoin_transaction": "N/A",
      "bitcoin_block_header_of_proof": "N/A",
      "endorsed_block_header": "N/A",
      "outputs": [
        {
          "address": "VBm7xzvLRRqCigLnxKgAJzURzHzoPg",
          "amount": "1.00000000"
        }
      ]
    }
  ],
  "txidsNotAbandoned": []
}

200 success (79.62 ms)


addallowed

Adds an IP to the whitelist. See: NodeCore_Networking. See command NodeCore_CommandLine#clearallowed

Syntax

addallowed <address>

Example

# input
addallowed 33.33.33.33

# This will update [[nodecore.properties]] file:
# rpc.whitelist.addresses=33.33.33.33

#output
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

addnode

Add a peer node to the local configuration and connect. After adding a node, you should see it when running getpeerinfo,

Syntax

addnode <peer>

Example

# input
addnode 93.130.33.180:7501

#output (also run getpeerinfo to see the node added)
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

backupwallet

Backup the wallet of the NodeCore instance to the given folder. Copies multiple wallet-related files. Takes either a folder, or a specific file.

See: NodeCore_CommandLine#importwallet, NodeCore_File_Structure

Syntax

backupwallet <targetLocation>

Example: Folder

# input A
backupwallet C:\Temp\myFolder

#copies 
# wallet_backup.dat
# walletconfig_backup.dat

Example: File

# input A
backupwallet C:\Temp\myFolder\wallet.dat

#copies 
# wallet.dat 
# walletconfig.dat

clearallowed

Clears the list of allowed addresses. See command NodeCore_CommandLine#addallowed.

Syntax

clearallowed

Example

# input
clearallowed

# This will update [[nodecore.properties]] file:
# rpc.whitelist.addresses=

#output
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

clearbannedpeers

Removes banned peers

(VBK_CLI rpc (127.0.0.1:10500)) > clearbannedpeers
clearbannedpeers
{}

200 success (47.27 ms)

clearpoolbans

clearpoolbans
Clears the list of pool connections that have been banned

decryptwallet

See: Wallet_Encryption

decryptwallet
Decrypts the wallet loaded in NodeCore

disconnect

Simply disconnects from the current NodeCore instance

drainaddress

drainaddress <sourceAddress> <destinationAddress>
Fully drain all VBK from one address to another. The result of sourceAddress will be zero.

dumpprivatekey

See also: importprivatekey

dumpprivatekey <address>
Gets private key for an address

Output:

dumpprivatekey VD39ynwFyn7Zqf46HeSq3bbzq9q3U9
{
  "address": "VD39ynwFyn7Zqf46HeSq3bbzq9q3U9",
  "private_key": "40303E931132A899A0924F02B0F0998917B9345175CF55CB31C79F7D429B66294B4B9E46E094A70432043223889429CF1017542205F91209FE077FC0F1C259F80BE42024315048DE18CF2B603FE226EB9201607E6CC020594C299F080FF7016F28C40F977116DC0629009C139810C41043A1280200284692E04B445E823F6789F5CA4369F6C983B80F900FE680E4B00890E799525C20406319"
}

encryptwallet

See: Wallet_Encryption

encryptwallet
Encrypts the wallet loaded in NodeCore with a passphrase

generatemultisigaddress

generatemultisigaddress <csvaddresses> <signatureThreshold>
(Generates a multisig address from the provided standard addresses)

getblocktemplate

Returns a block template along with candidate transactions

Syntax

getblocktemplate [mode] [capabilities]

Examples:

getblocktemplate

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "target": -7236281451971613363,
    "size_limit": 1232896,
    "block_height": 37625,
    "coinbase_value": 500000000000,
    "minimum_timestamp": 1516502622,
    "current_timestamp": 1516503768,
    "previous_block_hash": "00000002F22575136B63F90BBAB423CC1241C0ED8EA6FB40",
    "mutable": [
      "timestamp",
      "transactions"
    ],
    "transactions": [
      {
        "fee": 121,
        "weight": 221,
        "required": true,
        "transaction_id": "2EB013AC6B62D192FD0EA3D8DBB757BB8D4F6008BC3A17846A42CBB629F27D58",
        "transaction": {
          "type": "signed",
          "signed": {
            "signature": "304402202F8DDB95B57F536C5317B19C63BDBF41314BBEB9C8A02484DCF09C9069FB2F6F022077902BDC9CDE23BA9FFD6256E9DF57BB37D9D21EF6D793F8B2A2959789A60110",
            "public_key": "3056301006072A8648CE3D020106052B8104000A034200042704DEA2E9BDB74133E298C3AAD8E76588E48AED614674869380B959BB49DF69E8DAA1B7EF4E14240952C2BB082C89FB54A528D6502F8934E1BDA95F651F8D29",
            "signature_index": 27,
            "transaction": {
              "size": 56,
              "txid": "2EB013AC6B62D192FD0EA3D8DBB757BB8D4F6008BC3A17846A42CBB629F27D58",
              "data": "",
              "type": "standard",
              "fee": 121,
              "source_amount": 1121,
              "merkle_path": "",
              "source_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
              "bitcoin_transaction": "",
              "bitcoin_block_header": "",
              "endorsed_block_header": "",
              "outputs": [
                {
                  "address": "VEP6ZjXby6Ska22bb4fcrirL4Dj2Vo",
                  "amount": 1000
                }
              ]
            }
          }
        },
        "depends": []
      }
    ]
  },
  "success": true,
  "messages": []
}


getbalance

Find the balance for a given address

Syntax

getbalance [address]

Case 1: Specific address

#input
getbalance VEYtYxYUJY3MinMa7oyC7vjdGBLrfV

#output
rpc (77.46.106.162:10500) > {
  "payload": {
    "confirmed": [
      {
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
        "amount": 992331
      }
    ],
    "unconfimed": [
      {
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
        "amount": 0
      }
    ]
  },
  "success": true,
  "messages": []
}

Case 2: All addresses

#input
getbalance

#output
rpc (77.46.106.162:10500) > {
  "payload": {
    "confirmed": [
      {
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
        "amount": 992331
      },
      {
        "address": "VCGeXVDjH9EHv8zkGmh6VwL5mHXfpm",
        "amount": 0
      }
    ],
    "unconfimed": [
      {
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
        "amount": 0
      },
      {
        "address": "VC4YViRdJuiiZw8VSMZMBaUUXBzr8v",
        "amount": 0
      }
    ]
  },
  "success": true,
  "messages": []
}


getbalanceunlockschedule

See: VBK_Unlocking

Shows the schedule for unlocking coins.

getbalanceunlockschedule
[
  {
    "address": "V7t4RfqkdJedmH3DG8EPdF6tnG6jdJ",
    "totalBalance": "733.74304500",
    "unlockedBalance": "733.74304500",
    "lockedBalance": "0.00000000",
    "schedule": []
  }
]

getblockfromindex

Returns the block for the specified block number

Syntax

getblockfromindex <blockNumber>

Examples:

#get info for block 30000
getblockfromindex 30000

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "blocks": [
      {
        "coinbaseReward": 1000000000,
        "transactionFees": 0,
        "size": 0,
        "raw": "CLDqARDu+t7SBRoYAAABzlcP6/yCPKGucmMsLyg5lpSry1lAIhgAAAOgOclPMbNBFhGVm/qG/Hamtlw3HtYpRgAAAAAAAAAwhsm43/v/////AToWaVLnTYcGoeUPflsiB8rJOoy/viPRGkIk0000003815F944BD02E2AA76E69E7DFBD493D689ADE032ACaICU69wD",
        "number": 30000,
        "timestamp": 1515699566,
        "hash": "000001CE570FEBFC823CA1AE72632C2F28399694ABCB5940",
        "previous_hash": "000003A039C94F31B3411611959BFA86FC76A6B65C371ED6",
        "difficulty": 70,
        "winning_nonce": -1142020986,
        "miner_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
        "ledgerHash": "D34D34D34DFCD7917DE38043D36136000EFA13AF44EC31410F8F770FAF3D003134DF6002",
        "bitcoin_block_headers": [],
        "transactions": []
      }
    ]
  },
  "success": true,
  "messages": []
}


getblockchains

Returns blockchain information

Syntax

getblockchains

Examples:

#get info about the current blockchain
getblockchains

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "best_length": 37530,
    "longest_length": 37530
  },
  "success": true,
  "messages": []
}

getblockfromhash

Returns the block for the specified hash

Syntax

getblockfromhash <blockHash>

Examples:

#get block given specific hash
getblockfromhash 0000000B1F90DED765A69641F9840568839BCA0DB02EF126

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "blocks": [
      {
        "coinbaseReward": 1000000000,
        "transactionFees": 0,
        "size": 0,
        "raw": "CKulAhCcxI7TBRoYAAAACx+Q3tdlppZB+YQFaIObyg2wLvEmIhgAAAAQSRpa2pkGjaMFF0g+7uedXcOynIopfQcAAAAAAAAwof3QwP//////AToWaVLnTYcGoeUPflsiB8rJOoy/viPRGkIk0000003815F944BD02E2AA76E69E7DFBD493D689ADE032ACaICU69wD",
        "number": 37547,
        "timestamp": 1516479004,
        "hash": "0000000B1F90DED765A69641F9840568839BCA0DB02EF126",
        "previous_hash": "00000010491A5ADA99068DA30517483EEEE79D5DC3B29C8A",
        "difficulty": 1917,
        "winning_nonce": -132890975,
        "miner_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
        "ledgerHash": "D34D34D34DFCD7917DE38043D36136000EFA13AF44EC31410F8F770FAF3D003134DF6002",
        "bitcoin_block_headers": [],
        "transactions": []
      }
    ]
  },
  "success": true,
  "messages": []
}


getdiagnosticinfo

Returns diagnostic info about the NodeCore instance
(VBK_CLI rpc (127.0.0.1:10501)) > getdiagnosticinfo
getdiagnosticinfo
{
  "nodecore_working_directory": "/root/nodecore/0.4.7/nodecore-0.4.7/bin",
  "user_language": "en",
  "java_runtime_name": "OpenJDK Runtime Environment",
  "sun_boot_library_path": "/usr/lib/jvm/zulu-11/lib",
  "java_runtime_version": "11.0.4+11-LTS",
  "java_specification_version": "11",
  "os_name": "Linux",
  "os_arch": "amd64",
  "os_version": "3.10.0-957.27.2.el7.x86_64",
  "memory_total_gb": "0.67 GB",
  "memory_max_gb": "6.00 GB",
  "processor_count": "2",
  "processor_type": "",
  "datetime_now_utc": "2019-12-03 11:19:10.051-0500",
  "nodecore_properties_source": "/root/VeriBlock/nodecore.properties",
  "nodecore_properties_values": [
    "rpc.bind.address: 127.0.0.1",
    "bitcoin.configured: true",
    "peer.external.hosts.testnet: 95.216.123.86:7501,94.130.147.194:7501,94.130.147.195:7501,95.216.53.162:7501",
    "rpc.security.password.enabled: false",
    "initial.bitcoin.height: 1579832",
    "pool.standard.autostart: CPU",
    "network: testnet",
    "initial.bitcoin.merkle: c93a6ae864731e0fdcc225605d5577d0711cc606aee8eac3e8105372a8b64142",
    "initial.bitcoin.previous: 00000000000002028556c35b288d3599fa1955eca6d80c29ebe25fdf58f23022",
    "initial.bitcoin.version: 536870912",
    "initial.bitcoin.timestamp: 1569610087",
    "initial.bitcoin.nonce: 2015032031",
    "peer.max.count: 50",
    "initial.bitcoin.difficulty: 486604799",
    "rpc.security.password: ********",
    "rpc.whitelist.addresses: 192.168.0.10"
  ],
  "environment_variables": [
    "NODECORE_LOG_PATH: "
  ]
}

200 success (60.91 ms)

gethistory

Returns transaction history for specified address or the default if not (available only at NodeCore 4.8 or greater).

Syntax

gethistory [address]

Examples:

#Get history for a specific address
gethistory VE2TkS4er4JeZJRnPkSKUdSeaAew5E

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": [
    {
      "balance": 2000,
      "blocks_mined": 0,
      "transactions": [
        {
          "type": "signed",
          "signed": {
            "signature": "3046022100E786556F3693541F6D059165903F261D8971E6DC92316457FA5381C039E3D8F4022100A08D4B8838053B48474ECABE9EF340E83D8A3A330A814316EA75958D510A1B76",
            "public_key": "3056301006072A8648CE3D020106052B8104000A034200042704DEA2E9BDB74133E298C3AAD8E76588E48AED614674869380B959BB49DF69E8DAA1B7EF4E14240952C2BB082C89FB54A528D6502F8934E1BDA95F651F8D29",
            "signature_index": 25,
            "transaction": {
              "size": 56,
              "txid": "B6C62ADB8CFAC18FBAC5F9F5BD3E828249E176A64C71445BD443752C8635787D",
              "data": "",
              "type": "standard",
              "fee": 121,
              "source_amount": 1121,
              "merkle_path": "",
              "source_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
              "bitcoin_transaction": "",
              "bitcoin_block_header": "",
              "endorsed_block_header": "",
              "outputs": [
                {
                  "address": "VE2TkS4er4JeZJRnPkSKUdSeaAew5E",
                  "amount": 1000
                }
              ]
            }
          }
        },
        {
          "type": "signed",
          "signed": {
            "signature": "3044022042C19F6CC85D64E9D87583011D020D232A056DBDAAECA0499BD711AFF72B87540220010A9D4F7BFC7CF4F3202FC8774542ECFBE94CC1B4876DAB9EFC1CE586959073",
            "public_key": "3056301006072A8648CE3D020106052B8104000A034200042704DEA2E9BDB74133E298C3AAD8E76588E48AED614674869380B959BB49DF69E8DAA1B7EF4E14240952C2BB082C89FB54A528D6502F8934E1BDA95F651F8D29",
            "signature_index": 26,
            "transaction": {
              "size": 56,
              "txid": "7BA24151FA9A8D59D009B952BC259E3228FFE753526C38F8F1C4703EFFA8C115",
              "data": "",
              "type": "standard",
              "fee": 121,
              "source_amount": 1121,
              "merkle_path": "",
              "source_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
              "bitcoin_transaction": "",
              "bitcoin_block_header": "",
              "endorsed_block_header": "",
              "outputs": [
                {
                  "address": "VE2TkS4er4JeZJRnPkSKUdSeaAew5E",
                  "amount": 1000
                }
              ]
            }
          }
        }
      ]
    }
  ],
  "success": true,
  "messages": []
}

getinfo

Returns general information about this node and the presently-known blockchain

Syntax

getinfo

Examples:

getinfo

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "default_address": {
      "address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
      "amount": 187457753607875
    },
    "estimated_hash_rate": 6,
    "number_of_blocks": 37532,
    "transaction_fee": "0.00000801",
    "last_block": {
      "coinbaseReward": 1000000000,
      "transactionFees": 0,
      "size": 0,
      "raw": "CJulAhCLoo7TBRoYAAAAKxIj2rocYAtCHvclu0nOg6mEdUFFIhgAAAAV+9oXWONJpFXwDTd3aUIEabXUJJ8pfQcAAAAAAAAw6q+nsvr/////AToWaVLnTYcGoeUPflsiB8rJOoy/viPRGkIk0000003815F944BD02E2AA76E69E7DFBD493D689ADE032ACaICU69wD",
      "number": 37531,
      "timestamp": 1516474635,
      "hash": "0000002B1223DABA1C600B421EF725BB49CE83A984754145",
      "previous_hash": "00000015FBDA1758E349A455F00D377769420469B5D4249F",
      "difficulty": 1917,
      "winning_nonce": -1505110038,
      "miner_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
      "ledgerHash": "D34D34D34DFCD7917DE38043D36136000EFA13AF44EC31410F8F770FAF3D003134DF6002",
      "bitcoin_block_headers": [],
      "transactions": []
    },
    "difficulty": 1917
  },
  "success": true,
  "messages": []
}


getlastbitcoinblock

Returns the last bitcoin block.

Syntax

getlastbitcoinblock

Example

# input
getlastbitcoinblock

#output
rpc (127.0.0.1:10500) > {
  "payload": "00000020F3E15A9E8C0D18957E6E048311B85014F54EDD6FDB27442809C9A64C00000000324227DB35ECF6AC8E35C403366C84BCBA613F3A8F5C67DA3B40E302731A1BD8A90EA35AFFFF001D6887AE1E",
  "success": true,
  "messages": []
}

getnewaddress

Creates a new address from the wallet

Example

# input
getnewaddress

#output
rpc (77.46.106.162:10500) > {
  "payload": "VCGeXVDjH9EHv8zkGmh6VwL5mHXfpm",
  "success": true,
  "messages": []
}

Create multiple addresses at once

getnewaddress [count]
Gets {count} new address from the wallet (default: 1)


getpeerinfo

Returns a list of connected peers

Syntax

getpeerinfo 

Examples:

rpc (127.0.0.1:10500) > {
  "payload": {
    "configured_endpoints": [
      {
        "address": "93.130.33.180",
        "port": 6500
      },
      {
        "address": "77.46.106.162",
        "port": 6500
      }
    ],
    "connected": [
      {
        "address": "77.46.106.162",
        "port": 6500,
        "application": "VeriBlock NodeCore v0.1.0-rc.28",
        "protocol_version": 1,
        "platform": "Windows Server 2016",
        "start_timestamp": 1520633272
      }
    ],
    "disconnected": [],
    "candidates": [
      {
        "address": "23.96.176.247",
        "port": 6500,
        "application": "VeriBlock NodeCore v0.1.0-rc.28",
        "protocol_version": 1,
        "platform": "Linux",
        "start_timestamp": 1520634269
      },
      {
        "address": "13.95.160.234",
        "port": 6500,
        "application": "VeriBlock NodeCore v0.1.0-rc.24",
        "protocol_version": 1,
        "platform": "Linux",
        "start_timestamp": 1520625288
      }
    ]
  },
  "success": true,
  "messages": []
}


getpendingtransactions

Returns the serialized mempool transactions. Returns nothing if there are no transactions.

Syntax

getpendingtransactions

Examples:

#First send some coins (to ensure there is a transaction), then check for pending transactions.
send 1000 VE2TkS4er4JeZJRnPkSKUdSeaAew5E
getpendingtransactions

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": [
    {
      "size": 56,
      "txid": "2EB013AC6B62D192FD0EA3D8DBB757BB8D4F6008BC3A17846A42CBB629F27D58",
      "data": "",
      "type": "standard",
      "fee": 121,
      "source_amount": 1121,
      "merkle_path": "",
      "source_address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
      "bitcoin_transaction": "",
      "bitcoin_block_header": "",
      "endorsed_block_header": "",
      "outputs": [
        {
          "address": "VEP6ZjXby6Ska22bb4fcrirL4Dj2Vo",
          "amount": 1000
        }
      ]
    }
  ],
  "success": true,
  "messages": []
}

getpoolinfo

Shows pool info if running a pool.

getpoolinfo
{
  "running": true,
  "configuration": {
    "solo": false,
    "type": "GPU",
    "pool_target": "00000000ffffffffffffffffffffffffffffffffffffffff",
    "pool_address": "V4upDbv4ne6f88Pr8h5oHdok9Ezzzz",
    "operator_address": "V4cP4AfoSomxYHfnCDN8tuWFstrgdw",
    "operator_fee": 0.01,
    "coinbase_comment": "myPoolCommentHere"
  },
  "stats": {
    "current_round": 4536,
    "mining_block_number": 55855,
    "last_block_number": 55854,
    "recent_hash_rate": "772.66 GH/s"
  }
}


getpop

getpop [block]
Gets the data VeriBlock wants Proof-of-Proof published to Bitcoin

getpopendorsementsinfo

Returns transaction history for specified address or the default if not.

getpopendorsementsinfo <address> [searchLength]

Example

# input
getpopendorsementsinfo V34RwWk5CEp5uE8L4SSpJWcwN29dKu

#output
  "payload": [
    {
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
      "endorsed_veriblock_block_hash": "0000000330089FE0A8335AEF138265D7F9A7E9EFC251001A",
      "contained_in_veriblock_block_hash": "00000003028BD9FD9A3FD188BF2D70A4B99FC8BB43EC9786",
      "veriblock_transaction_id": "E9E18AFB9212EC873B5D1E7A6AFE7727AF8D5FCC07C9CAA4DD39662C5C8EB1D2",
      "bitcoin_transaction": "0100000001497856D96BCC107D844DE83F711A30101AAD1BF2EF68213CAAE72225C8E65A08000000006B4830450221009AD5105F19A1A03D48E69860659BEBAF456DF4A80D0A047C8A0F67C020A230C502203F6EFC440B2BC177A6CA91914E8CD881D4D60E496AC22AFE6704E9DA1DA9480D0121025EA042772B22B46E924C1EAFF3D24F369501D615ECF4063C2C6C97C820C107C7FFFFFFFF0208413900000000001976A914E9C0E8D5D4C74F427A4836C8E6E3A582E761958588AC0000000000000000536A4C50000000010000000019E1492ECF1943299294D1B72AB25E56AD2A5BDA0C28A9D3E1299F501DA61E9FE2081CE3DEAD8DFFDD6041125ADA3E9A044AE83904116460217C8C3562659235A15C85F155CA620C00000000",
      "bitcoin_transaction_id": "1CA7C540AF39C6D11F40569AA549AA716B12AAF052A57D521ED41049C12A97B7",
      "bitcoin_block_header": "00000020605C4627C7168F21B41CECF20DC8C4AC0C7F32C8B9CF186ACF00000000000000C232B26F9AFCCFDDCA7819A9FBF7B146FEC2B17E88968ADD318CD74279C878138540DA5A9B03031A4CDDF632",
      "bitcoin_block_header_hash": "0000000000000107EB54ED752020E978BBAC7504659EC1745A61A1905E40B66F",
      "reward": "28.00000000",
      "finalized": true
    },

getprotectedchildren

Returns the children protected by PoP transactions in a particular VeriBlock block identified by the provided block hash.

The paradigm is "A parent protects children"

See: NodeCore_CommandLine#getprotectingparents

Syntax

getprotectedchildren <blockhash> [searchLength]

Example

# input
getprotectedchildren 00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B 10000

#output
  "payload": [
    {
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
      "endorsed_veriblock_block_hash": "00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53",
      "contained_in_veriblock_block_hash": "00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B",
      "veriblock_transaction_id": "E25E8ECFFF3A3DB843167C066AC052AE42BE44EB528934EEE6ED8CF5219A17C3",
      "bitcoin_transaction": "020000000129F1343830462940EC71F9A041FA3FF3FCBC87360AD891F1F93FDFC19E030E63010000006A473044022017ACFF98378B2865981C9E2D4D79AF27005B4FE4843EC7811BAEC12F0C40189602203087F1B456E6A7E794AE67A369D3214CEEC2AE0923AE9D73084FC7B25C474BBF0121029787960F4CE284F40F1C8953E2F8DDFC5E664088580588153E5FC7513AC88C7DFFFFFFFF020000000000000000536A4C500000000100000002666994A2AFEF035F53D0048991648A8304839BF07B1C3A9F5CE2071B1EE66E039F8E3477A2FD940FC87CE7A45ACE5178045F55BE585CA12F217C8C3562659235A15C85F155CA620CC0270900000000001976A914ABA57562278E5D543E33A20E5AE1B8427B51AD0988AC00000000",
      "bitcoin_transaction_id": "840AD8CB3D5A64979220FA9CE9BE302FF644D294E0186CD14C876BE7B54C87E8",
      "bitcoin_block_header": "00000020F0055E0D2B1D78409650AE4C23D9501EBDF3AA00D03B50014D0000000000000089ABCEA79221A9BCFF8BA8DF17719C23AB399D6B171CC5A2199878D76AB859C6B552CE5A9B03031ADD59C1A0",
      "bitcoin_block_header_hash": "000000000000017CC389D86556814B198A4B9673E5D55CC846A6853B0C283279",
      "reward": "28.00000000",
      "finalized": true

getprotectingparents

Returns the pop endorsement information of parents protecting the provided block hash.

The paradigm is "A child can be protected by mulitple parents"

See: NodeCore_CommandLine#getprotectedchildren

Syntax

getprotectingparents <blockhash> [searchLength]

Example

# input
getprotectingparents 00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53 10000

#output
  "payload": [
    {
      "miner_address": "V34RwWk5CEp5uE8L4SSpJWcwN29dKu",
      "endorsed_veriblock_block_hash": "00000000EBDFF3806FEFC22799E75FD36C3935F7FA36AA53",
      "contained_in_veriblock_block_hash": "00000001176E53EA4CB9872910F9E567C6DC4B09C01DBB6B",
      "veriblock_transaction_id": "E25E8ECFFF3A3DB843167C066AC052AE42BE44EB528934EEE6ED8CF5219A17C3",
      "bitcoin_transaction": "020000000129F1343830462940EC71F9A041FA3FF3FCBC87360AD891F1F93FDFC19E030E63010000006A473044022017ACFF98378B2865981C9E2D4D79AF27005B4FE4843EC7811BAEC12F0C40189602203087F1B456E6A7E794AE67A369D3214CEEC2AE0923AE9D73084FC7B25C474BBF0121029787960F4CE284F40F1C8953E2F8DDFC5E664088580588153E5FC7513AC88C7DFFFFFFFF020000000000000000536A4C500000000100000002666994A2AFEF035F53D0048991648A8304839BF07B1C3A9F5CE2071B1EE66E039F8E3477A2FD940FC87CE7A45ACE5178045F55BE585CA12F217C8C3562659235A15C85F155CA620CC0270900000000001976A914ABA57562278E5D543E33A20E5AE1B8427B51AD0988AC00000000",
      "bitcoin_transaction_id": "840AD8CB3D5A64979220FA9CE9BE302FF644D294E0186CD14C876BE7B54C87E8",
      "bitcoin_block_header": "00000020F0055E0D2B1D78409650AE4C23D9501EBDF3AA00D03B50014D0000000000000089ABCEA79221A9BCFF8BA8DF17719C23AB399D6B171CC5A2199878D76AB859C6B552CE5A9B03031ADD59C1A0",
      "bitcoin_block_header_hash": "000000000000017CC389D86556814B198A4B9673E5D55CC846A6853B0C283279",
      "reward": "28.00000000",
      "finalized": true
    },
	

getstateinfo

getstateinfo
Returns blockchain, operating, and network state information

Example:

getstateinfo
{
  "blockchain_state": "LOADED",
  "operating_state": "RUNNING",
  "network_state": "CONNECTED",
  "connected_peer_count": 8,
  "current_sync_peer": "",
  "network_height": 148816,
  "local_blockchain_height": 148816,
  "network_version": "TestNet",
  "data_directory": "",
  "program_version": "0.3.8",
  "nodecore_starttime": 1541471711,
  "wallet_cache_sync_height": 148816
}


gettransaction

gettransaction <txId> [searchLength]
Gets information regarding provided TxID

getwallettransactions

See: GetWalletTransactions_API for more usage details.

This requires the wallet cache be up to date (run getstateinfo to see how far along wallet cache is caught up). If you just imported a new wallet, it may take some time to rebuild that cache.

This returns data only for imported wallets that show up in getbalance NodeCore_CommandLine#getbalance.

getwallettransactions <address> [type]
Writes transaction history for an address to a local file. This could take a while.

See also: NodeCore_CommandLine#refreshwalletcache --> rebuilds the cache

Example:

getwallettransactions V4m6JbAs8VaEa3wwemJPgsPRY8ETdk
Append to file: C:\outputs\V4m6JbAs8VaEa3wwemJPgsPRY8ETdk.csv
Got page 1 with 100 rows, appended to file
Got page 2 with 93 rows, appended to file
"Wrote 193 wallet transactions to file C:\\outputs\V4m6JbAs8VaEa3wwemJPgsPRY8ETdk.csv"

importprivatekey

See also: dumpprivatekey

importprivatekey <privateKey>
Imports the provided private key into NodeCore

Example of Private Key format:

{
  "address": "VD39ynwFyn7Zqf46HeSq3bbzq9q3U9",
  "private_key": "40303E931132A899A0924F02B0F0998917B9345175CF55CB31C79F7D429B66294B4B9E46E094A70432043223889429CF1017542205F91209FE077FC0F1C259F80BE42024315048DE18CF2B603FE226EB9201607E6CC020594C299F080FF7016F28C40F977116DC0629009C139810C41043A1280200284692E04B445E823F6789F5CA4369F6C983B80F900FE680E4B00890E799525C20406319"
}

importwallet

Import a NodeCore wallet backup from the provided location. Expects an exact wallet file.

Run getbalance before and after the importwallet command to see the impact. Note that importwallet merges the addresses into the existing wallet, it does NOT overwrite them. If nodecore has wallet with address A, and one runs the importwallet command with a wallet.dat file containing B and C, then the final nodecore addresses from getbalance will show A, B, and C.

See: NodeCore_CommandLine#backupwallet, NodeCore_File_Structure

Syntax

importwallet <sourceLocation>

Example

# input
importwallet C:\MyBackups\wallet_backup.dat

#output
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

listbannedminers

listbannedminers
Returns a list of UCP clients that are currently banned

listbannedpeers

Lists banned peers

(VBK_CLI rpc (127.0.0.1:10500)) > listbannedpeers
listbannedpeers
{
  "banned_peers": []
}


listallowed

Returns a list of allowed whitelist addresses

listallowed

lockwallet

See: Wallet_Encryption

lockwallet
Disables the temporary unlock on the NodeCore wallet

makeunsignedmultisigtx

makeunsignedmultisigtx <sourceAddress> <amount> <destinationAddress> [transactionFee] [signatureIndex]
(Generates an unsigned multisig transaction)

rebroadcasttransactionfromtxid

Rebroadcasts the specified pending transaction and all dependent transactions

Syntax

rebroadcasttransactionfromtxid <txId>

Example

rebroadcasttransactionfromtxid DEFC0D3808669D24111B02EC76A3C18F430BC5E3863297429331C69A02A11517

rebroadcasttransactionsfromaddress

Rebroadcasts all pending transactions from a particular source address (optionally above a particular signature index), and all dependent transactions

Syntax

rebroadcasttransactionsfromaddress <address> <index (optional)>


Example

rebroadcasttransactionsfromaddress VAiKDCMJLdoqdsbLbqFamDuHdEyRuQ

refreshwalletcache

See also: NodeCore_CommandLine#getwallettransactions

refreshwalletcache
Rescans the blockchain for transactions belonging to imported wallets

removeallowed

removeallowed <address>
Remove allowed addresses

removenode

Removes the peer address from the configuration

Syntax

removenode <peer>

Example

# input
removenode 93.130.33.180:10500

#output (also run getpeerinfo to see the node removed)
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

restartpoolwebserver

restartpoolwebserver
Restarts the built-in pool web server

send

Send coins to the specified address. Will automatically pick a source address that has sufficient coins.

Can return multiple Transactions if pulling from multiple addresses.

Syntax

send <amount> <destinationAddress> <sourceAddress> <takeFeeFromOutputs>

Note: takeFeeFromOutputs is always false by default. If set to true the fee will be taken from the outputs.


Examples:

#send 1000 coins to address "VE2TkS4er4JeZJRnPkSKUdSeaAew5E"
send 1000 VE2TkS4er4JeZJRnPkSKUdSeaAew5E

#returns the VBK transaction ID
rpc (127.0.0.1:10500) > {
  "payload": {
    "txids": [
      "76796500882C927FF057BDA528C94BE883A06A1B6430655067ACF51F09A6E376",
      "79AC6FFE176F068BBB0F5B4F79A2FD1AA92925CA9310FEC58236E220804B58DF"
    ]
  },
  "success": true,
  "messages": []
}

setdefaultaddress

Sets a new default address. This is what will show up when running getinfo

setdefaultaddress <address>
(Sets the default address of a NodeCore instance)

settxfee

Sets the transaction fee per byte. You can view the transaction fee by running getinfo

Syntax

settxfee <transactionFee>

Examples:

#Set the transaction fee (since 0.4.9)
settxfee 1000

#Set the transaction fee (prior to 0.4.9)
settxfee 0.00001000

#returns info for a specific command
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

signhexmessage

signhexmessage <address> <message>
(Signs a hex-encoded message with the addresses private key)


sigindex

See: Sigindex

Return the signature index for the specified address

Syntax

sigindex [address]

Examples:

#get the signature index
sigindex VE2TkS4er4JeZJRnPkSKUdSeaAew5E

#returns info for a specific command
rpc (127.0.0.1:10500) > {
  "payload": {
    "addresses": [
      {
        "pool_index": -1,
        "address": "VE2TkS4er4JeZJRnPkSKUdSeaAew5E",
        "blockchain_index": -1
      }
    ]
  },
  "success": true,
  "messages": []
}


signmessage

Signs a message with the addresses private key

Syntax

signmessage <address> <message>

Examples:

#sign a message, infer the private key from the address
signmessage VDonzX9vwXxcL9BapJWkhnBiyAX6ia ThisIsSomeText

#returns info for a specific command
rpc (127.0.0.1:10500) > {
  "payload": "MEYCIQDDxExDiIGkjxrs20cl5RhlbHo5MEgSdub+MmdEE5d21AIhAJk7alAVUAuH/+j3/PuUY7BEuLtH4vIjAFwvGEaLdexh",
  "success": true,
  "messages": []
}

startpool

Starts the built-in pool service in NodeCore.

Requires permissions.

Syntax

startpool <type>
(Starts the built-in pool service in NodeCore)

Examples:

#start the UCP pool on an instance

#CPU
startpool CPU

#GPU
startpool GPU

#returns info for a specific command
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

startsolopool

startsolopool [address]
Starts the built-in pool service in NodeCore in solo mode

stopnodecore

Gracefully stops the connected instance of NodeCore. Very useful for remote instances.

An alternative is to CTRL+C NodeCore.

stoppool

Stops the built-in pool service in NodeCore

Syntax

stoppool

Examples:

stoppool

#returns info for a specific command
rpc (127.0.0.1:10500) > {
  "payload": {},
  "success": true,
  "messages": []
}

submitmultisigtx

How_to_Submit_Multisig_Tx


troubleshootpopbyaddress

Command: Troubleshoot PoP By Address

troubleshootpopbyaddress <onlyFailures> [searchLength] [address]
(Returns a troubleshooting report of the PoP transaction(s) matching the provided address in the specified history)

Example:
troubleshootpopbyaddress true 1000 VHPgy7kUNtkKFLdx3CyB6rAyHAhd7n

unlockwallet

See: Wallet_Encryption

Command: Unlock Wallet

unlockwallet
Temporarily unlocks the NodeCore wallet

validateaddress

Returns details about an address if it's valid

Syntax

validateaddress <address>

Examples:

#Check a specific address
validateaddress VazUQm9TaPmbhTWEi6FYUUPp28Eynq

#returns info for a specific command
rpc (77.46.106.162:10500) > {
  "payload": {
    "address": "VazUQm9TaPmbhTWEi6FYUUPp28Eynq",
    "is_remote": false,
    "public_key": "3056301006072A8648CE3D020106052B8104000A034200042704DEA2E9BDB74133E298C3AAD8E76588E48AED614674869380B959BB49DF69E8DAA1B7EF4E14240952C2BB082C89FB54A528D6502F8934E1BDA95F651F8D29"
  },
  "success": true,
  "messages": []
}