Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Function readBundle

    • Reads a whole pack, or a pack that arrives in chunks, and returns its index and state. Every block is checked as it lands, and the set digest is checked at the end. Throws bad-bundle.

      Parameters

      • source: Bytes | AsyncIterable<Bytes, any, any>
      • maxFrameBytes: number = MAX_BUNDLE_FRAME_BYTES

      Returns Promise<{ index: BundleIndex; state: BundleState }>