UNPKG

abstractionkit

Version:

Account Abstraction 4337 SDK by Candidelabs

32 lines 2.19 kB
import { AbiInputValue, UserOperationV6, JsonRpcParam, GasOption, JsonRpcResult, UserOperationV7, PolygonChain } from "./types"; export declare function createUserOperationHash(useroperation: UserOperationV6 | UserOperationV7, entrypointAddress: string, chainId: bigint): string; export declare function createPackedUserOperationV6(useroperation: UserOperationV6): string; export declare function createPackedUserOperationV7(useroperation: UserOperationV7): string; export declare function createCallData(functionSelector: string, functionInputAbi: string[], functionInputParameters: AbiInputValue[]): string; export declare function sendJsonRpcRequest(rpcUrl: string, method: string, params: JsonRpcParam): Promise<JsonRpcResult>; export declare function getFunctionSelector(functionSignature: string): string; export declare function fetchAccountNonce(rpcUrl: string, entryPoint: string, account: string, key?: number): Promise<bigint>; export declare function fetchGasPrice(provideRpc: string, gasLevel?: GasOption): Promise<[bigint, bigint]>; export declare function fetchGasPricePolygon(polygonChain: PolygonChain, gasLevel?: GasOption): Promise<[bigint, bigint]>; export declare function calculateUserOperationMaxGasCost(useroperation: UserOperationV6 | UserOperationV7): bigint; export type DepositInfo = { deposit: bigint; staked: boolean; stake: bigint; unstakeDelaySec: bigint; withdrawTime: bigint; }; export declare function getBalanceOf(nodeRpcUrl: string, address: string, entrypointAddress: string): Promise<bigint>; export declare function getDepositInfo(nodeRpcUrl: string, address: string, entrypointAddress: string): Promise<DepositInfo>; type EthCallTransaction = { from?: string; to: string; gas?: bigint; gasPrice?: bigint; value?: bigint; data?: string; }; export declare function sendEthCallRequest(nodeRpcUrl: string, ethCallTransaction: EthCallTransaction, blockNumber: string | bigint, stateOverrides?: object): Promise<string>; export declare function sendEthGetCodeRequest(nodeRpcUrl: string, contractAddress: string, blockNumber: string | bigint): Promise<string>; export {}; //# sourceMappingURL=utils.d.ts.map