@learncard/didkit-plugin 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,43 +1,29 @@
1
-
2
1
  let wasm;
3
2
 
4
- const heap = new Array(32).fill(undefined);
5
-
6
- heap.push(undefined, null, true, false);
3
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
7
4
 
8
- function getObject(idx) { return heap[idx]; }
5
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
9
6
 
10
- let heap_next = heap.length;
11
-
12
- function dropObject(idx) {
13
- if (idx < 36) return;
14
- heap[idx] = heap_next;
15
- heap_next = idx;
16
- }
17
-
18
- function takeObject(idx) {
19
- const ret = getObject(idx);
20
- dropObject(idx);
21
- return ret;
22
- }
23
-
24
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
-
26
- cachedTextDecoder.decode();
27
-
28
- let cachedUint8Memory0 = new Uint8Array();
7
+ let cachedUint8Memory0 = null;
29
8
 
30
9
  function getUint8Memory0() {
31
- if (cachedUint8Memory0.byteLength === 0) {
10
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
32
11
  cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
33
12
  }
34
13
  return cachedUint8Memory0;
35
14
  }
36
15
 
37
16
  function getStringFromWasm0(ptr, len) {
17
+ ptr = ptr >>> 0;
38
18
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
19
  }
40
20
 
21
+ const heap = new Array(128).fill(undefined);
22
+
23
+ heap.push(undefined, null, true, false);
24
+
25
+ let heap_next = heap.length;
26
+
41
27
  function addHeapObject(obj) {
42
28
  if (heap_next === heap.length) heap.push(heap.length + 1);
43
29
  const idx = heap_next;
@@ -47,9 +33,23 @@ function addHeapObject(obj) {
47
33
  return idx;
48
34
  }
49
35
 
36
+ function getObject(idx) { return heap[idx]; }
37
+
38
+ function dropObject(idx) {
39
+ if (idx < 132) return;
40
+ heap[idx] = heap_next;
41
+ heap_next = idx;
42
+ }
43
+
44
+ function takeObject(idx) {
45
+ const ret = getObject(idx);
46
+ dropObject(idx);
47
+ return ret;
48
+ }
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__hf6251ee6687a20b8(arg0, arg1, addHeapObject(arg2));
208
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7955a8bde413354d(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__h63ffd509f6690aab(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
773
+ function __wbg_adapter_137(arg0, arg1, arg2, arg3) {
774
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h787c66a4f6d2c392(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,16 +805,16 @@ 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
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
787
- takeObject(arg0);
788
- };
789
811
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
790
812
  const ret = getStringFromWasm0(arg0, arg1);
791
813
  return addHeapObject(ret);
792
814
  };
815
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
816
+ takeObject(arg0);
817
+ };
793
818
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
794
819
  const obj = takeObject(arg0).original;
795
820
  if (obj.cnt-- == 1) {
@@ -803,64 +828,75 @@ 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.__wbg_new_4cba26249c1686cd = function() { return handleError(function () {
839
+ imports.wbg.__wbg_new_1eead62f64ca15ce = function() { return handleError(function () {
815
840
  const ret = new Headers();
816
841
  return addHeapObject(ret);
817
842
  }, arguments) };
818
- imports.wbg.__wbg_append_9c6d4d7f71076e48 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
843
+ imports.wbg.__wbg_append_fda9e3432e3e88da = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
819
844
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
820
845
  }, arguments) };
846
+ imports.wbg.__wbg_signal_4bd18fb489af2d4c = function(arg0) {
847
+ const ret = getObject(arg0).signal;
848
+ return addHeapObject(ret);
849
+ };
850
+ imports.wbg.__wbg_new_55c9955722952374 = function() { return handleError(function () {
851
+ const ret = new AbortController();
852
+ return addHeapObject(ret);
853
+ }, arguments) };
854
+ imports.wbg.__wbg_abort_654b796176d117aa = function(arg0) {
855
+ getObject(arg0).abort();
856
+ };
821
857
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
822
858
  const obj = getObject(arg1);
823
859
  const ret = typeof(obj) === 'string' ? obj : undefined;
824
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
825
- var len0 = WASM_VECTOR_LEN;
826
- getInt32Memory0()[arg0 / 4 + 1] = len0;
827
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
860
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
861
+ var len1 = WASM_VECTOR_LEN;
862
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
863
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
828
864
  };
829
- imports.wbg.__wbg_instanceof_Response_240e67e5796c3c6b = function(arg0) {
830
- const ret = getObject(arg0) instanceof Response;
865
+ imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = function(arg0) {
866
+ let result;
867
+ try {
868
+ result = getObject(arg0) instanceof Response;
869
+ } catch {
870
+ result = false;
871
+ }
872
+ const ret = result;
831
873
  return ret;
832
874
  };
833
- imports.wbg.__wbg_url_0f503b904b694ff5 = function(arg0, arg1) {
875
+ imports.wbg.__wbg_url_8503de97f69da463 = function(arg0, arg1) {
834
876
  const ret = getObject(arg1).url;
835
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
- const len0 = WASM_VECTOR_LEN;
837
- getInt32Memory0()[arg0 / 4 + 1] = len0;
838
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
877
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
878
+ const len1 = WASM_VECTOR_LEN;
879
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
880
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
839
881
  };
840
- imports.wbg.__wbg_status_9067c6a4fdd064c9 = function(arg0) {
882
+ imports.wbg.__wbg_status_ac85a3142a84caa2 = function(arg0) {
841
883
  const ret = getObject(arg0).status;
842
884
  return ret;
843
885
  };
844
- imports.wbg.__wbg_headers_aa309e800cf75016 = function(arg0) {
886
+ imports.wbg.__wbg_headers_b70de86b8e989bc0 = function(arg0) {
845
887
  const ret = getObject(arg0).headers;
846
888
  return addHeapObject(ret);
847
889
  };
848
- imports.wbg.__wbg_arrayBuffer_ccd485f4d2929b08 = function() { return handleError(function (arg0) {
890
+ imports.wbg.__wbg_arrayBuffer_288fb3538806e85c = function() { return handleError(function (arg0) {
849
891
  const ret = getObject(arg0).arrayBuffer();
850
892
  return addHeapObject(ret);
851
893
  }, arguments) };
852
- imports.wbg.__wbg_newwithstrandinit_de7c409ec8538105 = function() { return handleError(function (arg0, arg1, arg2) {
894
+ imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = function() { return handleError(function (arg0, arg1, arg2) {
853
895
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
854
896
  return addHeapObject(ret);
855
897
  }, arguments) };
856
- imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
857
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
858
- }, arguments) };
859
- imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
860
- getObject(arg0).getRandomValues(getObject(arg1));
861
- }, arguments) };
862
- imports.wbg.__wbg_process_e56fd54cf6319b6c = function(arg0) {
863
- const ret = getObject(arg0).process;
898
+ imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
899
+ const ret = getObject(arg0).crypto;
864
900
  return addHeapObject(ret);
865
901
  };
866
902
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -868,11 +904,15 @@ function getImports() {
868
904
  const ret = typeof(val) === 'object' && val !== null;
869
905
  return ret;
870
906
  };
871
- imports.wbg.__wbg_versions_77e21455908dad33 = function(arg0) {
907
+ imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
908
+ const ret = getObject(arg0).process;
909
+ return addHeapObject(ret);
910
+ };
911
+ imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
872
912
  const ret = getObject(arg0).versions;
873
913
  return addHeapObject(ret);
874
914
  };
875
- imports.wbg.__wbg_node_0dd25d832e4785d5 = function(arg0) {
915
+ imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
876
916
  const ret = getObject(arg0).node;
877
917
  return addHeapObject(ret);
878
918
  };
@@ -880,37 +920,33 @@ function getImports() {
880
920
  const ret = typeof(getObject(arg0)) === 'string';
881
921
  return ret;
882
922
  };
883
- imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) {
884
- const ret = getObject(arg0).crypto;
885
- return addHeapObject(ret);
886
- };
887
- imports.wbg.__wbg_msCrypto_5a86d77a66230f81 = function(arg0) {
923
+ imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
888
924
  const ret = getObject(arg0).msCrypto;
889
925
  return addHeapObject(ret);
890
926
  };
891
- imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
892
- const ret = module;
893
- return addHeapObject(ret);
894
- };
895
- imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
896
- const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
927
+ imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
928
+ const ret = module.require;
897
929
  return addHeapObject(ret);
898
930
  }, arguments) };
