import { CarReader } from '@ipld/car'; import { CidString, IpnsString } from '@wovin/core/applog'; import { ThreadInMemory } from '@wovin/core/thread'; import { CID } from 'multiformats/cid'; import { ProxyConfig } from './utils.ts'; export declare class IPNSNeverPublishedError extends Error { constructor(ipns: string); } export declare class IPNSResolutionError extends Error { constructor(ipns: string, cause: unknown); } export declare function retrieveThread(proxyConfig: ProxyConfig, // ? which one when pubID: IpnsString | CidString | null, { readOnly, pinnedCID }?: { readOnly?: boolean; pinnedCID?: CidString; }): Promise<{ cid: CID; thread: ThreadInMemory; encryptedCount: number; }>; export declare function resolveIPNS(proxyConfig: Pick, // ? which one when name: IpnsString): Promise; /** * Best-effort resolve an IPNS name via one or more w3name-compatible HTTP services * (`GET /name/` → `{value:"/ipfs/"}`), independent of any connector * or UCAN auth and independent of the public IPFS DHT. * * This is the graceful-transition fallback for names published to w3name * (e.g. `https://name.web3.storage`) that haven't propagated to the public DHT, so * public gateways can't resolve them. Unlike {@link resolveIPNS} it returns `null` * instead of throwing, and races a list of bases — suitable as a last-resort step in * a larger resolution chain. Resolvers may be passed with or without a trailing `/name/`. * * @param ipns - The IPNS name (k51... string) * @param bases - w3name service base URLs (e.g. `["https://name.web3.storage"]`) * @returns The resolved CID, or null if no service could resolve the name */ export declare function resolveIPNSViaW3Name(ipns: string, bases: string[]): Promise; export declare function retrieveCar(gatewayBaseUrl: string, cid: CID): Promise; //# sourceMappingURL=retrieve.d.ts.map