Interface API

Define the API a validator exposes to other validators

interface API
  : API ;

A validator can do everything a full node does, and additionally takes part of consensus.

Methods

NameDescription
getPublicKey (key)
getSCPState ()
getTxSet (hash) Set of TX hashes represented by the given hash
postBlockSignature (block_sig) Receives a block signature and if it validates adds it to the block multi sig after it has been externalized. The node does not respond with any status code and clients which call this API can & should call it asynchronously.
postEnvelope (envelope) Receives an SCP envelope and processes it. The node does not respond with any status code, clients which call this API can & should call it asynchronously.
getBlock (_height) Expose blocks as a REST collection
getBlockHeaders (heights)
getBlockHeight ()
getBlocksFrom (height, max_blocks) Get the array of blocks starting from the provided block height.
getConsensusParams () Get the node's consensus parameter
getEnrollment (enroll_hash) Get an enrollment data if the data exists in the enrollment pool
getLocalTime ()
getMerklePath (height, hash) Get the array of hashes which form the merkle path
getNodeInfo ()
getPreimages (enroll_keys) Returns the preimages for the specified enroll keys.
getPreimagesFrom (start_height) Get validators' pre-image information spanning a certain period
getTransactions (tx_hashes)
getTransactions (from)
getValidators (height)
handshake (peer) Endpoint used by other FullNodes or Validator to establish a long connection to this node.
hasTransactionHash (tx)
postEnrollment (enroll, avail_height) Enroll as a validator
postPreimage (preimage) Reveals a pre-image
postTransaction (tx)
shutdown () Shutdown the node and its connections to other peers