Abstraxn Bundler package to interact with any bundler node as per ERC4337 standard
npm install @abstraxn/bundlerIn the realm of ERC-4337, the role of a bundler is paramount within the infrastructure. This fundamental concept is indispensable for the seamless operation of account abstraction across all networks leveraging the Ethereum Virtual Machine (EVM). Bundlers serve as key orchestrators, facilitating the aggregation and management of transactions, thereby enhancing the efficiency and effectiveness of the account abstraction paradigm.
Using npm package manager
``bash`
npm i @abstraxn/bundler
OR
Using yarn package manager
`bash`
yarn add @abstraxn/bundler
| Key | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| bundlerUrl | Represent ERC4337 spec implemented bundler url. you can get one from abstraxn dashboard. Alternatively you can supply any of your preferred |
| chainId | This represents the network your smart wallet transactions will be conducted on. Take a look following Link for supported chain id's |
| entryPointAddress | Since entrypoint can have different addresses you can call getSupportedEntryPoints() on bundler instance for supported addresses list |
`typescript
// This is how you create bundler instance in your dapp's
import { IBundler, Bundler } from "@abstraxn/bundler";
// Make use of core-types package
import { ChainId } from "@abstraxn/core-types";
const bundler: IBundler = new Bundler({
bundlerUrl: "",
chainId: ChainId.POLYGON_MAINNET,
entryPointAddress: "",
});
`
Following are the methods that can be call on bundler instance
`typescript``
export interface IBundler {
estimateUserOpGas(userOp: Partial
sendUserOp(userOp: UserOperation): Promise
getUserOpReceipt(userOpHash: string): Promise
getUserOpByHash(userOpHash: string): Promise
}