899
- imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
900
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
931
+ imports.wbg.__wbindgen_is_function = function(arg0) {
932
+ const ret = typeof(getObject(arg0)) === 'function';
933
+ return ret;
901
934
  };
902
- imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
935
+ imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
903
936
  getObject(arg0).getRandomValues(getObject(arg1));
904
- };
905
- imports.wbg.__wbg_self_86b4b13392c7af56 = function() { return handleError(function () {
937
+ }, arguments) };
938
+ imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
939
+ getObject(arg0).randomFillSync(takeObject(arg1));
940
+ }, arguments) };
941
+ imports.wbg.__wbg_self_7eede1f4488bf346 = function() { return handleError(function () {
906
942
  const ret = self.self;
907
943
  return addHeapObject(ret);
908
944
  }, arguments) };
909
- imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
945
+ imports.wbg.__wbg_crypto_c909fb428dcbddb6 = function(arg0) {
910
946
  const ret = getObject(arg0).crypto;
911
947
  return addHeapObject(ret);
912
948
  };
913
- imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
949
+ imports.wbg.__wbg_msCrypto_511eefefbfc70ae4 = function(arg0) {
914
950
  const ret = getObject(arg0).msCrypto;
915
951
  return addHeapObject(ret);
916
952
  };
@@ -918,94 +954,96 @@ function getImports() {
918
954
  const ret = getObject(arg0) === undefined;
919
955
  return ret;
920
956
  };
