Skip to content

Commit

Permalink
Merge pull request #189 from starkware-libs/block_with_receipts
Browse files Browse the repository at this point in the history
Add getBlockWithReceipts method (#189)
  • Loading branch information
ArielElp authored Feb 2, 2024
2 parents 37d35b4 + 75f9c2f commit 553a65e
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,43 @@
}
]
},
{
"name": "starknet_getBlockWithReceipts",
"summary": "Get block information with full transactions and receipts given the block id",
"params": [
{
"name": "block_id",
"description": "The hash of the requested block, or number (height) of the requested block, or a block tag",
"required": true,
"schema": {
"title": "Block id",
"$ref": "#/components/schemas/BLOCK_ID"
}
}
],
"result": {
"name": "result",
"description": "The resulting block information with full transactions",
"schema": {
"title": "Starknet get block with txs and receipts result",
"oneOf": [
{
"title": "Block with transactions",
"$ref": "#/components/schemas/BLOCK_WITH_RECEIPTS"
},
{
"title": "Pending block with transactions",
"$ref": "#/components/schemas/PENDING_BLOCK_WITH_RECEIPTS"
}
]
}
},
"errors": [
{
"$ref": "#/components/errors/BLOCK_NOT_FOUND"
}
]
},
{
"name": "starknet_getStateUpdate",
"summary": "Get the information about the result of executing the requested block",
Expand Down Expand Up @@ -1372,6 +1409,42 @@
"transactions"
]
},
"BLOCK_BODY_WITH_RECEIPTS": {
"title": "Block body with transactions and receipts",
"type": "object",
"properties": {
"transactions": {
"title": "Transactions",
"description": "The transactions in this block",
"type": "array",
"items": {
"title": "transactions in block",
"type": "object",
"allOf": [
{
"title": "transaction",
"$ref": "#/components/schemas/TXN"
},
{
"type": "object",
"properties": {
"receipt": {
"title": "receipt",
"$ref": "#/components/schemas/TXN_RECEIPT"
}
},
"required": [
"receipt"
]
}
]
}
}
},
"required": [
"transactions"
]
},
"BLOCK_HEADER": {
"title": "Block header",
"type": "object",
Expand Down Expand Up @@ -1542,6 +1615,33 @@
}
]
},
"BLOCK_WITH_RECEIPTS": {
"title": "Block with transactions and receipts",
"description": "The block object",
"allOf": [
{
"title": "block with txs",
"type": "object",
"properties": {
"status": {
"title": "Status",
"$ref": "#/components/schemas/BLOCK_STATUS"
}
},
"required": [
"status"
]
},
{
"title": "Block header",
"$ref": "#/components/schemas/BLOCK_HEADER"
},
{
"title": "Block body with transactions and receipts",
"$ref": "#/components/schemas/BLOCK_BODY_WITH_RECEIPTS"
}
]
},
"PENDING_BLOCK_WITH_TX_HASHES": {
"title": "Pending block with transaction hashes",
"description": "The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.",
Expand Down Expand Up @@ -1570,6 +1670,20 @@
}
]
},
"PENDING_BLOCK_WITH_RECEIPTS": {
"title": "Pending block with transactions and receipts",
"description": "The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.",
"allOf": [
{
"title": "Block body with transactions and receipts",
"$ref": "#/components/schemas/BLOCK_BODY_WITH_RECEIPTS"
},
{
"title": "Pending block header",
"$ref": "#/components/schemas/PENDING_BLOCK_HEADER"
}
]
},
"DEPLOYED_CONTRACT_ITEM": {
"title": "Deployed contract item",
"type": "object",
Expand Down

0 comments on commit 553a65e

Please sign in to comment.