A simple JS library for building ERC-4337 UserOperations.

userop.js is an open-source library for building ERC-4337 User Operations for any bundler or paymaster. Similar to how ethers.js allows developers to easily create traditional EVM transactions, userop.js allows developers to create and send User Operations to ERC-4337 Bundlers.

💪 Implementation agnostic: Can be used to create User Operations for any ERC-4337 Smart Account, Bundler service, or Paymaster. Completely open source and MIT licensed, so you can modify it however you like, and know you're never locked in.

🏗️ Intuitive design: Based on the builder design pattern, which mirrors how User Operations are built in production.

Native TypeScript support: Builds on top of common ethers types like BigNumberish and BytesLike.

Install

userop.js is available as an npm package here. To install, simply use your package manager of choice.

npm install userop
yarn add userop