import type { JsonFragment } from '@ethersproject/abi'; import { OptimalRate } from 'paraswap-core'; import { Address, Token, TxHash } from './token'; export type { Address, Token, TxHash }; export interface ConstructBaseInput { apiURL?: string; network: number; } interface FetcherInputBase { url: string; headers?: Record; signal?: AbortSignal; } export interface FetcherGetInput extends FetcherInputBase { method: 'GET'; } export interface FetcherPostInput extends FetcherInputBase { method: 'POST'; data: Record; } export declare type FetcherFunction = (params: FetcherGetInput | FetcherPostInput) => Promise; export interface ConstructFetchInput extends ConstructBaseInput { fetcher: FetcherFunction; } interface OverridesBase { from?: string; gasPrice?: string; gas?: number; value?: number | string; } export interface StaticCallOverrides extends OverridesBase { block?: string | number | 'latest' | 'pending' | 'earliest' | 'genesis'; } export interface TxSendOverrides extends OverridesBase { nonce?: number; } interface ContractCallInput { address: Address; abi: ReadonlyArray; contractMethod: T; static: boolean; args: any[]; } interface ContractCallStaticInput extends ContractCallInput { static: true; overrides: StaticCallOverrides; } interface ContractCallTransactionInput extends ContractCallInput { static: false; overrides: TxSendOverrides; } export declare type ContractCallerFunction = (params: ContractCallTransactionInput | ContractCallStaticInput) => Promise; export interface ConstructProviderFetchInput extends ConstructFetchInput { contractCaller: ContractCallerFunction; } export declare type TokenFromApi = Pick; export interface TokensApiResponse { tokens: TokenFromApi[]; } export interface TokenApiResponse { token?: TokenFromApi; } export declare type NoExtraKeysCheck = Exclude extends never ? Checking : never; export declare type PriceRouteApiResponse = { priceRoute: OptimalRate; }; export declare type PriceRouteApiErrorResponse = { error: string; } | { error: string; value: string; priceRoute: OptimalRate; }; //# sourceMappingURL=types.d.ts.map