Socket
Socket
Sign inDemoInstall

@account-abstraction/utils

Package Overview
Dependencies
49
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.3 to 0.3.0

dist/src/types/@account-abstraction/contracts/core/BaseAccount.d.ts

11

dist/src/ERC4337Utils.d.ts
import { UserOperationStruct } from '@account-abstraction/contracts';
export declare type NotPromise<T> = {
export declare const AddressZero = "0x0000000000000000000000000000000000000000";
export type NotPromise<T> = {
[P in keyof T]: Exclude<T[P], Promise<any>>;

@@ -8,3 +9,3 @@ };

* @param op
* @param forSignature "true" if the hash is needed to calculate the getRequestId()
* @param forSignature "true" if the hash is needed to calculate the getUserOpHash()
* "false" to pack entire UserOp, for calculating the calldata cost of putting it on-chain.

@@ -14,4 +15,4 @@ */

/**
* calculate the requestId of a given userOperation.
* The requestId is a hash of all UserOperation fields, except the "signature" field.
* calculate the userOpHash of a given userOperation.
* The userOpHash is a hash of all UserOperation fields, except the "signature" field.
* The entryPoint uses this value in the emitted UserOperationEvent.

@@ -23,3 +24,3 @@ * A wallet may use this value as the hash to sign (the SampleWallet uses this method)

*/
export declare function getRequestId(op: NotPromise<UserOperationStruct>, entryPoint: string, chainId: number): string;
export declare function getUserOpHash(op: NotPromise<UserOperationStruct>, entryPoint: string, chainId: number): string;
interface DecodedError {

@@ -26,0 +27,0 @@ message: string;

"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.rethrowError = exports.decodeErrorReason = exports.getRequestId = exports.packUserOp = void 0;
exports.rethrowError = exports.decodeErrorReason = exports.getUserOpHash = exports.packUserOp = exports.AddressZero = void 0;
const utils_1 = require("ethers/lib/utils");
const IEntryPoint_json_1 = require("@account-abstraction/contracts/artifacts/IEntryPoint.json");
const ethers_1 = require("ethers");
exports.AddressZero = ethers_1.ethers.constants.AddressZero;
// UserOperation is the first parameter of simulateValidation

@@ -18,3 +19,3 @@ const UserOpType = (_a = IEntryPoint_json_1.abi.find(entry => entry.name === 'simulateValidation')) === null || _a === void 0 ? void 0 : _a.inputs[0];

* @param op
* @param forSignature "true" if the hash is needed to calculate the getRequestId()
* @param forSignature "true" if the hash is needed to calculate the getUserOpHash()
* "false" to pack entire UserOp, for calculating the calldata cost of putting it on-chain.

@@ -141,4 +142,4 @@ */

/**
* calculate the requestId of a given userOperation.
* The requestId is a hash of all UserOperation fields, except the "signature" field.
* calculate the userOpHash of a given userOperation.
* The userOpHash is a hash of all UserOperation fields, except the "signature" field.
* The entryPoint uses this value in the emitted UserOperationEvent.

@@ -150,3 +151,3 @@ * A wallet may use this value as the hash to sign (the SampleWallet uses this method)

*/
function getRequestId(op, entryPoint, chainId) {
function getUserOpHash(op, entryPoint, chainId) {
const userOpHash = (0, utils_1.keccak256)(packUserOp(op, true));

@@ -156,3 +157,3 @@ const enc = utils_1.defaultAbiCoder.encode(['bytes32', 'address', 'uint256'], [userOpHash, entryPoint, chainId]);

}
exports.getRequestId = getRequestId;
exports.getUserOpHash = getUserOpHash;
const ErrorSig = (0, utils_1.keccak256)(Buffer.from('Error(string)')).slice(0, 10); // 0x08c379a0

@@ -164,3 +165,3 @@ const FailedOpSig = (0, utils_1.keccak256)(Buffer.from('FailedOp(uint256,address,string)')).slice(0, 10); // 0x00fa072b

function decodeErrorReason(error) {
console.log('decoding', error);
// console.log('decoding', error)
if (error.startsWith(ErrorSig)) {

@@ -167,0 +168,0 @@ const [message] = utils_1.defaultAbiCoder.decode(['string'], '0x' + error.substring(10));

import { NotPromise } from './ERC4337Utils';
import { EntryPoint, UserOperationStruct } from '@account-abstraction/contracts';
export declare function postExecutionDump(entryPoint: EntryPoint, requestId: string): Promise<void>;
export declare function postExecutionDump(entryPoint: EntryPoint, userOpHash: string): Promise<void>;
/**

@@ -10,5 +10,5 @@ * check whether an already executed UserOperation paid enough

* @param entryPoint
* @param requestId
* @param userOpHash
*/
export declare function postExecutionCheck(entryPoint: EntryPoint, requestId: string): Promise<{
export declare function postExecutionCheck(entryPoint: EntryPoint, userOpHash: string): Promise<{
gasUsed: number;

@@ -15,0 +15,0 @@ gasPaid: number;

@@ -5,4 +5,4 @@ "use strict";

const utils_1 = require("ethers/lib/utils");
async function postExecutionDump(entryPoint, requestId) {
const { gasPaid, gasUsed, success, userOp } = await postExecutionCheck(entryPoint, requestId);
async function postExecutionDump(entryPoint, userOpHash) {
const { gasPaid, gasUsed, success, userOp } = await postExecutionCheck(entryPoint, userOpHash);
/// / debug dump:

@@ -18,6 +18,6 @@ console.log('==== used=', gasUsed, 'paid', gasPaid, 'over=', gasPaid - gasUsed, 'callLen=', userOp.callData.length, 'initLen=', userOp.initCode.length, success ? 'success' : 'failed');

* @param entryPoint
* @param requestId
* @param userOpHash
*/
async function postExecutionCheck(entryPoint, requestId) {
const req = await entryPoint.queryFilter(entryPoint.filters.UserOperationEvent(requestId));
async function postExecutionCheck(entryPoint, userOpHash) {
const req = await entryPoint.queryFilter(entryPoint.filters.UserOperationEvent(userOpHash));
if (req.length === 0) {

@@ -24,0 +24,0 @@ console.log('postExecutionCheck: failed to read event (not mined)');

@@ -1,1 +0,1 @@

export type { BaseWallet } from "./BaseWallet";
export type { BaseAccount } from "./BaseAccount";

@@ -5,3 +5,3 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";

import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../common";
export declare type UserOperationStruct = {
export type UserOperationStruct = {
sender: PromiseOrValue<string>;

@@ -19,3 +19,3 @@ nonce: PromiseOrValue<BigNumberish>;

};
export declare type UserOperationStructOutput = [
export type UserOperationStructOutput = [
string,

@@ -47,10 +47,10 @@ BigNumber,

functions: {
"aggregateSignatures(bytes[])": FunctionFragment;
"aggregateSignatures((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])": FunctionFragment;
"validateSignatures((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes)": FunctionFragment;
"validateUserOpSignature((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bool)": FunctionFragment;
"validateUserOpSignature((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "aggregateSignatures" | "validateSignatures" | "validateUserOpSignature"): FunctionFragment;
encodeFunctionData(functionFragment: "aggregateSignatures", values: [PromiseOrValue<BytesLike>[]]): string;
encodeFunctionData(functionFragment: "aggregateSignatures", values: [UserOperationStruct[]]): string;
encodeFunctionData(functionFragment: "validateSignatures", values: [UserOperationStruct[], PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: "validateUserOpSignature", values: [UserOperationStruct, PromiseOrValue<boolean>]): string;
encodeFunctionData(functionFragment: "validateUserOpSignature", values: [UserOperationStruct]): string;
decodeFunctionResult(functionFragment: "aggregateSignatures", data: BytesLike): Result;

@@ -76,51 +76,29 @@ decodeFunctionResult(functionFragment: "validateSignatures", data: BytesLike): Result;

functions: {
aggregateSignatures(sigsForAggregation: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<[string] & {
aggregateSignatures(userOps: UserOperationStruct[], overrides?: CallOverrides): Promise<[string] & {
aggregatesSignature: string;
}>;
validateSignatures(userOps: UserOperationStruct[], signature: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[void]>;
validateUserOpSignature(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<[
string,
string,
string
] & {
validateUserOpSignature(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<[string] & {
sigForUserOp: string;
sigForAggregation: string;
offChainSigInfo: string;
}>;
};
aggregateSignatures(sigsForAggregation: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<string>;
aggregateSignatures(userOps: UserOperationStruct[], overrides?: CallOverrides): Promise<string>;
validateSignatures(userOps: UserOperationStruct[], signature: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
validateUserOpSignature(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<[
string,
string,
string
] & {
sigForUserOp: string;
sigForAggregation: string;
offChainSigInfo: string;
}>;
validateUserOpSignature(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
callStatic: {
aggregateSignatures(sigsForAggregation: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<string>;
aggregateSignatures(userOps: UserOperationStruct[], overrides?: CallOverrides): Promise<string>;
validateSignatures(userOps: UserOperationStruct[], signature: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
validateUserOpSignature(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<[
string,
string,
string
] & {
sigForUserOp: string;
sigForAggregation: string;
offChainSigInfo: string;
}>;
validateUserOpSignature(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
};
filters: {};
estimateGas: {
aggregateSignatures(sigsForAggregation: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<BigNumber>;
aggregateSignatures(userOps: UserOperationStruct[], overrides?: CallOverrides): Promise<BigNumber>;
validateSignatures(userOps: UserOperationStruct[], signature: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
validateUserOpSignature(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<BigNumber>;
validateUserOpSignature(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<BigNumber>;
};
populateTransaction: {
aggregateSignatures(sigsForAggregation: PromiseOrValue<BytesLike>[], overrides?: CallOverrides): Promise<PopulatedTransaction>;
aggregateSignatures(userOps: UserOperationStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>;
validateSignatures(userOps: UserOperationStruct[], signature: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
validateUserOpSignature(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
validateUserOpSignature(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
};
}

@@ -5,3 +5,3 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers";

import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../common";
export declare type UserOperationStruct = {
export type UserOperationStruct = {
sender: PromiseOrValue<string>;

@@ -19,3 +19,3 @@ nonce: PromiseOrValue<BigNumberish>;

};
export declare type UserOperationStructOutput = [
export type UserOperationStructOutput = [
string,

@@ -89,15 +89,12 @@ BigNumber,

"getDepositInfo(address)": FunctionFragment;
"getRequestId((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment;
"getSenderAddress(bytes)": FunctionFragment;
"getSenderStorage(address)": FunctionFragment;
"getUserOpHash((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment;
"handleAggregatedOps(((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address,bytes)[],address)": FunctionFragment;
"handleOps((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address)": FunctionFragment;
"paymasterStake()": FunctionFragment;
"simulateValidation((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bool)": FunctionFragment;
"simulateValidation((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment;
"unlockStake()": FunctionFragment;
"unstakeDelaySec()": FunctionFragment;
"withdrawStake(address)": FunctionFragment;
"withdrawTo(address,uint256)": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "addStake" | "balanceOf" | "depositTo" | "getDepositInfo" | "getRequestId" | "getSenderAddress" | "getSenderStorage" | "handleAggregatedOps" | "handleOps" | "paymasterStake" | "simulateValidation" | "unlockStake" | "unstakeDelaySec" | "withdrawStake" | "withdrawTo"): FunctionFragment;
getFunction(nameOrSignatureOrTopic: "addStake" | "balanceOf" | "depositTo" | "getDepositInfo" | "getSenderAddress" | "getUserOpHash" | "handleAggregatedOps" | "handleOps" | "simulateValidation" | "unlockStake" | "withdrawStake" | "withdrawTo"): FunctionFragment;
encodeFunctionData(functionFragment: "addStake", values: [PromiseOrValue<BigNumberish>]): string;

@@ -107,11 +104,8 @@ encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue<string>]): string;

encodeFunctionData(functionFragment: "getDepositInfo", values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: "getRequestId", values: [UserOperationStruct]): string;
encodeFunctionData(functionFragment: "getSenderAddress", values: [PromiseOrValue<BytesLike>]): string;
encodeFunctionData(functionFragment: "getSenderStorage", values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: "getUserOpHash", values: [UserOperationStruct]): string;
encodeFunctionData(functionFragment: "handleAggregatedOps", values: [IEntryPoint.UserOpsPerAggregatorStruct[], PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: "handleOps", values: [UserOperationStruct[], PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: "paymasterStake", values?: undefined): string;
encodeFunctionData(functionFragment: "simulateValidation", values: [UserOperationStruct, PromiseOrValue<boolean>]): string;
encodeFunctionData(functionFragment: "simulateValidation", values: [UserOperationStruct]): string;
encodeFunctionData(functionFragment: "unlockStake", values?: undefined): string;
encodeFunctionData(functionFragment: "unstakeDelaySec", values?: undefined): string;
encodeFunctionData(functionFragment: "withdrawStake", values: [PromiseOrValue<string>]): string;

@@ -123,11 +117,8 @@ encodeFunctionData(functionFragment: "withdrawTo", values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;

decodeFunctionResult(functionFragment: "getDepositInfo", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRequestId", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getSenderAddress", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getSenderStorage", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getUserOpHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "handleAggregatedOps", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "handleOps", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "paymasterStake", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "simulateValidation", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "unlockStake", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "unstakeDelaySec", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "withdrawStake", data: BytesLike): Result;

@@ -156,7 +147,7 @@ decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result;

}
export declare type DepositedEvent = TypedEvent<[
export type DepositedEvent = TypedEvent<[
string,
BigNumber
], DepositedEventObject>;
export declare type DepositedEventFilter = TypedEventFilter<DepositedEvent>;
export type DepositedEventFilter = TypedEventFilter<DepositedEvent>;
export interface StakeLockedEventObject {

@@ -167,3 +158,3 @@ account: string;

}
export declare type StakeLockedEvent = TypedEvent<[
export type StakeLockedEvent = TypedEvent<[
string,

@@ -173,3 +164,3 @@ BigNumber,

], StakeLockedEventObject>;
export declare type StakeLockedEventFilter = TypedEventFilter<StakeLockedEvent>;
export type StakeLockedEventFilter = TypedEventFilter<StakeLockedEvent>;
export interface StakeUnlockedEventObject {

@@ -179,7 +170,7 @@ account: string;

}
export declare type StakeUnlockedEvent = TypedEvent<[
export type StakeUnlockedEvent = TypedEvent<[
string,
BigNumber
], StakeUnlockedEventObject>;
export declare type StakeUnlockedEventFilter = TypedEventFilter<StakeUnlockedEvent>;
export type StakeUnlockedEventFilter = TypedEventFilter<StakeUnlockedEvent>;
export interface StakeWithdrawnEventObject {

@@ -190,3 +181,3 @@ account: string;

}
export declare type StakeWithdrawnEvent = TypedEvent<[
export type StakeWithdrawnEvent = TypedEvent<[
string,

@@ -196,5 +187,5 @@ string,

], StakeWithdrawnEventObject>;
export declare type StakeWithdrawnEventFilter = TypedEventFilter<StakeWithdrawnEvent>;
export type StakeWithdrawnEventFilter = TypedEventFilter<StakeWithdrawnEvent>;
export interface UserOperationEventEventObject {
requestId: string;
userOpHash: string;
sender: string;

@@ -207,3 +198,3 @@ paymaster: string;

}
export declare type UserOperationEventEvent = TypedEvent<[
export type UserOperationEventEvent = TypedEvent<[
string,

@@ -217,5 +208,5 @@ string,

], UserOperationEventEventObject>;
export declare type UserOperationEventEventFilter = TypedEventFilter<UserOperationEventEvent>;
export type UserOperationEventEventFilter = TypedEventFilter<UserOperationEventEvent>;
export interface UserOperationRevertReasonEventObject {
requestId: string;
userOpHash: string;
sender: string;

@@ -225,3 +216,3 @@ nonce: BigNumber;

}
export declare type UserOperationRevertReasonEvent = TypedEvent<[
export type UserOperationRevertReasonEvent = TypedEvent<[
string,

@@ -232,3 +223,3 @@ string,

], UserOperationRevertReasonEventObject>;
export declare type UserOperationRevertReasonEventFilter = TypedEventFilter<UserOperationRevertReasonEvent>;
export type UserOperationRevertReasonEventFilter = TypedEventFilter<UserOperationRevertReasonEvent>;
export interface WithdrawnEventObject {

@@ -239,3 +230,3 @@ account: string;

}
export declare type WithdrawnEvent = TypedEvent<[
export type WithdrawnEvent = TypedEvent<[
string,

@@ -245,3 +236,3 @@ string,

], WithdrawnEventObject>;
export declare type WithdrawnEventFilter = TypedEventFilter<WithdrawnEvent>;
export type WithdrawnEventFilter = TypedEventFilter<WithdrawnEvent>;
export interface IEntryPoint extends BaseContract {

@@ -274,9 +265,6 @@ connect(signerOrProvider: Signer | Provider | string): this;

}>;
getRequestId(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<[string]>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
getSenderStorage(sender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber[]] & {
senderStorageCells: BigNumber[];
}>;
getUserOpHash(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<[string]>;
handleAggregatedOps(opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue<string>, overrides?: Overrides & {

@@ -288,14 +276,8 @@ from?: PromiseOrValue<string>;

}): Promise<ContractTransaction>;
paymasterStake(overrides?: Overrides & {
simulateValidation(userOp: UserOperationStruct, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
simulateValidation(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -316,7 +298,6 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<IStakeManager.DepositInfoStructOutput>;
getRequestId(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
getSenderStorage(sender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber[]>;
getUserOpHash(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
handleAggregatedOps(opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue<string>, overrides?: Overrides & {

@@ -328,14 +309,8 @@ from?: PromiseOrValue<string>;

}): Promise<ContractTransaction>;
paymasterStake(overrides?: Overrides & {
simulateValidation(userOp: UserOperationStruct, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
simulateValidation(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -352,25 +327,8 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<IStakeManager.DepositInfoStructOutput>;
getRequestId(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
getSenderStorage(sender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber[]>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
getUserOpHash(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<string>;
handleAggregatedOps(opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
handleOps(ops: UserOperationStruct[], beneficiary: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;
paymasterStake(overrides?: CallOverrides): Promise<BigNumber>;
simulateValidation(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: CallOverrides): Promise<[
BigNumber,
BigNumber,
string,
string,
string,
string
] & {
preOpGas: BigNumber;
prefund: BigNumber;
actualAggregator: string;
sigForUserOp: string;
sigForAggregation: string;
offChainSigInfo: string;
}>;
simulateValidation(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<void>;
unlockStake(overrides?: CallOverrides): Promise<void>;
unstakeDelaySec(overrides?: CallOverrides): Promise<number>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;

@@ -388,6 +346,6 @@ withdrawTo(withdrawAddress: PromiseOrValue<string>, withdrawAmount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;

StakeWithdrawn(account?: PromiseOrValue<string> | null, withdrawAddress?: null, amount?: null): StakeWithdrawnEventFilter;
"UserOperationEvent(bytes32,address,address,uint256,uint256,uint256,bool)"(requestId?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, paymaster?: PromiseOrValue<string> | null, nonce?: null, actualGasCost?: null, actualGasPrice?: null, success?: null): UserOperationEventEventFilter;
UserOperationEvent(requestId?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, paymaster?: PromiseOrValue<string> | null, nonce?: null, actualGasCost?: null, actualGasPrice?: null, success?: null): UserOperationEventEventFilter;
"UserOperationRevertReason(bytes32,address,uint256,bytes)"(requestId?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, nonce?: null, revertReason?: null): UserOperationRevertReasonEventFilter;
UserOperationRevertReason(requestId?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, nonce?: null, revertReason?: null): UserOperationRevertReasonEventFilter;
"UserOperationEvent(bytes32,address,address,uint256,uint256,uint256,bool)"(userOpHash?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, paymaster?: PromiseOrValue<string> | null, nonce?: null, actualGasCost?: null, actualGasPrice?: null, success?: null): UserOperationEventEventFilter;
UserOperationEvent(userOpHash?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, paymaster?: PromiseOrValue<string> | null, nonce?: null, actualGasCost?: null, actualGasPrice?: null, success?: null): UserOperationEventEventFilter;
"UserOperationRevertReason(bytes32,address,uint256,bytes)"(userOpHash?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, nonce?: null, revertReason?: null): UserOperationRevertReasonEventFilter;
UserOperationRevertReason(userOpHash?: PromiseOrValue<BytesLike> | null, sender?: PromiseOrValue<string> | null, nonce?: null, revertReason?: null): UserOperationRevertReasonEventFilter;
"Withdrawn(address,address,uint256)"(account?: PromiseOrValue<string> | null, withdrawAddress?: null, amount?: null): WithdrawnEventFilter;

@@ -405,7 +363,6 @@ Withdrawn(account?: PromiseOrValue<string> | null, withdrawAddress?: null, amount?: null): WithdrawnEventFilter;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
getRequestId(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<BigNumber>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
getSenderStorage(sender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
getUserOpHash(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<BigNumber>;
handleAggregatedOps(opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue<string>, overrides?: Overrides & {

@@ -417,14 +374,8 @@ from?: PromiseOrValue<string>;

}): Promise<BigNumber>;
paymasterStake(overrides?: Overrides & {
simulateValidation(userOp: UserOperationStruct, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
simulateValidation(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -446,7 +397,6 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRequestId(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getSenderAddress(initCode: PromiseOrValue<BytesLike>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
getSenderStorage(sender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
getUserOpHash(userOp: UserOperationStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
handleAggregatedOps(opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue<string>, overrides?: Overrides & {

@@ -458,14 +408,8 @@ from?: PromiseOrValue<string>;

}): Promise<PopulatedTransaction>;
paymasterStake(overrides?: Overrides & {
simulateValidation(userOp: UserOperationStruct, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
simulateValidation(userOp: UserOperationStruct, offChainSigCheck: PromiseOrValue<boolean>, overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -472,0 +416,0 @@ from?: PromiseOrValue<string>;

@@ -0,4 +1,4 @@

export type { IAccount } from "./IAccount";
export type { IAggregator } from "./IAggregator";
export type { IEntryPoint } from "./IEntryPoint";
export type { IStakeManager } from "./IStakeManager";
export type { IWallet } from "./IWallet";

@@ -33,9 +33,7 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers";

"getDepositInfo(address)": FunctionFragment;
"paymasterStake()": FunctionFragment;
"unlockStake()": FunctionFragment;
"unstakeDelaySec()": FunctionFragment;
"withdrawStake(address)": FunctionFragment;
"withdrawTo(address,uint256)": FunctionFragment;
};
getFunction(nameOrSignatureOrTopic: "addStake" | "balanceOf" | "depositTo" | "getDepositInfo" | "paymasterStake" | "unlockStake" | "unstakeDelaySec" | "withdrawStake" | "withdrawTo"): FunctionFragment;
getFunction(nameOrSignatureOrTopic: "addStake" | "balanceOf" | "depositTo" | "getDepositInfo" | "unlockStake" | "withdrawStake" | "withdrawTo"): FunctionFragment;
encodeFunctionData(functionFragment: "addStake", values: [PromiseOrValue<BigNumberish>]): string;

@@ -45,5 +43,3 @@ encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue<string>]): string;

encodeFunctionData(functionFragment: "getDepositInfo", values: [PromiseOrValue<string>]): string;
encodeFunctionData(functionFragment: "paymasterStake", values?: undefined): string;
encodeFunctionData(functionFragment: "unlockStake", values?: undefined): string;
encodeFunctionData(functionFragment: "unstakeDelaySec", values?: undefined): string;
encodeFunctionData(functionFragment: "withdrawStake", values: [PromiseOrValue<string>]): string;

@@ -55,5 +51,3 @@ encodeFunctionData(functionFragment: "withdrawTo", values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;

decodeFunctionResult(functionFragment: "getDepositInfo", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "paymasterStake", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "unlockStake", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "unstakeDelaySec", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "withdrawStake", data: BytesLike): Result;

@@ -78,7 +72,7 @@ decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result;

}
export declare type DepositedEvent = TypedEvent<[
export type DepositedEvent = TypedEvent<[
string,
BigNumber
], DepositedEventObject>;
export declare type DepositedEventFilter = TypedEventFilter<DepositedEvent>;
export type DepositedEventFilter = TypedEventFilter<DepositedEvent>;
export interface StakeLockedEventObject {

@@ -89,3 +83,3 @@ account: string;

}
export declare type StakeLockedEvent = TypedEvent<[
export type StakeLockedEvent = TypedEvent<[
string,

@@ -95,3 +89,3 @@ BigNumber,

], StakeLockedEventObject>;
export declare type StakeLockedEventFilter = TypedEventFilter<StakeLockedEvent>;
export type StakeLockedEventFilter = TypedEventFilter<StakeLockedEvent>;
export interface StakeUnlockedEventObject {

@@ -101,7 +95,7 @@ account: string;

}
export declare type StakeUnlockedEvent = TypedEvent<[
export type StakeUnlockedEvent = TypedEvent<[
string,
BigNumber
], StakeUnlockedEventObject>;
export declare type StakeUnlockedEventFilter = TypedEventFilter<StakeUnlockedEvent>;
export type StakeUnlockedEventFilter = TypedEventFilter<StakeUnlockedEvent>;
export interface StakeWithdrawnEventObject {

@@ -112,3 +106,3 @@ account: string;

}
export declare type StakeWithdrawnEvent = TypedEvent<[
export type StakeWithdrawnEvent = TypedEvent<[
string,

@@ -118,3 +112,3 @@ string,

], StakeWithdrawnEventObject>;
export declare type StakeWithdrawnEventFilter = TypedEventFilter<StakeWithdrawnEvent>;
export type StakeWithdrawnEventFilter = TypedEventFilter<StakeWithdrawnEvent>;
export interface WithdrawnEventObject {

@@ -125,3 +119,3 @@ account: string;

}
export declare type WithdrawnEvent = TypedEvent<[
export type WithdrawnEvent = TypedEvent<[
string,

@@ -131,3 +125,3 @@ string,

], WithdrawnEventObject>;
export declare type WithdrawnEventFilter = TypedEventFilter<WithdrawnEvent>;
export type WithdrawnEventFilter = TypedEventFilter<WithdrawnEvent>;
export interface IStakeManager extends BaseContract {

@@ -160,11 +154,5 @@ connect(signerOrProvider: Signer | Provider | string): this;

}>;
paymasterStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -185,11 +173,5 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<IStakeManager.DepositInfoStructOutput>;
paymasterStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<ContractTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -206,5 +188,3 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<IStakeManager.DepositInfoStructOutput>;
paymasterStake(overrides?: CallOverrides): Promise<BigNumber>;
unlockStake(overrides?: CallOverrides): Promise<void>;
unstakeDelaySec(overrides?: CallOverrides): Promise<number>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: CallOverrides): Promise<void>;

@@ -234,11 +214,5 @@ withdrawTo(withdrawAddress: PromiseOrValue<string>, withdrawAmount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
paymasterStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<BigNumber>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -260,11 +234,5 @@ from?: PromiseOrValue<string>;

getDepositInfo(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
paymasterStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
unlockStake(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
unstakeDelaySec(overrides?: Overrides & {
from?: PromiseOrValue<string>;
}): Promise<PopulatedTransaction>;
withdrawStake(withdrawAddress: PromiseOrValue<string>, overrides?: Overrides & {

@@ -271,0 +239,0 @@ from?: PromiseOrValue<string>;

@@ -1,1 +0,1 @@

export type { SimpleWallet } from "./SimpleWallet";
export type { SimpleAccount } from "./SimpleAccount";

@@ -11,3 +11,3 @@ import type { Listener } from "@ethersproject/providers";

}
declare type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
export interface OnEvent<TRes> {

@@ -17,8 +17,8 @@ <TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes;

}
export declare type MinEthersFactory<C, ARGS> = {
export type MinEthersFactory<C, ARGS> = {
deploy(...a: ARGS[]): Promise<C>;
};
export declare type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
export declare type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
export declare type PromiseOrValue<T> = T | Promise<T>;
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
export type PromiseOrValue<T> = T | Promise<T>;
export {};

@@ -25,3 +25,3 @@ import type { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";

}
export declare type SenderEvent = TypedEvent<[
export type SenderEvent = TypedEvent<[
string,

@@ -31,3 +31,3 @@ string,

], SenderEventObject>;
export declare type SenderEventFilter = TypedEventFilter<SenderEvent>;
export type SenderEventFilter = TypedEventFilter<SenderEvent>;
export interface SampleRecipient extends BaseContract {

@@ -34,0 +34,0 @@ connect(signerOrProvider: Signer | Provider | string): this;

@@ -1,1 +0,1 @@

export { BaseWallet__factory } from "./BaseWallet__factory";
export { BaseAccount__factory } from "./BaseAccount__factory";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseWallet__factory = void 0;
exports.BaseAccount__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var BaseWallet__factory_1 = require("./BaseWallet__factory");
Object.defineProperty(exports, "BaseWallet__factory", { enumerable: true, get: function () { return BaseWallet__factory_1.BaseWallet__factory; } });
var BaseAccount__factory_1 = require("./BaseAccount__factory");
Object.defineProperty(exports, "BaseAccount__factory", { enumerable: true, get: function () { return BaseAccount__factory_1.BaseAccount__factory; } });
//# sourceMappingURL=index.js.map

@@ -5,3 +5,22 @@ import { Signer } from "ethers";

export declare class IAggregator__factory {
static readonly abi: {
static readonly abi: ({
inputs: {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
} | {
inputs: ({

@@ -23,12 +42,8 @@ components: {

name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
outputs: never[];
stateMutability: string;
type: string;
}[];
})[];
static createInterface(): IAggregatorInterface;
static connect(address: string, signerOrProvider: Signer | Provider): IAggregator;
}

@@ -12,5 +12,62 @@ "use strict";

{
internalType: "bytes[]",
name: "sigsForAggregation",
type: "bytes[]",
components: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "uint256",
name: "nonce",
type: "uint256",
},
{
internalType: "bytes",
name: "initCode",
type: "bytes",
},
{
internalType: "bytes",
name: "callData",
type: "bytes",
},
{
internalType: "uint256",
name: "callGasLimit",
type: "uint256",
},
{
internalType: "uint256",
name: "verificationGasLimit",
type: "uint256",
},
{
internalType: "uint256",
name: "preVerificationGas",
type: "uint256",
},
{
internalType: "uint256",
name: "maxFeePerGas",
type: "uint256",
},
{
internalType: "uint256",
name: "maxPriorityFeePerGas",
type: "uint256",
},
{
internalType: "bytes",
name: "paymasterAndData",
type: "bytes",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
internalType: "struct UserOperation[]",
name: "userOps",
type: "tuple[]",
},

@@ -168,7 +225,2 @@ ],

},
{
internalType: "bool",
name: "offChainSigCheck",
type: "bool",
},
],

@@ -182,12 +234,2 @@ name: "validateUserOpSignature",

},
{
internalType: "bytes",
name: "sigForAggregation",
type: "bytes",
},
{
internalType: "bytes",
name: "offChainSigInfo",
type: "bytes",
},
],

@@ -194,0 +236,0 @@ stateMutability: "view",

@@ -6,7 +6,17 @@ import { Signer } from "ethers";

static readonly abi: ({
inputs: {
inputs: ({
internalType: string;
name: string;
type: string;
}[];
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
name: string;

@@ -37,2 +47,17 @@ type: string;

outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
} | {
inputs: {
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: {
components: {

@@ -51,2 +76,22 @@ internalType: string;

} | {
inputs: {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
} | {
inputs: ({

@@ -82,27 +127,2 @@ components: ({

anonymous?: undefined;
} | {
inputs: ({
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
})[];

@@ -109,0 +129,0 @@ static createInterface(): IEntryPointInterface;

@@ -34,2 +34,13 @@ "use strict";

internalType: "address",
name: "sender",
type: "address",
},
],
name: "SenderAddressResult",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "aggregator",

@@ -43,2 +54,100 @@ type: "address",

{
inputs: [
{
internalType: "uint256",
name: "preOpGas",
type: "uint256",
},
{
internalType: "uint256",
name: "prefund",
type: "uint256",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
components: [
{
internalType: "uint256",
name: "paymasterStake",
type: "uint256",
},
{
internalType: "uint256",
name: "paymasterUnstakeDelay",
type: "uint256",
},
],
internalType: "struct IEntryPoint.PaymasterInfo",
name: "paymasterInfo",
type: "tuple",
},
],
name: "SimulationResult",
type: "error",
},
{
inputs: [
{
internalType: "uint256",
name: "preOpGas",
type: "uint256",
},
{
internalType: "uint256",
name: "prefund",
type: "uint256",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
components: [
{
internalType: "uint256",
name: "paymasterStake",
type: "uint256",
},
{
internalType: "uint256",
name: "paymasterUnstakeDelay",
type: "uint256",
},
],
internalType: "struct IEntryPoint.PaymasterInfo",
name: "paymasterInfo",
type: "tuple",
},
{
components: [
{
internalType: "address",
name: "actualAggregator",
type: "address",
},
{
internalType: "uint256",
name: "aggregatorStake",
type: "uint256",
},
{
internalType: "uint256",
name: "aggregatorUnstakeDelay",
type: "uint256",
},
],
internalType: "struct IEntryPoint.AggregationInfo",
name: "aggregationInfo",
type: "tuple",
},
],
name: "SimulationResultWithAggregation",
type: "error",
},
{
anonymous: false,

@@ -137,3 +246,3 @@ inputs: [

internalType: "bytes32",
name: "requestId",
name: "userOpHash",
type: "bytes32",

@@ -187,3 +296,3 @@ },

internalType: "bytes32",
name: "requestId",
name: "userOpHash",
type: "bytes32",

@@ -332,2 +441,15 @@ },

{
internalType: "bytes",
name: "initCode",
type: "bytes",
},
],
name: "getSenderAddress",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [

@@ -395,3 +517,3 @@ {

],
name: "getRequestId",
name: "getUserOpHash",
outputs: [

@@ -410,40 +532,2 @@ {

{
internalType: "bytes",
name: "initCode",
type: "bytes",
},
],
name: "getSenderAddress",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
],
name: "getSenderStorage",
outputs: [
{
internalType: "uint256[]",
name: "senderStorageCells",
type: "uint256[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [

@@ -614,15 +698,2 @@ {

{
inputs: [],
name: "paymasterStake",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [

@@ -691,41 +762,5 @@ {

},
{
internalType: "bool",
name: "offChainSigCheck",
type: "bool",
},
],
name: "simulateValidation",
outputs: [
{
internalType: "uint256",
name: "preOpGas",
type: "uint256",
},
{
internalType: "uint256",
name: "prefund",
type: "uint256",
},
{
internalType: "address",
name: "actualAggregator",
type: "address",
},
{
internalType: "bytes",
name: "sigForUserOp",
type: "bytes",
},
{
internalType: "bytes",
name: "sigForAggregation",
type: "bytes",
},
{
internalType: "bytes",
name: "offChainSigInfo",
type: "bytes",
},
],
outputs: [],
stateMutability: "nonpayable",

@@ -742,15 +777,2 @@ type: "function",

{
inputs: [],
name: "unstakeDelaySec",
outputs: [
{
internalType: "uint32",
name: "",
type: "uint32",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [

@@ -757,0 +779,0 @@ {

@@ -0,4 +1,4 @@

export { IAccount__factory } from "./IAccount__factory";
export { IAggregator__factory } from "./IAggregator__factory";
export { IEntryPoint__factory } from "./IEntryPoint__factory";
export { IStakeManager__factory } from "./IStakeManager__factory";
export { IWallet__factory } from "./IWallet__factory";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IWallet__factory = exports.IStakeManager__factory = exports.IEntryPoint__factory = exports.IAggregator__factory = void 0;
exports.IStakeManager__factory = exports.IEntryPoint__factory = exports.IAggregator__factory = exports.IAccount__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var IAccount__factory_1 = require("./IAccount__factory");
Object.defineProperty(exports, "IAccount__factory", { enumerable: true, get: function () { return IAccount__factory_1.IAccount__factory; } });
var IAggregator__factory_1 = require("./IAggregator__factory");

@@ -13,4 +15,2 @@ Object.defineProperty(exports, "IAggregator__factory", { enumerable: true, get: function () { return IAggregator__factory_1.IAggregator__factory; } });

Object.defineProperty(exports, "IStakeManager__factory", { enumerable: true, get: function () { return IStakeManager__factory_1.IStakeManager__factory; } });
var IWallet__factory_1 = require("./IWallet__factory");
Object.defineProperty(exports, "IWallet__factory", { enumerable: true, get: function () { return IWallet__factory_1.IWallet__factory; } });
//# sourceMappingURL=index.js.map

@@ -215,15 +215,2 @@ "use strict";

inputs: [],
name: "paymasterStake",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "unlockStake",

@@ -235,15 +222,2 @@ outputs: [],

{
inputs: [],
name: "unstakeDelaySec",
outputs: [
{
internalType: "uint32",
name: "",
type: "uint32",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [

@@ -250,0 +224,0 @@ {

@@ -1,1 +0,1 @@

export { SimpleWallet__factory } from "./SimpleWallet__factory";
export { SimpleAccount__factory } from "./SimpleAccount__factory";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimpleWallet__factory = void 0;
exports.SimpleAccount__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var SimpleWallet__factory_1 = require("./SimpleWallet__factory");
Object.defineProperty(exports, "SimpleWallet__factory", { enumerable: true, get: function () { return SimpleWallet__factory_1.SimpleWallet__factory; } });
var SimpleAccount__factory_1 = require("./SimpleAccount__factory");
Object.defineProperty(exports, "SimpleAccount__factory", { enumerable: true, get: function () { return SimpleAccount__factory_1.SimpleAccount__factory; } });
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ import { Signer, ContractFactory, Overrides } from "ethers";

import type { SampleRecipient, SampleRecipientInterface } from "../../../contracts/test/SampleRecipient";
declare type SampleRecipientConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
type SampleRecipientConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
export declare class SampleRecipient__factory extends ContractFactory {

@@ -17,3 +17,3 @@ constructor(...args: SampleRecipientConstructorParams);

connect(signer: Signer): SampleRecipient__factory;
static readonly bytecode = "0x608060405234801561001057600080fd5b5061023e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806325d9185c1461003b578063d1f9cf0e14610045575b600080fd5b610043610058565b005b6100436100533660046100e6565b610092565b60405162461bcd60e51b815260206004820152600b60248201526a1d195cdd081c995d995c9d60aa1b604482015260640160405180910390fd5b7f603c3fe9b00ecddbd86daa6cbfe9a7f26505792913b8d1dec79052d86b5f79df3233836040516100c593929190610197565b60405180910390a150565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156100f857600080fd5b813567ffffffffffffffff8082111561011057600080fd5b818401915084601f83011261012457600080fd5b813581811115610136576101366100d0565b604051601f8201601f19908116603f0116810190838211818310171561015e5761015e6100d0565b8160405282815287602084870101111561017757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060018060a01b038086168352602081861681850152606060408501528451915081606085015260005b828110156101de578581018201518582016080015281016101c2565b828111156101f0576000608084870101525b5050601f01601f19169190910160800194935050505056fea264697066735822122086a57e4194d4d53d2e8eb5089933589c76aca1e23080ee34b69e778d233acc3764736f6c634300080f0033";
static readonly bytecode = "0x608060405234801561001057600080fd5b5061023e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806325d9185c1461003b578063d1f9cf0e14610045575b600080fd5b610043610058565b005b6100436100533660046100e6565b610092565b60405162461bcd60e51b815260206004820152600b60248201526a1d195cdd081c995d995c9d60aa1b604482015260640160405180910390fd5b7f603c3fe9b00ecddbd86daa6cbfe9a7f26505792913b8d1dec79052d86b5f79df3233836040516100c593929190610197565b60405180910390a150565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156100f857600080fd5b813567ffffffffffffffff8082111561011057600080fd5b818401915084601f83011261012457600080fd5b813581811115610136576101366100d0565b604051601f8201601f19908116603f0116810190838211818310171561015e5761015e6100d0565b8160405282815287602084870101111561017757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060018060a01b038086168352602081861681850152606060408501528451915081606085015260005b828110156101de578581018201518582016080015281016101c2565b828111156101f0576000608084870101525b5050601f01601f19169190910160800194935050505056fea264697066735822122010adf792b41e69335605cb2f1af48e6582a5a81771c068790c8957f58ac731ff64736f6c634300080f0033";
static readonly abi: ({

@@ -20,0 +20,0 @@ anonymous: boolean;

@@ -55,3 +55,3 @@ "use strict";

];
const _bytecode = "0x608060405234801561001057600080fd5b5061023e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806325d9185c1461003b578063d1f9cf0e14610045575b600080fd5b610043610058565b005b6100436100533660046100e6565b610092565b60405162461bcd60e51b815260206004820152600b60248201526a1d195cdd081c995d995c9d60aa1b604482015260640160405180910390fd5b7f603c3fe9b00ecddbd86daa6cbfe9a7f26505792913b8d1dec79052d86b5f79df3233836040516100c593929190610197565b60405180910390a150565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156100f857600080fd5b813567ffffffffffffffff8082111561011057600080fd5b818401915084601f83011261012457600080fd5b813581811115610136576101366100d0565b604051601f8201601f19908116603f0116810190838211818310171561015e5761015e6100d0565b8160405282815287602084870101111561017757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060018060a01b038086168352602081861681850152606060408501528451915081606085015260005b828110156101de578581018201518582016080015281016101c2565b828111156101f0576000608084870101525b5050601f01601f19169190910160800194935050505056fea264697066735822122086a57e4194d4d53d2e8eb5089933589c76aca1e23080ee34b69e778d233acc3764736f6c634300080f0033";
const _bytecode = "0x608060405234801561001057600080fd5b5061023e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806325d9185c1461003b578063d1f9cf0e14610045575b600080fd5b610043610058565b005b6100436100533660046100e6565b610092565b60405162461bcd60e51b815260206004820152600b60248201526a1d195cdd081c995d995c9d60aa1b604482015260640160405180910390fd5b7f603c3fe9b00ecddbd86daa6cbfe9a7f26505792913b8d1dec79052d86b5f79df3233836040516100c593929190610197565b60405180910390a150565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156100f857600080fd5b813567ffffffffffffffff8082111561011057600080fd5b818401915084601f83011261012457600080fd5b813581811115610136576101366100d0565b604051601f8201601f19908116603f0116810190838211818310171561015e5761015e6100d0565b8160405282815287602084870101111561017757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060018060a01b038086168352602081861681850152606060408501528451915081606085015260005b828110156101de578581018201518582016080015281016101c2565b828111156101f0576000608084870101525b5050601f01601f19169190910160800194935050505056fea264697066735822122010adf792b41e69335605cb2f1af48e6582a5a81771c068790c8957f58ac731ff64736f6c634300080f0033";
const isSuperArgs = (xs) => xs.length > 1;

@@ -58,0 +58,0 @@ class SampleRecipient__factory extends ethers_1.ContractFactory {

@@ -5,3 +5,3 @@ import { Signer, ContractFactory, Overrides } from "ethers";

import type { SingletonFactory, SingletonFactoryInterface } from "../../../contracts/test/SingletonFactory";
declare type SingletonFactoryConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
type SingletonFactoryConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
export declare class SingletonFactory__factory extends ContractFactory {

@@ -8,0 +8,0 @@ constructor(...args: SingletonFactoryConstructorParams);

@@ -6,4 +6,6 @@ import type * as accountAbstraction from "./@account-abstraction";

export * as factories from "./factories";
export type { BaseWallet } from "./@account-abstraction/contracts/core/BaseWallet";
export { BaseWallet__factory } from "./factories/@account-abstraction/contracts/core/BaseWallet__factory";
export type { BaseAccount } from "./@account-abstraction/contracts/core/BaseAccount";
export { BaseAccount__factory } from "./factories/@account-abstraction/contracts/core/BaseAccount__factory";
export type { IAccount } from "./@account-abstraction/contracts/interfaces/IAccount";
export { IAccount__factory } from "./factories/@account-abstraction/contracts/interfaces/IAccount__factory";
export type { IAggregator } from "./@account-abstraction/contracts/interfaces/IAggregator";

@@ -15,6 +17,4 @@ export { IAggregator__factory } from "./factories/@account-abstraction/contracts/interfaces/IAggregator__factory";

export { IStakeManager__factory } from "./factories/@account-abstraction/contracts/interfaces/IStakeManager__factory";
export type { IWallet } from "./@account-abstraction/contracts/interfaces/IWallet";
export { IWallet__factory } from "./factories/@account-abstraction/contracts/interfaces/IWallet__factory";
export type { SimpleWallet } from "./@account-abstraction/contracts/samples/SimpleWallet";
export { SimpleWallet__factory } from "./factories/@account-abstraction/contracts/samples/SimpleWallet__factory";
export type { SimpleAccount } from "./@account-abstraction/contracts/samples/SimpleAccount";
export { SimpleAccount__factory } from "./factories/@account-abstraction/contracts/samples/SimpleAccount__factory";
export type { SampleRecipient } from "./contracts/test/SampleRecipient";

@@ -21,0 +21,0 @@ export { SampleRecipient__factory } from "./factories/contracts/test/SampleRecipient__factory";

@@ -26,6 +26,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SingletonFactory__factory = exports.SampleRecipient__factory = exports.SimpleWallet__factory = exports.IWallet__factory = exports.IStakeManager__factory = exports.IEntryPoint__factory = exports.IAggregator__factory = exports.BaseWallet__factory = exports.factories = void 0;
exports.SingletonFactory__factory = exports.SampleRecipient__factory = exports.SimpleAccount__factory = exports.IStakeManager__factory = exports.IEntryPoint__factory = exports.IAggregator__factory = exports.IAccount__factory = exports.BaseAccount__factory = exports.factories = void 0;
exports.factories = __importStar(require("./factories"));
var BaseWallet__factory_1 = require("./factories/@account-abstraction/contracts/core/BaseWallet__factory");
Object.defineProperty(exports, "BaseWallet__factory", { enumerable: true, get: function () { return BaseWallet__factory_1.BaseWallet__factory; } });
var BaseAccount__factory_1 = require("./factories/@account-abstraction/contracts/core/BaseAccount__factory");
Object.defineProperty(exports, "BaseAccount__factory", { enumerable: true, get: function () { return BaseAccount__factory_1.BaseAccount__factory; } });
var IAccount__factory_1 = require("./factories/@account-abstraction/contracts/interfaces/IAccount__factory");
Object.defineProperty(exports, "IAccount__factory", { enumerable: true, get: function () { return IAccount__factory_1.IAccount__factory; } });
var IAggregator__factory_1 = require("./factories/@account-abstraction/contracts/interfaces/IAggregator__factory");

@@ -37,6 +39,4 @@ Object.defineProperty(exports, "IAggregator__factory", { enumerable: true, get: function () { return IAggregator__factory_1.IAggregator__factory; } });

Object.defineProperty(exports, "IStakeManager__factory", { enumerable: true, get: function () { return IStakeManager__factory_1.IStakeManager__factory; } });
var IWallet__factory_1 = require("./factories/@account-abstraction/contracts/interfaces/IWallet__factory");
Object.defineProperty(exports, "IWallet__factory", { enumerable: true, get: function () { return IWallet__factory_1.IWallet__factory; } });
var SimpleWallet__factory_1 = require("./factories/@account-abstraction/contracts/samples/SimpleWallet__factory");
Object.defineProperty(exports, "SimpleWallet__factory", { enumerable: true, get: function () { return SimpleWallet__factory_1.SimpleWallet__factory; } });
var SimpleAccount__factory_1 = require("./factories/@account-abstraction/contracts/samples/SimpleAccount__factory");
Object.defineProperty(exports, "SimpleAccount__factory", { enumerable: true, get: function () { return SimpleAccount__factory_1.SimpleAccount__factory; } });
var SampleRecipient__factory_1 = require("./factories/contracts/test/SampleRecipient__factory");

@@ -43,0 +43,0 @@ Object.defineProperty(exports, "SampleRecipient__factory", { enumerable: true, get: function () { return SampleRecipient__factory_1.SampleRecipient__factory; } });

{
"name": "@account-abstraction/utils",
"version": "0.2.3",
"version": "0.3.0",
"main": "./dist/src/index.js",

@@ -19,3 +19,3 @@ "license": "MIT",

"dependencies": {
"@account-abstraction/contracts": "^0.2.0",
"@account-abstraction/contracts": "0.3.0",
"@ethersproject/abi": "^5.7.0",

@@ -31,3 +31,3 @@ "@ethersproject/providers": "^5.7.0",

},
"gitHead": "f16c22b80978158f4310f7687dd311ef2276434c"
"gitHead": "48624ede779b449adf9b60c2db266af1cf6b1318"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc