@learncard/didkit-plugin 1.10.12 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,17 +4,8 @@ export function getVersion(): string;
4
4
  export function completeIssuePresentation(presentation: string, preparation: string, signature: string): Promise<any>;
5
5
  export function verifyPresentation(vp: string, proof_options: string, context_map: string): Promise<any>;
6
6
  export function DIDAuth(holder: string, linked_data_proof_options: string, key: string, context_map: string): Promise<any>;
7
- export function verifyInvocation(invocation: string, delegation: string): Promise<any>;
8
- export function contextLoader(url: string): Promise<any>;
9
7
  export function JWKFromTezos(tz: string): Promise<any>;
10
- export function delegateCapability(capability: string, linked_data_proof_options: string, parents: string, key: string): Promise<any>;
11
- export function prepareDelegateCapability(capability: string, linked_data_proof_options: string, parents: string, public_key: string): Promise<any>;
12
- export function completeDelegateCapability(capability: string, preparation: string, signature: string): Promise<any>;
13
- export function verifyDelegation(delegation: string): Promise<any>;
14
- export function invokeCapability(invocation: string, target_id: string, linked_data_proof_options: string, key: string): Promise<any>;
15
- export function prepareInvokeCapability(invocation: string, target_id: string, linked_data_proof_options: string, public_key: string): Promise<any>;
16
- export function completeInvokeCapability(invocation: string, preparation: string, signature: string): Promise<any>;
17
- export function verifyInvocationSignature(invocation: string): Promise<any>;
8
+ export function contextLoader(url: string): Promise<any>;
18
9
  export function clearCache(): Promise<any>;
19
10
  export function didResolver(did: string, input_metadata: string): Promise<any>;
20
11
  export function resolveDID(did: string, input_metadata: string): Promise<any>;
@@ -40,13 +31,9 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
40
31
 
