NARU API
    Preparing search index...

    One package's transfer policy, bound to the document its resources are resolved against.

    Every method is the corresponding free function with this policy applied, so an embedder configures the transport once and hands it to whatever loads the package instead of repeating the policy at each call site.

    Index
    documentUrl: URL
    origins: readonly string[]

    Every origin this package's resources may be fetched from.

    • Reads one resource, from the persistent tier when the request declares an identity the tier holds verified bytes for, and from the network otherwise. Network bytes are published only when they match the declared identity; mismatching bytes are returned unchanged so the caller raises its own verification error, exactly as it does without a tier.

      Parameters

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Parameters

      • response: Response
      • limitBytes: number
      • label: string

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Resolves a declared URI against the document and holds it to the policy.

      Parameters

      • uri: string
      • baseUrl: URL = ...
      • label: string = uri

      Returns URL

    • The ceiling one resource is read against: its own declared length when the package states one, so a resource is never allowed to grow past what it promised, and the single-resource ceiling otherwise.

      Parameters

      • OptionaldeclaredByteLength: number

      Returns number