{"id":18878,"library":"tx-bundler","title":"tx-bundler","description":"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.","status":"active","version":"0.1.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","blockchain","ethereum","transaction","batch","batch transaction"],"install":[{"cmd":"npm install tx-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add tx-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add tx-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Underlying Ethereum interaction library for RPC, wallet, and transaction building.","package":"ethers","optional":false}],"imports":[{"note":"CommonJS default export is an object, not a function. Named import from object is required.","wrong":"const sendBatchedCoins = require('tx-bundler');","symbol":"sendBatchedCoins","correct":"const { sendBatchedCoins } = require('tx-bundler');"},{"note":"Package does not export ESM; only CommonJS is supported. Default import will fail.","wrong":"import pkg from 'tx-bundler';","symbol":"default","correct":"const pkg = require('tx-bundler');"},{"note":"No .default property; directly destructure from require result.","wrong":"const { sendBatchedCoins } = require('tx-bundler').default;","symbol":"sendBatchedCoins","correct":"const pkg = require('tx-bundler'); const { sendBatchedCoins } = pkg;"}],"quickstart":{"code":"const { sendBatchedCoins } = require('tx-bundler');\nconst RPC_URL = process.env.RPC_URL ?? 'https://sepolia.infura.io/v3/YOUR-PROJECT-ID';\nconst recipients = ['0xRecipient1...', '0xRecipient2...'];\nconst amounts = [0.001, 0.002];\nconst privateKey = process.env.PRIVATE_KEY ?? '';\nasync function main() {\n  const txHash = await sendBatchedCoins(RPC_URL, recipients, amounts, privateKey);\n  console.log('Batch transaction hash:', txHash);\n}\nmain().catch(console.error);","lang":"javascript","description":"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."},"warnings":[{"fix":"Wait for future versions that support mainnet or use an alternative batch transaction solution.","message":"The package only works on Sepolia testnet. Mainnet and other chains are not supported.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use only when sending multiple transfers in one go. For single transfers, use direct ETH transfer.","message":"Batching only saves gas when sending many transactions (e.g., dozens). For a single transaction, it costs more due to overhead.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require() in Node.js. For ESM projects, use dynamic import() or wait for an ESM update.","message":"The package does not export ESM; only CommonJS require() works. Using import may cause errors.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.1.2':28 'activ':31 'amount':68 'batch':10,94,95 'blockchain':91 'bundl':40 'bundler':3 'cadenc':86 'call':45 'chain':55 'coin':46 'cost':18 'current':26 'develop':32 'differenti':58 'econom':80 'eth':44 'ethereum':12,92 'exchang':20 'gas':17 'high':23 'high-volum':22 'javascript':90 'key':57,72 'level':7 'librari':8 'list':67 'multipl':11,48 'mvp':6 'mvp-level':5 'nativ':43 'on-chain':53 'one':15 'privat':71 'product':76 'production-readi':75 'provid':62 'publish':85 'readi':77 'recipi':49,66 'reduc':16 'rpc':64 'sender':25 'sepolia':37 'simplic':60 'singl':52,82 'support':35,89 'testnet':38 'transact':13,56,93,96 'transfer':41,83 'tx':2 'tx-bundler':1 'typescript':88 'url':65 'version':27 'volum':24 'yet':74","created_at":"2026-04-25T07:40:36.469787+00:00","updated_at":"2026-04-25T07:40:36.469787+00:00","problems":[{"fix":"Use const { sendBatchedCoins } = require('tx-bundler');","cause":"Incorrect import: using default import from CommonJS module.","error":"TypeError: pkg.sendBatchedCoins is not a function"},{"fix":"Ensure the sending account has sufficient ETH on Sepolia (or use a faucet).","cause":"The account does not have enough ETH to cover the batched transfers and gas.","error":"Error: insufficient funds for gas * price + value"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/tx-bundler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}