Documentation
    Preparing search index...

    Function fetchBlob

    • Fetch a blob by SHA-256 from a list of Blossom servers, returning the first server's bytes whose hash matches. The returned bytes are always re-verified against sha256Hex — servers (and gateways) are never trusted.

      Parameters

      • servers: readonly string[]

        Candidate Blossom server base URLs, tried in order

      • sha256Hex: string

        The blob's lowercase-hex SHA-256

      • fetchBytes: (url: string) => Promise<Uint8Array<ArrayBufferLike>>

        Fetches raw bytes for a URL (<server>/<sha256>)

      Returns Promise<Uint8Array<ArrayBufferLike>>

      The verified blob bytes

      NappletResolutionError blob-unavailable if no server serves a hash-matching blob