Node
Overview
Node APIs provide access to the client engine. Access information about the client's state and configuration.
node_getTransactionStatus
Get the status of a transaction. Learn whether a transaction has been included in a mined block or whether it is in the transaction pool.
Parameters:
Argument
Type
Required
Description
hash
String
True
The transaction's hash
Curl Example:
Console Example
Returns:
Object
Field
Type
Description
status
String
"mined" = In a block that has been mined.
"pooled" = In the transaction pool.
Output:
node_getSyncStat
Get the progress stats of block synchronization between the node and a peer.
Parameters: None
Curl Example:
Console Example
Returns:
Object
| null
Field
Type
Description
currentChainHeight
Integer
The current height of the main chain.
currentTotalDifficulty
Integer
The current total difficulty of the main chain.
progressPercent
Integer
Describes the sync progress as a percentage.
targetChainHeight
Integer
The highest chain height discovered from peer interactions.
targetTotalDifficulty
Integer
The highest total difficulty discovered from peer interactions.
Output:
node_isSyncing
Checks whether the client is currently syncing with peers.
Parameters: None
Curl Example:
Console Example
Returns:
Boolean
Output:
node_info
Get information about the node. The information returned may include sensitive details about the node.
Private: Requires authentication.
Parameters: None
Curl Example:
Console Example
Returns:
Object
Field
Type
Description
address
String
The listening address of client.
id
String
The node ID.
name
String
A random pet name.
coinbase
String
The clients loaded account used to derive its unique
network ID and receive rewards.
coinbasePublicKey
String
The public key of the client. Used to derive the
address and node ID.
listeningAddresses
Array<String>
A list of all listening addresses.
mode
String
The currently enabled environment. ("development" or "production").
syncing
Boolean
Whether the node is currently syncing.
netVersion
String
The nodes network version.
buildVersion
String
The client's build version.
buildDate
String
The client's build date.
buildCommit
String
The client's build git commit hash.node.
goVersion
String
The version of go that was used to create the build.
Output:
node_basic
Get public-friendly information about the node. Unlike node_basic
, the information that is returned are non-sensitive and suitable for public access.
Curl Example:
Console Example
Returns:
Object
Field
Type
Description
id
String
The node ID.
name
String
A random pet name.
mode
String
The currently enabled environment. ("development" or "production").
syncing
Boolean
Whether the node is currently syncing.
netVersion
String
The nodes network version.
buildVersion
String
The client's build version.
buildDate
String
The client's build date.
buildCommit
String
The client's build git commit hash.node.
goVersion
String
The version of go that was used to create the build.
Output:
node_config
Returns the clients configurations.
Private: Requires authentication.
Parameters: None
Curl Example:
Console Example
Returns:
Object
Field
Type
Description
peer
Object
The client specific configuration.
.messageTimeout
Int
The number of seconds to wait before aborting connection attempt.
.addresses
Array<String>
A list of bootstrap connection addresses.
.cleanUpInt
Int
Number of seconds between peer address clean up.
.conEstInt
Int
Number of seconds between attempts to establish connection with unconnected peer.
.dev
Int
The environment mode. (0 = production, 1 = development, 2 = test).
getAddrInt
Int
Number of seconds between requests for more addresses.
maxAddrsExpected
Int
The maximum number of addresses expected from a peer.
maxInConnections
Int
The maximum number of inbound connections.
maxOutConnections
Int
The maximum number of outbound connections.
pingInt
Int
Number of seconds between pings to peers.
selfAdvInt
Int
Number of seconds between self advertisements to peers.
rpc
Object
RPC specific configurations.
.disableAuth
Boolean
Disable RPC authentication (default=false)
.username
String
RPC username (default=admin)
.password
String
RPC Password (default=admin)
.sessionSecretKey
String
Session key is used to bcrypt the RPC session token.
txPool
Object
Transaction pool configurations.
.cap
Int
The maximum number of transactions that is allowed in the transaction pool.
Please change the default RPC username and password before enabling RPC service. Also set up appropriate firewall to prevent unauthorized access to the RPC endpoint.
Keep your RPC session secret private.
Output:
Last updated