NodeCore CommandLine

From Veriblock Wiki
Jump to: navigation, search

See: Main_Page

Overview

The NodeCore CommandLine can access an instance of NodeCore

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 78.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

Commands: Connected

Most often the command line will be connected to a NodeCore instance, as that is its point.

All commands:

Command Explanation Example
addNode ... ...
getBalance
getBlockchains
getBlocks
getBlockTemplate
getBlockTimes
getHistory
getInfo
getLastBitcoinBlock
getNewAddress
getPeerInfo
getPendingTransactions
getPop
getSignatureIndex
getTransactions
removeNode
sendCoins
setTransactionFee
signMessage
submitBlocks
submitPop
submitTransactions
validateAddress

getBalance

Find the balance for a given address

Syntax

getbalance [address]

Case 1: Specific address

#input
getbalance VEYtYxYUJY3MinMa7oyC7vjdGBLrfV

#output
rpc (78.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 (78.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": []
}

getNewAddress

Returns a new address from the wallet

Example

# input
getnewaddress

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


send

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

Syntax

send <amount> <destinationAddress>

Examples:

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

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