2.0.0 • Published 1 year ago
@peter-present/user-operation v2.0.0
Package for build user operation
Installation
npm install @peter-present/user-operation
- Or if you use
yarn
yarn add @peter-present/user-operation
Usage
- Main purpose of the package is to build a
user operation
. First, you must create aUserOperation
object.
const userOperation = new UserOperation(
account: Account,
callData: BytesLike,
paymasterAndData: BytesLike,
rpcUrl: string,
chainId: string | number,
);
- After having a object, you can create your
user operation
. If you want deploy your account abstraction, you must pass initCode inbuild function
.
const rawUserOps = await userOperation.build(entrypointAddress, { initCode });