Registry / web-framework / tx-bundler

tx-bundler

JSON →
library0.1.2jsnpmunverified

An MVP-level library for batching multiple Ethereum transactions into one, reducing gas costs for exchanges and high-volume senders. Current version 0.1.2 is in active development and only supports the Sepolia testnet. It bundles transfers of native ETH (called coins) to multiple recipients in a single on-chain transaction. Key differentiator is simplicity: just provide an RPC URL, recipient list, amounts, and a private key. Not yet production-ready and not economical for single transfers. No published cadence; no TypeScript support.

npm install tx-bundler
INSTALL
IMPORT
SIG · TX-BUNDLER
T
tx-bundler
web-frameworkjavascriptv0.1.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sendBatchedCoins
✓ const { sendBatchedCoins } = require('tx-bundler');
✗ const sendBatchedCoins = require('tx-bundler');
CommonJS default export is an object, not a function. Named import from object is required.
default
✓ const pkg = require('tx-bundler');
✗ import pkg from 'tx-bundler';
Package does not export ESM; only CommonJS is supported. Default import will fail.
sendBatchedCoins
✓ const pkg = require('tx-bundler'); const { sendBatchedCoins } = pkg;
✗ const { sendBatchedCoins } = require('tx-bundler').default;
No .default property; directly destructure from require result.

Demonstrates sending a batched ETH transfer to two recipients on Sepolia testnet using an Infura RPC URL and a private key. Requires ethers as a peer dependency.

const { sendBatchedCoins } = require('tx-bundler'); const RPC_URL = process.env.RPC_URL ?? 'https://sepolia.infura.io/v3/YOUR-PROJECT-ID'; const recipients = ['0xRecipient1...', '0xRecipient2...']; const amounts = [0.001, 0.002]; const privateKey = process.env.PRIVATE_KEY ?? ''; async function main() { const txHash = await sendBatchedCoins(RPC_URL, recipients, amounts, privateKey); console.log('Batch transaction hash:', txHash); } main().catch(console.error);
Debug
Known issues
breakingThe package only works on Sepolia testnet. Mainnet and other chains are not supported.
fix
Wait for future versions that support mainnet or use an alternative batch transaction solution.
affects: >=0.0.0
gotchaBatching only saves gas when sending many transactions (e.g., dozens). For a single transaction, it costs more due to overhead.
fix
Use only when sending multiple transfers in one go. For single transfers, use direct ETH transfer.
affects: >=0.0.0
gotchaThe package does not export ESM; only CommonJS require() works. Using import may cause errors.
fix
Use require() in Node.js. For ESM projects, use dynamic import() or wait for an ESM update.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: pkg.sendBatchedCoins is not a function
Incorrect import: using default import from CommonJS module.
fix
Use const { sendBatchedCoins } = require('tx-bundler');
Error: insufficient funds for gas * price + value
The account does not have enough ETH to cover the batched transfers and gas.
fix
Ensure the sending account has sufficient ETH on Sepolia (or use a faucet).
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
ethersrequiredUnderlying Ethereum interaction library for RPC, wallet, and transaction building.
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources
tx-bundler — npm install tx-bundler · libregistry