← Back to all products

Private Tx Relay

$10

Flashbots-compatible relay for submitting private transactions with bundle inclusion guarantees.

📁 12 files
TypeScriptJSONMarkdown

📁 File Structure 12 files

private-tx-relay/ ├── LICENSE ├── README.md ├── package.json ├── security-notes.md ├── src/ │ ├── index.ts │ ├── providers/ │ │ ├── bloxroute.ts │ │ ├── flashbots.ts │ │ └── mev-share.ts │ ├── relay.ts │ └── types/ │ └── relay.ts ├── test/ │ └── relay.test.ts └── tsconfig.json

📖 Documentation Preview README excerpt

Private Transaction Relay

Multi-provider template for submitting transactions via Flashbots Protect, MEV-Share, and bloXroute.

Price: $9.99 | License: MIT


Overview

A TypeScript template for privately submitting Ethereum transactions through multiple relay providers. Supports Flashbots Protect, MEV-Share, and bloXroute with automatic fallback, status tracking, and hint configuration.

Architecture


PrivateTxRelay
      │
      ├──→ FlashbotsProvider  (eth_sendPrivateTransaction)
      ├──→ MEVShareProvider   (mev_sendBundle)
      └──→ BloxrouteProvider  (submit-transaction API)
                │
         Automatic fallback
         Status polling
         Cancellation

Features

  • Multi-provider support (Flashbots, MEV-Share, bloXroute)
  • Automatic provider fallback on failure
  • Configurable MEV-Share hint preferences
  • Transaction status polling and waiting
  • Private transaction cancellation
  • Builder targeting for MEV-Share
  • TypeScript-first with full type safety

Quick Start


npm install
npm run build

import { PrivateTxRelay } from "@cryptoforge/private-tx-relay";

const relay = new PrivateTxRelay({
  provider: "flashbots",
  authSignerKey: process.env.FLASHBOTS_AUTH_KEY!,
});

// Send privately
const result = await relay.send({
  signedTx: signedTransaction,
  maxBlockNumber: currentBlock + 25,
  hints: { txHash: true, logs: true },
});

// Wait for inclusion
const final = await relay.waitForInclusion(result.txHash, 60_000);

*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .ts preview

src/index.ts /** * @cryptoforge/private-tx-relay * * Template for submitting transactions privately via Flashbots Protect, * MEV-Share, and other private transaction relay providers. * * @packageDocumentation */ export { PrivateTxRelay } from "./relay"; export { FlashbotsProvider } from "./providers/flashbots"; export { MEVShareProvider } from "./providers/mev-share"; export { BloxrouteProvider } from "./providers/bloxroute"; export type { RelayConfig, PrivateTxParams, PrivateTxResult, TxStatus, ProviderConfig, HintConfig, } from "./types/relay";
Buy Now — $10 Back to Products