Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Unreleased changes are in the `master` branch.

## [Unreleased]

### Added

- `/blocks/:hash_or_number/txs/cbor` endpoint

## [0.1.74] - 2025-03-13

### Added
Expand Down
65 changes: 65 additions & 0 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,71 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/blocks/{hash_or_number}/txs/cbor:
get:
tags:
- Cardano » Blocks
summary: Block transactions with CBOR data
description: Return the transactions within the block, including CBOR representations.
parameters:
- in: path
name: hash_or_number
required: true
schema:
type: string
format: 64-character case-sensitive hexadecimal string or block number.
description: Hash of the requested block.
example: '4873401'
- in: query
name: count
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 100
description: The number of results displayed on one page.
- in: query
name: page
required: false
schema:
type: integer
minimum: 1
maximum: 21474836
default: 1
description: The page number for listing the results.
- in: query
name: order
required: false
schema:
type: string
enum:
- asc
- desc
default: asc
description: |
Ordered by tx index in the block.
The ordering of items from the point of view of the blockchain,
not the page listing itself. By default, we return oldest first, newest last.
responses:
'200':
description: Return the contents of the block with CBOR data
content:
application/json:
schema:
$ref: '#/components/schemas/block_content_txs_cbor'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'418':
$ref: '#/components/responses/418'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/blocks/{hash_or_number}/addresses:
get:
tags:
Expand Down
70 changes: 70 additions & 0 deletions docs/blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,76 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
'/blocks/{hash_or_number}/txs/cbor':
get:
tags:
- Cardano » Blocks
summary: Block transactions with CBOR data
description: >-
Return the transactions within the block, including CBOR
representations.
parameters:
- in: path
name: hash_or_number
required: true
schema:
type: string
format: 64-character case-sensitive hexadecimal string or block number.
description: Hash of the requested block.
example: '4873401'
- in: query
name: count
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 100
description: The number of results displayed on one page.
- in: query
name: page
required: false
schema:
type: integer
minimum: 1
maximum: 21474836
default: 1
description: The page number for listing the results.
- in: query
name: order
required: false
schema:
type: string
enum:
- asc
- desc
default: asc
description: >
Ordered by tx index in the block.

The ordering of items from the point of view of the blockchain,

not the page listing itself. By default, we return oldest first,
newest last.
responses:
'200':
description: Return the contents of the block with CBOR data
content:
application/json:
schema:
$ref: '#/components/schemas/block_content_txs_cbor'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'418':
$ref: '#/components/responses/418'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
'/blocks/{hash_or_number}/addresses':
get:
tags:
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,96 @@
}
}
},
"/blocks/{hash_or_number}/txs/cbor": {
"get": {
"tags": [
"Cardano » Blocks"
],
"summary": "Block transactions with CBOR data",
"description": "Return the transactions within the block, including CBOR representations.",
"parameters": [
{
"in": "path",
"name": "hash_or_number",
"required": true,
"schema": {
"type": "string",
"format": "64-character case-sensitive hexadecimal string or block number."
},
"description": "Hash of the requested block.",
"example": "4873401"
},
{
"in": "query",
"name": "count",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
},
"description": "The number of results displayed on one page."
},
{
"in": "query",
"name": "page",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 21474836,
"default": 1
},
"description": "The page number for listing the results."
},
{
"in": "query",
"name": "order",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "asc"
},
"description": "Ordered by tx index in the block.\nThe ordering of items from the point of view of the blockchain,\nnot the page listing itself. By default, we return oldest first, newest last.\n"
}
],
"responses": {
"200": {
"description": "Return the contents of the block with CBOR data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/block_content_txs_cbor"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
"418": {
"$ref": "#/components/responses/418"
},
"429": {
"$ref": "#/components/responses/429"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/blocks/{hash_or_number}/addresses": {
"get": {
"tags": [
Expand Down
70 changes: 70 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,76 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
'/blocks/{hash_or_number}/txs/cbor':
get:
tags:
- Cardano » Blocks
summary: Block transactions with CBOR data
description: >-
Return the transactions within the block, including CBOR
representations.
parameters:
- in: path
name: hash_or_number
required: true
schema:
type: string
format: 64-character case-sensitive hexadecimal string or block number.
description: Hash of the requested block.
example: '4873401'
- in: query
name: count
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 100
description: The number of results displayed on one page.
- in: query
name: page
required: false
schema:
type: integer
minimum: 1
maximum: 21474836
default: 1
description: The page number for listing the results.
- in: query
name: order
required: false
schema:
type: string
enum:
- asc
- desc
default: asc
description: >
Ordered by tx index in the block.

The ordering of items from the point of view of the blockchain,

not the page listing itself. By default, we return oldest first,
newest last.
responses:
'200':
description: Return the contents of the block with CBOR data
content:
application/json:
schema:
$ref: '#/components/schemas/block_content_txs_cbor'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'418':
$ref: '#/components/responses/418'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
'/blocks/{hash_or_number}/addresses':
get:
tags:
Expand Down
5 changes: 4 additions & 1 deletion src/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ paths:
$ref: ./paths/api/blocks/epoch/{epoch_number}/slot/{slot_number}/index.yaml

/blocks/{hash_or_number}/txs:
$ref: ./paths/api/blocks/txs/index.yaml
$ref: ./paths/api/blocks/{hash_or_number}/txs/index.yaml

/blocks/{hash_or_number}/txs/cbor:
$ref: ./paths/api/blocks/{hash_or_number}/txs/cbor.yaml

/blocks/{hash_or_number}/addresses:
$ref: ./paths/api/blocks/addresses/index.yaml
Expand Down
Loading