Commits

Commits represent the set of validators that signed off on a specific block in the blockchain. This section provides information on the available endpoints to retrieve commit information by block ID or height.

Properties

  • Name
    height
    Type
    string
    Description

    The height of the block associated with the commit.

  • Name
    signature
    Type
    string
    Description

    The cryptographic signature of the block.

  • Name
    validators
    Type
    array
    Description

    A list of public keys representing the validators that signed the block.


GET/commits/:id

Retrieve Commit Information

Retrieve commit information for a specific block by its ID or height. This includes the list of validators that signed the block and the block's signature.

Path Parameters

  • Name
    id
    Type
    string
    Description

    The unique identifier or height of the block to retrieve commit information for.

Request

GET
/commits/:id
curl https://testnet.mainsailhq.com/api/commits/1

Response

{
  "data": {
    "number": "1",
    "signature": "8b4c6e0f8be88b7c3c7a8aa89a3eef388a9aa6561a412bd01bab948988cb3e897513eb2b4a2f7a0f9d74f85d38f4d8c20c39ec8683d40202540bcf11c57b1c59501d18b33ee758a0d72f6e2e1e657c7ad6af6b00e1cc3e2e6e1ea5bb604bdb34",
    "validators": [
      "02ba352eab5ddfd1a19f5681162b1550b035003ed01bd83cd173f48dbb8ebb2907",
      "02ab5bebf52333bdad0d3d75e6b5b1f602adf7b8af6faa87c23b2e121318f95542",
      "03f3f6d09101d6fd97cc5b987707442c14cb4b990b097852f265ef41631ae4c7d5",
      "02da652d03f195fd2adb9e6290b8916f78a16daee4bc3d0a2c03b7f6c6651d1a29",
      // ...
    ]
  }
}