/** * Node Resolver — multi-identifier resolution for SDN nodes. * * Resolves various identifier formats to a usable node endpoint: * - PeerID (12D3KooW...) * - .onion address * - IPFS CID (bafy... / Qm...) * - IPNS name (k51...) * - HTTP(S) URL * - Multiaddr (/ip4/... /dns4/...) * - ENS name (*.eth) * - EPM FlatBuffer bytes */ import type { ParsedEPM } from './epm-resolver'; /** Identifier types the resolver can detect. */ export type IdentifierType = 'peerId' | 'onion' | 'cid' | 'ipns' | 'ens' | 'http' | 'multiaddr' | 'epm'; /** Result of resolving a node identifier. */ export interface ResolvedNode { /** Libp2p PeerID (12D3KooW...) if known. */ peerId?: string; /** HTTP(S) base URL for the node's API (no trailing slash). */ httpUrl?: string; /** Multiaddrs discovered for the node. */ multiaddrs?: string[]; /** Parsed EPM if available. */ epm?: ParsedEPM; /** What kind of identifier was provided. */ identifierType: IdentifierType; } /** Options for resolveNode(). */ export interface ResolveOptions { /** IPFS HTTP gateway URL for CID/IPNS resolution (default: https://dweb.link). */ ipfsGateway?: string; /** Timeout in ms for HTTP fetches (default: 10000). */ timeout?: number; } /** * Detect the type of a node identifier string. */ export declare function detectIdentifierType(id: string): IdentifierType; /** * Resolve a node identifier to connection details. * * @param id - A PeerID, .onion address, CID, IPNS name, HTTP URL, multiaddr, or ENS name. * @param opts - Resolution options. * @returns Resolved node details including HTTP URL and/or multiaddrs. */ export declare function resolveNode(id: string, opts?: ResolveOptions): Promise; //# sourceMappingURL=resolver.d.ts.map