TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BlockRazorinc/docs_en/llms.txt
Use this file to discover all available pages before exploring further.
eth_sendPrivateTransaction method routes a signed transaction directly to BlockRazor’s Block Builder without broadcasting it to the public BSC mempool. Because the transaction never appears in the public pending transaction pool, malicious bots and MEV searchers cannot detect, front-run, or sandwich it before it is included in a block. This makes private transaction submission essential for any workflow where transaction visibility before confirmation creates risk—including large swaps, liquidations, and time-sensitive arbitrage.
New registered users can submit private transactions to the Block Builder on BSC for free with no submission-rate limits. Sign up at https://blockrazor.io to get started immediately.
Why Private Submission Matters
When a transaction is sent via a standard RPC node, it is broadcast to the public mempool where every participant on the network can observe it. Automated bots continuously monitor the mempool and can:- Front-run your transaction by submitting an identical or competing transaction with a higher gas price.
- Sandwich attack your swap by inserting buy and sell transactions around yours to extract value at your expense.
eth_sendPrivateTransaction, your transaction bypasses the public mempool entirely and travels through a private channel directly to BlockRazor’s Block Builder. It is only revealed on-chain once it has been included in a confirmed block.
Request Format
Send a standard JSON-RPC 2.0POST request with the method eth_sendPrivateTransaction.
Parameters
The fully signed, RLP-encoded raw transaction hex string, prefixed with
0x. This is the same format as used with eth_sendRawTransaction on a standard RPC node.Optional. The maximum block number (hexadecimal) up to which the Block Builder will attempt to include the transaction. If the transaction has not been included by this block, it is dropped. Omit this field to allow the Block Builder to attempt inclusion over its default window.
Response Format
A successful call returns the transaction hash, which can be used to monitor inclusion status on-chain.The keccak256 hash of the submitted transaction. Use this hash to poll
eth_getTransactionReceipt and confirm on-chain inclusion.Example Integration
- JavaScript (fetch)
- cURL
Integration Guide
Build and sign your transaction
Construct your transaction off-chain using your preferred library (ethers.js, web3.js, viem, etc.) and sign it with your private key. The result is a hex-encoded raw transaction string.
Determine your maxBlockNumber
Query
eth_blockNumber to get the current chain head, then set maxBlockNumber to a future block that gives the Block Builder enough time to include the transaction—typically currentBlock + 5 to currentBlock + 20 depending on urgency.Submit via eth_sendPrivateTransaction
POST the JSON-RPC payload to the BlockRazor Block Builder endpoint with your API key in the
Authorization header.Unlike
eth_sendBundle, a private transaction does not need to be grouped with other transactions. Use it whenever you have a single transaction that must remain invisible to the mempool before confirmation.