Skip to content

Commit

Permalink
spec(send beta bundle): fixup openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha authored Jun 9, 2024
1 parent c0b466e commit 0ad7318
Showing 1 changed file with 87 additions and 57 deletions.
144 changes: 87 additions & 57 deletions mev_sendbetabundle/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,62 @@
openapi: 3.0.0
info:
title: MEV Send Beta Bundle API
description: API for submitting transaction bundles for MEV purposes on Ethereum.
version: "1.0.0"
servers:
- url: https://holesky-api.securerpc.com/v2
description: Testnet Server for MEV Send Beta Bundle

title: MEV Send Beta Bundle Method
description: OpenAPI specification for the `mev_sendBetaBundle` JSON-RPC method.
version: 1.0.0
paths:
/:
/mev_sendBetaBundle:
post:
tags:
- MEV Bundle Submission
summary: Submit a bundle of transactions to be included in a specific block.
description: >
This endpoint allows for the submission of a set of transactions as a bundle for inclusion in a specific block. It is designed for transactions that are not priority-sensitive. Transactions that exceed the block's gas limit will be dropped in the order they are listed, allowing for partial fulfillment of the bundle.
operationId: mev_sendBetaBundle
summary: Submits a set of transactions as a bundle to be included in a specific block.
description: |
This method allows the submission of a bundle of transactions to be included in a specific block.
It is designed for transactions that do not require priority ordering within the block.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MevSendBetaBundleRequest'
$ref: '#/components/schemas/JsonRpcRequest'
responses:
'200':
description: Successful operation
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/MevSendBetaBundleResponse'
$ref: '#/components/schemas/JsonRpcResponse'
'400':
description: Bad request due to missing required fields, invalid slot, or transaction format.
'401':
description: Unauthorized, typically if the transaction originator does not have a corresponding call option for the slot.
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/JsonRpcError'
'500':
description: Internal server error indicating a problem with the server.

description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/JsonRpcError'
components:
schemas:
MevSendBetaBundleRequest:
JsonRpcRequest:
type: object
required:
- jsonrpc
- method
- params
- id
properties:
jsonrpc:
type: string
description: JSON-RPC protocol version, should always be "2.0".
example: "2.0"
enum: ['2.0']
description: JSON-RPC version
example: '2.0'
method:
type: string
description: The JSON-RPC method name, for this operation it should be "mev_sendBetaBundle".
example: "mev_sendBetaBundle"
enum: ['mev_sendBetaBundle']
description: JSON-RPC method name
example: 'mev_sendBetaBundle'
params:
type: array
description: An array containing a single object with the transaction bundle details.
items:
type: object
required:
Expand All @@ -60,47 +65,72 @@ components:
properties:
txs:
type: array
description: An array of raw transactions (as hex strings) to be included in the bundle.
description: Array of raw transactions (as hex strings) to be included in the bundle.
items:
type: string
description: A single raw transaction as a hex string.
description: Raw transaction data as a hex string
example: '0xf86c808504a817c80082520894f5d3f722b63b9d4a4ff8f37b8213e544d2bde95580b844a9059cbb000000000000000000000000bcd4042de499d14e55001ccbb24a551f3b954096000000000000000000000000000000000000000000000000000000000000000001ca0e1fd7a794b59ad58e77c6d0e08b17e6e9893d6c600c1f24a19a34b02c9e4bc8a065c0b9c5b41baf9478d2e2e42ac20ff2c0a8e091d7a9b80ff20f08c16964a1a'
slot:
type: string
description: The target block number as a string for the bundle to be included.
description: The block number at which the bundle should be included.
example: '1001'
id:
type: integer
description: A unique identifier for the JSON-RPC request.
description: Unique identifier for the request
example: 8
MevSendBetaBundleResponse:
JsonRpcResponse:
type: object
required:
- jsonrpc
- result
- id
properties:
jsonrpc:
type: string
description: JSON-RPC protocol version, echoed back from the request.
example: "2.0"
method:
type: string
description: The JSON-RPC method name, echoed back from the request.
example: "mev_sendBetaBundle"
params:
type: array
description: An array containing a single object with the transaction bundle details, echoed back from the request.
items:
type: object
required:
- txs
- slot
properties:
txs:
type: array
description: An array of raw transactions (as hex strings) included in the bundle, echoed back from the request.
items:
type: string
description: A single raw transaction as a hex string, echoed back.
slot:
enum: ['2.0']
description: JSON-RPC version
example: '2.0'
result:
type: object
properties:
txs:
type: array
items:
type: string
description: The target block number as a string for the bundle to be included, echoed back.
description: Raw transaction data as a hex string
example: '0xf86c808504a817c80082520894f5d3f722b63b9d4a4ff8f37b8213e544d2bde95580b844a9059cbb000000000000000000000000bcd4042de499d14e55001ccbb24a551f3b954096000000000000000000000000000000000000000000000000000000000000000001ca0e1fd7a794b59ad58e77c6d0e08b17e6e9893d6c600c1f24a19a34b02c9e4bc8a065c0b9c5b41baf9478d2e2e42ac20ff2c0a8e091d7a9b80ff20f08c16964a1a'
slot:
type: string
description: The block number at which the bundle should be included
example: '1001'
id:
type: integer
description: Unique identifier for the request
example: 8
JsonRpcError:
type: object
required:
- jsonrpc
- error
- id
properties:
jsonrpc:
type: string
enum: ['2.0']
description: JSON-RPC version
example: '2.0'
error:
type: object
properties:
code:
type: integer
description: Error code
example: -32000
message:
type: string
description: Error message
example: 'Invalid slot. The transaction originator does not have a corresponding call option for the specified slot.'
id:
type: integer
description: A unique identifier for the JSON-RPC request, echoed back.
description: Unique identifier for the request
example: 8

0 comments on commit 0ad7318

Please sign in to comment.