@learncard/didkit-plugin 1.0.8 → 1.1.1

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.
@@ -1,24 +1,24 @@
1
-
2
1
  let wasm;
3
2
 
4
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
3
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
5
4
 
6
- cachedTextDecoder.decode();
5
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
7
6
 
8
- let cachedUint8Memory0 = new Uint8Array();
7
+ let cachedUint8Memory0 = null;
9
8
 
10
9
  function getUint8Memory0() {
11
- if (cachedUint8Memory0.byteLength === 0) {
10
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
12
11
  cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
13
12
  }
14
13
  return cachedUint8Memory0;
15
14
  }
16
15
 
17
16
  function getStringFromWasm0(ptr, len) {
17
+ ptr = ptr >>> 0;
18
18
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
19
  }
20
20
 
21
- const heap = new Array(32).fill(undefined);
21
+ const heap = new Array(128).fill(undefined);
22
22
 
23
23
  heap.push(undefined, null, true, false);
24
24
 
@@ -36,7 +36,7 @@ function addHeapObject(obj) {
36
36
  function getObject(idx) { return heap[idx]; }
37
37
 
38
38
  function dropObject(idx) {
39
- if (idx < 36) return;
39
+ if (idx < 132) return;
40
40
  heap[idx] = heap_next;
41
41
  heap_next = idx;
42
42
  }
@@ -49,7 +49,7 @@ function takeObject(idx) {
49
49
 
50
50
  let WASM_VECTOR_LEN = 0;
51
51
 
52
- const cachedTextEncoder = new TextEncoder('utf-8');
52
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
53
53
 
54
54
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
55
55
  ? function (arg, view) {
@@ -68,14 +68,14 @@ function passStringToWasm0(arg, malloc, realloc) {
68
68
 
69
69
  if (realloc === undefined) {
70
70
  const buf = cachedTextEncoder.encode(arg);
71
- const ptr = malloc(buf.length);
71
+ const ptr = malloc(buf.length, 1) >>> 0;
72
72
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
73
73
  WASM_VECTOR_LEN = buf.length;
74
74
  return ptr;
75
75
  }
76
76
 
77
77
  let len = arg.length;
78
- let ptr = malloc(len);
78
+ let ptr = malloc(len, 1) >>> 0;
79
79
 
80
80
  const mem = getUint8Memory0();
81
81
 
@@ -91,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) {
91
91
  if (offset !== 0) {
92
92
  arg = arg.slice(offset);
93
93
  }
94
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
94
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
95
95
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
96
96
  const ret = encodeString(arg, view);
97
97
 
@@ -106,10 +106,10 @@ function isLikeNone(x) {
106
106
  return x === undefined || x === null;
107
107
  }
108
108
 
109
- let cachedInt32Memory0 = new Int32Array();
109
+ let cachedInt32Memory0 = null;
110
110
 
111
111
  function getInt32Memory0() {
112
- if (cachedInt32Memory0.byteLength === 0) {
112
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
113
113
  cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
114
114
  }
115
115
  return cachedInt32Memory0;
@@ -205,22 +205,26 @@ function makeMutClosure(arg0, arg1, dtor, f) {
205
205
  return real;
206
206
  }
207
207
  function __wbg_adapter_26(arg0, arg1, arg2) {
208
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd6ecfa201cc6ac51(arg0, arg1, addHeapObject(arg2));
208
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb2947e09b459f26(arg0, arg1, addHeapObject(arg2));
209
209
  }
210
210
 
211
211
  /**
212
212
  * @returns {string}
213
213
  */
214
214
  export function getVersion() {
215
+ let deferred1_0;
216
+ let deferred1_1;
215
217
  try {
216
218
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
217
219
  wasm.getVersion(retptr);
218
220
  var r0 = getInt32Memory0()[retptr / 4 + 0];
219
221
  var r1 = getInt32Memory0()[retptr / 4 + 1];
222
+ deferred1_0 = r0;
223
+ deferred1_1 = r1;
220
224
  return getStringFromWasm0(r0, r1);
221
225
  } finally {
222
226
  wasm.__wbindgen_add_to_stack_pointer(16);
223
- wasm.__wbindgen_free(r0, r1);
227
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
224
228
  }
225
229
  }
226
230
 
@@ -256,6 +260,8 @@ export function resolveDID(did, input_metadata) {
256
260
  * @returns {string}
257
261
  */
258
262
  export function generateEd25519Key() {
263
+ let deferred2_0;
264
+ let deferred2_1;
259
265
  try {
260
266
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
261
267
  wasm.generateEd25519Key(retptr);
@@ -263,21 +269,23 @@ export function generateEd25519Key() {
263
269
  var r1 = getInt32Memory0()[retptr / 4 + 1];
264
270
  var r2 = getInt32Memory0()[retptr / 4 + 2];
265
271
  var r3 = getInt32Memory0()[retptr / 4 + 3];
266
- var ptr0 = r0;
267
- var len0 = r1;
272
+ var ptr1 = r0;
273
+ var len1 = r1;
268
274
  if (r3) {
269
- ptr0 = 0; len0 = 0;
275
+ ptr1 = 0; len1 = 0;
270
276
  throw takeObject(r2);
271
277
  }
272
- return getStringFromWasm0(ptr0, len0);
278
+ deferred2_0 = ptr1;
279
+ deferred2_1 = len1;
280
+ return getStringFromWasm0(ptr1, len1);
273
281
  } finally {
274
282
  wasm.__wbindgen_add_to_stack_pointer(16);
275
- wasm.__wbindgen_free(ptr0, len0);
283
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
276
284
  }
277
285
  }
278
286
 
279
287
  function passArray8ToWasm0(arg, malloc) {
280
- const ptr = malloc(arg.length * 1);
288
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
281
289
  getUint8Memory0().set(arg, ptr / 1);
282
290
  WASM_VECTOR_LEN = arg.length;
283
291
  return ptr;
@@ -287,6 +295,8 @@ function passArray8ToWasm0(arg, malloc) {
287
295
  * @returns {string}
288
296
  */
289
297
  export function generateEd25519KeyFromBytes(bytes) {
298
+ let deferred3_0;
299
+ let deferred3_1;
290
300
  try {
291
301
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
292
302
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
@@ -296,16 +306,18 @@ export function generateEd25519KeyFromBytes(bytes) {
296
306
  var r1 = getInt32Memory0()[retptr / 4 + 1];
297
307
  var r2 = getInt32Memory0()[retptr / 4 + 2];
298
308
  var r3 = getInt32Memory0()[retptr / 4 + 3];
299
- var ptr1 = r0;
300
- var len1 = r1;
309
+ var ptr2 = r0;
310
+ var len2 = r1;
301
311
  if (r3) {
302
- ptr1 = 0; len1 = 0;
312
+ ptr2 = 0; len2 = 0;
303
313
  throw takeObject(r2);
304
314
  }
305
- return getStringFromWasm0(ptr1, len1);
315
+ deferred3_0 = ptr2;
316
+ deferred3_1 = len2;
317
+ return getStringFromWasm0(ptr2, len2);
306
318
  } finally {
307
319
  wasm.__wbindgen_add_to_stack_pointer(16);
308
- wasm.__wbindgen_free(ptr1, len1);
320
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
309
321
  }
310
322
  }
311
323
 
@@ -313,6 +325,8 @@ export function generateEd25519KeyFromBytes(bytes) {
313
325
  * @returns {string}
314
326
  */
315
327
  export function generateSecp256k1Key() {
328
+ let deferred2_0;
329
+ let deferred2_1;
316
330
  try {
317
331
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
318
332
  wasm.generateSecp256k1Key(retptr);
@@ -320,16 +334,18 @@ export function generateSecp256k1Key() {
320
334
  var r1 = getInt32Memory0()[retptr / 4 + 1];
321
335
  var r2 = getInt32Memory0()[retptr / 4 + 2];
322
336
  var r3 = getInt32Memory0()[retptr / 4 + 3];
323
- var ptr0 = r0;
324
- var len0 = r1;
337
+ var ptr1 = r0;
338
+ var len1 = r1;
325
339
  if (r3) {
326
- ptr0 = 0; len0 = 0;
340
+ ptr1 = 0; len1 = 0;
327
341
  throw takeObject(r2);
328
342
  }
329
- return getStringFromWasm0(ptr0, len0);
343
+ deferred2_0 = ptr1;
344
+ deferred2_1 = len1;
345
+ return getStringFromWasm0(ptr1, len1);
330
346
  } finally {
331
347
  wasm.__wbindgen_add_to_stack_pointer(16);
332
- wasm.__wbindgen_free(ptr0, len0);
348
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
333
349
  }
334
350
  }
335
351
 
@@ -338,6 +354,8 @@ export function generateSecp256k1Key() {
338
354
  * @returns {string}
339
355
  */
340
356
  export function generateSecp256k1KeyFromBytes(bytes) {
357
+ let deferred3_0;
358
+ let deferred3_1;
341
359
  try {
342
360
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
343
361
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
@@ -347,16 +365,18 @@ export function generateSecp256k1KeyFromBytes(bytes) {
347
365
  var r1 = getInt32Memory0()[retptr / 4 + 1];
348
366
  var r2 = getInt32Memory0()[retptr / 4 + 2];
349
367
  var r3 = getInt32Memory0()[retptr / 4 + 3];
350
- var ptr1 = r0;
351
- var len1 = r1;
368
+ var ptr2 = r0;
369
+ var len2 = r1;
352
370
  if (r3) {
353
- ptr1 = 0; len1 = 0;
371
+ ptr2 = 0; len2 = 0;
354
372
  throw takeObject(r2);
355
373
  }
356
- return getStringFromWasm0(ptr1, len1);
374
+ deferred3_0 = ptr2;
375
+ deferred3_1 = len2;
376
+ return getStringFromWasm0(ptr2, len2);
357
377
  } finally {
358
378
  wasm.__wbindgen_add_to_stack_pointer(16);
359
- wasm.__wbindgen_free(ptr1, len1);
379
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
360
380
  }
361
381
  }
362
382
 
@@ -366,6 +386,8 @@ export function generateSecp256k1KeyFromBytes(bytes) {
366
386
  * @returns {string}
367
387
  */
368
388
  export function keyToDID(method_pattern, jwk) {
389
+ let deferred4_0;
390
+ let deferred4_1;
369
391
  try {
370
392
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
371
393
  const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -377,16 +399,18 @@ export function keyToDID(method_pattern, jwk) {
377
399
  var r1 = getInt32Memory0()[retptr / 4 + 1];
378
400
  var r2 = getInt32Memory0()[retptr / 4 + 2];
379
401
  var r3 = getInt32Memory0()[retptr / 4 + 3];
380
- var ptr2 = r0;
381
- var len2 = r1;
402
+ var ptr3 = r0;
403
+ var len3 = r1;
382
404
  if (r3) {
383
- ptr2 = 0; len2 = 0;
405
+ ptr3 = 0; len3 = 0;
384
406
  throw takeObject(r2);
385
407
  }
386
- return getStringFromWasm0(ptr2, len2);
408
+ deferred4_0 = ptr3;
409
+ deferred4_1 = len3;
410
+ return getStringFromWasm0(ptr3, len3);
387
411
  } finally {
388
412
  wasm.__wbindgen_add_to_stack_pointer(16);
389
- wasm.__wbindgen_free(ptr2, len2);
413
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
390
414
  }
391
415
  }
392
416
 
@@ -743,13 +767,14 @@ function handleError(f, args) {
743
767
  }
744
768
 
745
769
  function getArrayU8FromWasm0(ptr, len) {
770
+ ptr = ptr >>> 0;
746
771
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
747
772
  }
748
- function __wbg_adapter_133(arg0, arg1, arg2, arg3) {
749
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h361d90515cfd8001(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
773
+ function __wbg_adapter_139(arg0, arg1, arg2, arg3) {
774
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h37b98ed5001919e7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
750
775
  }
751
776
 
752
- async function load(module, imports) {
777
+ async function __wbg_load(module, imports) {
753
778
  if (typeof Response === 'function' && module instanceof Response) {
754
779
  if (typeof WebAssembly.instantiateStreaming === 'function') {
755
780
  try {
@@ -780,7 +805,7 @@ async function load(module, imports) {
780
805
  }
781
806
  }
782
807
 
783
- function getImports() {
808
+ function __wbg_get_imports() {
784
809
  const imports = {};
785
810
  imports.wbg = {};
786
811
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
@@ -803,71 +828,92 @@ function getImports() {
803
828
  const ret = getObject(arg0);
804
829
  return addHeapObject(ret);
805
830
  };
806
- imports.wbg.__wbg_fetch_b1379d93c1e2b015 = function(arg0) {
831
+ imports.wbg.__wbg_fetch_57429b87be3dcc33 = function(arg0) {
807
832
  const ret = fetch(getObject(arg0));
808
833
  return addHeapObject(ret);
809
834
  };
810
- imports.wbg.__wbg_fetch_17b968b9c79d3c56 = function(arg0, arg1) {
835
+ imports.wbg.__wbg_fetch_8eaf01857a5bb21f = function(arg0, arg1) {
811
836
  const ret = getObject(arg0).fetch(getObject(arg1));
812
837
  return addHeapObject(ret);
813
838
  };
814
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
815
- const obj = getObject(arg1);
816
- const ret = typeof(obj) === 'string' ? obj : undefined;
817
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
818
- var len0 = WASM_VECTOR_LEN;
819
- getInt32Memory0()[arg0 / 4 + 1] = len0;
820
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
839
+ imports.wbg.__wbg_signal_4bd18fb489af2d4c = function(arg0) {
840
+ const ret = getObject(arg0).signal;
841
+ return addHeapObject(ret);
842
+ };
843
+ imports.wbg.__wbg_new_55c9955722952374 = function() { return handleError(function () {
844
+ const ret = new AbortController();
845
+ return addHeapObject(ret);
846
+ }, arguments) };
847
+ imports.wbg.__wbg_abort_654b796176d117aa = function(arg0) {
848
+ getObject(arg0).abort();
821
849
  };
822
- imports.wbg.__wbg_instanceof_Response_240e67e5796c3c6b = function(arg0) {
823
- const ret = getObject(arg0) instanceof Response;
850
+ imports.wbg.__wbg_new_1eead62f64ca15ce = function() { return handleError(function () {
851
+ const ret = new Headers();
852
+ return addHeapObject(ret);
853
+ }, arguments) };
854
+ imports.wbg.__wbg_append_fda9e3432e3e88da = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
855
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
856
+ }, arguments) };
857
+ imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = function(arg0) {
858
+ let result;
859
+ try {
860
+ result = getObject(arg0) instanceof Response;
861
+ } catch {
862
+ result = false;
863
+ }
864
+ const ret = result;
824
865
  return ret;
825
866
  };
826
- imports.wbg.__wbg_url_0f503b904b694ff5 = function(arg0, arg1) {
867
+ imports.wbg.__wbg_url_8503de97f69da463 = function(arg0, arg1) {
827
868
  const ret = getObject(arg1).url;
828
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
829
- const len0 = WASM_VECTOR_LEN;
830
- getInt32Memory0()[arg0 / 4 + 1] = len0;
831
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
869
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
870
+ const len1 = WASM_VECTOR_LEN;
871
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
872
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
832
873
  };
833
- imports.wbg.__wbg_status_9067c6a4fdd064c9 = function(arg0) {
874
+ imports.wbg.__wbg_status_ac85a3142a84caa2 = function(arg0) {
834
875
  const ret = getObject(arg0).status;
835
876
  return ret;
836
877
  };
837
- imports.wbg.__wbg_headers_aa309e800cf75016 = function(arg0) {
878
+ imports.wbg.__wbg_headers_b70de86b8e989bc0 = function(arg0) {
838
879
  const ret = getObject(arg0).headers;
839
880
  return addHeapObject(ret);
840
881
  };
841
- imports.wbg.__wbg_arrayBuffer_ccd485f4d2929b08 = function() { return handleError(function (arg0) {
882
+ imports.wbg.__wbg_arrayBuffer_288fb3538806e85c = function() { return handleError(function (arg0) {
842
883
  const ret = getObject(arg0).arrayBuffer();
843
884
  return addHeapObject(ret);
844
885
  }, arguments) };
845
- imports.wbg.__wbg_newwithstrandinit_de7c409ec8538105 = function() { return handleError(function (arg0, arg1, arg2) {
886
+ imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = function() { return handleError(function (arg0, arg1, arg2) {
846
887
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
847
888
  return addHeapObject(ret);
848
889
  }, arguments) };
849
- imports.wbg.__wbg_new_4cba26249c1686cd = function() { return handleError(function () {
850
- const ret = new Headers();
851
- return addHeapObject(ret);
852
- }, arguments) };
853
- imports.wbg.__wbg_append_9c6d4d7f71076e48 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
854
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
855
- }, arguments) };
856
- imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
890
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
891
+ const obj = getObject(arg1);
892
+ const ret = typeof(obj) === 'string' ? obj : undefined;
893
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
894
+ var len1 = WASM_VECTOR_LEN;
895
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
896
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
897
+ };
898
+ imports.wbg.__wbg_now_0cfdc90c97d0c24b = function(arg0) {
899
+ const ret = getObject(arg0).now();
900
+ return ret;
901
+ };
902
+ imports.wbg.__wbg_randomFillSync_85b3f4c52c56c313 = function(arg0, arg1, arg2) {
857
903
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
858
904
  };
859
- imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
905
+ imports.wbg.__wbg_getRandomValues_cd175915511f705e = function(arg0, arg1) {
860
906
  getObject(arg0).getRandomValues(getObject(arg1));
861
907
  };
862
- imports.wbg.__wbg_self_86b4b13392c7af56 = function() { return handleError(function () {
908
+ imports.wbg.__wbg_self_7eede1f4488bf346 = function() { return handleError(function () {
863
909
  const ret = self.self;
864
910
  return addHeapObject(ret);
865
911
  }, arguments) };
866
- imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
912
+ imports.wbg.__wbg_crypto_c909fb428dcbddb6 = function(arg0) {
867
913
  const ret = getObject(arg0).crypto;
868
914
  return addHeapObject(ret);
869
915
  };
870
- imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
916
+ imports.wbg.__wbg_msCrypto_511eefefbfc70ae4 = function(arg0) {
871
917
  const ret = getObject(arg0).msCrypto;
872
918
  return addHeapObject(ret);
873
919
  };
@@ -875,26 +921,20 @@ function getImports() {
875
921
  const ret = getObject(arg0) === undefined;
876
922
  return ret;
877
923
  };
878
- imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
924
+ imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {
879
925
  const ret = module;
880
926
  return addHeapObject(ret);
881
927
  };
882
- imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
928
+ imports.wbg.__wbg_require_900d5c3984fe7703 = function(arg0, arg1, arg2) {
883
929
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
884
930
  return addHeapObject(ret);
885
931
  };
886
- imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
932
+ imports.wbg.__wbg_getRandomValues_307049345d0bd88c = function(arg0) {
887
933
  const ret = getObject(arg0).getRandomValues;
888
934
  return addHeapObject(ret);
889
935
  };
890
- imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
891
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
892
- }, arguments) };
893
- imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
894
- getObject(arg0).getRandomValues(getObject(arg1));
895
- }, arguments) };
896
- imports.wbg.__wbg_process_e56fd54cf6319b6c = function(arg0) {
897
- const ret = getObject(arg0).process;
936
+ imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
937
+ const ret = getObject(arg0).crypto;
898
938
  return addHeapObject(ret);
899
939
  };
900
940
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -902,11 +942,15 @@ function getImports() {
902
942
  const ret = typeof(val) === 'object' && val !== null;
903
943
  return ret;
904
944
  };
905
- imports.wbg.__wbg_versions_77e21455908dad33 = function(arg0) {
945
+ imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
946
+ const ret = getObject(arg0).process;
947
+ return addHeapObject(ret);
948
+ };
949
+ imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
906
950
  const ret = getObject(arg0).versions;
907
951
  return addHeapObject(ret);
908
952
  };
909
- imports.wbg.__wbg_node_0dd25d832e4785d5 = function(arg0) {
953
+ imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
910
954
  const ret = getObject(arg0).node;
911
955
  return addHeapObject(ret);
912
956
  };
@@ -914,98 +958,96 @@ function getImports() {
914
958
  const ret = typeof(getObject(arg0)) === 'string';
915
959
  return ret;
916
960
  };
917
- imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) {
918
- const ret = getObject(arg0).crypto;
919
- return addHeapObject(ret);
920
- };
921
- imports.wbg.__wbg_msCrypto_5a86d77a66230f81 = function(arg0) {
961
+ imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
922
962
  const ret = getObject(arg0).msCrypto;
923
963
  return addHeapObject(ret);
924
964
  };
925
- imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
926
- const ret = module;
927
- return addHeapObject(ret);
928
- };
929
- imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
930
- const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
965
+ imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
966
+ const ret = module.require;
931
967
  return addHeapObject(ret);
932
968
  }, arguments) };
933
969
  imports.wbg.__wbindgen_is_function = function(arg0) {
934
970
  const ret = typeof(getObject(arg0)) === 'function';
935
971
  return ret;
936
972
  };
937
- imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
973
+ imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
974
+ getObject(arg0).getRandomValues(getObject(arg1));
975
+ }, arguments) };
976
+ imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
977
+ getObject(arg0).randomFillSync(takeObject(arg1));
978
+ }, arguments) };
979
+ imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
938
980
  const ret = new Function(getStringFromWasm0(arg0, arg1));
939
981
  return addHeapObject(ret);
940
982
  };
941
- imports.wbg.__wbg_next_726d1c2255989269 = function(arg0) {
983
+ imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) {
942
984
  const ret = getObject(arg0).next;
943
985
  return addHeapObject(ret);
944
986
  };
945
- imports.wbg.__wbg_next_3d0c4cc33e7418c9 = function() { return handleError(function (arg0) {
987
+ imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
946
988
  const ret = getObject(arg0).next();
947
989
  return addHeapObject(ret);
948
990
  }, arguments) };
949
- imports.wbg.__wbg_done_e5655b169bb04f60 = function(arg0) {
991
+ imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
950
992
  const ret = getObject(arg0).done;
951
993
  return ret;
952
994
  };
953
- imports.wbg.__wbg_value_8f901bca1014f843 = function(arg0) {
995
+ imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
954
996
  const ret = getObject(arg0).value;
955
997
  return addHeapObject(ret);
956
998
  };
957
- imports.wbg.__wbg_iterator_22ed2b976832ff0c = function() {
999
+ imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {
958
1000
  const ret = Symbol.iterator;
959
1001
  return addHeapObject(ret);
960
1002
  };
961
- imports.wbg.__wbg_get_72332cd2bc57924c = function() { return handleError(function (arg0, arg1) {
1003
+ imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
962
1004
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
963
1005
  return addHeapObject(ret);
964
1006
  }, arguments) };
965
- imports.wbg.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function (arg0, arg1) {
1007
+ imports.wbg.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
966
1008
  const ret = getObject(arg0).call(getObject(arg1));
967
1009
  return addHeapObject(ret);
968
1010
  }, arguments) };
969
- imports.wbg.__wbg_new_e6a9fecc2bf26696 = function() {
1011
+ imports.wbg.__wbg_new_b51585de1b234aff = function() {
970
1012
  const ret = new Object();
971
1013
  return addHeapObject(ret);
972
1014
  };
973
- imports.wbg.__wbg_self_fd00a1ef86d1b2ed = function() { return handleError(function () {
1015
+ imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
974
1016
  const ret = self.self;
975
1017
  return addHeapObject(ret);
976
1018
  }, arguments) };
977
- imports.wbg.__wbg_window_6f6e346d8bbd61d7 = function() { return handleError(function () {
1019
+ imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
978
1020
  const ret = window.window;
979
1021
  return addHeapObject(ret);
980
1022
  }, arguments) };
981
- imports.wbg.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () {
1023
+ imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
982
1024
  const ret = globalThis.globalThis;
983
1025
  return addHeapObject(ret);
984
1026
  }, arguments) };
985
- imports.wbg.__wbg_global_67175caf56f55ca9 = function() { return handleError(function () {
1027
+ imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
986
1028
  const ret = global.global;
987
1029
  return addHeapObject(ret);
988
1030
  }, arguments) };
989
- imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
1031
+ imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
990
1032
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
991
1033
  return addHeapObject(ret);
992
1034
  }, arguments) };
993
- imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
1035
+ imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function(arg0) {
994
1036
  const ret = getObject(arg0).getTime();
995
1037
  return ret;
996
1038
  };
997
- imports.wbg.__wbg_new0_adda2d4bcb124f0a = function() {
1039
+ imports.wbg.__wbg_new0_c0be7df4b6bd481f = function() {
998
1040
  const ret = new Date();
999
1041
  return addHeapObject(ret);
1000
1042
  };
1001
- imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
1043
+ imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
1002
1044
  try {
1003
1045
  var state0 = {a: arg0, b: arg1};
1004
1046
  var cb0 = (arg0, arg1) => {
1005
1047
  const a = state0.a;
1006
1048
  state0.a = 0;
1007
1049
  try {
1008
- return __wbg_adapter_133(a, state0.b, arg0, arg1);
1050
+ return __wbg_adapter_139(a, state0.b, arg0, arg1);
1009
1051
  } finally {
1010
1052
  state0.a = a;
1011
1053
  }
@@ -1016,63 +1058,63 @@ function getImports() {
1016
1058
  state0.a = state0.b = 0;
1017
1059
  }
1018
1060
  };
1019
- imports.wbg.__wbg_resolve_0107b3a501450ba0 = function(arg0) {
1061
+ imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
1020
1062
  const ret = Promise.resolve(getObject(arg0));
1021
1063
  return addHeapObject(ret);
1022
1064
  };
1023
- imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
1065
+ imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
1024
1066
  const ret = getObject(arg0).then(getObject(arg1));
1025
1067
  return addHeapObject(ret);
1026
1068
  };
1027
- imports.wbg.__wbg_then_e5489f796341454b = function(arg0, arg1, arg2) {
1069
+ imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
1028
1070
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1029
1071
  return addHeapObject(ret);
1030
1072
  };
1031
- imports.wbg.__wbg_buffer_34f5ec9f8a838ba0 = function(arg0) {
1073
+ imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
1032
1074
  const ret = getObject(arg0).buffer;
1033
1075
  return addHeapObject(ret);
1034
1076
  };
1035
- imports.wbg.__wbg_newwithbyteoffsetandlength_88fdad741db1b182 = function(arg0, arg1, arg2) {
1077
+ imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
1036
1078
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1037
1079
  return addHeapObject(ret);
1038
1080
  };
1039
- imports.wbg.__wbg_new_cda198d9dbc6d7ea = function(arg0) {
1081
+ imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
1040
1082
  const ret = new Uint8Array(getObject(arg0));
1041
1083
  return addHeapObject(ret);
1042
1084
  };
1043
- imports.wbg.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) {
1085
+ imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
1044
1086
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1045
1087
  };
1046
- imports.wbg.__wbg_length_51f19f73d6d9eff3 = function(arg0) {
1088
+ imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
1047
1089
  const ret = getObject(arg0).length;
1048
1090
  return ret;
1049
1091
  };
1050
- imports.wbg.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) {
1092
+ imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
1051
1093
  const ret = new Uint8Array(arg0 >>> 0);
1052
1094
  return addHeapObject(ret);
1053
1095
  };
1054
- imports.wbg.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) {
1096
+ imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
1055
1097
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1056
1098
  return addHeapObject(ret);
1057
1099
  };
1058
- imports.wbg.__wbg_has_3be27932089d278e = function() { return handleError(function (arg0, arg1) {
1100
+ imports.wbg.__wbg_has_c5fcd020291e56b8 = function() { return handleError(function (arg0, arg1) {
1059
1101
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
1060
1102
  return ret;
1061
1103
  }, arguments) };
1062
- imports.wbg.__wbg_set_2762e698c2f5b7e0 = function() { return handleError(function (arg0, arg1, arg2) {
1104
+ imports.wbg.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
1063
1105
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1064
1106
  return ret;
1065
1107
  }, arguments) };
1066
- imports.wbg.__wbg_stringify_d8d1ee75d5b55ce4 = function() { return handleError(function (arg0) {
1108
+ imports.wbg.__wbg_stringify_e25465938f3f611f = function() { return handleError(function (arg0) {
1067
1109
  const ret = JSON.stringify(getObject(arg0));
1068
1110
  return addHeapObject(ret);
1069
1111
  }, arguments) };
1070
1112
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1071
1113
  const ret = debugString(getObject(arg1));
1072
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1073
- const len0 = WASM_VECTOR_LEN;
1074
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1075
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1114
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1115
+ const len1 = WASM_VECTOR_LEN;
1116
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1117
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1076
1118
  };
1077
1119
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1078
1120
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -1081,55 +1123,62 @@ function getImports() {
1081
1123
  const ret = wasm.memory;
1082
1124
  return addHeapObject(ret);
1083
1125
  };
1084
- imports.wbg.__wbindgen_closure_wrapper10674 = function(arg0, arg1, arg2) {
1085
- const ret = makeMutClosure(arg0, arg1, 2845, __wbg_adapter_26);
1126
+ imports.wbg.__wbindgen_closure_wrapper12815 = function(arg0, arg1, arg2) {
1127
+ const ret = makeMutClosure(arg0, arg1, 3699, __wbg_adapter_26);
1086
1128
  return addHeapObject(ret);
1087
1129
  };
1088
1130
 
1089
1131
  return imports;
1090
1132
  }
1091
1133
 
1092
- function initMemory(imports, maybe_memory) {
1134
+ function __wbg_init_memory(imports, maybe_memory) {
1093
1135
 
1094
1136
  }
1095
1137
 
1096
- function finalizeInit(instance, module) {
1138
+ function __wbg_finalize_init(instance, module) {
1097
1139
  wasm = instance.exports;
1098
- init.__wbindgen_wasm_module = module;
1099
- cachedInt32Memory0 = new Int32Array();
1100
- cachedUint8Memory0 = new Uint8Array();
1140
+ __wbg_init.__wbindgen_wasm_module = module;
1141
+ cachedInt32Memory0 = null;
1142
+ cachedUint8Memory0 = null;
1101
1143
 
1102
1144
 
1103
1145
  return wasm;
1104
1146
  }
1105
1147
 
1106
- function initSync(bytes) {
1107
- const imports = getImports();
1148
+ function initSync(module) {
1149
+ if (wasm !== undefined) return wasm;
1150
+
1151
+ const imports = __wbg_get_imports();
1108
1152
 
1109
- initMemory(imports);
1153
+ __wbg_init_memory(imports);
1154
+
1155
+ if (!(module instanceof WebAssembly.Module)) {
1156
+ module = new WebAssembly.Module(module);
1157
+ }
1110
1158
 
1111
- const module = new WebAssembly.Module(bytes);
1112
1159
  const instance = new WebAssembly.Instance(module, imports);
1113
1160
 
1114
- return finalizeInit(instance, module);
1161
+ return __wbg_finalize_init(instance, module);
1115
1162
  }
1116
1163
 
1117
- async function init(input) {
1164
+ async function __wbg_init(input) {
1165
+ if (wasm !== undefined) return wasm;
1166
+
1118
1167
  if (typeof input === 'undefined') {
1119
1168
  input = new URL('didkit_wasm_bg.wasm', import.meta.url);
1120
1169
  }
1121
- const imports = getImports();
1170
+ const imports = __wbg_get_imports();
1122
1171
 
1123
1172
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1124
1173
  input = fetch(input);
1125
1174
  }
1126
1175
 
1127
- initMemory(imports);
1176
+ __wbg_init_memory(imports);
1128
1177
 
1129
- const { instance, module } = await load(await input, imports);
1178
+ const { instance, module } = await __wbg_load(await input, imports);
1130
1179
 
1131
- return finalizeInit(instance, module);
1180
+ return __wbg_finalize_init(instance, module);
1132
1181
  }
1133
1182
 
1134
1183
  export { initSync }
1135
- export default init;
1184
+ export default __wbg_init;