@armada/sdk / index / IndexedDbArtifactCache
Class: IndexedDbArtifactCache
Defined in: src/prover/artifact-cache.ts:39
Caches an inner ArtifactSource's resolved sets in IndexedDB (browser). The first resolve for a shape fetches + stores; later resolves read from IndexedDB, so the multi-MB zkey isn't re-downloaded per proof.
Entries are keyed by the shape's digests in the pinned manifest, so shipping new circuits (a new manifest) is a cache miss by construction — stale artifacts are never served. Only bytes that match the manifest are stored or returned (ArtifactIntegrityError otherwise), and a shape the manifest doesn't pin is rejected without resolving it. Old entries stay until clear().
Implements
Constructors
Constructor
new IndexedDbArtifactCache(
inner,opts):IndexedDbArtifactCache
Defined in: src/prover/artifact-cache.ts:42
Parameters
inner
opts
manifest
dbName?
string
Returns
IndexedDbArtifactCache
Methods
resolve()
resolve(
shape,options?):Promise<ArtifactSet>
Defined in: src/prover/artifact-cache.ts:47
Parameters
shape
options?
Returns
Promise<ArtifactSet>
Implementation of
clear()
clear():
Promise<void>
Defined in: src/prover/artifact-cache.ts:62
Drop every cached artifact, including entries left behind by earlier manifests.
Returns
Promise<void>