@trylimbo/sdk-verifier-wasm 0.2.25 → 0.3.0-canary.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,31 +34,34 @@ export class AssetVerifier {
34
34
  /**
35
35
  * Verify an asset against the configured trust anchors and per-call recovery options.
36
36
  *
37
- * Reads the C2PA-native formats. A container format (MXF) is plugin-backed, and plugins
38
- * are native, so a master is verified through the native SDK.
37
+ * Reads the C2PA handlers included in the browser build. Additional native modules require
38
+ * the Node or Python SDK.
39
+ * `format` optionally declares the media type for inputs such as SVG and plain text.
39
40
  *
40
41
  * # Errors
41
42
  *
42
- * Throws on a malformed `input`, a repository (or binder) failure, or a validation
43
+ * Throws on a malformed `source`, a repository (or engine) failure, or a validation
43
44
  * failure.
44
- * @param {RangeSource} input
45
+ * @param {RangeSource} source
45
46
  * @param {Recovery | null} [recovery]
46
- * @returns {Promise<AssetVerification>}
47
+ * @param {string | null} [format]
48
+ * @returns {Promise<Verification>}
47
49
  */
48
- verify(input, recovery) {
49
- const ret = wasm.assetverifier_verify(this.__wbg_ptr, input, isLikeNone(recovery) ? 0 : addToExternrefTable0(recovery));
50
+ verify(source, recovery, format) {
51
+ var ptr0 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
52
+ var len0 = WASM_VECTOR_LEN;
53
+ const ret = wasm.assetverifier_verify(this.__wbg_ptr, source, isLikeNone(recovery) ? 0 : addToExternrefTable0(recovery), ptr0, len0);
50
54
  return ret;
51
55
  }
52
56
  }
53
57
  if (Symbol.dispose) AssetVerifier.prototype[Symbol.dispose] = AssetVerifier.prototype.free;
54
58
 
55
59
  /**
56
- * A [`RangeSource`](crate::wasm::RangeInput) over a `Blob`: a `File` off an `<input>`, a
60
+ * A `RangeSource` over a `Blob`: a `File` off an `<input>`, a
57
61
  * `Response.blob()`, a handle from the file system access API.
58
62
  *
59
- * The only source here that holds nothing. The SDK reads one slice at a time, so an asset larger
60
- * than the tab's memory verifies at the disk's speed rather than the heap's, and neither ceiling
61
- * the other two carry applies.
63
+ * It holds no bytes at all. The SDK reads one slice at a time, so an asset larger than the tab's
64
+ * memory verifies at the disk's speed rather than the heap's.
62
65
  *
63
66
  * # Worker only
64
67
  *
@@ -123,148 +126,6 @@ export class BlobSource {
123
126
  }
124
127
  if (Symbol.dispose) BlobSource.prototype[Symbol.dispose] = BlobSource.prototype.free;
125
128
 
126
- /**
127
- * A [`RangeSource`](crate::wasm::RangeInput) over bytes the caller already holds, read in place.
128
- *
129
- * [`MemorySource`] without the copy: the array stays on the JS side and only the window the SDK
130
- * asks for crosses, so nothing is resident here and linear memory's 4 GiB ceiling never applies to
131
- * the asset.
132
- */
133
- export class BytesSource {
134
- __destroy_into_raw() {
135
- const ptr = this.__wbg_ptr;
136
- this.__wbg_ptr = 0;
137
- BytesSourceFinalization.unregister(this);
138
- return ptr;
139
- }
140
- free() {
141
- const ptr = this.__destroy_into_raw();
142
- wasm.__wbg_bytessource_free(ptr, 0);
143
- }
144
- /**
145
- * @returns {number}
146
- */
147
- get length() {
148
- const ret = wasm.bytessource_length(this.__wbg_ptr);
149
- return ret;
150
- }
151
- /**
152
- * @param {Uint8Array} data
153
- */
154
- constructor(data) {
155
- const ret = wasm.bytessource_new(data);
156
- this.__wbg_ptr = ret;
157
- BytesSourceFinalization.register(this, this.__wbg_ptr, this);
158
- return this;
159
- }
160
- /**
161
- * @param {number} offset
162
- * @param {number} length
163
- * @returns {Uint8Array}
164
- */
165
- readAt(offset, length) {
166
- const ret = wasm.bytessource_readAt(this.__wbg_ptr, offset, length);
167
- return ret;
168
- }
169
- }
170
- if (Symbol.dispose) BytesSource.prototype[Symbol.dispose] = BytesSource.prototype.free;
171
-
172
- /**
173
- * @returns {string}
174
- */
175
- export function C2PA_TRUST_LIST() {
176
- let deferred1_0;
177
- let deferred1_1;
178
- try {
179
- const ret = wasm.C2PA_TRUST_LIST();
180
- deferred1_0 = ret[0];
181
- deferred1_1 = ret[1];
182
- return getStringFromWasm0(ret[0], ret[1]);
183
- } finally {
184
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
185
- }
186
- }
187
-
188
- /**
189
- * @returns {string}
190
- */
191
- export function C2PA_TSA_TRUST_LIST() {
192
- let deferred1_0;
193
- let deferred1_1;
194
- try {
195
- const ret = wasm.C2PA_TSA_TRUST_LIST();
196
- deferred1_0 = ret[0];
197
- deferred1_1 = ret[1];
198
- return getStringFromWasm0(ret[0], ret[1]);
199
- } finally {
200
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
201
- }
202
- }
203
-
204
- /**
205
- * @returns {string}
206
- */
207
- export function DEV_CA() {
208
- let deferred1_0;
209
- let deferred1_1;
210
- try {
211
- const ret = wasm.DEV_CA();
212
- deferred1_0 = ret[0];
213
- deferred1_1 = ret[1];
214
- return getStringFromWasm0(ret[0], ret[1]);
215
- } finally {
216
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
217
- }
218
- }
219
-
220
- /**
221
- * A binder contributing a binding you already hold (e.g. an out-of-band video ISCC):
222
- * `new HeldBinder(binding)`, the spelling the native lane uses. A verify takes it as data,
223
- * `{ kind: "held", binding }`, in `recovery.binders`.
224
- */
225
- export class HeldBinder {
226
- __destroy_into_raw() {
227
- const ptr = this.__wbg_ptr;
228
- this.__wbg_ptr = 0;
229
- HeldBinderFinalization.unregister(this);
230
- return ptr;
231
- }
232
- free() {
233
- const ptr = this.__destroy_into_raw();
234
- wasm.__wbg_heldbinder_free(ptr, 0);
235
- }
236
- /**
237
- * Hand back the held binding; reads nothing.
238
- *
239
- * # Errors
240
- *
241
- * Throws when the source cannot be opened.
242
- * @param {RangeSource} content
243
- * @param {DeriveOptions} options
244
- * @returns {Promise<SoftBinding | undefined>}
245
- */
246
- derive(content, options) {
247
- const ret = wasm.heldbinder_derive(this.__wbg_ptr, content, options);
248
- return ret;
249
- }
250
- /**
251
- * # Errors
252
- *
253
- * Throws `SdkError.invalid` on a binding with an empty algorithm or value.
254
- * @param {SoftBinding} binding
255
- */
256
- constructor(binding) {
257
- const ret = wasm.heldbinder_new(binding);
258
- if (ret[2]) {
259
- throw takeFromExternrefTable0(ret[1]);
260
- }
261
- this.__wbg_ptr = ret[0];
262
- HeldBinderFinalization.register(this, this.__wbg_ptr, this);
263
- return this;
264
- }
265
- }
266
- if (Symbol.dispose) HeldBinder.prototype[Symbol.dispose] = HeldBinder.prototype.free;
267
-
268
129
  export class IntoUnderlyingByteSource {
269
130
  __destroy_into_raw() {
270
131
  const ptr = this.__wbg_ptr;
@@ -377,57 +238,9 @@ export class IntoUnderlyingSource {
377
238
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
378
239
 
379
240
  /**
380
- * The SDK's local ISCC Image-Code binder, for a standalone `derive`: `new IsccBinder()`, the
381
- * spelling the native lane uses. A verify takes it as data, `{ kind: "iscc" }`, in
382
- * `recovery.binders`, because a class cannot cross into a worker.
383
- *
384
- * Vendor watermark detection is repository-side in this SDK: configured detectors participate in
385
- * `verify` through `byContent`, while a held binder covers values already available to the caller.
386
- */
387
- export class IsccBinder {
388
- __destroy_into_raw() {
389
- const ptr = this.__wbg_ptr;
390
- this.__wbg_ptr = 0;
391
- IsccBinderFinalization.unregister(this);
392
- return ptr;
393
- }
394
- free() {
395
- const ptr = this.__destroy_into_raw();
396
- wasm.__wbg_isccbinder_free(ptr, 0);
397
- }
398
- /**
399
- * Derive the asset's ISCC standalone; `undefined` when the format yields none.
400
- *
401
- * # Errors
402
- *
403
- * Throws on malformed or unreadable input.
404
- * @param {RangeSource} content
405
- * @param {DeriveOptions} options
406
- * @returns {Promise<SoftBinding | undefined>}
407
- */
408
- derive(content, options) {
409
- const ret = wasm.isccbinder_derive(this.__wbg_ptr, content, options);
410
- return ret;
411
- }
412
- constructor() {
413
- const ret = wasm.isccbinder_new();
414
- this.__wbg_ptr = ret;
415
- IsccBinderFinalization.register(this, this.__wbg_ptr, this);
416
- return this;
417
- }
418
- }
419
- if (Symbol.dispose) IsccBinder.prototype[Symbol.dispose] = IsccBinder.prototype.free;
420
-
421
- /**
422
- * An in-memory [`RangeSource`](crate::wasm::RangeInput), for a caller that already holds the whole
423
- * asset as bytes.
424
- *
425
- * # Size ceiling
426
- *
427
- * The constructor copies the bytes into wasm linear memory, which is 32-bit addressed, so the
428
- * asset and everything else the module allocates share a 4 GiB ceiling (a browser tab reaches its
429
- * own memory limit well before that). [`BytesSource`] takes the same bytes without the copy, and
430
- * [`BlobSource`] holds nothing at all.
241
+ * A `RangeSource` over bytes the caller already holds, read in place: the array stays on the JS
242
+ * side and only the window the SDK asks for crosses, so nothing is resident here and linear
243
+ * memory's 4 GiB ceiling never applies to the asset.
431
244
  */
432
245
  export class MemorySource {
433
246
  __destroy_into_raw() {
@@ -451,9 +264,7 @@ export class MemorySource {
451
264
  * @param {Uint8Array} data
452
265
  */
453
266
  constructor(data) {
454
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
455
- const len0 = WASM_VECTOR_LEN;
456
- const ret = wasm.memorysource_new(ptr0, len0);
267
+ const ret = wasm.memorysource_new(data);
457
268
  this.__wbg_ptr = ret;
458
269
  MemorySourceFinalization.register(this, this.__wbg_ptr, this);
459
270
  return this;
@@ -492,8 +303,8 @@ export class StreamSession {
492
303
  wasm.__wbg_streamsession_free(ptr, 0);
493
304
  }
494
305
  /**
495
- * Everything this stream's init segments have registered, as CBOR for another node to
496
- * `StreamVerifier.resume` from.
306
+ * This stream's id and everything its init segments have registered, as CBOR for another
307
+ * node to `StreamVerifier.resume` from.
497
308
  *
498
309
  * The one piece of stream state that leaves the SDK, and only because a clustered
499
310
  * verifier needs it: the init URL is overwritten on rotation, so a node joining during
@@ -522,11 +333,11 @@ export class StreamSession {
522
333
  *
523
334
  * Throws an `SdkError` on parse or signature failure, or when a media segment arrives
524
335
  * before any init was processed for the stream.
525
- * @param {RangeSource} data
336
+ * @param {RangeSource} source
526
337
  * @returns {Promise<SegmentValidation>}
527
338
  */
528
- validate(data) {
529
- const ret = wasm.streamsession_validate(this.__wbg_ptr, data);
339
+ validate(source) {
340
+ const ret = wasm.streamsession_validate(this.__wbg_ptr, source);
530
341
  return ret;
531
342
  }
532
343
  }
@@ -566,47 +377,178 @@ export class StreamVerifier {
566
377
  return StreamVerifier.__wrap(ret[0]);
567
378
  }
568
379
  /**
569
- * Open `stream_id` for validation, handing back a `StreamSession` to feed segments to.
380
+ * Open the stream `id` for validation, handing back a `StreamSession` to feed segments to.
570
381
  *
571
382
  * No I/O: the handle carries the id so it cannot be mistyped or confused with another
572
383
  * stream's, and classification still happens per segment. Opening one id twice hands
573
384
  * back the same live session, so a component that remounts keeps the state its earlier
574
385
  * handle accumulated.
575
- * @param {string} stream_id
386
+ * @param {string} id
576
387
  * @returns {StreamSession}
577
388
  */
578
- open(stream_id) {
579
- const ptr0 = passStringToWasm0(stream_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
389
+ open(id) {
390
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
580
391
  const len0 = WASM_VECTOR_LEN;
581
392
  const ret = wasm.streamverifier_open(this.__wbg_ptr, ptr0, len0);
582
393
  return StreamSession.__wrap(ret);
583
394
  }
584
395
  /**
585
- * Open `stream_id` on the state another node exported, merged into whatever this one
586
- * holds for that id already.
396
+ * Open the stream another node exported, its state merged into whatever this one holds
397
+ * for that stream already.
587
398
  *
588
399
  * # Errors
589
400
  *
590
- * Throws an `SdkError` (`STREAM_INVALID`) when `state` is not a value
591
- * `StreamSession.export` produced, or carries a version this SDK no longer reads.
592
- * @param {string} stream_id
401
+ * Throws an `SdkError` with a field violation at `state` when it is not a value
402
+ * `StreamSession.export` produced (`state.malformed`), or one of another export version
403
+ * (`state.version`).
593
404
  * @param {Uint8Array} state
594
- * @returns {StreamSession}
405
+ * @returns {Promise<StreamSession>}
595
406
  */
596
- resume(stream_id, state) {
597
- const ptr0 = passStringToWasm0(stream_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
407
+ resume(state) {
408
+ const ptr0 = passArray8ToWasm0(state, wasm.__wbindgen_malloc);
598
409
  const len0 = WASM_VECTOR_LEN;
599
- const ptr1 = passArray8ToWasm0(state, wasm.__wbindgen_malloc);
600
- const len1 = WASM_VECTOR_LEN;
601
- const ret = wasm.streamverifier_resume(this.__wbg_ptr, ptr0, len0, ptr1, len1);
602
- if (ret[2]) {
603
- throw takeFromExternrefTable0(ret[1]);
604
- }
605
- return StreamSession.__wrap(ret[0]);
410
+ const ret = wasm.streamverifier_resume(this.__wbg_ptr, ptr0, len0);
411
+ return ret;
606
412
  }
607
413
  }
608
414
  if (Symbol.dispose) StreamVerifier.prototype[Symbol.dispose] = StreamVerifier.prototype.free;
609
415
 
416
+ /**
417
+ * One `verify` result held with the stores it read: `report` is the data, and `resource` reads a
418
+ * thumbnail from credential `credential` (its position in `report.credentials`) by the
419
+ * `identifier` of a resource reference in its manifest. A class rather than a field of the
420
+ * report because a store cannot be serialized, and one handle per verify is what a worker can
421
+ * proxy (a class nested in the report cannot cross a thread).
422
+ */
423
+ export class Verification {
424
+ static __wrap(ptr) {
425
+ const obj = Object.create(Verification.prototype);
426
+ obj.__wbg_ptr = ptr;
427
+ VerificationFinalization.register(obj, obj.__wbg_ptr, obj);
428
+ return obj;
429
+ }
430
+ __destroy_into_raw() {
431
+ const ptr = this.__wbg_ptr;
432
+ this.__wbg_ptr = 0;
433
+ VerificationFinalization.unregister(this);
434
+ return ptr;
435
+ }
436
+ free() {
437
+ const ptr = this.__destroy_into_raw();
438
+ wasm.__wbg_verification_free(ptr, 0);
439
+ }
440
+ /**
441
+ * The report: credentials, recovery, golden flow and verdict.
442
+ * @returns {AssetVerification}
443
+ */
444
+ get report() {
445
+ const ret = wasm.verification_report(this.__wbg_ptr);
446
+ return ret;
447
+ }
448
+ /**
449
+ * The bytes of one resource credential `credential` holds, or `undefined`.
450
+ *
451
+ * # Errors
452
+ *
453
+ * Throws `READER_INVALID` when the store holds the resource but cannot produce it, and
454
+ * `undefined` for a `credential` out of range.
455
+ * @param {number} credential
456
+ * @param {string} uri
457
+ * @returns {Uint8Array | undefined}
458
+ */
459
+ resource(credential, uri) {
460
+ const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
461
+ const len0 = WASM_VECTOR_LEN;
462
+ const ret = wasm.verification_resource(this.__wbg_ptr, credential, ptr0, len0);
463
+ if (ret[3]) {
464
+ throw takeFromExternrefTable0(ret[2]);
465
+ }
466
+ let v2;
467
+ if (ret[0] !== 0) {
468
+ v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
469
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
470
+ }
471
+ return v2;
472
+ }
473
+ }
474
+ if (Symbol.dispose) Verification.prototype[Symbol.dispose] = Verification.prototype.free;
475
+
476
+ /**
477
+ * The bundled C2PA Conformance Program signing-CA trust list (a release snapshot). Trusted by
478
+ * default with `trust.c2pa`; read it to pin or extend your own list.
479
+ * @returns {string}
480
+ */
481
+ export function c2paTrustList() {
482
+ let deferred1_0;
483
+ let deferred1_1;
484
+ try {
485
+ const ret = wasm.c2paTrustList();
486
+ deferred1_0 = ret[0];
487
+ deferred1_1 = ret[1];
488
+ return getStringFromWasm0(ret[0], ret[1]);
489
+ } finally {
490
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
491
+ }
492
+ }
493
+
494
+ /**
495
+ * The bundled C2PA time-stamping-authority trust list (a release snapshot).
496
+ * @returns {string}
497
+ */
498
+ export function c2paTsaTrustList() {
499
+ let deferred1_0;
500
+ let deferred1_1;
501
+ try {
502
+ const ret = wasm.c2paTsaTrustList();
503
+ deferred1_0 = ret[0];
504
+ deferred1_1 = ret[1];
505
+ return getStringFromWasm0(ret[0], ret[1]);
506
+ } finally {
507
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
508
+ }
509
+ }
510
+
511
+ /**
512
+ * The values this SDK computes for `alg` over `source`, `[]` when it finds none. `format` is
513
+ * the asset's media type; omitted, the bytes name it.
514
+ *
515
+ * # Errors
516
+ *
517
+ * Throws on an algorithm this SDK computes no value of, a `format` that is no media type or that
518
+ * the bytes contradict, an unreadable source, or no trustworthy answer.
519
+ * @param {string} alg
520
+ * @param {RangeSource} source
521
+ * @param {string | null} [format]
522
+ * @returns {Promise<Block[]>}
523
+ */
524
+ export function computeSoftBinding(alg, source, format) {
525
+ const ptr0 = passStringToWasm0(alg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
526
+ const len0 = WASM_VECTOR_LEN;
527
+ var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
528
+ var len1 = WASM_VECTOR_LEN;
529
+ const ret = wasm.computeSoftBinding(ptr0, len0, source, ptr1, len1);
530
+ return ret;
531
+ }
532
+
533
+ /**
534
+ * PEM trust anchor for the Limbo Integrity development signing environment, **development
535
+ * only**, no security guarantees: put it in `trust.anchors` for a development build, never in a
536
+ * release.
537
+ * @returns {string}
538
+ */
539
+ export function devCa() {
540
+ let deferred1_0;
541
+ let deferred1_1;
542
+ try {
543
+ const ret = wasm.devCa();
544
+ deferred1_0 = ret[0];
545
+ deferred1_1 = ret[1];
546
+ return getStringFromWasm0(ret[0], ret[1]);
547
+ } finally {
548
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
549
+ }
550
+ }
551
+
610
552
  export function init_panic_hook() {
611
553
  wasm.init_panic_hook();
612
554
  }
@@ -622,37 +564,28 @@ export function init_panic_hook() {
622
564
  *
623
565
  * # Errors
624
566
  *
625
- * Throws `READER_INVALID` when the bytes are not a manifest store c2pa can parse.
567
+ * Rejects with `READER_INVALID` when the bytes are not a manifest store c2pa can parse.
626
568
  * @param {Uint8Array} manifest
627
- * @returns {import('@contentauth/c2pa-types').ManifestStore}
569
+ * @returns {Promise<import('@contentauth/c2pa-types').ManifestStore>}
628
570
  */
629
571
  export function parse(manifest) {
630
572
  const ptr0 = passArray8ToWasm0(manifest, wasm.__wbindgen_malloc);
631
573
  const len0 = WASM_VECTOR_LEN;
632
574
  const ret = wasm.parse(ptr0, len0);
633
- if (ret[2]) {
634
- throw takeFromExternrefTable0(ret[1]);
635
- }
636
- return takeFromExternrefTable0(ret[0]);
575
+ return ret;
637
576
  }
638
577
 
639
578
  /**
640
579
  * The bytes of one resource in a detached manifest store, or `undefined` when it holds none
641
- * under `uri`.
642
- *
643
- * `uri` is the `identifier` on a resource reference the store carries, so walking the chain in
644
- * the parsed store is what produces it: any manifest's claim thumbnail, including a non-active
645
- * one, and any ingredient's. Render it with the `format` beside that identifier. A `uri` naming a
646
- * manifest rather than a resource answers that manifest's own JUMBF, so pass what a reference
647
- * states, never a bare label.
580
+ * under `uri`: the `identifier` on a resource reference the parsed store carries.
648
581
  *
649
582
  * # Errors
650
583
  *
651
- * Throws `READER_INVALID` when the bytes are not a manifest store c2pa can parse, or the store
584
+ * Rejects with `READER_INVALID` when the bytes are not a manifest store c2pa can parse, or the store
652
585
  * holds the resource but cannot produce it.
653
586
  * @param {Uint8Array} manifest
654
587
  * @param {string} uri
655
- * @returns {Uint8Array | undefined}
588
+ * @returns {Promise<Uint8Array | undefined>}
656
589
  */
657
590
  export function resource(manifest, uri) {
658
591
  const ptr0 = passArray8ToWasm0(manifest, wasm.__wbindgen_malloc);
@@ -660,39 +593,7 @@ export function resource(manifest, uri) {
660
593
  const ptr1 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
661
594
  const len1 = WASM_VECTOR_LEN;
662
595
  const ret = wasm.resource(ptr0, len0, ptr1, len1);
663
- if (ret[3]) {
664
- throw takeFromExternrefTable0(ret[2]);
665
- }
666
- let v3;
667
- if (ret[0] !== 0) {
668
- v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
669
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
670
- }
671
- return v3;
672
- }
673
-
674
- /**
675
- * Every thumbnail the store references, by the `identifier` it references them under: each
676
- * manifest's claim thumbnail and each ingredient's, whichever manifest carries them.
677
- *
678
- * One parse for the whole set, where `resource` pays one per call, so a chain view asks once
679
- * instead of once per tile. Render each one as the `format` beside its identifier. A reference
680
- * the store cannot produce is left out rather than failing the set.
681
- *
682
- * # Errors
683
- *
684
- * Throws `READER_INVALID` when the bytes are not a manifest store c2pa can parse.
685
- * @param {Uint8Array} manifest
686
- * @returns {Record<string, Uint8Array>}
687
- */
688
- export function thumbnails(manifest) {
689
- const ptr0 = passArray8ToWasm0(manifest, wasm.__wbindgen_malloc);
690
- const len0 = WASM_VECTOR_LEN;
691
- const ret = wasm.thumbnails(ptr0, len0);
692
- if (ret[2]) {
693
- throw takeFromExternrefTable0(ret[1]);
694
- }
695
- return takeFromExternrefTable0(ret[0]);
596
+ return ret;
696
597
  }
697
598
  function __wbg_get_imports() {
698
599
  const import0 = {
@@ -789,6 +690,14 @@ function __wbg_get_imports() {
789
690
  __wbg_abort_eee9248a6d680839: function(arg0, arg1) {
790
691
  arg0.abort(arg1);
791
692
  },
693
+ __wbg_aborted_2b7b403d16663f24: function(arg0) {
694
+ const ret = arg0.aborted;
695
+ return ret;
696
+ },
697
+ __wbg_any_a57fdb241e47190d: function(arg0) {
698
+ const ret = AbortSignal.any(arg0);
699
+ return ret;
700
+ },
792
701
  __wbg_append_01c74e5c6b58aa64: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
793
702
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
794
703
  }, arguments); },
@@ -796,6 +705,10 @@ function __wbg_get_imports() {
796
705
  const ret = arg0.arrayBuffer();
797
706
  return ret;
798
707
  }, arguments); },
708
+ __wbg_assign_fd82cd5b89efb160: function(arg0, arg1) {
709
+ const ret = Object.assign(arg0, arg1);
710
+ return ret;
711
+ },
799
712
  __wbg_body_18c9f2ac15ead4b2: function(arg0) {
800
713
  const ret = arg0.body;
801
714
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
@@ -1112,6 +1025,10 @@ function __wbg_get_imports() {
1112
1025
  const ret = arg0.now();
1113
1026
  return ret;
1114
1027
  },
1028
+ __wbg_of_5f1b88183ddb5d94: function(arg0, arg1) {
1029
+ const ret = Array.of(arg0, arg1);
1030
+ return ret;
1031
+ },
1115
1032
  __wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
1116
1033
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1117
1034
  return ret;
@@ -1138,6 +1055,10 @@ function __wbg_get_imports() {
1138
1055
  const ret = arg0.read();
1139
1056
  return ret;
1140
1057
  },
1058
+ __wbg_reject_90df95b492dd8563: function(arg0) {
1059
+ const ret = Promise.reject(arg0);
1060
+ return ret;
1061
+ },
1141
1062
  __wbg_releaseLock_5b92874cad775644: function(arg0) {
1142
1063
  arg0.releaseLock();
1143
1064
  },
@@ -1165,10 +1086,6 @@ function __wbg_get_imports() {
1165
1086
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1166
1087
  arg0[arg1] = arg2;
1167
1088
  },
1168
- __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
1169
- const ret = Reflect.set(arg0, arg1, arg2);
1170
- return ret;
1171
- }, arguments); },
1172
1089
  __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
1173
1090
  arg0[arg1 >>> 0] = arg2;
1174
1091
  },
@@ -1190,6 +1107,12 @@ function __wbg_get_imports() {
1190
1107
  __wbg_set_mode_66c79886ad78fc05: function(arg0, arg1) {
1191
1108
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
1192
1109
  },
1110
+ __wbg_set_name_3bbc583faefa4193: function(arg0, arg1, arg2) {
1111
+ arg0.name = getStringFromWasm0(arg1, arg2);
1112
+ },
1113
+ __wbg_set_redirect_badd73a0bcb765e3: function(arg0, arg1) {
1114
+ arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
1115
+ },
1193
1116
  __wbg_set_signal_c4ef8faddb4c1446: function(arg0, arg1) {
1194
1117
  arg0.signal = arg1;
1195
1118
  },
@@ -1232,6 +1155,10 @@ function __wbg_get_imports() {
1232
1155
  const ret = arg0.status;
1233
1156
  return ret;
1234
1157
  },
1158
+ __wbg_streamsession_new: function(arg0) {
1159
+ const ret = StreamSession.__wrap(arg0);
1160
+ return ret;
1161
+ },
1235
1162
  __wbg_stringify_b54333f60f1e4dad: function() { return handleError(function (arg0) {
1236
1163
  const ret = JSON.stringify(arg0);
1237
1164
  return ret;
@@ -1248,6 +1175,10 @@ function __wbg_get_imports() {
1248
1175
  const ret = arg0.then(arg1);
1249
1176
  return ret;
1250
1177
  },
1178
+ __wbg_timeout_c971ded6d319fad2: function(arg0) {
1179
+ const ret = AbortSignal.timeout(arg0 >>> 0);
1180
+ return ret;
1181
+ },
1251
1182
  __wbg_url_abdb8fb08377f8c0: function(arg0, arg1) {
1252
1183
  const ret = arg1.url;
1253
1184
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1259,23 +1190,27 @@ function __wbg_get_imports() {
1259
1190
  const ret = arg0.value;
1260
1191
  return ret;
1261
1192
  },
1193
+ __wbg_verification_new: function(arg0) {
1194
+ const ret = Verification.__wrap(arg0);
1195
+ return ret;
1196
+ },
1262
1197
  __wbg_view_21f1d4a4f175dfa9: function(arg0) {
1263
1198
  const ret = arg0.view;
1264
1199
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1265
1200
  },
1266
1201
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1267
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2054, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1202
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2292, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1268
1203
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hfa954cb356c7e7e1);
1269
1204
  return ret;
1270
1205
  },
1271
1206
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1272
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3951, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1273
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hedf60f9cb8ab20c3);
1207
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6094, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1208
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hbfbf6526ca40dbc0);
1274
1209
  return ret;
1275
1210
  },
1276
1211
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1277
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2728, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1278
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hcc9f2329e90526d5);
1212
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3579, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1213
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h66de60f9da4a5479);
1279
1214
  return ret;
1280
1215
  },
1281
1216
  __wbindgen_cast_0000000000000004: function(arg0) {
@@ -1303,6 +1238,20 @@ function __wbg_get_imports() {
1303
1238
  const ret = BigInt.asUintN(64, arg0);
1304
1239
  return ret;
1305
1240
  },
1241
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
1242
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
1243
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
1244
+ // Cast intrinsic for `Vector(NamedExternref("Block")) -> Externref`.
1245
+ const ret = v0;
1246
+ return ret;
1247
+ },
1248
+ __wbindgen_cast_000000000000000a: function(arg0, arg1) {
1249
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1250
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
1251
+ // Cast intrinsic for `Vector(U8) -> Externref`.
1252
+ const ret = v0;
1253
+ return ret;
1254
+ },
1306
1255
  __wbindgen_init_externref_table: function() {
1307
1256
  const table = wasm.__wbindgen_externrefs;
1308
1257
  const offset = table.grow(4);
@@ -1319,12 +1268,12 @@ function __wbg_get_imports() {
1319
1268
  };
1320
1269
  }
1321
1270
 
1322
- function wasm_bindgen__convert__closures_____invoke__hcc9f2329e90526d5(arg0, arg1) {
1323
- wasm.wasm_bindgen__convert__closures_____invoke__hcc9f2329e90526d5(arg0, arg1);
1271
+ function wasm_bindgen__convert__closures_____invoke__h66de60f9da4a5479(arg0, arg1) {
1272
+ wasm.wasm_bindgen__convert__closures_____invoke__h66de60f9da4a5479(arg0, arg1);
1324
1273
  }
1325
1274
 
1326
- function wasm_bindgen__convert__closures_____invoke__hedf60f9cb8ab20c3(arg0, arg1, arg2) {
1327
- wasm.wasm_bindgen__convert__closures_____invoke__hedf60f9cb8ab20c3(arg0, arg1, arg2);
1275
+ function wasm_bindgen__convert__closures_____invoke__hbfbf6526ca40dbc0(arg0, arg1, arg2) {
1276
+ wasm.wasm_bindgen__convert__closures_____invoke__hbfbf6526ca40dbc0(arg0, arg1, arg2);
1328
1277
  }
1329
1278
 
1330
1279
  function wasm_bindgen__convert__closures_____invoke__hfa954cb356c7e7e1(arg0, arg1, arg2) {
@@ -1349,18 +1298,15 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
1349
1298
 
1350
1299
 
1351
1300
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
1301
+
1302
+
1303
+ const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
1352
1304
  const AssetVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
1353
1305
  ? { register: () => {}, unregister: () => {} }
1354
1306
  : new FinalizationRegistry(ptr => wasm.__wbg_assetverifier_free(ptr, 1));
1355
1307
  const BlobSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1356
1308
  ? { register: () => {}, unregister: () => {} }
1357
1309
  : new FinalizationRegistry(ptr => wasm.__wbg_blobsource_free(ptr, 1));
1358
- const BytesSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1359
- ? { register: () => {}, unregister: () => {} }
1360
- : new FinalizationRegistry(ptr => wasm.__wbg_bytessource_free(ptr, 1));
1361
- const HeldBinderFinalization = (typeof FinalizationRegistry === 'undefined')
1362
- ? { register: () => {}, unregister: () => {} }
1363
- : new FinalizationRegistry(ptr => wasm.__wbg_heldbinder_free(ptr, 1));
1364
1310
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1365
1311
  ? { register: () => {}, unregister: () => {} }
1366
1312
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
@@ -1370,9 +1316,6 @@ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefin
1370
1316
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1371
1317
  ? { register: () => {}, unregister: () => {} }
1372
1318
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
1373
- const IsccBinderFinalization = (typeof FinalizationRegistry === 'undefined')
1374
- ? { register: () => {}, unregister: () => {} }
1375
- : new FinalizationRegistry(ptr => wasm.__wbg_isccbinder_free(ptr, 1));
1376
1319
  const MemorySourceFinalization = (typeof FinalizationRegistry === 'undefined')
1377
1320
  ? { register: () => {}, unregister: () => {} }
1378
1321
  : new FinalizationRegistry(ptr => wasm.__wbg_memorysource_free(ptr, 1));
@@ -1382,6 +1325,9 @@ const StreamSessionFinalization = (typeof FinalizationRegistry === 'undefined')
1382
1325
  const StreamVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
1383
1326
  ? { register: () => {}, unregister: () => {} }
1384
1327
  : new FinalizationRegistry(ptr => wasm.__wbg_streamverifier_free(ptr, 1));
1328
+ const VerificationFinalization = (typeof FinalizationRegistry === 'undefined')
1329
+ ? { register: () => {}, unregister: () => {} }
1330
+ : new FinalizationRegistry(ptr => wasm.__wbg_verification_free(ptr, 1));
1385
1331
 
1386
1332
  function addToExternrefTable0(obj) {
1387
1333
  const idx = wasm.__externref_table_alloc();
@@ -1458,6 +1404,17 @@ function debugString(val) {
1458
1404
  return className;
1459
1405
  }
1460
1406
 
1407
+ function getArrayJsValueFromWasm0(ptr, len) {
1408
+ ptr = ptr >>> 0;
1409
+ const mem = getDataViewMemory0();
1410
+ const result = [];
1411
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1412
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1413
+ }
1414
+ wasm.__externref_drop_slice(ptr, len);
1415
+ return result;
1416
+ }
1417
+
1461
1418
  function getArrayU8FromWasm0(ptr, len) {
1462
1419
  ptr = ptr >>> 0;
1463
1420
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);