> For the complete documentation index, see [llms.txt](https://docs.blinklabs.xyz/blink/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blinklabs.xyz/blink/ethereum/api-reference/eth_gettransactionbyhash.md).

# eth\_getTransactionByHash

Blink intercepts `eth_getTransactionByHash` and resolves it in two steps:

1. The request is forwarded to an Ethereum node. If the node knows the transaction — mined, or sitting in its mempool — that response is returned unchanged.
2. If — and only if — the node returns `null`, Blink checks its own records. If the transaction was submitted through Blink within the last **3 hours** — or the last **96 seconds** if it used revert protection — Blink returns a **synthetic pending response** built from the raw transaction you submitted.

The node always wins. A transaction body or an error from the node is passed through untouched; only a definitive `null` reaches Blink's own store.

`eth_getGaslessTransactionByHash` is an alias for this method and behaves identically.

{% hint style="warning" %}
A transaction still pending more than a minute after submission is almost always either **nonce-blocked** — an earlier nonce from the same sender has not landed yet — or **underpriced** for current network conditions.

Neither is terminal. If the base fee falls or the sender tops up their balance, Blink can still get the transaction on chain inside its retention window — though a revert-protected submission has only 96 seconds of that window, so gas pricing matters more there. We recommend strong nonce management and being generous with the gas price.
{% endhint %}

### Reading the response

| Response                               | Meaning                                                                                                                                                       |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result` with a non-null `blockNumber` | Mined. Comes straight from the node.                                                                                                                          |
| `result` with `blockNumber: null`      | Not mined yet. Either the node's own mempool entry, or a transaction Blink is holding that the node has not seen. It remains includable — see the note above. |
| `result: null`                         | Neither the node nor Blink knows of the transaction within its retention window. See below.                                                                   |

`result: null` does not mean the transaction failed. It covers several distinct situations this method cannot tell apart:

* never submitted, or submitted somewhere other than Blink
* submitted more than 3 hours ago, or more than 96 seconds ago with revert protection
* submitted to Blink and rejected at ingress (in which case your original `eth_sendRawTransaction` call returned an error)
* included and then reorged out
* replaced by another transaction with the same sender and nonce

See [Determining a final outcome](#determining-a-final-outcome) for how to resolve these.

### Submission lifecycle

A transaction submitted through Blink is first offered exclusively to Blink's integrated builders, then submitted more widely for a further set of blocks. It stays eligible for inclusion throughout the 3-hour window.

**Revert protection is the exception.** A revert-protected submission is sent to builders as a bundle targeting a fixed range of upcoming blocks, and is not retried past it — so it is dropped after **96 seconds** rather than staying eligible for 3 hours. From then on this method returns `null` for it.

### The synthetic pending response

When Blink answers from its own records rather than the node, the response is built from the raw transaction bytes you submitted. It is a well-formed transaction object:

* `blockHash`, `blockNumber` and `transactionIndex` are `null`, as for any pending transaction.
* `to` is `null` for contract creation, as for any node response.
* **`v`, `r` and `s` are returned as `0x0`.** Blink deliberately withholds signature values for transactions that have not yet been included — see below.

The remaining fields are decoded from the transaction you submitted. Field-level parity with a node's own response is not guaranteed for a synthetic body; treat the node's response as authoritative once it has one.

#### Why signature values are withheld

A transaction's signature, combined with the other fields, is enough to re-encode the complete signed transaction. If Blink returned real signature values for a transaction still in flight, anyone who learned the hash could reconstruct it and submit it to builders themselves — bypassing the protection you submitted it for, or using it to front-run or sandwich you.

Blink therefore zeroes `v`, `r` and `s` until the transaction is on chain. The fields are still present, so the response keeps the shape a node returns. Once the transaction is mined, the response comes straight from the node and carries the real values.

Every other field is reported faithfully, and the `hash` is the real transaction hash, so you can still match the response to your submission.

### Determining a final outcome

A non-null `blockNumber` is the only positive terminal signal. Wait for your required confirmation depth before treating it as final.

Otherwise:

1. Compare `eth_getTransactionCount(from, "latest")` with your transaction's nonce. A count greater than the nonce means the nonce was consumed by a different transaction, so yours will never land.
2. If the nonce is still free and the transaction is still pending, it is waiting on gas price or on an earlier nonce — see the note at the top. Raising the fee or clearing the blocking nonce resolves it faster than waiting does.
3. Past the retention window — 3 hours, or 96 seconds with revert protection — Blink no longer holds the transaction and returns `null`.

If Blink's own lookup fails, the method returns a JSON-RPC error rather than `null`. Treat an error as "retry the poll", never as "the transaction is gone".

### Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
  ]
}
```

### Example response — pending

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockHash": null,
    "blockNumber": null,
    "transactionIndex": null,
    "chainId": "0x1",
    "from": "0x398137383b3d25c92898c656696e41950e47316b",
    "gas": "0x1d45e",
    "gasPrice": "0x4a817c800",
    "maxFeePerGas": "0x4a817c800",
    "maxPriorityFeePerGas": "0x3b9aca00",
    "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
    "input": "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1",
    "nonce": "0x18",
    "to": "0x1234567890123456789012345678901234567890",
    "type": "0x2",
    "accessList": [],
    "value": "0x1c6bf526340000",
    "v": "0x0",
    "r": "0x0",
    "s": "0x0"
  }
}
```

### Example response — mined

Returned unchanged from the node once the transaction is included.

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "blockNumber": "0x5bad55",
    "transactionIndex": "0x11",
    "chainId": "0x1",
    "from": "0x398137383b3d25c92898c656696e41950e47316b",
    "gas": "0x1d45e",
    "gasPrice": "0x4a817c800",
    "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
    "input": "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1",
    "nonce": "0x18",
    "to": "0x1234567890123456789012345678901234567890",
    "type": "0x2",
    "value": "0x1c6bf526340000",
    "v": "0x1",
    "r": "0x8b7c0d9f0e1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7081920304",
    "s": "0x5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f6071829304a"
  }
}
```
