{
  "type": "object",
  "title": "TenureChangeTransactionMetadata",
  "description": "Describes representation of a Type 7 Stacks transaction: Tenure Change",
  "required": ["tx_type"],
  "additionalProperties": false,
  "properties": {
    "tx_type": {
      "type": "string",
      "enum": ["tenure_change"]
    },
    "tenure_change_payload": {
      "type": "object",
      "additionalProperties": false,
      "required": ["tenure_consensus_hash", "prev_tenure_consensus_hash", "burn_view_consensus_hash", "previous_tenure_end", "previous_tenure_blocks", "cause", "pubkey_hash"],
      "properties": {
        "tenure_consensus_hash": {
          "type": "string",
          "description": "Consensus hash of this tenure. Corresponds to the sortition in which the miner of this block was chosen."
        },
        "prev_tenure_consensus_hash": {
          "type": "string",
          "description": "Consensus hash of the previous tenure. Corresponds to the sortition of the previous winning block-commit."
        },
        "burn_view_consensus_hash": {
          "type": "string",
          "description": "Current consensus hash on the underlying burnchain. Corresponds to the last-seen sortition."
        },
        "previous_tenure_end": {
          "type": "string",
          "description": "(Hex string) Stacks Block hash"
        },
        "previous_tenure_blocks": {
          "type": "number",
          "description": "The number of blocks produced in the previous tenure."
        },
        "cause": {
          "type": "string",
          "enum": ["block_found", "extended"],
          "description": "Cause of change in mining tenure. Depending on cause, tenure can be ended or extended."
        },
        "pubkey_hash": {
          "type": "string",
          "description": "(Hex string) The ECDSA public key hash of the current tenure."
        }
      }
    }
  }
}
