///
export = configure;
/**
* @typedef { import("./core").ClientOptions } ClientOptions
*/
/**
* @template T
* @typedef {(client: Client, clientOptions: ClientOptions) => T} Fn
*/
/**
* @template T
* @typedef {(clientOptions: ClientOptions) => T} Factory
*/
/**
* @template T
* @param {Fn} fn
* @returns {Factory}
*/
declare function configure(fn: Fn): Factory;
declare namespace configure {
export { ClientOptions, Fn, Factory };
}
type Fn = (client: Client, clientOptions: ClientOptions) => T;
type Factory = (clientOptions: ClientOptions) => T;
type ClientOptions = {
host?: string | undefined;
port?: number | undefined;
protocol?: string | undefined;
/**
* - Request headers.
*/
headers?: Headers | Record | undefined;
/**
* - Amount of time until request should timeout in ms or humand readable. https://www.npmjs.com/package/parse-duration for valid string values.
*/
timeout?: string | number | undefined;
/**
* - Path to the API.
*/
apiPath?: string | undefined;
/**
* - Full API URL.
*/
url?: string | URL | import("multiaddr") | undefined;
method?: "POST" | "GET" | undefined;
ipld?: {
/**
* - An array of additional [IPLD formats](https://github.com/ipld/interface-ipld-format) to support
*/
formats?: any[] | undefined;
/**
* - an async function that takes the name of an [IPLD format](https://github.com/ipld/interface-ipld-format) as a string and should return the implementation of that codec
*/
loadFormat?: ((format: string) => Promise) | undefined;
} | undefined;
/**
* - A [http.Agent](https://nodejs.org/api/http.html#http_class_http_agent) used to control connection persistence and reuse for HTTP clients (only supported in node.js)
*/
agent?: import("http").Agent | import("https").Agent | undefined;
};
import Client = require("./core");
//# sourceMappingURL=configure.d.ts.map