Submit Result
Submits a new election result block to the blockchain. The block must include valid cryptographic signatures and will be validated before being added to the chain.Request Body
SHA-256 hash of the block header
Cryptographic signature of the block hash
32-byte array representing the Merkle tree root of all results in the block
Block type and data. Can be
Genesis, Pending, or Result containing an array of candidate results.Block height (position in the blockchain)
Hash of the validator’s public key
ISO 8601 timestamp of block creation
Hash of the previous block in the chain
Signature of the previous block’s hash
Identifier of the node that created this block
Public key hash of the block creator
Block format version (currently 1)
Response
Confirmation message with the block index
Example
cURL
Response
Get Block by Height
Retrieve a specific block from the blockchain by its height (block number).Path Parameters
The block height to retrieve (0 for genesis block)
Response
Block hash
Signature of the block hash
32-byte Merkle root
Block type and results data
Block height
Validator public key hash
Block creation timestamp
Previous block hash
Signature of previous block hash
Block creator identifier
Creator public key hash
Block format version
Example
cURL
Response
Block Structure
Block Types
Blocks can have one of three types:- Genesis - The first block in the chain (height 0)
- Result - Contains election results data
- Pending - Placeholder for blocks being constructed
Merkle Tree
Each block includes a Merkle root that cryptographically commits to all election results in the block. This allows efficient verification of result integrity without accessing the entire block data.Signatures
Blocks are secured with ECDSA signatures using the P-256 curve. Each block contains:- Hash signature: Signature of the block hash by the creator
- Previous hash signature: Signature of the previous block’s hash
- Public key hash: SHA-256 hash of the creator’s public key