# MEVBlocker Compatible (V2)

During the initial development of Blink, searchers will need to be onboarded for access. Searchers should reach out to <contact@blinklabs.xyz> or @YNBlink / @ciaranmcveigh on telegram or discord for access.

The V2 WebSocket is designed for ease of integration. It uses the MEVBlocker Schema meaning if you have integrated with MEVBlocker no code changes are required for you to search on Blink's order flow.

## Connecting to Blink's WebSocket

You can connect to Blink's WebSocket via `wss://ethauction.blinklabs.xyz/ws/v2/{$API_KEY}`.

As soon as you connect to the WebSocket transactions will sent over that connection.

### eth\_subscribe

Unlike MEVBlocker you **DO NOT** need to write `eth_subscribe` to the WebSocket to begin receiving transactions. However, if you do the system is set up to handle that request.

```
{"method":"eth_subscribe","params": ["mevblocker_partialPendingTransactions"]}
```

OR

```
{"method":"eth_subscribe","params": ["blink_partialPendingTransactions"]}
```

It will respond with the following dummy value.

```
{"jsonrpc": "2.0", "id": 1, "result": "0x00000000000000000000000000000000"}
```

### eth\_subscription

Once connected transactions will be sent through in the `eth_subscription` format.

```
{
    "jsonrpc": "2.0", 
    "method": "eth_subscription", 
    "params": {
        "subscription": "0xd58bbbc0f5190962eff01b6f0ec17724", 
        "result": {
            "chainId": "0x1", 
            "to": "0x6215589d293fdf52886484f46f0d6a11c76b4a7e", 
            "value": "0x4fefa17b724000", 
            "data": "0x", 
            "accessList": [], 
            "nonce": "0x10", 
            "maxPriorityFeePerGas": "0x0", 
            "maxFeePerGas": "0x7e1c65b04", 
            "gas": "0x5208", 
            "type": "0x2", 
            "hash": "0x5f08dd372fce1a44dda27bed60ca036acb4979fad6ca37b9c388e351a870fe4c", 
            "from": "0xcb1588f3f7e92a1278c68a6aed4bdcbc68534b29"
        }
    }
}
```

Note there is an option for originators to obfuscate the "from" value.

### eth\_sendBundle

Bundles can be sent via the WebSocket or via HTTP. Both follow the same format where the target transaction is referenced by the 32-byte transaction hash.

```
{ 
    "jsonrpc": "2.0", 
    "id": 1, 
    "method": "eth_sendBundle", 
    "params": [ 
        { 
            "txs": [ 
                "0xfec1700ef24c9ff6fd2e07584a16bbb2fec1700ef24c9ff6fd2e07584a16bbb2", // this is the 32-byte transaction hash of the target transaction 
                "0xabc123.." // this is your signed encoded transaction
            ], 
            "blockNumber": "0xb63dcd"
        } 
    ]
}
```

All optional fields are also accepted.

```go
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundle",
  "params": [
    {
      txs,               
      blockNumber,       // String, a hex encoded block number for which this bundle is 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) Canonical UUID string (RFC 4122); used to cancel/replace this bundle
    }
  ]
}
```

#### WebSocket Submission

WebSocket submission occurs on the `wss://ethauction.blinklabs.xyz/ws/v2/{$API_KEY}` endpoint. A JSON RPC response will be written back to the WebSocket with either the bundle hash or an error.

*Bundle Hash*

```
{
    "id": 1,
    "result": {
        "bundleHash": "0xdb70096987a1b5cf11358ef5b5c3de14faf596d102b1fad2e94b6f249c139bf3"
    },
    "jsonrpc": "2.0"
}
```

*Error*

```
{
    "id": 1,
    "error": {
        "code": 0,
        "message": "error getting transaction in auction"
    },
    "jsonrpc": "2.0"
}
```

#### HTTP Submission

HTTP submission occurs on the `https://ethauction.blinklabs.xyz/v1/${API_KEY}` endpoint. A bundle hash will be returned in the response.

```
{
    "id": 1,
    "result": {
        "bundleHash": "0xdb70096987a1b5cf11358ef5b5c3de14faf596d102b1fad2e94b6f249c139bf3"
    },
    "jsonrpc": "2.0"
}
```

#### Builders

Blink currently sends bundles to builder who have bundle refund mechanisms in place, specifically the `refundPercent` & `refundRecipient` flags on their `eth_sendBundle` endpoint. These include,

* Builder0x69
* BeaverBuild
* Rsync
* Titan
* Flashbots (via mev\_sendBundle)


---

# 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://docs.blinklabs.xyz/blink/ethereum/searchers/integration/listen-to-transactions/mevblocker-compatible-v2.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.