921
- imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
957
+ imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {
922
958
  const ret = module;
923
959
  return addHeapObject(ret);
924
960
  };
925
- imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
961
+ imports.wbg.__wbg_require_900d5c3984fe7703 = function(arg0, arg1, arg2) {
926
962
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
927
963
  return addHeapObject(ret);
928
964
  };
929
- imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
965
+ imports.wbg.__wbg_getRandomValues_307049345d0bd88c = function(arg0) {
930
966
  const ret = getObject(arg0).getRandomValues;
931
967
  return addHeapObject(ret);
932
968
  };
933
- imports.wbg.__wbindgen_is_function = function(arg0) {
934
- const ret = typeof(getObject(arg0)) === 'function';
935
- return ret;
969
+ imports.wbg.__wbg_getRandomValues_cd175915511f705e = function(arg0, arg1) {
970
+ getObject(arg0).getRandomValues(getObject(arg1));
971
+ };
972
+ imports.wbg.__wbg_randomFillSync_85b3f4c52c56c313 = function(arg0, arg1, arg2) {
973
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
936
974
  };
937
- imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
975
+ imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
938
976
  const ret = new Function(getStringFromWasm0(arg0, arg1));
939
977
  return addHeapObject(ret);
940
978
  };
941
- imports.wbg.__wbg_next_726d1c2255989269 = function(arg0) {
979
+ imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) {
942
980
  const ret = getObject(arg0).next;
943
981
  return addHeapObject(ret);
944
982
  };
945
- imports.wbg.__wbg_next_3d0c4cc33e7418c9 = function() { return handleError(function (arg0) {
983
+ imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
946
984
  const ret = getObject(arg0).next();
947
985
  return addHeapObject(ret);
948
986
  }, arguments) };
949
- imports.wbg.__wbg_done_e5655b169bb04f60 = function(arg0) {
987
+ imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
950
988
  const ret = getObject(arg0).done;
951
989
  return ret;
952
990
  };
953
- imports.wbg.__wbg_value_8f901bca1014f843 = function(arg0) {
991
+ imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
954
992
  const ret = getObject(arg0).value;
955
993
  return addHeapObject(ret);
956
994
  };
957
- imports.wbg.__wbg_iterator_22ed2b976832ff0c = function() {
995
+ imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {
958
996
  const ret = Symbol.iterator;
959
997
  return addHeapObject(ret);
960
998
  };
961
- imports.wbg.__wbg_get_72332cd2bc57924c = function() { return handleError(function (arg0, arg1) {
999
+ imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
962
1000
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
963
1001
  return addHeapObject(ret);
964
1002
  }, arguments) };
965
- imports.wbg.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function (arg0, arg1) {
1003
+ imports.wbg.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
966
1004
  const ret = getObject(arg0).call(getObject(arg1));
967
1005
  return addHeapObject(ret);
968
1006
  }, arguments) };
