Helia
    Preparing search index...

    Interface TraversalStrategy

    Interface for different traversal strategies.

    While traversing the DAG, it will yield blocks that it has traversed.

    interface TraversalStrategy {
        isTarget(cid: CID): boolean;
        traverse<T extends BlockView<any, any, any, 0 | 1>>(
            cid: CID,
            block: T,
        ): AsyncGenerator<CID<unknown, number, number, Version>, void, undefined>;
    }

    Implemented by

    Index

    Methods

    • Returns true if the current CID is the target and we should switch to the export strategy

      Parameters

      Returns boolean