@abstraxn/account
Version:
@abstraxn/account: Empower ERC-4337 smart accounts with seamless APIs for enhanced decentralized finance experiences.
53 lines (52 loc) • 2.75 kB
TypeScript
import { UserOperation } from "@abstraxn/core-types";
import { VerificationGasLimits } from "./Interfaces";
import { BigNumber } from "ethers";
import { Bytes } from "ethers/lib/utils";
export declare const FACTORY_ADDRESS = "0x0adC1F2c9c7EdE2589f7f450959181a70701a735";
export declare const ECDSA_MODULE_ADDRESS = "0xbB226A6a80E81b54BBdE9888e8b8F623186b8c0B";
export declare const DEFAULT_IMPLEMENTATION_ADDRESS = "0x1A778a5228c18eF8d43D9FbE90B6Bb692ad82082";
export declare const DEFAULT_FALLBACK_HANDLER_ADDRESS = "0x8F0F9a3BD260Bf0EFEeDce84f037AFdc3EDe8E85";
export declare const DEFAULT_ENTRYPOINT_ADDRESS = "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789";
export declare const PROXY_CREATION_CODE = "0x6080346100aa57601f61012038819003918201601f19168301916001600160401b038311848410176100af578084926020946040528339810103126100aa57516001600160a01b0381168082036100aa5715610065573055604051605a90816100c68239f35b60405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420696d706c656d656e746174696f6e206164647265737300006044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405230546000808092368280378136915af43d82803e156020573d90f35b3d90fdfea2646970667358221220a643a3e437a687e6ded90abe47a4233f53666b0e4a45003271d6224f195cb56d64736f6c63430008110033";
export declare const DefaultGasLimits: VerificationGasLimits;
export declare const DefaultGasOverheads: GasOverheads;
export interface GasOverheads {
/**
* fixed overhead for entire handleOp bundle.
*/
fixed: number;
/**
* per userOp overhead, added on top of the above fixed per-bundle.
*/
perUserOp: number;
/**
* overhead for userOp word (32 bytes) block
*/
perUserOpWord: number;
/**
* zero byte cost, for calldata gas cost calculations
*/
zeroByte: number;
/**
* non-zero byte cost, for calldata gas cost calculations
*/
nonZeroByte: number;
/**
* expected bundle size, to split per-bundle overhead between all ops.
*/
bundleSize: number;
/**
* expected length of the userOp signature.
*/
sigSize: number;
}
export declare function packUserOp(op: Partial<UserOperation>, forSignature?: boolean): string;
export declare function calcPreVerificationGas(userOp: any, overheads?: Partial<GasOverheads>): BigNumber;
export declare const DefaultGasLimit: {
callGasLimit: number;
verificationGasLimit: number;
preVerificationGas: number;
};
export declare const DEFAULT_CONVERT_TO_FACTOR_PCT = 10;
export declare const isNullOrUndefined: (value: string | number | bigint | BigNumber | Bytes | undefined) => value is undefined;
export declare const convertToFactor: (userOp: Partial<UserOperation>) => Promise<Partial<UserOperation>>;