Skip to content

@lelantos-org/sdk / prover / loadArtifactBytes

Function: loadArtifactBytes() ​

ts
function loadArtifactBytes(path, opts?): Promise<Uint8Array<ArrayBufferLike>>;

Defined in: @lelantos-org/sdk/dist/prover/artifact-bytes.d.ts:65

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, so the memo key and the isHttpUrl persistence check agree across spellings; a relative path would otherwise lose persistence and download again in every realm.

Parameters ​

ParameterType
pathstring
opts?LoadArtifactOpts

Returns ​

Promise<Uint8Array<ArrayBufferLike>>