export = ipfsClient; /** * @param {import("./lib/core").ClientOptions} options */ declare function ipfsClient(options?: import("./lib/core").ClientOptions): { add: (input: import("ipfs-core-types/src/files").ToEntry, options?: (import("ipfs-core-types/src/root").AddAllOptions & HttpOptions) | undefined) => Promise; addAll: (source: import("ipfs-core-types/src/files").ImportSource, options?: (import("ipfs-core-types/src/root").AddAllOptions & HttpOptions) | undefined) => AsyncIterable; bitswap: { wantlist: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; wantlistForPeer: (peerId: string | CID | Uint8Array | import("peer-id"), options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; stat: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; unwant: (cid: CID | CID[], options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; }; block: { get: (cid: string | CID | Uint8Array, options?: (import("ipfs-core/src/components/block/get").GetOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; stat: (cid: CID, options?: (import("ipfs-core/src/components/block/stat").StatOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; put: (data: Uint8Array | import("ipfs-core-types/src/block-service").Block, options?: (import("ipfs-core/src/components/block/put").PutOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; rm: (cid: CID | CID[], options?: (import("ipfs-core/src/components/block/rm").RmOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; }; bootstrap: { add: (addr: multiaddr, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; clear: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; rm: (addr: multiaddr, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; reset: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; list: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; }; cat: (path: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core-types/src/root").CatOptions & HttpOptions) | undefined) => AsyncIterable; commands: (options?: {}) => Promise; config: { getAll: import("./interface").APIWithExtraOptions<(options?: import("ipfs-core-types").AbortOptions | undefined) => Promise, HttpOptions>; get: import("./interface").APIWithExtraOptions<(key: string, options?: import("ipfs-core-types").AbortOptions | undefined) => Promise, HttpOptions>; set: import("./interface").APIWithExtraOptions<(key: string, value: import("ipfs-core-types/src/basic").ToJSON, options?: import("ipfs-core-types").AbortOptions | undefined) => Promise, HttpOptions>; replace: import("./interface").APIWithExtraOptions<(value: import("ipfs-core/src/components/config").IPFSConfig, options?: import("ipfs-core-types").AbortOptions | undefined) => Promise, HttpOptions>; profiles: { apply: (profile: any, options?: {}) => Promise<{ original: any; updated: any; }>; list: (options?: {}) => Promise; }; }; dag: { get: import("./interface").APIWithExtraOptions<(ipfsPath: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/dag/get").GetOptions & import("ipfs-core-types").AbortOptions) | undefined) => Promise, HttpOptions>; put: import("./interface").APIWithExtraOptions<(dagNode: any, options?: (import("ipfs-core/src/components/dag/put").WithCID & import("ipfs-core/src/components/dag/put").OtherPutOptions & import("ipfs-core-types").AbortOptions) | (import("ipfs-core/src/components/dag/put").WithCIDOptions & import("ipfs-core/src/components/dag/put").OtherPutOptions & import("ipfs-core-types").AbortOptions) | undefined) => Promise, HttpOptions>; resolve: import("./interface").APIWithExtraOptions<(ipfsPath: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/dag/resolve").ResolveOptions & import("ipfs-core-types").AbortOptions) | undefined) => Promise, HttpOptions>; }; dht: { get: (key: string | Uint8Array, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; put: (key: Uint8Array, value: Uint8Array, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; findProvs: (cid: CID, options?: (import("ipfs-core/src/components/dht").FindProvsOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; findPeer: (peerId: CID | import("peer-id"), options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise<{ id: string; addrs: multiaddr[]; }>; provide: (cids: CID | CID[], options?: (import("ipfs-core/src/components/dht").ProvideOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; query: (peerId: string | import("peer-id"), options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable<{ id: CID; addrs: multiaddr[]; }>; }; diag: { net: (options?: {}) => Promise; sys: (options?: {}) => Promise; cmds: (options?: {}) => Promise; }; dns: import("./interface").APIWithExtraOptions<(domain: string, options?: import("ipfs-core/src/components/dns").DNSOptions | undefined) => Promise, HttpOptions>; files: { chmod: (path: string, mode: string | number, options?: (import("ipfs-core/src/components/files/chmod").ChmodOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; cp: (...args: [a1: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/files/cp").CpOptions & HttpOptions) | undefined] | [a1: import("ipfs-core-types/src/root").IPFSPath, a2: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/files/cp").CpOptions & HttpOptions) | undefined] | [a1: import("ipfs-core-types/src/root").IPFSPath, a2: import("ipfs-core-types/src/root").IPFSPath, a3: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/files/cp").CpOptions & HttpOptions) | undefined]) => Promise; flush: (path: string, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; ls: (path: string, options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; mkdir: (path: string, options?: (import("ipfs-core/src/components/files/mkdir").MkdirOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; mv: (...args: [a1: string, a2: string, options?: (import("ipfs-core/src/components/files/mv").MvOptions & HttpOptions) | undefined] | [a1: string, a2: string, a3: string, options?: (import("ipfs-core/src/components/files/mv").MvOptions & HttpOptions) | undefined]) => Promise; read: (path: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core/src/components/files/read").ReadOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => AsyncIterable; rm: (...args: [a1: string, options?: (import("ipfs-core/src/components/files/rm").RmOptions & HttpOptions) | undefined] | [a1: string, a2: string, options?: (import("ipfs-core/src/components/files/rm").RmOptions & HttpOptions) | undefined] | [a1: string, a2: string, a3: string, options?: (import("ipfs-core/src/components/files/rm").RmOptions & HttpOptions) | undefined]) => Promise; stat: (path: string, options?: (import("ipfs-core/src/components/files/stat").StatOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; touch: (path: string, options?: (import("ipfs-core/src/components/files/touch").TouchOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; write: (path: string, input: string | Uint8Array | AsyncIterable | Blob, options?: (import("ipfs-core/src/components/files/write").WriteOptions & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; }; get: (path: import("ipfs-core-types/src/root").IPFSPath, options?: (import("ipfs-core-types/src/root").GetOptions & HttpOptions) | undefined) => AsyncIterable; getEndpointConfig: () => { host: string; port: string; protocol: string; pathname: string; 'api-path': string; }; id: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; key: { gen: (name: any, options?: {}) => Promise; list: (options?: {}) => Promise; rename: (oldName: any, newName: any, options?: {}) => Promise; rm: (name: any, options?: {}) => Promise; import: (name: any, pem: any, password: any, options?: {}) => Promise; }; log: { tail: (options?: {}) => AsyncGenerator; ls: (options?: {}) => Promise; level: (subsystem: any, level: any, options?: {}) => Promise; }; ls: (path: any, options?: {}) => AsyncGenerator<{ name: any; path: string; size: any; cid: CID; type: string; depth: any; }, void, undefined>; mount: (options?: {}) => Promise; name: { publish: (path: any, options?: {}) => Promise; resolve: (path: any, options?: {}) => AsyncGenerator; pubsub: { cancel: (name: any, options?: {}) => Promise; state: (options?: {}) => Promise; subs: (options?: {}) => Promise; }; }; object: { data: (cid: any, options?: {}) => Promise; get: (cid: any, options?: {}) => Promise; links: (cid: any, options?: {}) => Promise; new: (options?: {}) => Promise; patch: { addLink: (cid: any, dLink: any, options?: {}) => Promise; appendData: (cid: any, data: any, options?: {}) => Promise; rmLink: (cid: any, dLink: any, options?: {}) => Promise; setData: (cid: any, data: any, options?: {}) => Promise; }; put: (obj: any, options?: {}) => Promise; stat: (cid: any, options?: {}) => Promise; }; pin: { add: (path: any, options?: {}) => Promise; addAll: (source: any, options?: {}) => AsyncGenerator; ls: (options?: {}) => AsyncGenerator<{ type: any; cid: CID; }, void, unknown>; rm: (path: any, options?: {}) => Promise; rmAll: (source: any, options?: {}) => AsyncGenerator; remote: import("./pin/remote"); }; ping: (peerId: any, options?: {}) => AsyncGenerator; pubsub: { ls: (options?: {}) => Promise; peers: (topic: any, options?: {}) => Promise; publish: (topic: any, data: any, options?: {}) => Promise; subscribe: (topic: any, handler: any, options?: {}) => Promise; unsubscribe: (topic: any, handler: any) => Promise; }; refs: { (args: any, options?: {}): AsyncGenerator; local: (options?: {}) => AsyncGenerator; }; repo: { gc: (options?: {}) => AsyncGenerator; stat: (options?: {}) => Promise<{ numObjects: import("bignumber.js").default; repoSize: import("bignumber.js").default; repoPath: any; version: any; storageMax: import("bignumber.js").default; }>; version: (options?: {}) => Promise; }; resolve: (path: string, options?: (import("ipfs-core/src/components/resolve").ResolveSettings & import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; stats: { bitswap: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; bw: (options?: {}) => AsyncGenerator; repo: (options?: {}) => Promise<{ numObjects: import("bignumber.js").default; repoSize: import("bignumber.js").default; repoPath: any; version: any; storageMax: import("bignumber.js").default; }>; }; stop: (options?: {}) => Promise; shutdown: (options?: {}) => Promise; swarm: { addrs: (options?: {}) => Promise<{ id: string; addrs: any; }[]>; connect: (addrs: any, options?: {}) => Promise; disconnect: (addrs: any, options?: {}) => Promise; localAddrs: (options?: {}) => Promise; peers: (options?: {}) => Promise; }; version: (options?: (import("ipfs-core-types").AbortOptions & HttpOptions) | undefined) => Promise; }; declare namespace ipfsClient { export { HttpOptions, AbortOptions, Implements, ImplementsMethod, APIWithExtraOptions }; } type HttpOptions = { /** * - An object or [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) instance that can be used to set custom HTTP headers. Note that this option can also be [configured globally](#custom-headers) via the constructor options. */ headers?: Headers | Record | undefined; /** * - An object or [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) instance that can be used to add additional query parameters to the query string sent with each request. */ searchParams?: Record | URLSearchParams | undefined; }; import CID = require("cids"); import multiaddr = require("multiaddr"); /** * } */ type AbortOptions = import("ipfs-core-types").AbortOptions; /** * This is an utility type that can be used to derive type of the HTTP Client * API from the Core API. It takes type of the API factory (from ipfs-core), * derives API from it's return type and extends it last `options` parameter * with `HttpOptions`. * * This can be used to avoid (re)typing API interface when implementing it in * http client e.g you can annotate `ipfs.addAll` implementation with * * `@type {Implements}` * * **Caution**: This supports APIs with up to four parameters and last optional * `options` parameter, anything else will result to `never` type. */ type Implements any> = import("./interface").APIWithExtraOptions, HttpOptions>; type ImplementsMethod any> = ReturnType[Key] extends (...args: any[]) => any ? import("./interface").APIWithExtraOptions[Key], HttpOptions> : never; type APIWithExtraOptions = import("./interface").APIWithExtraOptions; //# sourceMappingURL=index.d.ts.map