969
- imports.wbg.__wbg_new_e6a9fecc2bf26696 = function() {
1007
+ imports.wbg.__wbg_new_b51585de1b234aff = function() {
970
1008
  const ret = new Object();
971
1009
  return addHeapObject(ret);
972
1010
  };
973
- imports.wbg.__wbg_self_fd00a1ef86d1b2ed = function() { return handleError(function () {
1011
+ imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
974
1012
  const ret = self.self;
975
1013
  return addHeapObject(ret);
976
1014
  }, arguments) };
977
- imports.wbg.__wbg_window_6f6e346d8bbd61d7 = function() { return handleError(function () {
1015
+ imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
978
1016
  const ret = window.window;
979
1017
  return addHeapObject(ret);
980
1018
  }, arguments) };
981
- imports.wbg.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () {
1019
+ imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
982
1020
  const ret = globalThis.globalThis;
983
1021
  return addHeapObject(ret);
984
1022
  }, arguments) };
985
- imports.wbg.__wbg_global_67175caf56f55ca9 = function() { return handleError(function () {
1023
+ imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
986
1024
  const ret = global.global;
987
1025
  return addHeapObject(ret);
988
1026
  }, arguments) };
989
- imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
1027
+ imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
990
1028
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
991
1029
  return addHeapObject(ret);
992
1030
  }, arguments) };
993
- imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
1031
+ imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function(arg0) {
994
1032
  const ret = getObject(arg0).getTime();
995
1033
  return ret;
996
1034
  };
997
- imports.wbg.__wbg_new0_adda2d4bcb124f0a = function() {
1035
+ imports.wbg.__wbg_new0_c0be7df4b6bd481f = function() {
998
1036
  const ret = new Date();
999
1037
  return addHeapObject(ret);
1000
1038
  };
1001
- imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
1039
+ imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
1002
1040
  try {
1003
1041
  var state0 = {a: arg0, b: arg1};
1004
1042
  var cb0 = (arg0, arg1) => {
1005
1043
  const a = state0.a;
1006
1044
  state0.a = 0;
1007
1045
  try {
1008
- return __wbg_adapter_133(a, state0.b, arg0, arg1);
1046
+ return __wbg_adapter_137(a, state0.b, arg0, arg1);
1009
1047
  } finally {
1010
1048
  state0.a = a;
1011
1049
  }
@@ -1016,63 +1054,63 @@ function getImports() {
1016
1054
  state0.a = state0.b = 0;
1017
1055
  }
1018
1056
  };
1019
- imports.wbg.__wbg_resolve_0107b3a501450ba0 = function(arg0) {
1057
+ imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
1020
1058
  const ret = Promise.resolve(getObject(arg0));
1021
1059
  return addHeapObject(ret);
1022
1060
  };
1023
- imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
1061
+ imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
1024
1062
  const ret = getObject(arg0).then(getObject(arg1));
1025
1063
  return addHeapObject(ret);
1026
1064
  };
1027
- imports.wbg.__wbg_then_e5489f796341454b = function(arg0, arg1, arg2) {
1065
+ imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
1028
1066
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1029
1067
  return addHeapObject(ret);
1030
1068
  };
1031
- imports.wbg.__wbg_buffer_34f5ec9f8a838ba0 = function(arg0) {
1069
+ imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
1032
1070
  const ret = getObject(arg0).buffer;
1033
1071
  return addHeapObject(ret);
1034
1072
  };
1035
- imports.wbg.__wbg_newwithbyteoffsetandlength_88fdad741db1b182 = function(arg0, arg1, arg2) {
1073
+ imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
1036
1074
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1037
1075
  return addHeapObject(ret);
1038
1076
  };
1039
- imports.wbg.__wbg_new_cda198d9dbc6d7ea = function(arg0) {
1077
+ imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
1040
1078
  const ret = new Uint8Array(getObject(arg0));
1041
1079
  return addHeapObject(ret);
1042
1080
  };
1043
- imports.wbg.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) {
1081
+ imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
1044
1082
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1045
1083
  };
1046
- imports.wbg.__wbg_length_51f19f73d6d9eff3 = function(arg0) {
1084
+ imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
1047
1085
  const ret = getObject(arg0).length;
1048
1086
  return ret;
1049
1087
  };
1050
- imports.wbg.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) {
1088
+ imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
1051
1089
  const ret = new Uint8Array(arg0 >>> 0);
1052
1090
  return addHeapObject(ret);
1053
1091
  };
1054
- imports.wbg.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) {
1092
+ imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
1055
1093
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1056
1094
  return addHeapObject(ret);
1057
1095
  };
