{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Block",
  "description": "A block",
  "type": "object",
  "required": [
    "canonical",
    "height",
    "hash",
    "parent_block_hash",
    "txs",
    "burn_block_time",
    "burn_block_time_iso",
    "burn_block_hash",
    "burn_block_height",
    "miner_txid",
    "parent_microblock_hash",
    "parent_microblock_sequence",
    "microblocks_accepted",
    "microblocks_streamed",
    "execution_cost_read_count",
    "execution_cost_read_length",
    "execution_cost_runtime",
    "execution_cost_write_count",
    "execution_cost_write_length"
  ],
  "properties": {
    "canonical": {
      "type": "boolean",
      "description": "Set to `true` if block corresponds to the canonical chain tip"
    },
    "height": {
      "type": "integer",
      "description": "Height of the block"
    },
    "hash": {
      "type": "string",
      "description": "Hash representing the block"
    },
    "parent_block_hash": {
      "type": "string",
      "description": "Hash of the parent block"
    },
    "burn_block_time": {
      "type": "number",
      "description": "Unix timestamp (in seconds) indicating when this block was mined."
    },
    "burn_block_time_iso": {
      "type": "string",
      "description": "An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined."
    },
    "burn_block_hash": {
      "type": "string",
      "description": "Hash of the anchor chain block"
    },
    "burn_block_height": {
      "type": "integer",
      "description": "Height of the anchor chain block"
    },
    "miner_txid": {
      "type": "string",
      "description": "Anchor chain transaction ID"
    },
    "parent_microblock_hash": {
      "type": "string",
      "description": "The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1."
    },
    "parent_microblock_sequence": {
      "type": "integer",
      "description": "The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1."
    },
    "txs": {
      "type": "array",
      "description": "List of transactions included in the block",
      "items": {
        "type": "string",
        "description": "Transaction ID"
      }
    },
    "microblocks_accepted": {
      "type": "array",
      "description": "List of microblocks that were accepted in this anchor block. Not every anchored block will have a accepted all (or any) of the previously streamed microblocks. Microblocks that were orphaned are not included in this list.",
      "items": {
        "type": "string",
        "description": "Microblock hash"
      }
    },
    "microblocks_streamed": {
      "type": "array",
      "description": "List of microblocks that were streamed/produced by this anchor block's miner. This list only includes microblocks that were accepted in the following anchor block. Microblocks that were orphaned are not included in this list.",
      "items": {
        "type": "string",
        "description": "Microblock hash"
      }
    },
    "execution_cost_read_count": {
      "type": "integer",
      "description": "Execution cost read count."
    },
    "execution_cost_read_length": {
      "type": "integer",
      "description": "Execution cost read length."
    },
    "execution_cost_runtime": {
      "type": "integer",
      "description": "Execution cost runtime."
    },
    "execution_cost_write_count": {
      "type": "integer",
      "description": "Execution cost write count."
    },
    "execution_cost_write_length": {
      "type": "integer",
      "description": "Execution cost write length."
    }
  }
}