41
32
  export interface InitOutput {
42
33
  readonly memory: WebAssembly.Memory;
43
- readonly didkit_error_code: () => number;
44
- readonly didkit_error_message: () => number;
45
34
  readonly DIDAuth: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
46
35
  readonly JWKFromTezos: (a: number, b: number) => number;
47
36
  readonly clearCache: () => number;
48
- readonly completeDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
49
- readonly completeInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
50
37
  readonly completeIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
51
38
  readonly completeIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
52
39
  readonly contextLoader: (a: number, b: number) => number;
@@ -54,7 +41,6 @@ export interface InitOutput {
54
41
  readonly createJwe: (a: number, b: number, c: number, d: number) => number;
55
42
  readonly decryptDagJwe: (a: number, b: number, c: number, d: number) => number;
56
43
  readonly decryptJwe: (a: number, b: number, c: number, d: number) => number;
57
- readonly delegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
58
44
  readonly didResolver: (a: number, b: number, c: number, d: number) => number;
59
45
  readonly didToVerificationMethod: (a: number, b: number) => number;
60
46
  readonly generateEd25519Key: (a: number) => void;
@@ -62,29 +48,25 @@ export interface InitOutput {
62
48
  readonly generateSecp256k1Key: (a: number) => void;
63
49
  readonly generateSecp256k1KeyFromBytes: (a: number, b: number, c: number) => void;
64
50
  readonly getVersion: (a: number) => void;
65
- readonly invokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
66
51
  readonly issueCredential: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
67
52
  readonly issuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
68
53
  readonly keyToDID: (a: number, b: number, c: number, d: number, e: number) => void;
69
54
  readonly keyToVerificationMethod: (a: number, b: number, c: number, d: number) => number;
70
- readonly prepareDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
71
- readonly prepareInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
72
55
  readonly prepareIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
73
56
  readonly prepareIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
74
57
  readonly resolveDID: (a: number, b: number, c: number, d: number) => number;
75
58
  readonly verifyCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
76
- readonly verifyDelegation: (a: number, b: number) => number;
77
- readonly verifyInvocation: (a: number, b: number, c: number, d: number) => number;
78
- readonly verifyInvocationSignature: (a: number, b: number) => number;
79
59
  readonly verifyPresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
60
+ readonly didkit_error_code: () => number;
61
+ readonly didkit_error_message: () => number;
80
62
  readonly __wbindgen_export_0: (a: number, b: number) => number;
81
63
  readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
82
64
  readonly __wbindgen_export_2: (a: number) => void;
83
65
  readonly __wbindgen_export_3: WebAssembly.Table;
84
66
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
85
67
  readonly __wbindgen_export_4: (a: number, b: number, c: number) => void;
86
- readonly __wbindgen_export_5: (a: number, b: number, c: number) => void;
87
- readonly __wbindgen_export_6: (a: number, b: number) => void;
68
+ readonly __wbindgen_export_5: (a: number, b: number) => void;
69
+ readonly __wbindgen_export_6: (a: number, b: number, c: number) => void;
88
70
  readonly __wbindgen_export_7: (a: number, b: number, c: number, d: number) => void;
89
71
  }
90
72
 
@@ -311,31 +311,6 @@ export function DIDAuth(holder, linked_data_proof_options, key, context_map) {
311
311
  return takeObject(ret);
312
312
  }
313
313
 
314
- /**
315
- * @param {string} invocation
316
- * @param {string} delegation
317
- * @returns {Promise<any>}
318
- */
319
- export function verifyInvocation(invocation, delegation) {
320
- const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
321
- const len0 = WASM_VECTOR_LEN;
322
- const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
323
- const len1 = WASM_VECTOR_LEN;
324
- const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);
325
- return takeObject(ret);
326
- }
327
-
328
- /**
329
- * @param {string} url
330
- * @returns {Promise<any>}
331
- */
332
- export function contextLoader(url) {
333
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
334
- const len0 = WASM_VECTOR_LEN;
335
- const ret = wasm.contextLoader(ptr0, len0);
336
- return takeObject(ret);
337
- }
338
-
339
314
  /**
340
315
  * @param {string} tz
341
316
  * @returns {Promise<any>}
@@ -348,138 +323,13 @@ export function JWKFromTezos(tz) {
348
323
  }
349
324
 
350
325
  /**
351
- * @param {string} capability
352
- * @param {string} linked_data_proof_options
353
- * @param {string} parents
354
- * @param {string} key
355
- * @returns {Promise<any>}
356
- */
357
- export function delegateCapability(capability, linked_data_proof_options, parents, key) {
358
- const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
359
- const len0 = WASM_VECTOR_LEN;
360
- const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
361
- const len1 = WASM_VECTOR_LEN;
362
- const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
363
- const len2 = WASM_VECTOR_LEN;
364
- const ptr3 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
365
- const len3 = WASM_VECTOR_LEN;
366
- const ret = wasm.delegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
367
- return takeObject(ret);
368
- }
369
-
370
- /**
371
- * @param {string} capability
372
- * @param {string} linked_data_proof_options
373
- * @param {string} parents
374
- * @param {string} public_key
375
- * @returns {Promise<any>}
376
- */
377
- export function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {
378
- const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
379
- const len0 = WASM_VECTOR_LEN;
380
- const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
381
- const len1 = WASM_VECTOR_LEN;
382
- const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
383
- const len2 = WASM_VECTOR_LEN;
384
- const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
385
- const len3 = WASM_VECTOR_LEN;
386
- const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
387
- return takeObject(ret);
388
- }
389
-
390
- /**
391
- * @param {string} capability
392
- * @param {string} preparation
393
- * @param {string} signature
394
- * @returns {Promise<any>}
395
- */
396
- export function completeDelegateCapability(capability, preparation, signature) {
397
- const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
398
- const len0 = WASM_VECTOR_LEN;
399
- const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
400
- const len1 = WASM_VECTOR_LEN;
401
- const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
402
- const len2 = WASM_VECTOR_LEN;
403
- const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);
404
- return takeObject(ret);
405
- }
406
-
407
- /**
408
- * @param {string} delegation
409
- * @returns {Promise<any>}
410
- */
411
- export function verifyDelegation(delegation) {
412
- const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
413
- const len0 = WASM_VECTOR_LEN;
414
- const ret = wasm.verifyDelegation(ptr0, len0);
415
- return takeObject(ret);
416
- }
417
-
418
- /**
419
- * @param {string} invocation
420
- * @param {string} target_id
421
- * @param {string} linked_data_proof_options
422
- * @param {string} key
423
- * @returns {Promise<any>}
424
- */
425
- export function invokeCapability(invocation, target_id, linked_data_proof_options, key) {
426
- const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
427
- const len0 = WASM_VECTOR_LEN;
428
- const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
429
- const len1 = WASM_VECTOR_LEN;
430
- const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
431
- const len2 = WASM_VECTOR_LEN;
432
- const ptr3 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
433
- const len3 = WASM_VECTOR_LEN;
434
- const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
435
- return takeObject(ret);
436
- }
437
-
438
- /**
439
- * @param {string} invocation
440
- * @param {string} target_id
441
- * @param {string} linked_data_proof_options
442
- * @param {string} public_key
443
- * @returns {Promise<any>}
444
- */
445
- export function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {
446
- const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
447
- const len0 = WASM_VECTOR_LEN;
448
- const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
449
- const len1 = WASM_VECTOR_LEN;
450
- const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
451
- const len2 = WASM_VECTOR_LEN;
452
- const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
453
- const len3 = WASM_VECTOR_LEN;
454
- const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
455
- return takeObject(ret);
456
- }
457
-
458
- /**
459
- * @param {string} invocation
460
- * @param {string} preparation
461
- * @param {string} signature
462
- * @returns {Promise<any>}
463
- */
464
- export function completeInvokeCapability(invocation, preparation, signature) {
465
- const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
466
- const len0 = WASM_VECTOR_LEN;
467
- const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
468
- const len1 = WASM_VECTOR_LEN;
469
- const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
470
- const len2 = WASM_VECTOR_LEN;
471
- const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);
472
- return takeObject(ret);
473
- }
474
-
475
- /**
476
- * @param {string} invocation
326
+ * @param {string} url
477
327
  * @returns {Promise<any>}
478
328
  */
