Skip to content

chore: update openapi specs #6201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/rpc/api/core-node/api-error.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Standard API error response",
"title": "ApiError",
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message describing what went wrong"
}
},
"required": [
"error"
]
}
4 changes: 3 additions & 1 deletion docs/rpc/api/core-node/get-clarity-marf-value.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"description": "Response of get Clarity MARF value request",
"title": "ClarityMARFValueResponse",
"type": "object",
"required": ["data"],
"required": [
"data"
],
"properties": {
"data": {
"type": "string",
Expand Down
102 changes: 102 additions & 0 deletions docs/rpc/api/core-node/get-sortitions-single.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Single sortition information response",
"title": "SingleSortitionResponse",
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/definitions/SortitionInfo"
},
"definitions": {
"SortitionInfo": {
"type": "object",
"description": "Information about a burnchain sortition event",
"properties": {
"burn_block_hash": {
"type": "string",
"description": "The burnchain header hash of the block that triggered this event",
"pattern": "^0x[0-9a-f]{64}$"
},
"burn_block_height": {
"type": "integer",
"description": "The burn height of the block that triggered this event",
"minimum": 0
},
"burn_header_timestamp": {
"type": "integer",
"description": "The burn block time of the sortition (Unix timestamp)",
"minimum": 0
},
"sortition_id": {
"type": "string",
"description": "This sortition ID of the block that triggered this event",
"pattern": "^0x[0-9a-f]{64}$"
},
"parent_sortition_id": {
"type": "string",
"description": "The parent of this burn block's Sortition ID",
"pattern": "^0x[0-9a-f]{64}$"
},
"consensus_hash": {
"type": "string",
"description": "The consensus hash of the block that triggered this event",
"pattern": "^0x[0-9a-f]{40}$"
},
"was_sortition": {
"type": "boolean",
"description": "Boolean indicating whether or not there was a successful sortition"
},
"miner_pk_hash160": {
"type": [
"string",
"null"
],
"description": "Hash160 of the mining key if available",
"pattern": "^0x[0-9a-f]{40}$"
},
"stacks_parent_ch": {
"type": [
"string",
"null"
],
"description": "Consensus hash of the parent tenure",
"pattern": "^0x[0-9a-f]{40}$"
},
"last_sortition_ch": {
"type": [
"string",
"null"
],
"description": "Consensus hash of the most recent sortition",
"pattern": "^0x[0-9a-f]{40}$"
},
"committed_block_hash": {
"type": [
"string",
"null"
],
"description": "The committed block hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"vrf_seed": {
"type": [
"string",
"null"
],
"description": "VRF seed generated by this sortition",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"required": [
"burn_block_hash",
"burn_block_height",
"burn_header_timestamp",
"sortition_id",
"parent_sortition_id",
"consensus_hash",
"was_sortition"
]
}
}
}
97 changes: 97 additions & 0 deletions docs/rpc/api/core-node/get-sortitions.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Array of sortition information objects from the burnchain",
"title": "SortitionsResponse",
"type": "array",
"minItems": 1,
"maxItems": 2,
"items": {
"type": "object",
"description": "Information about a burnchain sortition event",
"properties": {
"burn_block_hash": {
"type": "string",
"description": "The burnchain header hash of the block that triggered this event",
"pattern": "^0x[0-9a-f]{64}$"
},
"burn_block_height": {
"type": "integer",
"description": "The burn height of the block that triggered this event",
"minimum": 0
},
"burn_header_timestamp": {
"type": "integer",
"description": "The burn block time of the sortition (Unix timestamp)",
"minimum": 0
},
"sortition_id": {
"type": "string",
"description": "This sortition ID of the block that triggered this event. This incorporates PoX forking information and the burn block hash to obtain an identifier that is unique across PoX forks and burnchain forks.",
"pattern": "^0x[0-9a-f]{64}$"
},
"parent_sortition_id": {
"type": "string",
"description": "The parent of this burn block's Sortition ID",
"pattern": "^0x[0-9a-f]{64}$"
},
"consensus_hash": {
"type": "string",
"description": "The consensus hash of the block that triggered this event. This incorporates PoX forking information and burn op information to obtain an identifier that is unique across PoX forks and burnchain forks.",
"pattern": "^0x[0-9a-f]{40}$"
},
"was_sortition": {
"type": "boolean",
"description": "Boolean indicating whether or not there was a successful sortition (i.e. a winning block or miner was chosen). This will also be true if this sortition corresponds to a shadow block."
},
"miner_pk_hash160": {
"type": [
"string",
"null"
],
"description": "If sortition occurred, and the miner's VRF key registration associated a nakamoto mining pubkey with their commit, this will contain the Hash160 of that mining key.",
"pattern": "^0x[0-9a-f]{40}$"
},
"stacks_parent_ch": {
"type": [
"string",
"null"
],
"description": "If sortition occurred, this will be the consensus hash of the burn block corresponding to the winning block commit's parent block ptr. In 3.x, this is the consensus hash of the tenure that this new burn block's miner will be building off of.",
"pattern": "^0x[0-9a-f]{40}$"
},
"last_sortition_ch": {
"type": [
"string",
"null"
],
"description": "If sortition occurred, this will be the consensus hash of the most recent sortition before this one.",
"pattern": "^0x[0-9a-f]{40}$"
},
"committed_block_hash": {
"type": [
"string",
"null"
],
"description": "In Stacks 2.x, this is the winning block. In Stacks 3.x, this is the first block of the parent tenure.",
"pattern": "^0x[0-9a-f]{64}$"
},
"vrf_seed": {
"type": [
"string",
"null"
],
"description": "This is the VRF seed generated by this sortition",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"required": [
"burn_block_hash",
"burn_block_height",
"burn_header_timestamp",
"sortition_id",
"parent_sortition_id",
"consensus_hash",
"was_sortition"
]
}
}
Loading