@learncard/core 3.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,17 @@
1
+
1
2
  let wasm;
2
3
 
3
4
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
4
5
 
5
6
  cachedTextDecoder.decode();
6
7
 
7
- let cachegetUint8Memory0 = null;
8
+ let cachedUint8Memory0 = new Uint8Array();
9
+
8
10
  function getUint8Memory0() {
9
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
10
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
11
+ if (cachedUint8Memory0.byteLength === 0) {
12
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
11
13
  }
12
- return cachegetUint8Memory0;
14
+ return cachedUint8Memory0;
13
15
  }
14
16
 
15
17
  function getStringFromWasm0(ptr, len) {
@@ -31,9 +33,7 @@ function addHeapObject(obj) {
31
33
  return idx;
32
34
  }
33
35
 
34
- function getObject(idx) {
35
- return heap[idx];
36
- }
36
+ function getObject(idx) { return heap[idx]; }
37
37
 
38
38
  function dropObject(idx) {
39
39
  if (idx < 36) return;
@@ -51,27 +51,25 @@ let WASM_VECTOR_LEN = 0;
51
51
 
52
52
  const cachedTextEncoder = new TextEncoder('utf-8');
53
53
 
54
- const encodeString =
55
- typeof cachedTextEncoder.encodeInto === 'function'
56
- ? function (arg, view) {
57
- return cachedTextEncoder.encodeInto(arg, view);
58
- }
59
- : function (arg, view) {
60
- const buf = cachedTextEncoder.encode(arg);
61
- view.set(buf);
62
- return {
63
- read: arg.length,
64
- written: buf.length,
65
- };
66
- };
54
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
55
+ ? function (arg, view) {
56
+ return cachedTextEncoder.encodeInto(arg, view);
57
+ }
58
+ : function (arg, view) {
59
+ const buf = cachedTextEncoder.encode(arg);
60
+ view.set(buf);
61
+ return {
62
+ read: arg.length,
63
+ written: buf.length
64
+ };
65
+ });
67
66
 
68
67
  function passStringToWasm0(arg, malloc, realloc) {
68
+
69
69
  if (realloc === undefined) {
70
70
  const buf = cachedTextEncoder.encode(arg);
71
71
  const ptr = malloc(buf.length);
72
- getUint8Memory0()
73
- .subarray(ptr, ptr + buf.length)
74
- .set(buf);
72
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
75
73
  WASM_VECTOR_LEN = buf.length;
76
74
  return ptr;
77
75
  }
@@ -85,7 +83,7 @@ function passStringToWasm0(arg, malloc, realloc) {
85
83
 
86
84
  for (; offset < len; offset++) {
87
85
  const code = arg.charCodeAt(offset);
88
- if (code > 0x7f) break;
86
+ if (code > 0x7F) break;
89
87
  mem[ptr + offset] = code;
90
88
  }
91
89
 
@@ -93,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) {
93
91
  if (offset !== 0) {
94
92
  arg = arg.slice(offset);
95
93
  }
96
- ptr = realloc(ptr, len, (len = offset + arg.length * 3));
94
+ ptr = realloc(ptr, len, len = offset + arg.length * 3);
97
95
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
98
96
  const ret = encodeString(arg, view);
99
97
 
@@ -108,19 +106,20 @@ function isLikeNone(x) {
108
106
  return x === undefined || x === null;
109
107
  }
110
108
 
111
- let cachegetInt32Memory0 = null;
109
+ let cachedInt32Memory0 = new Int32Array();
110
+
112
111
  function getInt32Memory0() {
113
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
114
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
112
+ if (cachedInt32Memory0.byteLength === 0) {
113
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
115
114
  }
116
- return cachegetInt32Memory0;
115
+ return cachedInt32Memory0;
117
116
  }
118
117
 
119
118
  function debugString(val) {
120
119
  // primitive types
121
120
  const type = typeof val;
122
121
  if (type == 'number' || type == 'boolean' || val == null) {
123
- return `${val}`;
122
+ return `${val}`;
124
123
  }
125
124
  if (type == 'string') {
126
125
  return `"${val}"`;
@@ -148,7 +147,7 @@ function debugString(val) {
148
147
  if (length > 0) {
149
148
  debug += debugString(val[0]);
150
149
  }
151
- for (let i = 1; i < length; i++) {
150
+ for(let i = 1; i < length; i++) {
152
151
  debug += ', ' + debugString(val[i]);
153
152
  }
154
153
  debug += ']';
@@ -195,6 +194,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
195
194
  } finally {
196
195
  if (--state.cnt === 0) {
197
196
  wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
197
+
198
198
  } else {
199
199
  state.a = a;
200
200
  }
@@ -205,16 +205,12 @@ function makeMutClosure(arg0, arg1, dtor, f) {
205
205
  return real;
206
206
  }
207
207
  function __wbg_adapter_24(arg0, arg1, arg2) {
208
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h91a8814f66f14b17(
209
- arg0,
210
- arg1,
211
- addHeapObject(arg2)
212
- );
208
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h47a829c6210a1ab1(arg0, arg1, addHeapObject(arg2));
213
209
  }
214
210
 
215
211
  /**
216
- * @returns {string}
217
- */
212
+ * @returns {string}
213
+ */
218
214
  export function getVersion() {
219
215
  try {
220
216
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -229,10 +225,10 @@ export function getVersion() {
229
225
  }
230
226
 
231
227
  /**
232
- * @param {string} did
233
- * @param {string} input_metadata
234
- * @returns {Promise<any>}
235
- */
228
+ * @param {string} did
229
+ * @param {string} input_metadata
230
+ * @returns {Promise<any>}
231
+ */
236
232
  export function resolveDID(did, input_metadata) {
237
233
  const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
238
234
  const len0 = WASM_VECTOR_LEN;
@@ -243,8 +239,8 @@ export function resolveDID(did, input_metadata) {
243
239
  }
244
240
 
245
241
  /**
246
- * @returns {string}
247
- */
242
+ * @returns {string}
243
+ */
248
244
  export function generateEd25519Key() {
249
245
  try {
250
246
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -256,8 +252,7 @@ export function generateEd25519Key() {
256
252
  var ptr0 = r0;
257
253
  var len0 = r1;
258
254
  if (r3) {
259
- ptr0 = 0;
260
- len0 = 0;
255
+ ptr0 = 0; len0 = 0;
261
256
  throw takeObject(r2);
262
257
  }
263
258
  return getStringFromWasm0(ptr0, len0);
@@ -274,9 +269,9 @@ function passArray8ToWasm0(arg, malloc) {
274
269
  return ptr;
275
270
  }
276
271
  /**
277
- * @param {Uint8Array} bytes
278
- * @returns {string}
279
- */
272
+ * @param {Uint8Array} bytes
273
+ * @returns {string}
274
+ */
280
275
  export function generateEd25519KeyFromBytes(bytes) {
281
276
  try {
282
277
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -290,8 +285,7 @@ export function generateEd25519KeyFromBytes(bytes) {
290
285
  var ptr1 = r0;
291
286
  var len1 = r1;
292
287
  if (r3) {
293
- ptr1 = 0;
294
- len1 = 0;
288
+ ptr1 = 0; len1 = 0;
295
289
  throw takeObject(r2);
296
290
  }
297
291
  return getStringFromWasm0(ptr1, len1);
@@ -302,8 +296,8 @@ export function generateEd25519KeyFromBytes(bytes) {
302
296
  }
303
297
 
304
298
  /**
305
- * @returns {string}
306
- */
299
+ * @returns {string}
300
+ */
307
301
  export function generateSecp256k1Key() {
308
302
  try {
309
303
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -315,8 +309,7 @@ export function generateSecp256k1Key() {
315
309
  var ptr0 = r0;
316
310
  var len0 = r1;
317
311
  if (r3) {
318
- ptr0 = 0;
319
- len0 = 0;
312
+ ptr0 = 0; len0 = 0;
320
313
  throw takeObject(r2);
321
314
  }
322
315
  return getStringFromWasm0(ptr0, len0);
@@ -327,9 +320,9 @@ export function generateSecp256k1Key() {
327
320
  }
328
321
 
329
322
  /**
330
- * @param {Uint8Array} bytes
331
- * @returns {string}
332
- */
323
+ * @param {Uint8Array} bytes
324
+ * @returns {string}
325
+ */
333
326
  export function generateSecp256k1KeyFromBytes(bytes) {
334
327
  try {
335
328
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -343,8 +336,7 @@ export function generateSecp256k1KeyFromBytes(bytes) {
343
336
  var ptr1 = r0;
344
337
  var len1 = r1;
345
338
  if (r3) {
346
- ptr1 = 0;
347
- len1 = 0;
339
+ ptr1 = 0; len1 = 0;
348
340
  throw takeObject(r2);
349
341
  }
350
342
  return getStringFromWasm0(ptr1, len1);
@@ -355,18 +347,14 @@ export function generateSecp256k1KeyFromBytes(bytes) {
355
347
  }
356
348
 
357
349
  /**
358
- * @param {string} method_pattern
359
- * @param {string} jwk
360
- * @returns {string}
361
- */
350
+ * @param {string} method_pattern
351
+ * @param {string} jwk
352
+ * @returns {string}
353
+ */
362
354
  export function keyToDID(method_pattern, jwk) {
363
355
  try {
364
356
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
365
- const ptr0 = passStringToWasm0(
366
- method_pattern,
367
- wasm.__wbindgen_malloc,
368
- wasm.__wbindgen_realloc
369
- );
357
+ const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
370
358
  const len0 = WASM_VECTOR_LEN;
371
359
  const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
372
360
  const len1 = WASM_VECTOR_LEN;
@@ -378,8 +366,7 @@ export function keyToDID(method_pattern, jwk) {
378
366
  var ptr2 = r0;
379
367
  var len2 = r1;
380
368
  if (r3) {
381
- ptr2 = 0;
382
- len2 = 0;
369
+ ptr2 = 0; len2 = 0;
383
370
  throw takeObject(r2);
384
371
  }
385
372
  return getStringFromWasm0(ptr2, len2);
@@ -390,10 +377,10 @@ export function keyToDID(method_pattern, jwk) {
390
377
  }
391
378
 
392
379
  /**
393
- * @param {string} method_pattern
394
- * @param {string} jwk
395
- * @returns {Promise<any>}
396
- */
380
+ * @param {string} method_pattern
381
+ * @param {string} jwk
382
+ * @returns {Promise<any>}
383
+ */
397
384
  export function keyToVerificationMethod(method_pattern, jwk) {
398
385
  const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
399
386
  const len0 = WASM_VECTOR_LEN;
@@ -404,11 +391,11 @@ export function keyToVerificationMethod(method_pattern, jwk) {
404
391
  }
405
392
 
406
393
  /**
407
- * @param {string} credential
408
- * @param {string} proof_options
409
- * @param {string} key
410
- * @returns {Promise<any>}
411
- */
394
+ * @param {string} credential
395
+ * @param {string} proof_options
396
+ * @param {string} key
397
+ * @returns {Promise<any>}
398
+ */
412
399
  export function issueCredential(credential, proof_options, key) {
413
400
  const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
414
401
  const len0 = WASM_VECTOR_LEN;
@@ -421,19 +408,15 @@ export function issueCredential(credential, proof_options, key) {
421
408
  }
422
409
 
423
410
  /**
424
- * @param {string} credential
425
- * @param {string} linked_data_proof_options
426
- * @param {string} public_key
427
- * @returns {Promise<any>}
428
- */
411
+ * @param {string} credential
412
+ * @param {string} linked_data_proof_options
413
+ * @param {string} public_key
414
+ * @returns {Promise<any>}
415
+ */
429
416
  export function prepareIssueCredential(credential, linked_data_proof_options, public_key) {
430
417
  const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
418
  const len0 = WASM_VECTOR_LEN;
432
- const ptr1 = passStringToWasm0(
433
- linked_data_proof_options,
434
- wasm.__wbindgen_malloc,
435
- wasm.__wbindgen_realloc
436
- );
419
+ const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
437
420
  const len1 = WASM_VECTOR_LEN;
438
421
  const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
439
422
  const len2 = WASM_VECTOR_LEN;
@@ -442,11 +425,11 @@ export function prepareIssueCredential(credential, linked_data_proof_options, pu
442
425
  }
443
426
 
444
427
  /**
445
- * @param {string} credential
446
- * @param {string} preparation
447
- * @param {string} signature
448
- * @returns {Promise<any>}
449
- */
428
+ * @param {string} credential
429
+ * @param {string} preparation
430
+ * @param {string} signature
431
+ * @returns {Promise<any>}
432
+ */
450
433
  export function completeIssueCredential(credential, preparation, signature) {
451
434
  const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
452
435
  const len0 = WASM_VECTOR_LEN;
@@ -459,10 +442,10 @@ export function completeIssueCredential(credential, preparation, signature) {
459
442
  }
460
443
 
461
444
  /**
462
- * @param {string} vc
463
- * @param {string} proof_options
464
- * @returns {Promise<any>}
465
- */
445
+ * @param {string} vc
446
+ * @param {string} proof_options
447
+ * @returns {Promise<any>}
448
+ */
466
449
  export function verifyCredential(vc, proof_options) {
467
450
  const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
468
451
  const len0 = WASM_VECTOR_LEN;
@@ -473,11 +456,11 @@ export function verifyCredential(vc, proof_options) {
473
456
  }
474
457
 
475
458
  /**
476
- * @param {string} presentation
477
- * @param {string} proof_options
478
- * @param {string} key
479
- * @returns {Promise<any>}
480
- */
459
+ * @param {string} presentation
460
+ * @param {string} proof_options
461
+ * @param {string} key
462
+ * @returns {Promise<any>}
463
+ */
481
464
  export function issuePresentation(presentation, proof_options, key) {
482
465
  const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
483
466
  const len0 = WASM_VECTOR_LEN;
@@ -490,19 +473,15 @@ export function issuePresentation(presentation, proof_options, key) {
490
473
  }
491
474
 
492
475
  /**
493
- * @param {string} presentation
494
- * @param {string} linked_data_proof_options
495
- * @param {string} public_key
496
- * @returns {Promise<any>}
497
- */
476
+ * @param {string} presentation
477
+ * @param {string} linked_data_proof_options
478
+ * @param {string} public_key
479
+ * @returns {Promise<any>}
480
+ */
498
481
  export function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {
499
482
  const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
500
483
  const len0 = WASM_VECTOR_LEN;
501
- const ptr1 = passStringToWasm0(
502
- linked_data_proof_options,
503
- wasm.__wbindgen_malloc,
504
- wasm.__wbindgen_realloc
505
- );
484
+ const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
506
485
  const len1 = WASM_VECTOR_LEN;
507
486
  const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
508
487
  const len2 = WASM_VECTOR_LEN;
@@ -511,11 +490,11 @@ export function prepareIssuePresentation(presentation, linked_data_proof_options
511
490
  }
512
491
 
513
492
  /**
514
- * @param {string} presentation
515
- * @param {string} preparation
516
- * @param {string} signature
517
- * @returns {Promise<any>}
518
- */
493
+ * @param {string} presentation
494
+ * @param {string} preparation
495
+ * @param {string} signature
496
+ * @returns {Promise<any>}
497
+ */
519
498
  export function completeIssuePresentation(presentation, preparation, signature) {
520
499
  const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
521
500
  const len0 = WASM_VECTOR_LEN;
@@ -528,10 +507,10 @@ export function completeIssuePresentation(presentation, preparation, signature)
528
507
  }
529
508
 
530
509
  /**
531
- * @param {string} vp
532
- * @param {string} proof_options
533
- * @returns {Promise<any>}
534
- */
510
+ * @param {string} vp
511
+ * @param {string} proof_options
512
+ * @returns {Promise<any>}
513
+ */
535
514
  export function verifyPresentation(vp, proof_options) {
536
515
  const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
537
516
  const len0 = WASM_VECTOR_LEN;
@@ -542,19 +521,15 @@ export function verifyPresentation(vp, proof_options) {
542
521
  }
543
522
 
544
523
  /**
545
- * @param {string} holder
546
- * @param {string} linked_data_proof_options
547
- * @param {string} key
548
- * @returns {Promise<any>}
549
- */
524
+ * @param {string} holder
525
+ * @param {string} linked_data_proof_options
526
+ * @param {string} key
527
+ * @returns {Promise<any>}
528
+ */
550
529
  export function DIDAuth(holder, linked_data_proof_options, key) {
551
530
  const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
552
531
  const len0 = WASM_VECTOR_LEN;
553
- const ptr1 = passStringToWasm0(
554
- linked_data_proof_options,
555
- wasm.__wbindgen_malloc,
556
- wasm.__wbindgen_realloc
557
- );
532
+ const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
558
533
  const len1 = WASM_VECTOR_LEN;
559
534
  const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
560
535
  const len2 = WASM_VECTOR_LEN;
@@ -563,9 +538,9 @@ export function DIDAuth(holder, linked_data_proof_options, key) {
563
538
  }
564
539
 
565
540
  /**
566
- * @param {string} tz
567
- * @returns {Promise<any>}
568
- */
541
+ * @param {string} tz
542
+ * @returns {Promise<any>}
543
+ */
569
544
  export function JWKFromTezos(tz) {
570
545
  const ptr0 = passStringToWasm0(tz, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
571
546
  const len0 = WASM_VECTOR_LEN;
@@ -574,20 +549,16 @@ export function JWKFromTezos(tz) {
574
549
  }
575
550
 
576
551
  /**
577
- * @param {string} capability
578
- * @param {string} linked_data_proof_options
579
- * @param {string} parents
580
- * @param {string} key
581
- * @returns {Promise<any>}
582
- */
552
+ * @param {string} capability
553
+ * @param {string} linked_data_proof_options
554
+ * @param {string} parents
555
+ * @param {string} key
556
+ * @returns {Promise<any>}
557
+ */
583
558
  export function delegateCapability(capability, linked_data_proof_options, parents, key) {
584
559
  const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
585
560
  const len0 = WASM_VECTOR_LEN;
586
- const ptr1 = passStringToWasm0(
587
- linked_data_proof_options,
588
- wasm.__wbindgen_malloc,
589
- wasm.__wbindgen_realloc
590
- );
561
+ const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
591
562
  const len1 = WASM_VECTOR_LEN;
592
563
  const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
593
564
  const len2 = WASM_VECTOR_LEN;
@@ -598,25 +569,16 @@ export function delegateCapability(capability, linked_data_proof_options, parent
598
569
  }
599
570
 
600
571
  /**
601
- * @param {string} capability
602
- * @param {string} linked_data_proof_options
603
- * @param {string} parents
604
- * @param {string} public_key
605
- * @returns {Promise<any>}
606
- */
607
- export function prepareDelegateCapability(
608
- capability,
609
- linked_data_proof_options,
610
- parents,
611
- public_key
612
- ) {
572
+ * @param {string} capability
573
+ * @param {string} linked_data_proof_options
574
+ * @param {string} parents
575
+ * @param {string} public_key
576
+ * @returns {Promise<any>}
577
+ */
578
+ export function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {
613
579
  const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
614
580
  const len0 = WASM_VECTOR_LEN;
615
- const ptr1 = passStringToWasm0(
616
- linked_data_proof_options,
617
- wasm.__wbindgen_malloc,
618
- wasm.__wbindgen_realloc
619
- );
581
+ const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
620
582
  const len1 = WASM_VECTOR_LEN;
621
583
  const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
622
584
  const len2 = WASM_VECTOR_LEN;
@@ -627,11 +589,11 @@ export function prepareDelegateCapability(
627
589
  }
628
590
 
629
591
  /**
630
- * @param {string} capability
631
- * @param {string} preparation
632
- * @param {string} signature
633
- * @returns {Promise<any>}
634
- */
592
+ * @param {string} capability
593
+ * @param {string} preparation
594
+ * @param {string} signature
595
+ * @returns {Promise<any>}
596
+ */
635
597
  export function completeDelegateCapability(capability, preparation, signature) {
636
598
  const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
599
  const len0 = WASM_VECTOR_LEN;
@@ -644,9 +606,9 @@ export function completeDelegateCapability(capability, preparation, signature) {
644
606
  }
645
607
 
646
608
  /**
647
- * @param {string} delegation
648
- * @returns {Promise<any>}
649
- */
609
+ * @param {string} delegation
610
+ * @returns {Promise<any>}
611
+ */
650
612
  export function verifyDelegation(delegation) {
651
613
  const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
652
614
  const len0 = WASM_VECTOR_LEN;
@@ -655,22 +617,18 @@ export function verifyDelegation(delegation) {
655
617
  }
656
618
 
657
619
  /**
658
- * @param {string} invocation
659
- * @param {string} target_id
660
- * @param {string} linked_data_proof_options
661
- * @param {string} key
662
- * @returns {Promise<any>}
663
- */
620
+ * @param {string} invocation
621
+ * @param {string} target_id
622
+ * @param {string} linked_data_proof_options
623
+ * @param {string} key
624
+ * @returns {Promise<any>}
625
+ */
664
626
  export function invokeCapability(invocation, target_id, linked_data_proof_options, key) {
665
627
  const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
666
628
  const len0 = WASM_VECTOR_LEN;
667
629
  const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
668
630
  const len1 = WASM_VECTOR_LEN;
669
- const ptr2 = passStringToWasm0(
670
- linked_data_proof_options,
671
- wasm.__wbindgen_malloc,
672
- wasm.__wbindgen_realloc
673
- );
631
+ const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
674
632
  const len2 = WASM_VECTOR_LEN;
675
633
  const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
676
634
  const len3 = WASM_VECTOR_LEN;
@@ -679,27 +637,18 @@ export function invokeCapability(invocation, target_id, linked_data_proof_option
679
637
  }
680
638
 
681
639
  /**
682
- * @param {string} invocation
683
- * @param {string} target_id
684
- * @param {string} linked_data_proof_options
685
- * @param {string} public_key
686
- * @returns {Promise<any>}
687
- */
688
- export function prepareInvokeCapability(
689
- invocation,
690
- target_id,
691
- linked_data_proof_options,
692
- public_key
693
- ) {
640
+ * @param {string} invocation
641
+ * @param {string} target_id
642
+ * @param {string} linked_data_proof_options
643
+ * @param {string} public_key
644
+ * @returns {Promise<any>}
645
+ */
646
+ export function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {
694
647
  const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
695
648
  const len0 = WASM_VECTOR_LEN;
696
649
  const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
697
650
  const len1 = WASM_VECTOR_LEN;
698
- const ptr2 = passStringToWasm0(
699
- linked_data_proof_options,
700
- wasm.__wbindgen_malloc,
701
- wasm.__wbindgen_realloc
702
- );
651
+ const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
703
652
  const len2 = WASM_VECTOR_LEN;
704
653
  const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
705
654
  const len3 = WASM_VECTOR_LEN;
@@ -708,11 +657,11 @@ export function prepareInvokeCapability(
708
657
  }
709
658
 
710
659
  /**
711
- * @param {string} invocation
712
- * @param {string} preparation
713
- * @param {string} signature
714
- * @returns {Promise<any>}
715
- */
660
+ * @param {string} invocation
661
+ * @param {string} preparation
662
+ * @param {string} signature
663
+ * @returns {Promise<any>}
664
+ */
716
665
  export function completeInvokeCapability(invocation, preparation, signature) {
717
666
  const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
718
667
  const len0 = WASM_VECTOR_LEN;
@@ -725,9 +674,9 @@ export function completeInvokeCapability(invocation, preparation, signature) {
725
674
  }
726
675
 
727
676
  /**
728
- * @param {string} invocation
729
- * @returns {Promise<any>}
730
- */
677
+ * @param {string} invocation
678
+ * @returns {Promise<any>}
679
+ */
731
680
  export function verifyInvocationSignature(invocation) {
732
681
  const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
733
682
  const len0 = WASM_VECTOR_LEN;
@@ -736,10 +685,10 @@ export function verifyInvocationSignature(invocation) {
736
685
  }
737
686
 
738
687
  /**
739
- * @param {string} invocation
740
- * @param {string} delegation
741
- * @returns {Promise<any>}
742
- */
688
+ * @param {string} invocation
689
+ * @param {string} delegation
690
+ * @returns {Promise<any>}
691
+ */
743
692
  export function verifyInvocation(invocation, delegation) {
744
693
  const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
745
694
  const len0 = WASM_VECTOR_LEN;
@@ -749,6 +698,17 @@ export function verifyInvocation(invocation, delegation) {
749
698
  return takeObject(ret);
750
699
  }
751
700
 
701
+ /**
702
+ * @param {string} url
703
+ * @returns {Promise<any>}
704
+ */
705
+ export function contextLoader(url) {
706
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
707
+ const len0 = WASM_VECTOR_LEN;
708
+ const ret = wasm.contextLoader(ptr0, len0);
709
+ return takeObject(ret);
710
+ }
711
+
752
712
  function handleError(f, args) {
753
713
  try {
754
714
  return f.apply(this, args);
@@ -760,13 +720,8 @@ function handleError(f, args) {
760
720
  function getArrayU8FromWasm0(ptr, len) {
761
721
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
762
722
  }
763
- function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
764
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h3ecfeb7a01c1be81(
765
- arg0,
766
- arg1,
767
- addHeapObject(arg2),
768
- addHeapObject(arg3)
769
- );
723
+ function __wbg_adapter_111(arg0, arg1, arg2, arg3) {
724
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h68d8a804a96909b8(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
770
725
  }
771
726
 
772
727
  async function load(module, imports) {
@@ -774,12 +729,11 @@ async function load(module, imports) {
774
729
  if (typeof WebAssembly.instantiateStreaming === 'function') {
775
730
  try {
776
731
  return await WebAssembly.instantiateStreaming(module, imports);
732
+
777
733
  } catch (e) {
778
734
  if (module.headers.get('Content-Type') != 'application/wasm') {
779
- console.warn(
780
- '`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n',
781
- e
782
- );
735
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
736
+
783
737
  } else {
784
738
  throw e;
785
739
  }
@@ -788,31 +742,30 @@ async function load(module, imports) {
788
742
 
789
743
  const bytes = await module.arrayBuffer();
790
744
  return await WebAssembly.instantiate(bytes, imports);
745
+
791
746
  } else {
792
747
  const instance = await WebAssembly.instantiate(module, imports);
793
748
 
794
749
  if (instance instanceof WebAssembly.Instance) {
795
750
  return { instance, module };
751
+
796
752
  } else {
797
753
  return instance;
798
754
  }
799
755
  }
800
756
  }
801
757
 
802
- async function init(input) {
803
- if (typeof input === 'undefined') {
804
- // input = new URL('didkit_wasm_bg.wasm', import.meta.url);
805
- }
758
+ function getImports() {
806
759
  const imports = {};
807
760
  imports.wbg = {};
808
- imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
761
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
809
762
  const ret = getStringFromWasm0(arg0, arg1);
810
763
  return addHeapObject(ret);
811
764
  };
812
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
765
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
813
766
  takeObject(arg0);
814
767
  };
815
- imports.wbg.__wbindgen_cb_drop = function (arg0) {
768
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
816
769
  const obj = takeObject(arg0).original;
817
770
  if (obj.cnt-- == 1) {
818
771
  obj.a = 0;
@@ -821,179 +774,159 @@ async function init(input) {
821
774
  const ret = false;
822
775
  return ret;
823
776
  };
824
- imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
777
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
825
778
  const ret = getObject(arg0);
826
779
  return addHeapObject(ret);
827
780
  };
828
- imports.wbg.__wbg_fetch_811d43d6bdcad5b1 = function (arg0) {
781
+ imports.wbg.__wbg_fetch_b1379d93c1e2b015 = function(arg0) {
829
782
  const ret = fetch(getObject(arg0));
830
783
  return addHeapObject(ret);
831
784
  };
832
- imports.wbg.__wbg_fetch_bf56e2a9f0644e3f = function (arg0, arg1) {
785
+ imports.wbg.__wbg_fetch_17b968b9c79d3c56 = function(arg0, arg1) {
833
786
  const ret = getObject(arg0).fetch(getObject(arg1));
834
787
  return addHeapObject(ret);
835
788
  };
836
- imports.wbg.__wbg_new_89d7f088c1c45353 = function () {
837
- return handleError(function () {
838
- const ret = new Headers();
839
- return addHeapObject(ret);
840
- }, arguments);
841
- };
842
- imports.wbg.__wbg_append_f4f93bc73c45ee3e = function () {
843
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
844
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
845
- }, arguments);
846
- };
847
- imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
789
+ imports.wbg.__wbg_new_4cba26249c1686cd = function() { return handleError(function () {
790
+ const ret = new Headers();
791
+ return addHeapObject(ret);
792
+ }, arguments) };
793
+ imports.wbg.__wbg_append_9c6d4d7f71076e48 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
794
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
795
+ }, arguments) };
796
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
848
797
  const obj = getObject(arg1);
849
- const ret = typeof obj === 'string' ? obj : undefined;
850
- var ptr0 = isLikeNone(ret)
851
- ? 0
852
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
798
+ const ret = typeof(obj) === 'string' ? obj : undefined;
799
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
853
800
  var len0 = WASM_VECTOR_LEN;
854
801
  getInt32Memory0()[arg0 / 4 + 1] = len0;
855
802
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
856
803
  };
857
- imports.wbg.__wbg_instanceof_Response_ccfeb62399355bcd = function (arg0) {
804
+ imports.wbg.__wbg_instanceof_Response_240e67e5796c3c6b = function(arg0) {
858
805
  const ret = getObject(arg0) instanceof Response;
859
806
  return ret;
860
807
  };
861
- imports.wbg.__wbg_url_06c0f822d68d195c = function (arg0, arg1) {
808
+ imports.wbg.__wbg_url_0f503b904b694ff5 = function(arg0, arg1) {
862
809
  const ret = getObject(arg1).url;
863
810
  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
864
811
  const len0 = WASM_VECTOR_LEN;
865
812
  getInt32Memory0()[arg0 / 4 + 1] = len0;
866
813
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
867
814
  };
868
- imports.wbg.__wbg_status_600fd8b881393898 = function (arg0) {
815
+ imports.wbg.__wbg_status_9067c6a4fdd064c9 = function(arg0) {
869
816
  const ret = getObject(arg0).status;
870
817
  return ret;
871
818
  };
872
- imports.wbg.__wbg_headers_9e7f2c05a9b962ea = function (arg0) {
819
+ imports.wbg.__wbg_headers_aa309e800cf75016 = function(arg0) {
873
820
  const ret = getObject(arg0).headers;
874
821
  return addHeapObject(ret);
875
822
  };
876
- imports.wbg.__wbg_arrayBuffer_5a99283a3954c850 = function () {
877
- return handleError(function (arg0) {
878
- const ret = getObject(arg0).arrayBuffer();
879
- return addHeapObject(ret);
880
- }, arguments);
881
- };
882
- imports.wbg.__wbg_newwithstrandinit_fd99688f189f053e = function () {
883
- return handleError(function (arg0, arg1, arg2) {
884
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
885
- return addHeapObject(ret);
886
- }, arguments);
887
- };
888
- imports.wbg.__wbindgen_is_object = function (arg0) {
823
+ imports.wbg.__wbg_arrayBuffer_ccd485f4d2929b08 = function() { return handleError(function (arg0) {
824
+ const ret = getObject(arg0).arrayBuffer();
825
+ return addHeapObject(ret);
826
+ }, arguments) };
827
+ imports.wbg.__wbg_newwithstrandinit_de7c409ec8538105 = function() { return handleError(function (arg0, arg1, arg2) {
828
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
829
+ return addHeapObject(ret);
830
+ }, arguments) };
831
+ imports.wbg.__wbindgen_is_object = function(arg0) {
889
832
  const val = getObject(arg0);
890
- const ret = typeof val === 'object' && val !== null;
833
+ const ret = typeof(val) === 'object' && val !== null;
891
834
  return ret;
892
835
  };
893
- imports.wbg.__wbg_self_86b4b13392c7af56 = function () {
894
- return handleError(function () {
895
- const ret = self.self;
896
- return addHeapObject(ret);
897
- }, arguments);
898
- };
899
- imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function (arg0) {
836
+ imports.wbg.__wbg_self_86b4b13392c7af56 = function() { return handleError(function () {
837
+ const ret = self.self;
838
+ return addHeapObject(ret);
839
+ }, arguments) };
840
+ imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
900
841
  const ret = getObject(arg0).crypto;
901
842
  return addHeapObject(ret);
902
843
  };
903
- imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function (arg0) {
844
+ imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
904
845
  const ret = getObject(arg0).msCrypto;
905
846
  return addHeapObject(ret);
906
847
  };
907
- imports.wbg.__wbindgen_is_undefined = function (arg0) {
848
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
908
849
  const ret = getObject(arg0) === undefined;
909
850
  return ret;
910
851
  };
911
- imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function () {
852
+ imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
912
853
  const ret = module;
913
854
  return addHeapObject(ret);
914
855
  };
915
- imports.wbg.__wbg_require_f5521a5b85ad2542 = function (arg0, arg1, arg2) {
856
+ imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
916
857
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
917
858
  return addHeapObject(ret);
918
859
  };
919
- imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function (arg0) {
860
+ imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
920
861
  const ret = getObject(arg0).getRandomValues;
921
862
  return addHeapObject(ret);
922
863
  };
923
- imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function (arg0, arg1) {
864
+ imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
924
865
  getObject(arg0).getRandomValues(getObject(arg1));
925
866
  };
926
- imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function (arg0, arg1, arg2) {
867
+ imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
927
868
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
928
869
  };
929
- imports.wbg.__wbindgen_is_function = function (arg0) {
930
- const ret = typeof getObject(arg0) === 'function';
870
+ imports.wbg.__wbindgen_is_function = function(arg0) {
871
+ const ret = typeof(getObject(arg0)) === 'function';
931
872
  return ret;
932
873
  };
933
- imports.wbg.__wbg_newnoargs_e23b458e372830de = function (arg0, arg1) {
874
+ imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
934
875
  const ret = new Function(getStringFromWasm0(arg0, arg1));
935
876
  return addHeapObject(ret);
936
877
  };
937
- imports.wbg.__wbg_next_cabb70b365520721 = function (arg0) {
878
+ imports.wbg.__wbg_next_726d1c2255989269 = function(arg0) {
938
879
  const ret = getObject(arg0).next;
939
880
  return addHeapObject(ret);
940
881
  };
941
- imports.wbg.__wbg_next_bf3d83fc18df496e = function () {
942
- return handleError(function (arg0) {
943
- const ret = getObject(arg0).next();
944
- return addHeapObject(ret);
945
- }, arguments);
946
- };
947
- imports.wbg.__wbg_done_040f966faa9a72b3 = function (arg0) {
882
+ imports.wbg.__wbg_next_3d0c4cc33e7418c9 = function() { return handleError(function (arg0) {
883
+ const ret = getObject(arg0).next();
884
+ return addHeapObject(ret);
885
+ }, arguments) };
886
+ imports.wbg.__wbg_done_e5655b169bb04f60 = function(arg0) {
948
887
  const ret = getObject(arg0).done;
949
888
  return ret;
950
889
  };
951
- imports.wbg.__wbg_value_419afbd9b9574c4c = function (arg0) {
890
+ imports.wbg.__wbg_value_8f901bca1014f843 = function(arg0) {
952
891
  const ret = getObject(arg0).value;
953
892
  return addHeapObject(ret);
954
893
  };
955
- imports.wbg.__wbg_iterator_4832ef1f15b0382b = function () {
894
+ imports.wbg.__wbg_iterator_22ed2b976832ff0c = function() {
956
895
  const ret = Symbol.iterator;
957
896
  return addHeapObject(ret);
958
897
  };
959
- imports.wbg.__wbg_get_a9cab131e3152c49 = function () {
960
- return handleError(function (arg0, arg1) {
961
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
962
- return addHeapObject(ret);
963
- }, arguments);
964
- };
965
- imports.wbg.__wbg_call_ae78342adc33730a = function () {
966
- return handleError(function (arg0, arg1) {
967
- const ret = getObject(arg0).call(getObject(arg1));
968
- return addHeapObject(ret);
969
- }, arguments);
970
- };
971
- imports.wbg.__wbg_new_36359baae5a47e27 = function () {
898
+ imports.wbg.__wbg_get_72332cd2bc57924c = function() { return handleError(function (arg0, arg1) {
899
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
900
+ return addHeapObject(ret);
901
+ }, arguments) };
902
+ imports.wbg.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function (arg0, arg1) {
903
+ const ret = getObject(arg0).call(getObject(arg1));
904
+ return addHeapObject(ret);
905
+ }, arguments) };
906
+ imports.wbg.__wbg_new_e6a9fecc2bf26696 = function() {
972
907
  const ret = new Object();
973
908
  return addHeapObject(ret);
974
909
  };
975
- imports.wbg.__wbg_call_3ed288a247f13ea5 = function () {
976
- return handleError(function (arg0, arg1, arg2) {
977
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
978
- return addHeapObject(ret);
979
- }, arguments);
980
- };
981
- imports.wbg.__wbg_getTime_bffb1c09df09618b = function (arg0) {
910
+ imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
911
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
912
+ return addHeapObject(ret);
913
+ }, arguments) };
914
+ imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
982
915
  const ret = getObject(arg0).getTime();
983
916
  return ret;
984
917
  };
985
- imports.wbg.__wbg_new0_0ff7eb5c1486f3ec = function () {
918
+ imports.wbg.__wbg_new0_adda2d4bcb124f0a = function() {
986
919
  const ret = new Date();
987
920
  return addHeapObject(ret);
988
921
  };
989
- imports.wbg.__wbg_new_37705eed627d5ed9 = function (arg0, arg1) {
922
+ imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
990
923
  try {
991
- var state0 = { a: arg0, b: arg1 };
924
+ var state0 = {a: arg0, b: arg1};
992
925
  var cb0 = (arg0, arg1) => {
993
926
  const a = state0.a;
994
927
  state0.a = 0;
995
928
  try {
996
- return __wbg_adapter_110(a, state0.b, arg0, arg1);
929
+ return __wbg_adapter_111(a, state0.b, arg0, arg1);
997
930
  } finally {
998
931
  state0.a = a;
999
932
  }
@@ -1004,120 +937,136 @@ async function init(input) {
1004
937
  state0.a = state0.b = 0;
1005
938
  }
1006
939
  };
1007
- imports.wbg.__wbg_resolve_a9a87bdd64e9e62c = function (arg0) {
940
+ imports.wbg.__wbg_resolve_0107b3a501450ba0 = function(arg0) {
1008
941
  const ret = Promise.resolve(getObject(arg0));
1009
942
  return addHeapObject(ret);
1010
943
  };
1011
- imports.wbg.__wbg_then_ce526c837d07b68f = function (arg0, arg1) {
944
+ imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
1012
945
  const ret = getObject(arg0).then(getObject(arg1));
1013
946
  return addHeapObject(ret);
1014
947
  };
1015
- imports.wbg.__wbg_then_842e65b843962f56 = function (arg0, arg1, arg2) {
948
+ imports.wbg.__wbg_then_e5489f796341454b = function(arg0, arg1, arg2) {
1016
949
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1017
950
  return addHeapObject(ret);
1018
951
  };
1019
- imports.wbg.__wbg_self_99737b4dcdf6f0d8 = function () {
1020
- return handleError(function () {
1021
- const ret = self.self;
1022
- return addHeapObject(ret);
1023
- }, arguments);
1024
- };
1025
- imports.wbg.__wbg_window_9b61fbbf3564c4fb = function () {
1026
- return handleError(function () {
1027
- const ret = window.window;
1028
- return addHeapObject(ret);
1029
- }, arguments);
1030
- };
1031
- imports.wbg.__wbg_globalThis_8e275ef40caea3a3 = function () {
1032
- return handleError(function () {
1033
- const ret = globalThis.globalThis;
1034
- return addHeapObject(ret);
1035
- }, arguments);
1036
- };
1037
- imports.wbg.__wbg_global_5de1e0f82bddcd27 = function () {
1038
- return handleError(function () {
1039
- const ret = global.global;
1040
- return addHeapObject(ret);
1041
- }, arguments);
1042
- };
1043
- imports.wbg.__wbg_buffer_7af23f65f6c64548 = function (arg0) {
952
+ imports.wbg.__wbg_self_fd00a1ef86d1b2ed = function() { return handleError(function () {
953
+ const ret = self.self;
954
+ return addHeapObject(ret);
955
+ }, arguments) };
956
+ imports.wbg.__wbg_window_6f6e346d8bbd61d7 = function() { return handleError(function () {
957
+ const ret = window.window;
958
+ return addHeapObject(ret);
959
+ }, arguments) };
960
+ imports.wbg.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () {
961
+ const ret = globalThis.globalThis;
962
+ return addHeapObject(ret);
963
+ }, arguments) };
964
+ imports.wbg.__wbg_global_67175caf56f55ca9 = function() { return handleError(function () {
965
+ const ret = global.global;
966
+ return addHeapObject(ret);
967
+ }, arguments) };
968
+ imports.wbg.__wbg_buffer_34f5ec9f8a838ba0 = function(arg0) {
1044
969
  const ret = getObject(arg0).buffer;
1045
970
  return addHeapObject(ret);
1046
971
  };
1047
- imports.wbg.__wbg_newwithbyteoffsetandlength_ce1e75f0ce5f7974 = function (arg0, arg1, arg2) {
972
+ imports.wbg.__wbg_newwithbyteoffsetandlength_88fdad741db1b182 = function(arg0, arg1, arg2) {
1048
973
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1049
974
  return addHeapObject(ret);
1050
975
  };
1051
- imports.wbg.__wbg_new_cc9018bd6f283b6f = function (arg0) {
976
+ imports.wbg.__wbg_new_cda198d9dbc6d7ea = function(arg0) {
1052
977
  const ret = new Uint8Array(getObject(arg0));
1053
978
  return addHeapObject(ret);
1054
979
  };
1055
- imports.wbg.__wbg_set_f25e869e4565d2a2 = function (arg0, arg1, arg2) {
980
+ imports.wbg.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) {
1056
981
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1057
982
  };
1058
- imports.wbg.__wbg_length_0acb1cf9bbaf8519 = function (arg0) {
983
+ imports.wbg.__wbg_length_51f19f73d6d9eff3 = function(arg0) {
1059
984
  const ret = getObject(arg0).length;
1060
985
  return ret;
1061
986
  };
1062
- imports.wbg.__wbg_newwithlength_8f0657faca9f1422 = function (arg0) {
987
+ imports.wbg.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) {
1063
988
  const ret = new Uint8Array(arg0 >>> 0);
1064
989
  return addHeapObject(ret);
1065
990
  };
1066
- imports.wbg.__wbg_subarray_da527dbd24eafb6b = function (arg0, arg1, arg2) {
991
+ imports.wbg.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) {
1067
992
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1068
993
  return addHeapObject(ret);
1069
994
  };
1070
- imports.wbg.__wbg_has_ce995ec88636803d = function () {
1071
- return handleError(function (arg0, arg1) {
1072
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
1073
- return ret;
1074
- }, arguments);
1075
- };
1076
- imports.wbg.__wbg_set_93b1c87ee2af852e = function () {
1077
- return handleError(function (arg0, arg1, arg2) {
1078
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1079
- return ret;
1080
- }, arguments);
1081
- };
1082
- imports.wbg.__wbg_stringify_c760003feffcc1f2 = function () {
1083
- return handleError(function (arg0) {
1084
- const ret = JSON.stringify(getObject(arg0));
1085
- return addHeapObject(ret);
1086
- }, arguments);
1087
- };
1088
- imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
995
+ imports.wbg.__wbg_has_3be27932089d278e = function() { return handleError(function (arg0, arg1) {
996
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
997
+ return ret;
998
+ }, arguments) };
999
+ imports.wbg.__wbg_set_2762e698c2f5b7e0 = function() { return handleError(function (arg0, arg1, arg2) {
1000
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1001
+ return ret;
1002
+ }, arguments) };
1003
+ imports.wbg.__wbg_stringify_d8d1ee75d5b55ce4 = function() { return handleError(function (arg0) {
1004
+ const ret = JSON.stringify(getObject(arg0));
1005
+ return addHeapObject(ret);
1006
+ }, arguments) };
1007
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1089
1008
  const ret = debugString(getObject(arg1));
1090
1009
  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1091
1010
  const len0 = WASM_VECTOR_LEN;
1092
1011
  getInt32Memory0()[arg0 / 4 + 1] = len0;
1093
1012
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1094
1013
  };
1095
- imports.wbg.__wbindgen_throw = function (arg0, arg1) {
1014
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1096
1015
  throw new Error(getStringFromWasm0(arg0, arg1));
1097
1016
  };
1098
- imports.wbg.__wbindgen_memory = function () {
1017
+ imports.wbg.__wbindgen_memory = function() {
1099
1018
  const ret = wasm.memory;
1100
1019
  return addHeapObject(ret);
1101
1020
  };
1102
- imports.wbg.__wbindgen_closure_wrapper10913 = function (arg0, arg1, arg2) {
1103
- const ret = makeMutClosure(arg0, arg1, 3725, __wbg_adapter_24);
1021
+ imports.wbg.__wbindgen_closure_wrapper10020 = function(arg0, arg1, arg2) {
1022
+ const ret = makeMutClosure(arg0, arg1, 3552, __wbg_adapter_24);
1104
1023
  return addHeapObject(ret);
1105
1024
  };
1106
1025
 
1107
- if (
1108
- typeof input === 'string' ||
1109
- (typeof Request === 'function' && input instanceof Request) ||
1110
- (typeof URL === 'function' && input instanceof URL)
1111
- ) {
1112
- input = fetch(input);
1113
- }
1026
+ return imports;
1027
+ }
1114
1028
 
1115
- const { instance, module } = await load(await input, imports);
1029
+ function initMemory(imports, maybe_memory) {
1030
+
1031
+ }
1116
1032
 
1033
+ function finalizeInit(instance, module) {
1117
1034
  wasm = instance.exports;
1118
1035
  init.__wbindgen_wasm_module = module;
1036
+ cachedInt32Memory0 = new Int32Array();
1037
+ cachedUint8Memory0 = new Uint8Array();
1038
+
1119
1039
 
1120
1040
  return wasm;
1121
1041
  }
1122
1042
 
1043
+ function initSync(bytes) {
1044
+ const imports = getImports();
1045
+
1046
+ initMemory(imports);
1047
+
1048
+ const module = new WebAssembly.Module(bytes);
1049
+ const instance = new WebAssembly.Instance(module, imports);
1050
+
1051
+ return finalizeInit(instance, module);
1052
+ }
1053
+
1054
+ async function init(input) {
1055
+ if (typeof input === 'undefined') {
1056
+ input = new URL('didkit_wasm_bg.wasm', import.meta.url);
1057
+ }
1058
+ const imports = getImports();
1059
+
1060
+ if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
1061
+ input = fetch(input);
1062
+ }
1063
+
1064
+ initMemory(imports);
1065
+
1066
+ const { instance, module } = await load(await input, imports);
1067
+
1068
+ return finalizeInit(instance, module);
1069
+ }
1070
+
1071
+ export { initSync }
1123
1072
  export default init;