Interface API

Define the API a full node exposes to the world

interface API ;

A full node: - Can connect to any node and request data about the blockchain & network - Accepts external connections and send them blockchain/network data - Store the data it receives on disk - Can catch up with the network when found lagging behind - Validates the data it receives - Receives, stores and forwards transactions (but drop them after a timeout) - Does not participate in consensus

In essence, a full node provides much of the basic functionality needed to verify the blockchain while lacking the ability to create new blocks.

Non Transaction data that are part of consensus are also accepted by full nodes, which simply relays them if they are valid (e.g. Enrollment).

Methods

NameDescription
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