@lelantos-org/sdk / prover / loadArtifactBytes
Function: loadArtifactBytes() โ
function loadArtifactBytes(path, opts?): Promise<Uint8Array<ArrayBufferLike>>;Defined in: @lelantos-org/sdk/dist/prover/artifact-bytes.d.ts:75
Load artifact bytes from a filesystem path, file:// href, or http(s):// URL. Results are memoised for the life of the realm; a failed load is evicted so callers can retry.
http(s) loads also consult the persistent cache โ see configureArtifactCache.
The path is absolutised first, because that is what makes the memo key and the isHttpUrl persistence check agree across spellings. Doing it here rather than only in resolveArtifacts is deliberate: a caller-supplied proverPaths reaches this function without passing through there โ via WalletConfig.proverPaths, the presets helper, BundleCommon, or the public WasmProver.build entrypoint โ and a relative base on any of those routes would otherwise silently lose persistence and re-download on every load.
Parameters โ
| Parameter | Type |
|---|---|
path | string |
opts? | LoadArtifactOpts |
Returns โ
Promise<Uint8Array<ArrayBufferLike>>