///
///
import type { Agent as HttpAgent } from 'http';
import type { Agent as HttpsAgent } from 'https';
import type { Multiaddr } from '@multiformats/multiaddr';
import type { BlockCodec } from 'multiformats/codecs/interface';
import type { MultihashHasher } from 'multiformats/hashes/interface';
import type { MultibaseCodec } from 'multiformats/bases/interface';
import type { IPFS } from 'ipfs-core-types';
export interface Options {
host?: string;
port?: number;
protocol?: string;
headers?: Headers | Record;
timeout?: number | string;
apiPath?: string;
url?: URL | string | Multiaddr;
ipld?: Partial;
agent?: HttpAgent | HttpsAgent;
}
export interface LoadBaseFn {
(codeOrName: number | string): Promise>;
}
export interface LoadCodecFn {
(codeOrName: number | string): Promise>;
}
export interface LoadHasherFn {
(codeOrName: number | string): Promise;
}
export interface IPLDOptions {
loadBase: LoadBaseFn;
loadCodec: LoadCodecFn;
loadHasher: LoadHasherFn;
bases: Array>;
codecs: Array>;
hashers: MultihashHasher[];
}
export interface HTTPClientExtraOptions {
headers?: Record;
searchParams?: URLSearchParams;
}
export interface EndpointConfig {
host: string;
port: string;
protocol: string;
pathname: string;
'api-path': string;
}
export interface IPFSHTTPClient extends IPFS {
getEndpointConfig: () => EndpointConfig;
}
//# sourceMappingURL=types.d.ts.map