@alchemy/aa-core
Version:
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
24 lines (23 loc) • 1.45 kB
TypeScript
import type { Chain } from "viem";
import type { PromiseOrValue } from "../types.js";
import type { RecordableKeys } from "./types.js";
export declare const AlchemyChainMap: Map<number, Chain>;
export declare const getChain: (chainId: number) => Chain;
export declare const asyncPipe: <S, O, F>(...fns: ((s: S, o?: O | undefined, f?: F | undefined) => Promise<S>)[]) => (s: S, o?: O | undefined, f?: F | undefined) => Promise<S>;
export type Deferrable<T> = {
[K in keyof T]: PromiseOrValue<T[K]>;
};
export declare function resolveProperties<T>(object: Deferrable<T>): Promise<T>;
export declare function deepHexlify(obj: any): any;
export declare function defineReadOnly<T, K extends keyof T>(object: T, key: K, value: T[K]): void;
export declare function filterUndefined<T>(obj: T): T;
export declare function pick(obj: Record<string, unknown>, keys: string | string[]): {};
export declare const allEqual: (...params: any[]) => boolean;
export declare const conditionalReturn: <T>(condition: Promise<boolean>, value: () => Promise<T>) => Promise<T | undefined>;
export declare const toRecord: <T extends { [K in RecordableKeys<T>]: string | number | symbol; }, K_1 extends RecordableKeys<T>, V>(array: T[], selector: K_1, fn: (item: T) => V) => Record<T[K_1], V>;
export * from "./bigint.js";
export * from "./bytes.js";
export * from "./defaults.js";
export * from "./schema.js";
export type * from "./types.js";
export * from "./userop.js";