479
- export function verifyInvocationSignature(invocation) {
480
- const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
329
+ export function contextLoader(url) {
330
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
481
331
  const len0 = WASM_VECTOR_LEN;
482
- const ret = wasm.verifyInvocationSignature(ptr0, len0);
332
+ const ret = wasm.contextLoader(ptr0, len0);
483
333
  return takeObject(ret);
484
334
  }
485
335
 
@@ -873,15 +723,15 @@ export function decryptDagJwe(jwe, jwks) {
873
723
  return takeObject(ret);
874
724
  }
875
725
 
876
- function __wbg_adapter_6(arg0, arg1, arg2) {
877
- wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
726
+ function __wbg_adapter_12(arg0, arg1) {
727
+ wasm.__wbindgen_export_5(arg0, arg1);
878
728
  }
879
729
 
880
- function __wbg_adapter_19(arg0, arg1) {
881
- wasm.__wbindgen_export_6(arg0, arg1);
730
+ function __wbg_adapter_17(arg0, arg1, arg2) {
731
+ wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
882
732
  }
883
733
 
884
- function __wbg_adapter_107(arg0, arg1, arg2, arg3) {
734
+ function __wbg_adapter_98(arg0, arg1, arg2, arg3) {
885
735
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
886
736
  }
887
737
 
@@ -1102,7 +952,7 @@ function __wbg_get_imports() {
1102
952
  const a = state0.a;
1103
953
  state0.a = 0;
1104
954
  try {
1105
- return __wbg_adapter_107(a, state0.b, arg0, arg1);
955
+ return __wbg_adapter_98(a, state0.b, arg0, arg1);
1106
956
  } finally {
1107
957
  state0.a = a;
1108
958
  }
@@ -1368,11 +1218,6 @@ function __wbg_get_imports() {
1368
1218
  imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
1369
1219
  throw new Error(getStringFromWasm0(arg0, arg1));
1370
1220
  };
1371
- imports.wbg.__wbindgen_cast_1eaafab1968e741d = function(arg0, arg1) {
1372
- // Cast intrinsic for `Closure(Closure { dtor_idx: 639, function: Function { arguments: [], shim_idx: 640, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1373
- const ret = makeMutClosure(arg0, arg1, 639, __wbg_adapter_19);
1374
- return addHeapObject(ret);
1375
- };
1376
1221
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1377
1222
  // Cast intrinsic for `Ref(String) -> Externref`.
1378
1223
  const ret = getStringFromWasm0(arg0, arg1);
@@ -1388,9 +1233,9 @@ function __wbg_get_imports() {
1388
1233
  const ret = BigInt.asUintN(64, arg0);
1389
1234
  return addHeapObject(ret);
1390
1235
  };
1391
- imports.wbg.__wbindgen_cast_67d14185bb436b4e = function(arg0, arg1) {
1392
- // Cast intrinsic for `Closure(Closure { dtor_idx: 726, function: Function { arguments: [Externref], shim_idx: 727, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1393
- const ret = makeMutClosure(arg0, arg1, 726, __wbg_adapter_6);
1236
+ imports.wbg.__wbindgen_cast_97b2994476861e36 = function(arg0, arg1) {
1237
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 580, function: Function { arguments: [Externref], shim_idx: 581, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1238
+ const ret = makeMutClosure(arg0, arg1, 580, __wbg_adapter_17);
1394
1239
  return addHeapObject(ret);
1395
1240
  };
1396
1241
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
@@ -1403,6 +1248,11 @@ function __wbg_get_imports() {
1403
1248
  const ret = getArrayU8FromWasm0(arg0, arg1);
1404
1249
  return addHeapObject(ret);
1405
1250
  };
1251
+ imports.wbg.__wbindgen_cast_cfb4a7783b62dc83 = function(arg0, arg1) {
1252
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 487, function: Function { arguments: [], shim_idx: 488, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1253
+ const ret = makeMutClosure(arg0, arg1, 487, __wbg_adapter_12);
1254
+ return addHeapObject(ret);
1255
+ };
1406
1256
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1407
1257
  // Cast intrinsic for `F64 -> Externref`.
1408
1258
  const ret = arg0;
Binary file
@@ -1,13 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const didkit_error_code: () => number;
5
- export const didkit_error_message: () => number;
6
4
  export const DIDAuth: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
7
5
  export const JWKFromTezos: (a: number, b: number) => number;
8
6
  export const clearCache: () => number;
9
- export const completeDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
10
- export const completeInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
11
7
  export const completeIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
12
8
  export const completeIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
13
9
  export const contextLoader: (a: number, b: number) => number;
@@ -15,7 +11,6 @@ export const createDagJwe: (a: number, b: number, c: number) => number;
15
11
  export const createJwe: (a: number, b: number, c: number, d: number) => number;
16
12
  export const decryptDagJwe: (a: number, b: number, c: number, d: number) => number;
17
13
  export const decryptJwe: (a: number, b: number, c: number, d: number) => number;
18
- export const delegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
19
14
  export const didResolver: (a: number, b: number, c: number, d: number) => number;
20
15
  export const didToVerificationMethod: (a: number, b: number) => number;
21
16
  export const generateEd25519Key: (a: number) => void;
@@ -23,27 +18,23 @@ export const generateEd25519KeyFromBytes: (a: number, b: number, c: number) => v
23
18
  export const generateSecp256k1Key: (a: number) => void;
24
19
  export const generateSecp256k1KeyFromBytes: (a: number, b: number, c: number) => void;
25
20
  export const getVersion: (a: number) => void;
26
- export const invokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
27
21
  export const issueCredential: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
28
22
  export const issuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
29
23
  export const keyToDID: (a: number, b: number, c: number, d: number, e: number) => void;
30
24
  export const keyToVerificationMethod: (a: number, b: number, c: number, d: number) => number;
31
- export const prepareDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
32
- export const prepareInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
33
25
  export const prepareIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
34
26
  export const prepareIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
35
27
  export const resolveDID: (a: number, b: number, c: number, d: number) => number;
36
28
  export const verifyCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
37
- export const verifyDelegation: (a: number, b: number) => number;
38
- export const verifyInvocation: (a: number, b: number, c: number, d: number) => number;
39
- export const verifyInvocationSignature: (a: number, b: number) => number;
40
29
  export const verifyPresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
30
+ export const didkit_error_code: () => number;
31
+ export const didkit_error_message: () => number;
41
32
  export const __wbindgen_export_0: (a: number, b: number) => number;
42
33
  export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
43
34
  export const __wbindgen_export_2: (a: number) => void;
44
35
  export const __wbindgen_export_3: WebAssembly.Table;
45
36
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
46
37
  export const __wbindgen_export_4: (a: number, b: number, c: number) => void;
47
- export const __wbindgen_export_5: (a: number, b: number, c: number) => void;
48
- export const __wbindgen_export_6: (a: number, b: number) => void;
38
+ export const __wbindgen_export_5: (a: number, b: number) => void;
39
+ export const __wbindgen_export_6: (a: number, b: number, c: number) => void;
49
40
  export const __wbindgen_export_7: (a: number, b: number, c: number, d: number) => void;
@@ -8,7 +8,7 @@ export * from './pkg/didkit_wasm';
8
8
  * Kept as a standalone constant so `scripts/set-default-wasm-url.mjs` can rewrite it regardless of
9
9
  * how Prettier wraps the `init` signature. Do not inline it back into the parameter list.
10
10
  */
11
- export declare const DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-ba3e2ec2208f6da57d94e47c332b3226f048e11d7a23093d50b184d849b6bc0b/didkit_wasm_bg.wasm";
11
+ export declare const DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-ded761c91910068261077c0e2e0c574b6c8c6ba638c8805ad9550a4b90e4138e/didkit_wasm_bg.wasm";
12
12
  export declare const init: (arg?: InitInput | Promise<InitInput>) => Promise<void>;
13
13
  export default init;
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/didkit/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,cAAc,mBAAmB,CAAC;AAElC;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,mIACgG,CAAC;AAKrI,eAAO,MAAM,IAAI,GAAU,MAAK,SAAS,GAAG,OAAO,CAAC,SAAS,CAA2B,kBAmBvF,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/didkit/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,cAAc,mBAAmB,CAAC;AAElC;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,mIACgG,CAAC;AAMrI,eAAO,MAAM,IAAI,GAAI,MAAK,SAAS,GAAG,OAAO,CAAC,SAAS,CAA2B,kBAWjF,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -30,6 +30,7 @@ __export(index_exports, {
30
30
  getDidKitPlugin: () => getDidKitPlugin,
31
31
  getDidWebDocumentFetchCacheStats: () => getDidWebDocumentFetchCacheStats,
32
32
  getDocumentMap: () => getDocumentMap,
33
+ initDidKit: () => initDidKit,
33
34
  installDidWebDocumentFetchCache: () => installDidWebDocumentFetchCache,
34
35
  installWalletDidWebDocumentFetchCache: () => installWalletDidWebDocumentFetchCache,
35
36
  invalidateDidWebDocument: () => invalidateDidWebDocument,
@@ -479,18 +480,18 @@ function decryptDagJwe(jwe, jwks) {
479
480
  return takeObject(ret);
480
481
  }
481
482
  __name(decryptDagJwe, "decryptDagJwe");
482
- function __wbg_adapter_6(arg0, arg1, arg2) {
483
- wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
483
+ function __wbg_adapter_12(arg0, arg1) {
484
+ wasm.__wbindgen_export_5(arg0, arg1);
484
485
  }
485
- __name(__wbg_adapter_6, "__wbg_adapter_6");
486
- function __wbg_adapter_19(arg0, arg1) {
487
- wasm.__wbindgen_export_6(arg0, arg1);
486
+ __name(__wbg_adapter_12, "__wbg_adapter_12");
487
+ function __wbg_adapter_17(arg0, arg1, arg2) {
488
+ wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
488
489
  }
489
- __name(__wbg_adapter_19, "__wbg_adapter_19");
490
- function __wbg_adapter_107(arg0, arg1, arg2, arg3) {
490
+ __name(__wbg_adapter_17, "__wbg_adapter_17");
491
+ function __wbg_adapter_98(arg0, arg1, arg2, arg3) {
491
492
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
492
493
  }
493
- __name(__wbg_adapter_107, "__wbg_adapter_107");
494
+ __name(__wbg_adapter_98, "__wbg_adapter_98");
494
495
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
495
496
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
496
497
  var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
@@ -713,7 +714,7 @@ function __wbg_get_imports() {
713
714
  const a = state0.a;
714
715
  state0.a = 0;
715
716
  try {
716
- return __wbg_adapter_107(a, state0.b, arg02, arg12);
717
+ return __wbg_adapter_98(a, state0.b, arg02, arg12);
717
718
  } finally {
718
719
  state0.a = a;
719
720
  }
@@ -995,10 +996,6 @@ function __wbg_get_imports() {
995
996
  imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
996
997
  throw new Error(getStringFromWasm0(arg0, arg1));
997
998
  };
998
- imports.wbg.__wbindgen_cast_1eaafab1968e741d = function(arg0, arg1) {
999
- const ret = makeMutClosure(arg0, arg1, 639, __wbg_adapter_19);
1000
- return addHeapObject(ret);
1001
- };
1002
999
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1003
1000
  const ret = getStringFromWasm0(arg0, arg1);
1004
1001
  return addHeapObject(ret);
@@ -1011,8 +1008,8 @@ function __wbg_get_imports() {
1011
1008
  const ret = BigInt.asUintN(64, arg0);
1012
1009
  return addHeapObject(ret);
1013
1010
  };
1014
- imports.wbg.__wbindgen_cast_67d14185bb436b4e = function(arg0, arg1) {
1015
- const ret = makeMutClosure(arg0, arg1, 726, __wbg_adapter_6);
1011
+ imports.wbg.__wbindgen_cast_97b2994476861e36 = function(arg0, arg1) {
1012
+ const ret = makeMutClosure(arg0, arg1, 580, __wbg_adapter_17);
1016
1013
  return addHeapObject(ret);
1017
1014
  };
1018
1015
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
@@ -1023,6 +1020,10 @@ function __wbg_get_imports() {
1023
1020
  const ret = getArrayU8FromWasm0(arg0, arg1);
1024
1021
  return addHeapObject(ret);
1025
1022
  };
1023
+ imports.wbg.__wbindgen_cast_cfb4a7783b62dc83 = function(arg0, arg1) {
1024
+ const ret = makeMutClosure(arg0, arg1, 487, __wbg_adapter_12);
1025
+ return addHeapObject(ret);
1026
+ };
1026
1027
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1027
1028
  const ret = arg0;
1028
1029
  return addHeapObject(ret);
@@ -1072,21 +1073,17 @@ __name(__wbg_init, "__wbg_init");
1072
1073
  var didkit_wasm_default = __wbg_init;
1073
1074
 
1074
1075
  // src/didkit/index.ts
1075
- var DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-ba3e2ec2208f6da57d94e47c332b3226f048e11d7a23093d50b184d849b6bc0b/didkit_wasm_bg.wasm";
1076
- var initialized = false;
1077
- var generating = false;
1078
- var init = /* @__PURE__ */ __name(async (arg = DEFAULT_DIDKIT_WASM_URL) => {
1079
- while (generating) await new Promise((res) => setTimeout(res, 250));
1080
- if (initialized) return;
1081
- try {
1082
- generating = true;
1083
- await didkit_wasm_default({ module_or_path: arg });
1084
- generating = false;
1085
- initialized = true;
1086
- } catch (error) {
1087
- generating = false;
1088
- throw error;
1089
- }
1076
+ var DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-ded761c91910068261077c0e2e0c574b6c8c6ba638c8805ad9550a4b90e4138e/didkit_wasm_bg.wasm";
1077
+ var initPromise;
1078
+ var init = /* @__PURE__ */ __name((arg = DEFAULT_DIDKIT_WASM_URL) => {
1079
+ initPromise ?? (initPromise = didkit_wasm_default({ module_or_path: arg }).then(
1080
+ () => void 0,
1081
+ (error) => {
1082
+ initPromise = void 0;
1083
+ throw error;
1084
+ }
1085
+ ));
1086
+ return initPromise;
1090
1087
  }, "init");
1091
1088
  var didkit_default = init;
1092
1089
 
@@ -1459,6 +1456,7 @@ var getDidWebDocumentFetchCacheStats = /* @__PURE__ */ __name(() => ({
1459
1456
  }), "getDidWebDocumentFetchCacheStats");
1460
1457
 
1461
1458
  // src/plugin.ts
1459
+ var initDidKit = /* @__PURE__ */ __name((input) => didkit_default(input), "initDidKit");
1462
1460
  var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts = false) => {
1463
1461
  installDidWebDocumentFetchCache();
1464
1462
  await didkit_default(input);