import type { Opaque } from 'ts-essentials'; import type { ZodTypeDef } from 'zod'; import { z } from 'zod'; import type { UserEtherscanKeys, UserEtherscanURLs, UserEtherscanURLsInput } from '../abi-management/etherscan/explorerEndpoints'; import { NetworkSymbol } from '../abi-management/networks'; import { NestedDict } from '../utils/utility-types'; export type { UserEtherscanURLs, UserEtherscanURLsInput }; export declare type AddressInput = `0x${string}`; /** @internal */ export declare type Address = Opaque; /** * @see https://info.etherscan.com/what-is-an-ethereum-address/ * @param address - string representation of an address * @returns the same string branded as Address if it's a valid address */ export declare function parseAddress(address: string): Address; export declare type NestedAddresses = NestedDict
; export declare type NestedAddressesInput = NestedDict; export declare type EthSdkContracts = { [key in NetworkSymbol]?: NestedAddresses; }; export declare type EthSdkContractsInput = { [key in NetworkSymbol | (string & {})]?: NestedAddressesInput; }; export declare const ethSdKContractsSchema: z.ZodSchema; export declare type RpcURLs = { [key in NetworkSymbol | (string & {})]?: string; }; declare const abiSourceSchema: z.ZodUnion<[z.ZodLiteral<"etherscan">, z.ZodLiteral<"sourcify">]>; export declare type AbiSource = z.infer; export declare type NetworkIds = { [key in NetworkSymbol | (string & {})]?: number; }; export declare const networkIdsSchema: z.ZodSchema; export declare const flagsSchema: z.ZodObject<{ tsNocheck: z.ZodOptional; discriminateTypes: z.ZodBoolean; alwaysGenerateOverloads: z.ZodBoolean; }, "strip", z.ZodTypeAny, { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; }, { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; }>; declare const ethSdkConfigSchema: z.ZodObject<{ contracts: z.ZodType; outputPath: z.ZodDefault; etherscanKey: z.ZodOptional; etherscanKeys: z.ZodDefault>; etherscanURLs: z.ZodDefault>; rpc: z.ZodDefault>; noFollowProxies: z.ZodOptional; abiSource: z.ZodDefault, z.ZodLiteral<"sourcify">]>>; networkIds: z.ZodDefault>; typechainFlags: z.ZodOptional; discriminateTypes: z.ZodBoolean; alwaysGenerateOverloads: z.ZodBoolean; }, "strip", z.ZodTypeAny, { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; }, { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; }>>; }, "strict", z.ZodTypeAny, { etherscanKey?: string | undefined; noFollowProxies?: boolean | undefined; typechainFlags?: { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; } | undefined; contracts: EthSdkContracts; outputPath: string; etherscanKeys: UserEtherscanKeys; etherscanURLs: UserEtherscanURLs; rpc: RpcURLs; abiSource: "etherscan" | "sourcify"; networkIds: NetworkIds; }, { outputPath?: string | undefined; etherscanKey?: string | undefined; etherscanKeys?: UserEtherscanKeys | undefined; etherscanURLs?: UserEtherscanURLsInput | undefined; rpc?: RpcURLs | undefined; noFollowProxies?: boolean | undefined; abiSource?: "etherscan" | "sourcify" | undefined; networkIds?: NetworkIds | undefined; typechainFlags?: { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; } | undefined; contracts: EthSdkContractsInput; }>; /** * Type of *parsed* eth-sdk config. * @internal */ export interface EthSdkConfig extends z.infer { } /** * Type of eth-sdk config file contents. */ export declare type EthSdkConfigInput = z.input; export declare function parseEthSdkConfig(data: unknown): { etherscanKey?: string | undefined; noFollowProxies?: boolean | undefined; typechainFlags?: { tsNocheck?: boolean | undefined; discriminateTypes: boolean; alwaysGenerateOverloads: boolean; } | undefined; contracts: EthSdkContracts; outputPath: string; etherscanKeys: UserEtherscanKeys; etherscanURLs: UserEtherscanURLs; rpc: RpcURLs; abiSource: "etherscan" | "sourcify"; networkIds: NetworkIds; }; /** @internal */ export declare const createEthSdkConfig: (config: EthSdkConfigInput) => EthSdkConfig;