import type { RoutingQueryEvent } from '../dht/index.js'; import type { HTTPRPCOptions } from '../index.js'; import type { HTTPRPCClient } from '../lib/core.js'; import type { PeerId } from '@libp2p/interface'; import type { CID } from 'multiformats/cid'; export interface RoutingFindProvsOptions extends HTTPRPCOptions { /** * How many providers to find * * @default 20 */ numProviders?: number; } export interface RoutingPutOptions extends HTTPRPCOptions { /** * When offline, save the IPNS record to the local datastore without * broadcasting to the network instead of simply failing */ allowOffline?: boolean; } export interface RoutingProvideOptions extends HTTPRPCOptions { /** * Recursively provide entire graph. */ recursive?: boolean; } export interface RoutingAPI { findPeer(peerId: string | PeerId, options?: HTTPRPCOptions): AsyncIterable; findProvs(key: string | CID, options?: RoutingFindProvsOptions): AsyncIterable; get(key: string | Uint8Array, options?: HTTPRPCOptions): AsyncIterable; put(key: string | Uint8Array, value: Uint8Array, options?: RoutingPutOptions): AsyncIterable; provide(key: string | string[] | CID | CID[], options?: RoutingProvideOptions): AsyncIterable; } export declare function createRouting(client: HTTPRPCClient): RoutingAPI; //# sourceMappingURL=index.d.ts.map