A TypeScript SDK for interacting with Fastlane's 4337 bundler (ShBundler), designed to simplify the submission of UserOperations with built-in support for Fastlane paymasters and Safe-based smart accounts.
pnpm add @fastlane-labs/shbundler-sdk
import { createShBundlerClient } from "@fastlane-labs/shbundler-sdk";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const client = await createShBundlerClient({
signer,
rpcUrl: "https://rpc.monadlabs.dev",
chain: monadTestnet, // a viem chain object
});
await client.sendUserOperation({
target: "0xTargetAddress",
data: "0xCallData",
});