Permissionless.js is a Typescript library built on top of viem for interacting with ERC-4337 bundlers and paymasters.
- Full ERC-4337 Support: We support all bundler actions following ERC-4337.
- Gas Sponsorship: We support paymaster actions to allow you to easily sponsor gas fees.
- Built on & for viem: We provide convenient helper functions like
createBundlerClient
to easily create viem clients. - More to come soon...
Install viem as a peer dependency
npm install viem permissionless
bun install viem permissionless
yarn add viem permissionless
Create a bundler client, and start sending user operations!
import { createBundlerClient } from "permissionless/clients/pimlico"
import { goerli } from "viem/chains"
import { http } from "viem"
const bundlerClient = createBundlerClient({
chain: goerli,
transport: http(`https://api.pimlico.io/v1/goerli/rpc?apikey=${pimlicoApiKey}`) // Use any bundler url
})
const userOpHash = await bundlerClient.sendUserOperation({
userOperation: signedUserOperation,
entryPoint: entryPoint
})
For detailed documentation visit our docs page.
For a full explanation of Permissionless.js, please visit our docs page
Build permissionless.js locally with:
bun run build
Distributed under an MIT License. See LICENSE for more information.
Feel free to ask any questions in our Telegram group