From 4c2dca9b2fb62c41d4cfaeadc96f29c29dec4c53 Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Wed, 30 Mar 2022 21:34:44 +0200 Subject: [PATCH] docs for eth_sendPrivateTransaction --- .../searchers/advanced/rpc-endpoint.mdx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/flashbots-auction/searchers/advanced/rpc-endpoint.mdx b/docs/flashbots-auction/searchers/advanced/rpc-endpoint.mdx index 1150482f..34be265c 100644 --- a/docs/flashbots-auction/searchers/advanced/rpc-endpoint.mdx +++ b/docs/flashbots-auction/searchers/advanced/rpc-endpoint.mdx @@ -181,6 +181,34 @@ example response: } ``` +### eth_sendPrivateTransaction + +The `eth_sendPrivateTransaction` JSON-RPC method is used to send a single transaction for inclusion while staying private. See https://docs.flashbots.net/flashbots-protect/overview for more information. + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_sendPrivateTransaction", + "params": [ + { + "tx": "0x123...", // raw signed tx + "maxBlockNumber": "0xcd23a0", // optional, after this block, the tx is thrown away. If greater than 25 blocks in the future, then it will be silently clamped to current+25. + "preferences": { "fast": true } // optional, see https://docs.flashbots.net/flashbots-protect/rpc/fast-mode + } + ] +} +``` + +example response: +```json +{ + "jsonrpc": "2.0", + "id": "123", + "result": "0x111..." // tx-hash +} +``` + ### Authentication To authenticate your request, the relay requires you sign the payload and include the signed payload in the `X-Flashbots-Signature` header of your request.