@contentauth/c2pa-wasm 0.4.5 → 0.5.0
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/pkg/c2pa.d.ts +13 -7
- package/pkg/c2pa.js +169 -161
- package/pkg/c2pa_bg.wasm +0 -0
- package/pkg/c2pa_bg.wasm.d.ts +6 -6
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ rustup target add wasm32-unknown-unknown
|
|
|
39
39
|
[Documentation](https://wasm-bindgen.github.io/wasm-bindgen/reference/cli)
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
cargo install wasm-bindgen-cli@0.2.
|
|
42
|
+
cargo install wasm-bindgen-cli@0.2.114
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
> **Important:** The version of `wasm-bindgen-cli` **must** match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](./Cargo.toml). A version mismatch will cause build failures with errors like _"rust Wasm file schema version: X.X.X, this binary schema version: Y.Y.Y"_. If you encounter this, check `Cargo.toml` for the correct version and reinstall the CLI accordingly.
|
package/package.json
CHANGED
package/pkg/c2pa.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class WasmBuilder {
|
|
|
35
35
|
* * `format` - The format of the ingredient.
|
|
36
36
|
* * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
|
|
37
37
|
*/
|
|
38
|
-
addIngredientFromBlob(json: string, format: string, blob: Blob): void
|
|
38
|
+
addIngredientFromBlob(json: string, format: string, blob: Blob): Promise<void>;
|
|
39
39
|
/**
|
|
40
40
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
41
41
|
*/
|
|
@@ -143,6 +143,12 @@ export class WasmSigner {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
+
*
|
|
147
|
+
* * NOTE: we can only return Err(JsString) or Err(JsValue) as error types here, because for some as-of-yet unknown
|
|
148
|
+
* * reason, wasm-bindgen appears to mishandle JsErrors when created in a Firefox web worker.
|
|
149
|
+
* *
|
|
150
|
+
* * See: https://github.com/wasm-bindgen/wasm-bindgen/issues/4961
|
|
151
|
+
*
|
|
146
152
|
* Accepts a JSON-serialized string to be loaded as c2pa-rs settings.
|
|
147
153
|
*/
|
|
148
154
|
export function loadSettings(settings: string): void;
|
|
@@ -167,7 +173,7 @@ export interface InitOutput {
|
|
|
167
173
|
readonly __wbg_wasmbuilder_free: (a: number, b: number) => void;
|
|
168
174
|
readonly wasmbuilder_addAction: (a: number, b: any) => [number, number];
|
|
169
175
|
readonly wasmbuilder_addIngredient: (a: number, b: number, c: number) => [number, number];
|
|
170
|
-
readonly wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) =>
|
|
176
|
+
readonly wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
171
177
|
readonly wasmbuilder_addResourceFromBlob: (a: number, b: number, c: number, d: any) => [number, number];
|
|
172
178
|
readonly wasmbuilder_fromArchive: (a: any, b: number, c: number) => [number, number, number];
|
|
173
179
|
readonly wasmbuilder_fromJson: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -184,11 +190,11 @@ export interface InitOutput {
|
|
|
184
190
|
readonly wasmsigner_fromDefinition: (a: any) => [number, number, number];
|
|
185
191
|
readonly loadSettings: (a: number, b: number) => [number, number];
|
|
186
192
|
readonly run: () => void;
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
191
|
-
readonly
|
|
193
|
+
readonly wasm_bindgen__closure__destroy__h08deb5985c70bc53: (a: number, b: number) => void;
|
|
194
|
+
readonly wasm_bindgen__closure__destroy__h1fe08a5c187de005: (a: number, b: number) => void;
|
|
195
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4bb8e6e9707fd977: (a: number, b: number, c: any) => [number, number];
|
|
196
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4b0b8f22c61fbfcd: (a: number, b: number, c: any, d: any) => void;
|
|
197
|
+
readonly wasm_bindgen__convert__closures_____invoke__h88b9912c47edf5c0: (a: number, b: number) => void;
|
|
192
198
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
193
199
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
194
200
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/pkg/c2pa.js
CHANGED
|
@@ -56,6 +56,7 @@ export class WasmBuilder {
|
|
|
56
56
|
* @param {string} json
|
|
57
57
|
* @param {string} format
|
|
58
58
|
* @param {Blob} blob
|
|
59
|
+
* @returns {Promise<void>}
|
|
59
60
|
*/
|
|
60
61
|
addIngredientFromBlob(json, format, blob) {
|
|
61
62
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -63,9 +64,7 @@ export class WasmBuilder {
|
|
|
63
64
|
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
64
65
|
const len1 = WASM_VECTOR_LEN;
|
|
65
66
|
const ret = wasm.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, ptr0, len0, ptr1, len1, blob);
|
|
66
|
-
|
|
67
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
68
|
-
}
|
|
67
|
+
return ret;
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
70
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
@@ -379,6 +378,12 @@ export class WasmSigner {
|
|
|
379
378
|
if (Symbol.dispose) WasmSigner.prototype[Symbol.dispose] = WasmSigner.prototype.free;
|
|
380
379
|
|
|
381
380
|
/**
|
|
381
|
+
*
|
|
382
|
+
* * NOTE: we can only return Err(JsString) or Err(JsValue) as error types here, because for some as-of-yet unknown
|
|
383
|
+
* * reason, wasm-bindgen appears to mishandle JsErrors when created in a Firefox web worker.
|
|
384
|
+
* *
|
|
385
|
+
* * See: https://github.com/wasm-bindgen/wasm-bindgen/issues/4961
|
|
386
|
+
*
|
|
382
387
|
* Accepts a JSON-serialized string to be loaded as c2pa-rs settings.
|
|
383
388
|
* @param {string} settings
|
|
384
389
|
*/
|
|
@@ -401,72 +406,72 @@ export function run() {
|
|
|
401
406
|
function __wbg_get_imports() {
|
|
402
407
|
const import0 = {
|
|
403
408
|
__proto__: null,
|
|
404
|
-
|
|
409
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
405
410
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
406
411
|
return ret;
|
|
407
412
|
},
|
|
408
|
-
|
|
413
|
+
__wbg_Number_a5a435bd7bbec835: function(arg0) {
|
|
409
414
|
const ret = Number(arg0);
|
|
410
415
|
return ret;
|
|
411
416
|
},
|
|
412
|
-
|
|
417
|
+
__wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
|
|
413
418
|
const v = arg1;
|
|
414
419
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
415
420
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
416
421
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
417
422
|
},
|
|
418
|
-
|
|
423
|
+
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
419
424
|
const v = arg0;
|
|
420
425
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
421
426
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
422
427
|
},
|
|
423
|
-
|
|
428
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
424
429
|
const ret = debugString(arg1);
|
|
425
430
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
426
431
|
const len1 = WASM_VECTOR_LEN;
|
|
427
432
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
428
433
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
429
434
|
},
|
|
430
|
-
|
|
435
|
+
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
431
436
|
const ret = arg0 in arg1;
|
|
432
437
|
return ret;
|
|
433
438
|
},
|
|
434
|
-
|
|
439
|
+
__wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
|
|
435
440
|
const ret = typeof(arg0) === 'bigint';
|
|
436
441
|
return ret;
|
|
437
442
|
},
|
|
438
|
-
|
|
443
|
+
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
439
444
|
const ret = typeof(arg0) === 'function';
|
|
440
445
|
return ret;
|
|
441
446
|
},
|
|
442
|
-
|
|
447
|
+
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
443
448
|
const val = arg0;
|
|
444
449
|
const ret = typeof(val) === 'object' && val !== null;
|
|
445
450
|
return ret;
|
|
446
451
|
},
|
|
447
|
-
|
|
452
|
+
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
448
453
|
const ret = typeof(arg0) === 'string';
|
|
449
454
|
return ret;
|
|
450
455
|
},
|
|
451
|
-
|
|
456
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
452
457
|
const ret = arg0 === undefined;
|
|
453
458
|
return ret;
|
|
454
459
|
},
|
|
455
|
-
|
|
460
|
+
__wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
|
|
456
461
|
const ret = arg0 === arg1;
|
|
457
462
|
return ret;
|
|
458
463
|
},
|
|
459
|
-
|
|
464
|
+
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
460
465
|
const ret = arg0 == arg1;
|
|
461
466
|
return ret;
|
|
462
467
|
},
|
|
463
|
-
|
|
468
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
464
469
|
const obj = arg1;
|
|
465
470
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
466
471
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
467
472
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
468
473
|
},
|
|
469
|
-
|
|
474
|
+
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
470
475
|
const obj = arg1;
|
|
471
476
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
472
477
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -474,54 +479,54 @@ function __wbg_get_imports() {
|
|
|
474
479
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
475
480
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
476
481
|
},
|
|
477
|
-
|
|
482
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
478
483
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
479
484
|
},
|
|
480
|
-
|
|
485
|
+
__wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
|
|
481
486
|
arg0._wbg_cb_unref();
|
|
482
487
|
},
|
|
483
|
-
|
|
488
|
+
__wbg_abort_5ef96933660780b7: function(arg0) {
|
|
484
489
|
arg0.abort();
|
|
485
490
|
},
|
|
486
|
-
|
|
491
|
+
__wbg_abort_6479c2d794ebf2ee: function(arg0, arg1) {
|
|
487
492
|
arg0.abort(arg1);
|
|
488
493
|
},
|
|
489
|
-
|
|
494
|
+
__wbg_append_608dfb635ee8998f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
490
495
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
491
496
|
}, arguments); },
|
|
492
|
-
|
|
497
|
+
__wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {
|
|
493
498
|
const ret = arg0.arrayBuffer();
|
|
494
499
|
return ret;
|
|
495
500
|
}, arguments); },
|
|
496
|
-
|
|
501
|
+
__wbg_byteLength_607b856aa6c5a508: function(arg0) {
|
|
497
502
|
const ret = arg0.byteLength;
|
|
498
503
|
return ret;
|
|
499
504
|
},
|
|
500
|
-
|
|
501
|
-
const ret = arg0.call(arg1);
|
|
505
|
+
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
506
|
+
const ret = arg0.call(arg1, arg2);
|
|
502
507
|
return ret;
|
|
503
508
|
}, arguments); },
|
|
504
|
-
|
|
505
|
-
const ret = arg0.call(arg1
|
|
509
|
+
__wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
|
|
510
|
+
const ret = arg0.call(arg1);
|
|
506
511
|
return ret;
|
|
507
512
|
}, arguments); },
|
|
508
|
-
|
|
513
|
+
__wbg_clearTimeout_6b8d9a38b9263d65: function(arg0) {
|
|
509
514
|
const ret = clearTimeout(arg0);
|
|
510
515
|
return ret;
|
|
511
516
|
},
|
|
512
|
-
|
|
517
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
513
518
|
const ret = arg0.crypto;
|
|
514
519
|
return ret;
|
|
515
520
|
},
|
|
516
|
-
|
|
521
|
+
__wbg_done_08ce71ee07e3bd17: function(arg0) {
|
|
517
522
|
const ret = arg0.done;
|
|
518
523
|
return ret;
|
|
519
524
|
},
|
|
520
|
-
|
|
525
|
+
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
521
526
|
const ret = Object.entries(arg0);
|
|
522
527
|
return ret;
|
|
523
528
|
},
|
|
524
|
-
|
|
529
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
525
530
|
let deferred0_0;
|
|
526
531
|
let deferred0_1;
|
|
527
532
|
try {
|
|
@@ -532,52 +537,60 @@ function __wbg_get_imports() {
|
|
|
532
537
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
533
538
|
}
|
|
534
539
|
},
|
|
535
|
-
|
|
536
|
-
const ret = fetch(
|
|
540
|
+
__wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {
|
|
541
|
+
const ret = arg0.fetch(arg1);
|
|
537
542
|
return ret;
|
|
538
543
|
},
|
|
539
|
-
|
|
540
|
-
const ret =
|
|
544
|
+
__wbg_fetch_9dad4fe911207b37: function(arg0) {
|
|
545
|
+
const ret = fetch(arg0);
|
|
541
546
|
return ret;
|
|
542
547
|
},
|
|
543
|
-
|
|
548
|
+
__wbg_from_4bdf88943703fd48: function(arg0) {
|
|
544
549
|
const ret = Array.from(arg0);
|
|
545
550
|
return ret;
|
|
546
551
|
},
|
|
547
|
-
|
|
552
|
+
__wbg_getRandomValues_3dda8830c2565714: function() { return handleError(function (arg0, arg1) {
|
|
548
553
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
549
554
|
}, arguments); },
|
|
550
|
-
|
|
555
|
+
__wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
|
|
551
556
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
552
557
|
}, arguments); },
|
|
553
|
-
|
|
558
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
554
559
|
arg0.getRandomValues(arg1);
|
|
555
560
|
}, arguments); },
|
|
556
|
-
|
|
561
|
+
__wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
|
|
557
562
|
const ret = arg0.getTime();
|
|
558
563
|
return ret;
|
|
559
564
|
},
|
|
560
|
-
|
|
561
|
-
const ret = arg0
|
|
565
|
+
__wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
|
|
566
|
+
const ret = Reflect.get(arg0, arg1);
|
|
562
567
|
return ret;
|
|
563
|
-
},
|
|
564
|
-
|
|
568
|
+
}, arguments); },
|
|
569
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
565
570
|
const ret = Reflect.get(arg0, arg1);
|
|
566
571
|
return ret;
|
|
567
572
|
}, arguments); },
|
|
568
|
-
|
|
573
|
+
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
574
|
+
const ret = arg0[arg1 >>> 0];
|
|
575
|
+
return ret;
|
|
576
|
+
},
|
|
577
|
+
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
578
|
+
const ret = arg0[arg1 >>> 0];
|
|
579
|
+
return ret;
|
|
580
|
+
},
|
|
581
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
569
582
|
const ret = arg0[arg1];
|
|
570
583
|
return ret;
|
|
571
584
|
},
|
|
572
|
-
|
|
585
|
+
__wbg_has_926ef2ff40b308cf: function() { return handleError(function (arg0, arg1) {
|
|
573
586
|
const ret = Reflect.has(arg0, arg1);
|
|
574
587
|
return ret;
|
|
575
588
|
}, arguments); },
|
|
576
|
-
|
|
589
|
+
__wbg_headers_eb2234545f9ff993: function(arg0) {
|
|
577
590
|
const ret = arg0.headers;
|
|
578
591
|
return ret;
|
|
579
592
|
},
|
|
580
|
-
|
|
593
|
+
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
581
594
|
let result;
|
|
582
595
|
try {
|
|
583
596
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -587,7 +600,7 @@ function __wbg_get_imports() {
|
|
|
587
600
|
const ret = result;
|
|
588
601
|
return ret;
|
|
589
602
|
},
|
|
590
|
-
|
|
603
|
+
__wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
|
|
591
604
|
let result;
|
|
592
605
|
try {
|
|
593
606
|
result = arg0 instanceof Map;
|
|
@@ -597,7 +610,7 @@ function __wbg_get_imports() {
|
|
|
597
610
|
const ret = result;
|
|
598
611
|
return ret;
|
|
599
612
|
},
|
|
600
|
-
|
|
613
|
+
__wbg_instanceof_Promise_7c3bdd7805c2c6e6: function(arg0) {
|
|
601
614
|
let result;
|
|
602
615
|
try {
|
|
603
616
|
result = arg0 instanceof Promise;
|
|
@@ -607,7 +620,7 @@ function __wbg_get_imports() {
|
|
|
607
620
|
const ret = result;
|
|
608
621
|
return ret;
|
|
609
622
|
},
|
|
610
|
-
|
|
623
|
+
__wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {
|
|
611
624
|
let result;
|
|
612
625
|
try {
|
|
613
626
|
result = arg0 instanceof Response;
|
|
@@ -617,7 +630,7 @@ function __wbg_get_imports() {
|
|
|
617
630
|
const ret = result;
|
|
618
631
|
return ret;
|
|
619
632
|
},
|
|
620
|
-
|
|
633
|
+
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
621
634
|
let result;
|
|
622
635
|
try {
|
|
623
636
|
result = arg0 instanceof Uint8Array;
|
|
@@ -627,62 +640,78 @@ function __wbg_get_imports() {
|
|
|
627
640
|
const ret = result;
|
|
628
641
|
return ret;
|
|
629
642
|
},
|
|
630
|
-
|
|
643
|
+
__wbg_isArray_33b91feb269ff46e: function(arg0) {
|
|
631
644
|
const ret = Array.isArray(arg0);
|
|
632
645
|
return ret;
|
|
633
646
|
},
|
|
634
|
-
|
|
647
|
+
__wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
|
|
635
648
|
const ret = Number.isSafeInteger(arg0);
|
|
636
649
|
return ret;
|
|
637
650
|
},
|
|
638
|
-
|
|
651
|
+
__wbg_iterator_d8f549ec8fb061b1: function() {
|
|
639
652
|
const ret = Symbol.iterator;
|
|
640
653
|
return ret;
|
|
641
654
|
},
|
|
642
|
-
|
|
655
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
643
656
|
const ret = arg0.length;
|
|
644
657
|
return ret;
|
|
645
658
|
},
|
|
646
|
-
|
|
659
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
647
660
|
const ret = arg0.length;
|
|
648
661
|
return ret;
|
|
649
662
|
},
|
|
650
|
-
|
|
663
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
651
664
|
const ret = arg0.msCrypto;
|
|
652
665
|
return ret;
|
|
653
666
|
},
|
|
654
|
-
|
|
667
|
+
__wbg_new_0837727332ac86ba: function() { return handleError(function () {
|
|
668
|
+
const ret = new Headers();
|
|
669
|
+
return ret;
|
|
670
|
+
}, arguments); },
|
|
671
|
+
__wbg_new_0_1dcafdf5e786e876: function() {
|
|
655
672
|
const ret = new Date();
|
|
656
673
|
return ret;
|
|
657
674
|
},
|
|
658
|
-
|
|
659
|
-
const ret = new
|
|
675
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
676
|
+
const ret = new Error();
|
|
660
677
|
return ret;
|
|
661
678
|
},
|
|
662
|
-
|
|
663
|
-
const ret = new
|
|
679
|
+
__wbg_new_338f3b13aa93419b: function() { return handleError(function () {
|
|
680
|
+
const ret = new FileReaderSync();
|
|
681
|
+
return ret;
|
|
682
|
+
}, arguments); },
|
|
683
|
+
__wbg_new_49d5571bd3f0c4d4: function() {
|
|
684
|
+
const ret = new Map();
|
|
664
685
|
return ret;
|
|
665
686
|
},
|
|
666
|
-
|
|
667
|
-
const ret = new
|
|
687
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
688
|
+
const ret = new Uint8Array(arg0);
|
|
668
689
|
return ret;
|
|
669
|
-
},
|
|
670
|
-
|
|
671
|
-
const ret = new
|
|
690
|
+
},
|
|
691
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
692
|
+
const ret = new Array();
|
|
672
693
|
return ret;
|
|
673
694
|
},
|
|
674
|
-
|
|
675
|
-
const ret = new
|
|
695
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
696
|
+
const ret = new Object();
|
|
676
697
|
return ret;
|
|
677
698
|
},
|
|
678
|
-
|
|
699
|
+
__wbg_new_c518c60af666645b: function() { return handleError(function () {
|
|
700
|
+
const ret = new AbortController();
|
|
701
|
+
return ret;
|
|
702
|
+
}, arguments); },
|
|
703
|
+
__wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
|
|
704
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
705
|
+
return ret;
|
|
706
|
+
},
|
|
707
|
+
__wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
|
|
679
708
|
try {
|
|
680
709
|
var state0 = {a: arg0, b: arg1};
|
|
681
710
|
var cb0 = (arg0, arg1) => {
|
|
682
711
|
const a = state0.a;
|
|
683
712
|
state0.a = 0;
|
|
684
713
|
try {
|
|
685
|
-
return
|
|
714
|
+
return wasm_bindgen__convert__closures_____invoke__h4b0b8f22c61fbfcd(a, state0.b, arg0, arg1);
|
|
686
715
|
} finally {
|
|
687
716
|
state0.a = a;
|
|
688
717
|
}
|
|
@@ -693,192 +722,168 @@ function __wbg_get_imports() {
|
|
|
693
722
|
state0.a = state0.b = 0;
|
|
694
723
|
}
|
|
695
724
|
},
|
|
696
|
-
|
|
697
|
-
const ret = new AbortController();
|
|
698
|
-
return ret;
|
|
699
|
-
}, arguments); },
|
|
700
|
-
__wbg_new_c27f68f047724fa3: function() { return handleError(function () {
|
|
701
|
-
const ret = new FileReaderSync();
|
|
702
|
-
return ret;
|
|
703
|
-
}, arguments); },
|
|
704
|
-
__wbg_new_dca287b076112a51: function() {
|
|
705
|
-
const ret = new Map();
|
|
706
|
-
return ret;
|
|
707
|
-
},
|
|
708
|
-
__wbg_new_dd2b680c8bf6ae29: function(arg0) {
|
|
709
|
-
const ret = new Uint8Array(arg0);
|
|
710
|
-
return ret;
|
|
711
|
-
},
|
|
712
|
-
__wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
|
|
713
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
714
|
-
return ret;
|
|
715
|
-
},
|
|
716
|
-
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
717
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
718
|
-
return ret;
|
|
719
|
-
},
|
|
720
|
-
__wbg_new_with_length_a2c39cbe88fd8ff1: function(arg0) {
|
|
725
|
+
__wbg_new_with_length_825018a1616e9e55: function(arg0) {
|
|
721
726
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
722
727
|
return ret;
|
|
723
728
|
},
|
|
724
|
-
|
|
729
|
+
__wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {
|
|
725
730
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
726
731
|
return ret;
|
|
727
732
|
}, arguments); },
|
|
728
|
-
|
|
733
|
+
__wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
|
|
729
734
|
const ret = arg0.next();
|
|
730
735
|
return ret;
|
|
731
736
|
}, arguments); },
|
|
732
|
-
|
|
737
|
+
__wbg_next_e01a967809d1aa68: function(arg0) {
|
|
733
738
|
const ret = arg0.next;
|
|
734
739
|
return ret;
|
|
735
740
|
},
|
|
736
|
-
|
|
741
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
737
742
|
const ret = arg0.node;
|
|
738
743
|
return ret;
|
|
739
744
|
},
|
|
740
|
-
|
|
745
|
+
__wbg_now_16f0c993d5dd6c27: function() {
|
|
741
746
|
const ret = Date.now();
|
|
742
747
|
return ret;
|
|
743
748
|
},
|
|
744
|
-
|
|
749
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
745
750
|
const ret = arg0.process;
|
|
746
751
|
return ret;
|
|
747
752
|
},
|
|
748
|
-
|
|
753
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
749
754
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
750
755
|
},
|
|
751
|
-
|
|
756
|
+
__wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
|
|
752
757
|
const ret = arg0.queueMicrotask;
|
|
753
758
|
return ret;
|
|
754
759
|
},
|
|
755
|
-
|
|
760
|
+
__wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
|
|
756
761
|
queueMicrotask(arg0);
|
|
757
762
|
},
|
|
758
|
-
|
|
763
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
759
764
|
arg0.randomFillSync(arg1);
|
|
760
765
|
}, arguments); },
|
|
761
|
-
|
|
766
|
+
__wbg_readAsArrayBuffer_762e6372375b4632: function() { return handleError(function (arg0, arg1) {
|
|
762
767
|
const ret = arg0.readAsArrayBuffer(arg1);
|
|
763
768
|
return ret;
|
|
764
769
|
}, arguments); },
|
|
765
|
-
|
|
770
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
766
771
|
const ret = module.require;
|
|
767
772
|
return ret;
|
|
768
773
|
}, arguments); },
|
|
769
|
-
|
|
774
|
+
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
770
775
|
const ret = Promise.resolve(arg0);
|
|
771
776
|
return ret;
|
|
772
777
|
},
|
|
773
|
-
|
|
778
|
+
__wbg_setTimeout_f757f00851f76c42: function(arg0, arg1) {
|
|
774
779
|
const ret = setTimeout(arg0, arg1);
|
|
775
780
|
return ret;
|
|
776
781
|
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
return ret;
|
|
782
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
783
|
+
arg0[arg1 >>> 0] = arg2;
|
|
780
784
|
},
|
|
781
|
-
|
|
785
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
782
786
|
arg0[arg1] = arg2;
|
|
783
787
|
},
|
|
784
|
-
|
|
788
|
+
__wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
|
|
789
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
790
|
+
},
|
|
791
|
+
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
792
|
+
const ret = arg0.set(arg1, arg2);
|
|
793
|
+
return ret;
|
|
794
|
+
},
|
|
795
|
+
__wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {
|
|
785
796
|
arg0.body = arg1;
|
|
786
797
|
},
|
|
787
|
-
|
|
798
|
+
__wbg_set_cache_ec7e430c6056ebda: function(arg0, arg1) {
|
|
788
799
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
789
800
|
},
|
|
790
|
-
|
|
791
|
-
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
792
|
-
},
|
|
793
|
-
__wbg_set_credentials_c4a58d2e05ef24fb: function(arg0, arg1) {
|
|
801
|
+
__wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
|
|
794
802
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
795
803
|
},
|
|
796
|
-
|
|
797
|
-
arg0[arg1 >>> 0] = arg2;
|
|
798
|
-
},
|
|
799
|
-
__wbg_set_headers_cfc5f4b2c1f20549: function(arg0, arg1) {
|
|
804
|
+
__wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
|
|
800
805
|
arg0.headers = arg1;
|
|
801
806
|
},
|
|
802
|
-
|
|
807
|
+
__wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
|
|
803
808
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
804
809
|
},
|
|
805
|
-
|
|
810
|
+
__wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
|
|
806
811
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
807
812
|
},
|
|
808
|
-
|
|
813
|
+
__wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
|
|
809
814
|
arg0.signal = arg1;
|
|
810
815
|
},
|
|
811
|
-
|
|
816
|
+
__wbg_signal_166e1da31adcac18: function(arg0) {
|
|
812
817
|
const ret = arg0.signal;
|
|
813
818
|
return ret;
|
|
814
819
|
},
|
|
815
|
-
|
|
820
|
+
__wbg_size_819df95195daae81: function(arg0) {
|
|
816
821
|
const ret = arg0.size;
|
|
817
822
|
return ret;
|
|
818
823
|
},
|
|
819
|
-
|
|
824
|
+
__wbg_slice_f55d290dcc799204: function() { return handleError(function (arg0, arg1, arg2) {
|
|
820
825
|
const ret = arg0.slice(arg1, arg2);
|
|
821
826
|
return ret;
|
|
822
827
|
}, arguments); },
|
|
823
|
-
|
|
828
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
824
829
|
const ret = arg1.stack;
|
|
825
830
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
826
831
|
const len1 = WASM_VECTOR_LEN;
|
|
827
832
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
828
833
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
829
834
|
},
|
|
830
|
-
|
|
835
|
+
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
831
836
|
const ret = typeof global === 'undefined' ? null : global;
|
|
832
837
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
833
838
|
},
|
|
834
|
-
|
|
839
|
+
__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
|
|
835
840
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
836
841
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
837
842
|
},
|
|
838
|
-
|
|
843
|
+
__wbg_static_accessor_SELF_f207c857566db248: function() {
|
|
839
844
|
const ret = typeof self === 'undefined' ? null : self;
|
|
840
845
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
841
846
|
},
|
|
842
|
-
|
|
847
|
+
__wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
|
|
843
848
|
const ret = typeof window === 'undefined' ? null : window;
|
|
844
849
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
845
850
|
},
|
|
846
|
-
|
|
851
|
+
__wbg_status_318629ab93a22955: function(arg0) {
|
|
847
852
|
const ret = arg0.status;
|
|
848
853
|
return ret;
|
|
849
854
|
},
|
|
850
|
-
|
|
855
|
+
__wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
|
|
851
856
|
const ret = JSON.stringify(arg0);
|
|
852
857
|
return ret;
|
|
853
858
|
}, arguments); },
|
|
854
|
-
|
|
859
|
+
__wbg_subarray_a068d24e39478a8a: function(arg0, arg1, arg2) {
|
|
855
860
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
856
861
|
return ret;
|
|
857
862
|
},
|
|
858
|
-
|
|
859
|
-
const ret = arg0.then(arg1
|
|
863
|
+
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
864
|
+
const ret = arg0.then(arg1);
|
|
860
865
|
return ret;
|
|
861
866
|
},
|
|
862
|
-
|
|
863
|
-
const ret = arg0.then(arg1);
|
|
867
|
+
__wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
|
|
868
|
+
const ret = arg0.then(arg1, arg2);
|
|
864
869
|
return ret;
|
|
865
870
|
},
|
|
866
|
-
|
|
871
|
+
__wbg_url_7fefc1820fba4e0c: function(arg0, arg1) {
|
|
867
872
|
const ret = arg1.url;
|
|
868
873
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
869
874
|
const len1 = WASM_VECTOR_LEN;
|
|
870
875
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
871
876
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
872
877
|
},
|
|
873
|
-
|
|
878
|
+
__wbg_valueOf_3dcf9bcf2e496cb2: function(arg0) {
|
|
874
879
|
const ret = arg0.valueOf();
|
|
875
880
|
return ret;
|
|
876
881
|
},
|
|
877
|
-
|
|
882
|
+
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
878
883
|
const ret = arg0.value;
|
|
879
884
|
return ret;
|
|
880
885
|
},
|
|
881
|
-
|
|
886
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
882
887
|
const ret = arg0.versions;
|
|
883
888
|
return ret;
|
|
884
889
|
},
|
|
@@ -887,13 +892,13 @@ function __wbg_get_imports() {
|
|
|
887
892
|
return ret;
|
|
888
893
|
},
|
|
889
894
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
890
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
891
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
895
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1466, function: Function { arguments: [], shim_idx: 1467, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
896
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h08deb5985c70bc53, wasm_bindgen__convert__closures_____invoke__h88b9912c47edf5c0);
|
|
892
897
|
return ret;
|
|
893
898
|
},
|
|
894
899
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
895
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
896
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
900
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1492, function: Function { arguments: [Externref], shim_idx: 2941, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
901
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1fe08a5c187de005, wasm_bindgen__convert__closures_____invoke__h4bb8e6e9707fd977);
|
|
897
902
|
return ret;
|
|
898
903
|
},
|
|
899
904
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -944,16 +949,19 @@ function __wbg_get_imports() {
|
|
|
944
949
|
};
|
|
945
950
|
}
|
|
946
951
|
|
|
947
|
-
function
|
|
948
|
-
wasm.
|
|
952
|
+
function wasm_bindgen__convert__closures_____invoke__h88b9912c47edf5c0(arg0, arg1) {
|
|
953
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h88b9912c47edf5c0(arg0, arg1);
|
|
949
954
|
}
|
|
950
955
|
|
|
951
|
-
function
|
|
952
|
-
wasm.
|
|
956
|
+
function wasm_bindgen__convert__closures_____invoke__h4bb8e6e9707fd977(arg0, arg1, arg2) {
|
|
957
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bb8e6e9707fd977(arg0, arg1, arg2);
|
|
958
|
+
if (ret[1]) {
|
|
959
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
960
|
+
}
|
|
953
961
|
}
|
|
954
962
|
|
|
955
|
-
function
|
|
956
|
-
wasm.
|
|
963
|
+
function wasm_bindgen__convert__closures_____invoke__h4b0b8f22c61fbfcd(arg0, arg1, arg2, arg3) {
|
|
964
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h4b0b8f22c61fbfcd(arg0, arg1, arg2, arg3);
|
|
957
965
|
}
|
|
958
966
|
|
|
959
967
|
|
|
@@ -1278,4 +1286,4 @@ async function __wbg_init(module_or_path) {
|
|
|
1278
1286
|
}
|
|
1279
1287
|
|
|
1280
1288
|
export { initSync, __wbg_init as default };
|
|
1281
|
-
export const WASM_SRI = "sha512
|
|
1289
|
+
export const WASM_SRI = "sha512-8ezFXcQofLhsrffqxyLLl/H8rpXZqT6lWPqt+t4G7ut6WtOkoJMYQFiaVkvgHLcB/SeiMKkAOKZZnJ+U9ccxQg==";
|
package/pkg/c2pa_bg.wasm
CHANGED
|
Binary file
|
package/pkg/c2pa_bg.wasm.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const wasmreader_resourceToBytes: (a: number, b: number, c: number) => [n
|
|
|
12
12
|
export const __wbg_wasmbuilder_free: (a: number, b: number) => void;
|
|
13
13
|
export const wasmbuilder_addAction: (a: number, b: any) => [number, number];
|
|
14
14
|
export const wasmbuilder_addIngredient: (a: number, b: number, c: number) => [number, number];
|
|
15
|
-
export const wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) =>
|
|
15
|
+
export const wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
16
16
|
export const wasmbuilder_addResourceFromBlob: (a: number, b: number, c: number, d: any) => [number, number];
|
|
17
17
|
export const wasmbuilder_fromArchive: (a: any, b: number, c: number) => [number, number, number];
|
|
18
18
|
export const wasmbuilder_fromJson: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -29,11 +29,11 @@ export const __wbg_wasmsigner_free: (a: number, b: number) => void;
|
|
|
29
29
|
export const wasmsigner_fromDefinition: (a: any) => [number, number, number];
|
|
30
30
|
export const loadSettings: (a: number, b: number) => [number, number];
|
|
31
31
|
export const run: () => void;
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
32
|
+
export const wasm_bindgen__closure__destroy__h08deb5985c70bc53: (a: number, b: number) => void;
|
|
33
|
+
export const wasm_bindgen__closure__destroy__h1fe08a5c187de005: (a: number, b: number) => void;
|
|
34
|
+
export const wasm_bindgen__convert__closures_____invoke__h4bb8e6e9707fd977: (a: number, b: number, c: any) => [number, number];
|
|
35
|
+
export const wasm_bindgen__convert__closures_____invoke__h4b0b8f22c61fbfcd: (a: number, b: number, c: any, d: any) => void;
|
|
36
|
+
export const wasm_bindgen__convert__closures_____invoke__h88b9912c47edf5c0: (a: number, b: number) => void;
|
|
37
37
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
38
38
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
39
39
|
export const __wbindgen_exn_store: (a: number) => void;
|