UNPKG

@abstract-foundation/agw-client

Version:
21 lines 1.85 kB
import { type Address, type Calls, type Chain, type Client, type Hex, type Narrow, type PublicClient, type Transport, type TypedDataDefinition, type UnionRequiredBy } from "viem"; import type { ChainEIP712, SignEip712TransactionParameters } from "viem/zksync"; import type { Call } from "./types/call.js"; export declare const VALID_CHAINS: Record<number, Chain>; export declare function convertBigIntToString(value: any): any; export declare function getSmartAccountAddressFromInitialSigner<chain extends ChainEIP712 | undefined = ChainEIP712 | undefined>(initialSigner: Address, publicClient: PublicClient<Transport, chain>): Promise<Hex>; export declare function isAGWAccount<chain extends ChainEIP712 | undefined = ChainEIP712 | undefined>(publicClient: PublicClient<Transport, chain>, address: Address): Promise<boolean>; export declare function isSmartAccountDeployed<transport extends Transport = Transport, chain extends ChainEIP712 | undefined = ChainEIP712 | undefined>(client: Client<transport, chain>, address: Hex): Promise<boolean>; export declare function getInitializerCalldata(initialOwnerAddress: Address, validatorAddress: Address, initialCall: Call): Hex; export declare function transformHexValues(transaction: any, keys: string[]): void; export declare function isEip712TypedData(typedData: TypedDataDefinition): boolean; export declare function transformEip712TypedData(typedData: TypedDataDefinition): UnionRequiredBy<Omit<SignEip712TransactionParameters, "chain">, "to" | "data"> & { chainId: number; }; export declare function encodeCalls<const calls extends readonly unknown[]>(calls: Calls<Narrow<calls>>): { to: Address; value?: bigint; data?: Hex; }[]; export declare function formatCalls<const calls extends readonly unknown[]>(calls: Calls<Narrow<calls>>): Call[]; //# sourceMappingURL=utils.d.ts.map