diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index c415e46..8a4fc86 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -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", @@ -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", @@ -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.", @@ -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",