Difference between revisions of "NodeCore CommandLine"

From Veriblock Wiki
Jump to: navigation, search
Line 164: Line 164:
  
 
=== getBalance===
 
=== getBalance===
find current values
+
Find the balance for a given address
  
 +
Syntax
 
<pre>
 
<pre>
 +
getbalance [address]
 +
</pre>
 +
 +
<pre>
 +
#input
 +
getbalance VEYtYxYUJY3MinMa7oyC7vjdGBLrfV
 +
 +
 +
#output
 +
rpc (78.46.106.162:10500) > {
 +
  "payload": {
 +
    "confirmed": [
 +
      {
 +
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
 +
        "amount": 992331
 +
      }
 +
    ],
 +
    "unconfimed": [
 +
      {
 +
        "address": "VEYtYxYUJY3MinMa7oyC7vjdGBLrfV",
 +
        "amount": 0
 +
      }
 +
    ]
 +
  },
 +
  "success": true,
 +
  "messages": []
 +
}
 +
 
#input
 
#input
 
getbalance
 
getbalance

Revision as of 18:46, 20 January 2018

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]
#input
getbalance VEYtYxYUJY3MinMa7oyC7vjdGBLrfV


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

#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

Example

# input
getnewaddress

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