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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Bundler
✓ import { Bundler } from '@biconomy/bundler'
✗ const Bundler = require('@biconomy/bundler')
ESM-only; CommonJS require() will fail. Use dynamic import if needed.
IBundler
✓ import { IBundler } from '@biconomy/bundler'
✗ import { IBundler } from '@biconomy/account'
IBundler is exported from @biconomy/bundler, not the parent package @biconomy/account.
ChainId
✓ import { ChainId } from '@biconomy/core-types'
✗ import { ChainId } from '@biconomy/bundler'
ChainId is in @biconomy/core-types, not in bundler package.
Demonstrates creating a Bundler instance, estimating gas for a UserOperation, sending it, and retrieving receipt/hash.
import { Bundler } from '@biconomy/bundler';
import { ChainId } from '@biconomy/core-types';
const bundler = new Bundler({
bundlerUrl: process.env.BUNDLER_URL ?? '',
chainId: ChainId.POLYGON_MAINNET,
entryPointAddress: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789',
});
async function quickStart() {
try {
// Estimate gas for a UserOperation
const gasEstimate = await bundler.estimateUserOpGas({
sender: '0xYourSmartAccount',
nonce: '0',
initCode: '0x',
callData: '0x',
callGasLimit: '0',
verificationGasLimit: '0',
preVerificationGas: '0',
maxFeePerGas: '0',
maxPriorityFeePerGas: '0',
paymasterAndData: '0x',
signature: '0x',
});
console.log('Gas estimates:', gasEstimate);
// Send a UserOperation (example with dummy fields)
const userOp = {
sender: '0xYourSmartAccount',
nonce: '1',
initCode: '0x',
callData: '0x',
callGasLimit: '100000',
verificationGasLimit: '100000',
preVerificationGas: '50000',
maxFeePerGas: '1000000000',
maxPriorityFeePerGas: '1000000000',
paymasterAndData: '0x',
signature: '0x',
};
const response = await bundler.sendUserOp(userOp);
console.log('UserOp hash:', response.userOpHash);
// Get receipt by hash
const receipt = await bundler.getUserOpReceipt(response.userOpHash);
console.log('Receipt:', receipt);
// Get UserOperation by hash
const op = await bundler.getUserOpByHash(response.userOpHash);
console.log('UserOp:', op);
} catch (error) {
console.error(error);
}
}
quickStart();
Errors
Common errors & fixes
Cannot find module '@biconomy/bundler' or 'ERR_MODULE_NOT_FOUND'
Package not installed or missing dependency.
fixRun 'npm install @biconomy/bundler @biconomy/core-types'.
TypeError: Bundler is not a constructor
Using default import instead of named import (e.g., import Bundler from '@biconomy/bundler').
fixUse named import: import { Bundler } from '@biconomy/bundler'. ChainId is not defined
ChainId is imported from wrong package.
fixImport ChainId from '@biconomy/core-types' (not @biconomy/bundler).
Missing bundlerUrl in configuration
Bundler instantiated without bundlerUrl.
fixProvide a valid bundler URL (e.g., from Biconomy dashboard).
Audit
Dependencies
@biconomy/bundlerrequiredpeer dependency for bundler types and configuration
@biconomy/core-typesrequiredprovides ChainId enum and other core types used in bundler configuration