diff --git a/.github/workflows/sync-apis.yaml b/.github/workflows/sync-apis.yaml
index 294895d4..bcd3749e 100644
--- a/.github/workflows/sync-apis.yaml
+++ b/.github/workflows/sync-apis.yaml
@@ -2284,6 +2284,12 @@ jobs:
working-directory: ./starknet
run: rdme openapi starknet_addDeclareTransaction.yaml --key=$README_API_KEY --id=64406faac2d7740059213a4f
+ - name: Update Starknet API - starknet_getBlockWithReceipts
+ env:
+ README_API_KEY: ${{ secrets.README_API_KEY }}
+ working-directory: ./starknet
+ run: rdme openapi starknet_getBlockWithReceipts.yaml --key=$README_API_KEY --id=6727ed186d9aab001314179d
+
- name: Update Starknet API - starknet_getClassAt
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
diff --git a/components/starknet/schemas.yaml b/components/starknet/schemas.yaml
index 38a3d403..95ac9512 100644
--- a/components/starknet/schemas.yaml
+++ b/components/starknet/schemas.yaml
@@ -312,6 +312,22 @@ BlockBodyWithTxs:
required:
- transactions
+BlockBodyWithReceipts:
+ type: object
+ description: Block body with transactions and receipts
+ properties:
+ transactions:
+ type: array
+ items:
+ $ref: '#/Txn'
+ receipts:
+ type: array
+ items:
+ $ref: '#/TxnReceipt'
+ required:
+ - transactions
+ - receipts
+
BlockHeader:
type: object
properties:
@@ -365,6 +381,18 @@ BlockWithTxs:
- $ref: '#/BlockHeader'
- $ref: '#/BlockBodyWithTxs'
+BlockWithReceipts:
+ title: The block object
+ allOf:
+ - type: object
+ properties:
+ status:
+ $ref: '#/BlockStatus'
+ required:
+ - status
+ - $ref: '#/BlockHeader'
+ - $ref: '#/BlockBodyWithReceipts'
+
PendingBlockWithTxHashes:
title: Pending block object with tx hashes
description: The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.
@@ -400,6 +428,23 @@ PendingBlockWithTxs:
description: The hash of this block's parent
$ref: '#/BlockHash'
+PendingBlockWithReceipts:
+ description: The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.
+ allOf:
+ - $ref: '#/BlockBodyWithReceipts'
+ - type: object
+ properties:
+ timestamp:
+ description: The time in which the block was created, encoded in Unix time
+ type: integer
+ minimum: 0
+ sequencer_address:
+ description: The StarkNet identity of the sequencer submitting this block
+ $ref: '#/Felt'
+ parent_hash:
+ description: The hash of this block's parent
+ $ref: '#/BlockHash'
+
DeployedContractItem:
type: object
properties:
diff --git a/starknet/starknet_getBlockWithReceipts.yaml b/starknet/starknet_getBlockWithReceipts.yaml
new file mode 100644
index 00000000..7bf5574d
--- /dev/null
+++ b/starknet/starknet_getBlockWithReceipts.yaml
@@ -0,0 +1,88 @@
+openapi: 3.1.0
+info:
+ title: starknet_getBlockWithReceipts
+ description: Get block information with full transactions and receipts given the block id
+ version: '1.0'
+servers:
+ - url: 'https://{network}.g.alchemy.com/starknet/version/rpc/{version}/'
+ variables:
+ network:
+ enum:
+ - starknet-mainnet
+ - starknet-sepolia
+ default: starknet-mainnet
+ version:
+ enum:
+ - v0_7
+ - v0.6
+ - v0.5
+ - v0.4
+ default: v0_7
+x-sandbox:
+ category:
+ type:
+ $ref: '../components/sandbox.yaml#/Category'
+ value: core
+paths:
+ /{apiKey}:
+ $ref: '#/components/pathItems/path'
+components:
+ pathItems:
+ path:
+ post:
+ operationId: starknet-getBlockWithReceipts
+ summary: starknet_getBlockWithReceipts
+ description: Get block information with full transactions and receipts given the block id
+ parameters:
+ - name: apiKey
+ in: path
+ schema:
+ type: string
+ default: docs-demo
+ description: |
+
+ For higher throughput, create your own API key
+ required: true
+ requestBody:
+ description: Request Body
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '../evm_body.yaml#/common_request_fields'
+ - type: object
+ properties:
+ method:
+ $ref: ../components/schemas.yaml#/Method
+ default: starknet_getBlockWithTxs
+ params:
+ type: array
+ title: block_id
+ items:
+ $ref: '../components/starknet/schemas.yaml#/BlockId'
+ description: The hash of the requested block, or number (height) of the requested block, or a block tag
+ minItems: 1
+ maxItems: 1
+ x-readme:
+ samples-languages:
+ - curl
+ - javascript
+ - python
+ responses:
+ '200':
+ description: The resulting block information with full transactions
+ content:
+ application/json:
+ schema:
+ allOf:
+ - $ref: '../evm_responses.yaml#/common_response_fields'
+ - type: object
+ properties:
+ result:
+ oneOf:
+ - $ref: '../components/starknet/schemas.yaml#/BlockWithReceipts'
+ - $ref: '../components/starknet/schemas.yaml#/PendingBlockWithReceipts'