abstractionkit
Version:
Account Abstraction 4337 SDK by Candidelabs
60 lines • 3.15 kB
TypeScript
import { SmartAccount } from "../SmartAccount";
import { GasOption, PolygonChain, StateOverrideSet, UserOperationV8 } from "src/types";
import { SendUseroperationResponse } from "../SendUseroperationResponse";
export interface SimpleMetaTransaction {
to: string;
value: bigint;
data: string;
}
export interface CreateUserOperationOverrides {
nonce?: bigint;
callData?: string;
callGasLimit?: bigint;
verificationGasLimit?: bigint;
preVerificationGas?: bigint;
maxFeePerGas?: bigint;
maxPriorityFeePerGas?: bigint;
callGasLimitPercentageMultiplier?: number;
verificationGasLimitPercentageMultiplier?: number;
preVerificationGasPercentageMultiplier?: number;
maxFeePerGasPercentageMultiplier?: number;
maxPriorityFeePerGasPercentageMultiplier?: number;
state_override_set?: StateOverrideSet;
dummySignature?: string;
gasLevel?: GasOption;
polygonGasStation?: PolygonChain;
eip7702Auth?: {
chainId: bigint;
address?: string;
nonce?: bigint;
yParity?: string;
r?: string;
s?: string;
};
}
export declare class Simple7702Account extends SmartAccount {
static readonly DEFAULT_DELEGATEE_ADDRESS = "0xe6Cae83BdE06E4c305530e199D7217f42808555B";
static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108";
static readonly executorFunctionSelector = "0xb61d27f6";
static readonly executorFunctionInputAbi: string[];
static readonly batchExecutorFunctionSelector = "0x34fcd5be";
static readonly batchExecutorFunctionInputAbi: string[];
static readonly dummySignature = "0xd2614025fc173b86704caf37b2fb447f7618101a0d31f5f304c777024cef38a060a29ee43fcf0c46f9107d4f670b8a85c2c017a1fe9e4af891f24f0be6ba5d671c";
readonly entrypointAddress: string;
constructor(accountAddress: string, overrides?: {
entrypointAddress?: string;
});
static createAccountCallData(to: string, value: bigint, data: string): string;
static createAccountCallDataSingleTransaction(metaTransaction: SimpleMetaTransaction): string;
static createAccountCallDataBatchTransactions(transactions: SimpleMetaTransaction[]): string;
createUserOperation(transactions: SimpleMetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationOverrides): Promise<UserOperationV8>;
estimateUserOperationGas(userOperation: UserOperationV8, bundlerRpc: string, overrides?: {
stateOverrideSet?: StateOverrideSet;
dummySignature?: string;
}): Promise<[bigint, bigint, bigint]>;
signUserOperation(useroperation: UserOperationV8, privateKey: string, chainId: bigint): string;
sendUserOperation(userOperation: UserOperationV8, bundlerRpc: string): Promise<SendUseroperationResponse>;
prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
static prependTokenPaymasterApproveToCallDataStatic(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
}
//# sourceMappingURL=Simple7702Account.d.ts.map