Integration Guide

Submitting a Bundle

Use eth_sendBundle to submit an atomic group of transactions targeting a specific block:

import requests
from eth_account import Account

EUREKA_RPC = "https://rpc.eurekabuilder.xyz"

def send_bundle(signed_txs: list[str], block_number: int, private_key: str):
    body = {
        "jsonrpc": "2.0",
        "method": "eth_sendBundle",
        "params": [{
            "txs": signed_txs,
            "blockNumber": hex(block_number),
        }],
        "id": 1,
    }

    # Sign the payload with Flashbots-style header
    message = json.dumps(body)
    account = Account.from_key(private_key)
    signature = account.sign_message(encode_defunct(text=message))
    header_value = f"{account.address}:{signature.signature.hex()}"

    response = requests.post(
        EUREKA_RPC,
        json=body,
        headers={"X-Flashbots-Signature": header_value},
    )
    return response.json()

The response includes a bundleHash you can use with eureka_getBundleStats to track inclusion.

Replacing a Bundle

To update a bundle before the target block is built, submit a new bundle with the same replacementUuid:

The builder discards the old bundle and processes the new one.

Cancelling a Bundle

Submitting a Private Transaction

For a single transaction that should be kept private without targeting a specific block:

Bundle Refunds

To receive a portion of the builder's profit back, set refundPercent and refundRecipient:

Use eureka_getBundleRefundInfo to confirm the payout after inclusion.

Allowing Reverts

To prevent a reverting transaction from invalidating the whole bundle, list its hash in revertingTxHashes:

Last updated