helia
    Preparing search index...

    Interface Router

    interface Router {
        name: string;
        cancelReprovide?(key: CID, options?: AbortOptions): Promise<void>;
        capabilities?(): "fallback"[];
        findPeer?(
            peer: CID,
            options?: RoutingOptions<RoutingFindPeerProgressEvents>,
        ): Promise<Peer>;
        findProviders?(
            cid: CID,
            options?: RoutingOptions<RoutingFindProvidersProgressEvents>,
        ): AsyncIterable<Provider>;
        get?(
            key: Uint8Array,
            options?: RoutingOptions<RoutingGetProgressEvents>,
        ): Promise<Uint8Array<ArrayBuffer>>;
        getClosestPeers?(
            key: Uint8Array,
            options?: RoutingOptions<RoutingGetClosestPeersProgressEvents>,
        ): AsyncIterable<Peer>;
        provide?(
            cid: CID,
            options?: RoutingOptions<RoutingProvideProgressEvents>,
        ): Promise<void>;
        put?(
            key: Uint8Array,
            value: Uint8Array,
            options?: RoutingOptions<RoutingPutProgressEvents>,
        ): Promise<void>;
    }
    Index
    name: string

    The name of this routing implementation

    • Helia will periodically re-provide every previously provided CID. Use this method to no longer re-provide the passed CID.

      Parameters

      Returns Promise<void>

      // ...
      await contentRouting.cancelReprovide(cid, {
      signal: AbortSignal.timeout(5_000)
      })