import { CID } from 'multiformats/cid'; /** * Resolve an IPNS name to a CID using a public IPFS gateway's HTTP HEAD response. * * Mechanism: per the IPFS HTTP Gateway spec, `HEAD /ipns//` returns the * IPNS-resolved root CID in the `X-Ipfs-Roots` response header (space-separated, ordered * from root to leaf). The first entry is the IPNS-resolved CID. * * This works against any gateway that follows the spec and exposes CORS for HEAD * (most public gateways do, e.g. ipfs.zt.ax, ipfs.io, dweb.link). * * The legacy w3name HTTP endpoint (`GET /name/` returning `{value: "/ipfs/"}`) * is also supported here for back-compat with self-hosted w3name-like services — but the * X-Ipfs-Roots path is preferred since it's the standardised gateway mechanism. * * @param ipns - The IPNS name (k51... string) * @param gateways - List of gateway base URLs (e.g. `["https://ipfs.zt.ax"]`) * @returns The resolved CID, or null if no gateway could resolve the name */ export declare function resolveIPNSViaGateway(ipns: string, gateways: string[]): Promise; //# sourceMappingURL=gateway-resolver.d.ts.map