Class NetworkClient
Used for communicating with a remote node
Constructors
Name | Description |
this
(taskman, banman, retry, max_retries)
|
Constructor.
|
Methods
Name | Description |
addresses
()
|
Convenience function to access all known addresses for this client
|
getBlockHeaders
(heights)
|
|
getBlockHeight
()
|
|
getBlocksFrom
(height, max_blocks)
|
Get the array of blocks starting from the provided block height.
The block at height is included in the array.
|
getLocalTime
()
|
Get the local time of the node
|
getNodeInfo
()
|
Get the network info of the node, stored in the
node_info parameter if the request succeeded.
|
getPreimages
(enroll_keys)
|
Returns the preimages for the specified enroll keys.
|
getPreimagesFrom
(start_height)
|
Get the array of pre-images starting from the enrolled_height .
|
getPublicKey
(key)
|
|
getTransactions
(tx_hashes)
|
|
getTxSet
(hash)
|
Set of TX hashes represented by the given hash
|
handshake
(key)
|
|
identity
()
|
Get the identity of this node. Full nodes return Identity.init .
|
isAuthenticated
()
|
|
isConnected
()
|
|
merge
(address, api)
|
Merge connections of incoming client to this
|
sendBlockSignature
(block_sig)
|
Sends a Validator Block Signature to the node.
|
sendEnrollment
(enroll, avail_height)
|
Send a enrollment request asynchronously to the node.
Any errors are reported to the debugging log.
|
sendEnvelope
(envelope)
|
Sends an SCP envelope to another node.
|
sendPreimage
(preimage)
|
Send a preimage asynchronously to the node.
Any errors are reported to the debugging log.
|
sendTransaction
(tx)
|
Send a transaction asynchronously to the node.
Any errors are reported to the debugging log.
|
setIdentity
(utxo, key)
|
Set/get the node's identity
|
shutdown
()
|
Shut down the gossiping timer
|
attemptRequest
(args, file, line)
|
Attempt a request up to 'this.max_retries' attempts, and make the task
wait this.retry_delay between each attempt.
|
Enums
Name | Description |
GossipType
|
Gossip type
|
Throw
|
Whether to throw an exception when attemptRequest() fails
|