1058
- imports.wbg.__wbg_has_3be27932089d278e = function() { return handleError(function (arg0, arg1) {
1096
+ imports.wbg.__wbg_has_c5fcd020291e56b8 = function() { return handleError(function (arg0, arg1) {
1059
1097
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
1060
1098
  return ret;
1061
1099
  }, arguments) };
1062
- imports.wbg.__wbg_set_2762e698c2f5b7e0 = function() { return handleError(function (arg0, arg1, arg2) {
1100
+ imports.wbg.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
1063
1101
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1064
1102
  return ret;
1065
1103
  }, arguments) };
1066
- imports.wbg.__wbg_stringify_d8d1ee75d5b55ce4 = function() { return handleError(function (arg0) {
1104
+ imports.wbg.__wbg_stringify_e25465938f3f611f = function() { return handleError(function (arg0) {
1067
1105
  const ret = JSON.stringify(getObject(arg0));
1068
1106
  return addHeapObject(ret);
1069
1107
  }, arguments) };
1070
1108
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1071
1109
  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;
1110
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1111
+ const len1 = WASM_VECTOR_LEN;
1112
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1113
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1076
1114
  };
1077
1115
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1078
1116
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -1081,55 +1119,62 @@ function getImports() {
1081
1119
  const ret = wasm.memory;
1082
1120
  return addHeapObject(ret);
1083
1121
  };
1084
- imports.wbg.__wbindgen_closure_wrapper9509 = function(arg0, arg1, arg2) {
1085
- const ret = makeMutClosure(arg0, arg1, 2773, __wbg_adapter_26);
1122
+ imports.wbg.__wbindgen_closure_wrapper9537 = function(arg0, arg1, arg2) {
1123
+ const ret = makeMutClosure(arg0, arg1, 2800, __wbg_adapter_26);
1086
1124
  return addHeapObject(ret);
1087
1125
  };
1088
1126
 
1089
1127
  return imports;
1090
1128
  }
1091
1129
 
1092
- function initMemory(imports, maybe_memory) {
1130
+ function __wbg_init_memory(imports, maybe_memory) {
1093
1131
 
1094
1132
  }
1095
1133
 
1096
- function finalizeInit(instance, module) {
1134
+ function __wbg_finalize_init(instance, module) {
1097
1135
  wasm = instance.exports;
1098
- init.__wbindgen_wasm_module = module;
1099
- cachedInt32Memory0 = new Int32Array();
1100
- cachedUint8Memory0 = new Uint8Array();
1136
+ __wbg_init.__wbindgen_wasm_module = module;
1137
+ cachedInt32Memory0 = null;
1138
+ cachedUint8Memory0 = null;
1101
1139
 
1102
1140
 
1103
1141
  return wasm;
1104
1142
  }
1105
1143
 
1106
- function initSync(bytes) {
1107
- const imports = getImports();
1144
+ function initSync(module) {
1145
+ if (wasm !== undefined) return wasm;
1146
+
1147
+ const imports = __wbg_get_imports();
1108
1148
 
1109
- initMemory(imports);
1149
+ __wbg_init_memory(imports);
1150
+
1151
+ if (!(module instanceof WebAssembly.Module)) {
1152
+ module = new WebAssembly.Module(module);
1153
+ }
1110
1154
 
1111
- const module = new WebAssembly.Module(bytes);
1112
1155
  const instance = new WebAssembly.Instance(module, imports);
1113
1156
 
1114
- return finalizeInit(instance, module);
1157
+ return __wbg_finalize_init(instance, module);
1115
1158
  }
1116
1159
 
1117
- async function init(input) {
1160
+ async function __wbg_init(input) {
1161
+ if (wasm !== undefined) return wasm;
1162
+
1118
1163
  if (typeof input === 'undefined') {
1119
- // input = new URL('didkit_wasm_bg.wasm', import.meta.url);
1164
+ input = new URL('didkit_wasm_bg.wasm', import.meta.url);
1120
1165
  }
1121
- const imports = getImports();
1166
+ const imports = __wbg_get_imports();
1122
1167
 
1123
1168
  if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1124
1169
  input = fetch(input);
1125
1170
  }
1126
1171
 
1127
- initMemory(imports);
1172
+ __wbg_init_memory(imports);
1128
1173
 
1129
- const { instance, module } = await load(await input, imports);
1174
+ const { instance, module } = await __wbg_load(await input, imports);
1130
1175
 
1131
- return finalizeInit(instance, module);
1176
+ return __wbg_finalize_init(instance, module);
1132
1177
  }
1133
1178
 
1134
1179
  export { initSync }
1135
- export default init;
1180
+ export default __wbg_init;