{"id":18448,"library":"jaskaran-bundler","title":"@biconomy/bundler","description":"Biconomy Bundler is a TypeScript library for interacting with ERC-4337 bundler nodes. It provides methods to estimate gas, send UserOperations, and fetch receipts/hashes. Current version 4.6.2 (actively maintained, frequent releases). Key differentiator: part of the Biconomy Smart Account ecosystem, integrates seamlessly with Biconomy paymasters and relayer services. Supports multiple EVM chains and provides a standardized IBundler interface.","status":"active","version":"0.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/bcnmy/biconomy-client-sdk","tags":["javascript","Ethereum","Bundler","Relayer","ERC4337","Gasless Transaction","Biconomy","SDK","typescript"],"install":[{"cmd":"npm install jaskaran-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add jaskaran-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add jaskaran-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for bundler types and configuration","package":"@biconomy/bundler","optional":false},{"reason":"provides ChainId enum and other core types used in bundler configuration","package":"@biconomy/core-types","optional":false}],"imports":[{"note":"ESM-only; CommonJS require() will fail. Use dynamic import if needed.","wrong":"const Bundler = require('@biconomy/bundler')","symbol":"Bundler","correct":"import { Bundler } from '@biconomy/bundler'"},{"note":"IBundler is exported from @biconomy/bundler, not the parent package @biconomy/account.","wrong":"import { IBundler } from '@biconomy/account'","symbol":"IBundler","correct":"import { IBundler } from '@biconomy/bundler'"},{"note":"ChainId is in @biconomy/core-types, not in bundler package.","wrong":"import { ChainId } from '@biconomy/bundler'","symbol":"ChainId","correct":"import { ChainId } from '@biconomy/core-types'"}],"quickstart":{"code":"import { Bundler } from '@biconomy/bundler';\nimport { ChainId } from '@biconomy/core-types';\n\nconst bundler = new Bundler({\n  bundlerUrl: process.env.BUNDLER_URL ?? '',\n  chainId: ChainId.POLYGON_MAINNET,\n  entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',\n});\n\nasync function quickStart() {\n  try {\n    // Estimate gas for a UserOperation\n    const gasEstimate = await bundler.estimateUserOpGas({\n      sender: '0xYourSmartAccount',\n      nonce: '0',\n      initCode: '0x',\n      callData: '0x',\n      callGasLimit: '0',\n      verificationGasLimit: '0',\n      preVerificationGas: '0',\n      maxFeePerGas: '0',\n      maxPriorityFeePerGas: '0',\n      paymasterAndData: '0x',\n      signature: '0x',\n    });\n    console.log('Gas estimates:', gasEstimate);\n\n    // Send a UserOperation (example with dummy fields)\n    const userOp = {\n      sender: '0xYourSmartAccount',\n      nonce: '1',\n      initCode: '0x',\n      callData: '0x',\n      callGasLimit: '100000',\n      verificationGasLimit: '100000',\n      preVerificationGas: '50000',\n      maxFeePerGas: '1000000000',\n      maxPriorityFeePerGas: '1000000000',\n      paymasterAndData: '0x',\n      signature: '0x',\n    };\n    const response = await bundler.sendUserOp(userOp);\n    console.log('UserOp hash:', response.userOpHash);\n\n    // Get receipt by hash\n    const receipt = await bundler.getUserOpReceipt(response.userOpHash);\n    console.log('Receipt:', receipt);\n\n    // Get UserOperation by hash\n    const op = await bundler.getUserOpByHash(response.userOpHash);\n    console.log('UserOp:', op);\n  } catch (error) {\n    console.error(error);\n  }\n}\n\nquickStart();","lang":"typescript","description":"Demonstrates creating a Bundler instance, estimating gas for a UserOperation, sending it, and retrieving receipt/hash."},"warnings":[{"fix":"Update import to @biconomy/bundler.","message":"v4.0.0 moved Bundler class from @biconomy/account to @biconomy/bundler package.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Omit entryPointAddress or call bundler.getSupportedEntryPoints() for list.","message":"entryPointAddress in Bundler config is deprecated in v4.2.0+; use getSupportedEntryPoints() to fetch dynamically.","severity":"deprecated","affected_versions":">=4.2.0"},{"fix":"Ensure you pass at minimum sender, nonce, initCode, callData, and signature (can be dummy).","message":"estimateUserOpGas requires a 'partial' UserOperation without gas limits; omitting fields may cause errors.","severity":"gotcha","affected_versions":"*"},{"fix":"Use import or dynamic import() in CommonJS.","message":"The Bundler is ESM-only; using require() throws 'ERR_REQUIRE_ESM'.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install @biconomy/bundler @biconomy/core-types'.","cause":"Package not installed or missing dependency.","error":"Cannot find module '@biconomy/bundler' or 'ERR_MODULE_NOT_FOUND'"},{"fix":"Use named import: import { Bundler } from '@biconomy/bundler'.","cause":"Using default import instead of named import (e.g., import Bundler from '@biconomy/bundler').","error":"TypeError: Bundler is not a constructor"},{"fix":"Import ChainId from '@biconomy/core-types' (not @biconomy/bundler).","cause":"ChainId is imported from wrong package.","error":"ChainId is not defined"},{"fix":"Provide a valid bundler URL (e.g., from Biconomy dashboard).","cause":"Bundler instantiated without bundlerUrl.","error":"Missing bundlerUrl in configuration"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}