Files
stacks-blockchain-api/docs/entities/blocks/nakamoto-block.schema.json
Rafael Cárdenas ceb7be08da feat: add /extended/v2/blocks endpoint with burn block filters (#1769)
* chore: add typebox

* feat: add blocks v2 endpoint

* chore: add types

* fix: v2 query

* fix: tests

* chore: tweaks

* docs: openapi

* fix: exports

* fix: tests

* fix: tokens router

* fix: adjust burn block hash regex
2023-12-14 09:38:29 -06:00

100 lines
2.6 KiB
JSON

{
"title": "NakamotoBlock",
"description": "A block",
"type": "object",
"additionalProperties": false,
"required": [
"canonical",
"height",
"hash",
"index_block_hash",
"parent_block_hash",
"parent_index_block_hash",
"txs",
"burn_block_time",
"burn_block_time_iso",
"burn_block_hash",
"burn_block_height",
"miner_txid",
"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"
},
"index_block_hash": {
"type": "string",
"description": "The only hash that can uniquely identify an anchored block or an unconfirmed state trie"
},
"parent_block_hash": {
"type": "string",
"description": "Hash of the parent block"
},
"parent_index_block_hash": {
"type": "string",
"description": "Index block 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"
},
"txs": {
"type": "array",
"description": "List of transactions included in the block",
"items": {
"type": "string",
"description": "Transaction ID"
}
},
"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."
}
}
}