2.0.0 • Published 2 years 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-operationUsage
- Main purpose of the package is to build a
user operation. First, you must create aUserOperationobject.
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 });