# Bundle API

**eth\_sendBundleCrossRollup**

Send bundles to builders.

\
Request:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundleCrossRollup",
  "params": [
    {
      txs,               // HashMap[String, String], This contains a mapping of signed transactions alonside their corresponding chainIds which we want to execute in an atomic bundle.
      blockNumbers,       // HashMap[String, String], This contains a mapping of chainIds alongside the corresponding hex encoded block number which this bundle will be valid on.  
      minTimestamp,      // (Optional) Number, the minimum timestamp for which this bundle is valid, in seconds since the unix epoch
      maxTimestamp,      // (Optional) Number, the maximum timestamp for which this bundle is valid, in seconds since the unix epoch
      revertingTxHashes, // (Optional) Array[String], A list of tx hashes that are allowed to revert
      replacementUuid,   // (Optional) String, UUID that can be used to cancel/replace this bundle
    }
  ]
}
```

Response:

```
{
  "jsonrpc": "2.0",
  "id": "123",
  "result": {
    "bundleHash": "0x2228f5d8954ce31dc1601a8ba264dbd401bf1428388ce88238932815c5d6f23f"
  }
}
```

**eth\_callBundleCrossRollup**

Test a bundle’s validity across multiple rollups for specific block numbers on the given rollups.

Request:&#x20;

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundleCrossRollup",
  "params": [
    {
     txs,               // HashMap[String, String], This contains a mapping of signed transactions alonside their corresponding chainIds which we want to execute in an atomic bundle.
      blockNumbers,       // HashMap[String, String], This contains a mapping of chainIds alongside the corresponding hex encoded block number which this bundle will be valid on.  
stateBlockNumbers,       // HashMap[String, String], This contains a mapping of chainIds alongside the corresponding hex encoded block number or a block tag for which state to base this simulation on. Can use "latest"
      timestamp,         // (Optional) Number, the timestamp to use for this bundle simulation, in seconds since the unix epoch
    }
  ]
}
```

Response:

```
{
  "jsonrpc": "2.0",
  "id": "123",
  "result": [
    {
      "chain": "optimism",
      "data": {
        "bundleGasPrice": "543210543210",
        "bundleHash": "0xa1b2c3d4e5f678901234567890abcdef1234567890abcdef1234567890abcd12",
        "coinbaseDiff": "15000000000150000",
        "ethSentToCoinbase": "15000000000000000",
        "gasFees": "95000",
        "results": [
          {
            "coinbaseDiff": "7500000000085000",
            "ethSentToCoinbase": "7500000000000000",
            "fromAddress": "0x987654321aefcda0123456789abcdef987654321",
            "gasFees": "47500",
            "gasPrice": "543210543210",
            "gasUsed": 19000,
            "toAddress": "0xabcdef1234567890abcdef9876543210abcdef12",
            "txHash": "0xbbccddee112233445566778899aabbccddeeff00112233445566778899aabbcc",
            "value": "0x"
          },
          {
            "coinbaseDiff": "7500000000085000",
            "ethSentToCoinbase": "7500000000000000",
            "fromAddress": "0x123456789abcdef0123456789abcdef123456789",
            "gasFees": "47500",
            "gasPrice": "543210543210",
            "gasUsed": 19000,
            "toAddress": "0x1234567890abcdef1234567890abcdef12345678",
            "txHash": "0x112233445566778899aabbccddeeff00bbccddee112233445566778899aabbcc",
            "value": "0x"
          }
        ],
        "stateBlockNumber": 6221595,
        "totalGasUsed": 38000
      }
    },
    {
      "chain": "polygon",
      "data": {
        "bundleGasPrice": "987654321987",
        "bundleHash": "0xdecaf0123456789abcdef0123456789abcdef0123456789abcdef0123456789",
        "coinbaseDiff": "25000000000250000",
        "ethSentToCoinbase": "25000000000000000",
        "gasFees": "152000",
        "results": [
          {
            "coinbaseDiff": "12500000000125000",
            "ethSentToCoinbase": "12500000000000000",
            "fromAddress": "0xfe0123456789abcdef9876543210abcdef987654",
            "gasFees": "76000",
            "gasPrice": "987654321987",
            "gasUsed": 23000,
            "toAddress": "0x01abcdef9876543210abcdef0123456789abcdef",
            "txHash": "0x123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01",
            "value": "0x"
          },
          {
            "coinbaseDiff": "12500000000125000",
            "ethSentToCoinbase": "12500000000000000",
            "fromAddress": "0xabcdef0123456789abcdef9876543210abcdef9876",
            "gasFees": "76000",
            "gasPrice": "987654321987",
            "gasUsed": 23000,
            "toAddress": "0x9876543210abcdef9876543210abcdef01234567",
            "txHash": "0xabcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789",
            "value": "0x"
          }
        ],
        "stateBlockNumber": 7221605,
        "totalGasUsed": 46000
      }
    }
  ]
}
```

**eth\_cancelBundleCrossRollup**

Prevents a submitted bundle from being included in a chunk that is sent to Baton and included on-chain. <br>

Request:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_cancelBundleCrossRollup",
  "params": [
    {
      replacementUuid, // UUIDv4 to uniquely identify submission
    }
  ]
}
```

NodeKit is backwards compatible with most Flashbots MEV APIs like eth\_callBundle, eth\_sendBundle, and eth\_cancelBundle. To submit to these bundles you must specify which chainId you wish to use the bundle method on using the request header.

Example Request:

```
curl -H 'X-Chain-ID: optimism' -d '{"jsonrpc":"2.0","method":"eth_callBundle","params":[],"id":1}' localhost:8080
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nodekit.gitbook.io/nodekit-documentation/builders-guide/javelin/bundle-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
