@sovereignbase/storage
    Preparing search index...

    Function loadObject

    • Loads, decrypts, and decodes an object from the cache or its remote URL.

      The Cache API is checked first. On a miss, the URL is fetched without credentials. Successful cache and network responses receive refreshed cache metadata in the background. A non-successful HTTP response resolves to undefined.

      Parameters

      • url: `http://${string}` | `https://${string}`

        Absolute HTTP(S) URL used as both the cache key and network location.

      • cipherKey: CipherKey

        The same cryptosuite cipher key used to store the object.

      • cacheOnly: boolean = false

        When true, return undefined on a cache miss without fetching.

      Returns Promise<unknown>

      The decoded object, or undefined for a non-successful HTTP response.

      StorageError with code INVALID_PADDING when decrypted bytes do not contain a valid length-prefixed 1 KiB padding envelope.