import type { EtherscanResponse, Transport } from './types.js'; /** Endpoint-specific query parameters supplied by a namespace method. */ export type QueryParams = Record; /** The shared GET request function handed to every namespace. */ export interface GetRequest { (params: QueryParams): Promise>; } /** A POST request function (used by the contract-verification endpoints). */ export interface PostRequest { (params: QueryParams): Promise>; } /** A GET against an arbitrary path under the base URL (e.g. `/v2/chainlist`). */ export interface RawGet { (path: string): Promise>; } export interface RequestConfig { baseUrl: string; timeout: number; } /** True for keys that could pollute a prototype if copied via bracket assignment. */ export declare function isUnsafeKey(key: string): boolean; /** * Builds the shared GET request function. Every namespace passes a plain params * object; this injects the universal `apikey` and `chainid`, serialises the * query, performs the GET via the supplied transport, and normalises the result. */ export declare function createGetRequest(request: Transport, defaults: Record, config: RequestConfig): GetRequest; /** * Builds a POST request function. Params (plus `apikey`/`chainid`) are sent as a * form-encoded body — required by the contract-verification endpoints. */ export declare function createPostRequest(request: Transport, defaults: Record, config: RequestConfig): PostRequest; /** * Builds a raw GET function for endpoints that live outside `/v2/api` and take * no apikey/chainid — currently just `/v2/chainlist`. */ export declare function createRawGet(request: Transport, config: RequestConfig): RawGet;