@learncard/didkit-plugin 1.8.6 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/didkit/didkit_wasm.d.ts +54 -54
- package/dist/didkit/didkit_wasm.js +321 -324
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +27 -27
- package/dist/didkit-plugin.cjs.development.js +102 -107
- package/dist/didkit-plugin.cjs.development.js.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.js +2 -2
- package/dist/didkit-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkit-plugin.esm.js +102 -107
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +54 -54
- package/dist/didkit_wasm.js +321 -324
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +27 -27
- package/package.json +3 -3
|
@@ -203,54 +203,135 @@ function debugString(val) {
|
|
|
203
203
|
return className;
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
|
-
* @
|
|
206
|
+
* @param {string} delegation
|
|
207
|
+
* @returns {Promise<any>}
|
|
207
208
|
*/
|
|
208
|
-
export function
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
deferred1_0 = ret[0];
|
|
214
|
-
deferred1_1 = ret[1];
|
|
215
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
216
|
-
} finally {
|
|
217
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
218
|
-
}
|
|
209
|
+
export function verifyDelegation(delegation) {
|
|
210
|
+
const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
211
|
+
const len0 = WASM_VECTOR_LEN;
|
|
212
|
+
const ret = wasm.verifyDelegation(ptr0, len0);
|
|
213
|
+
return ret;
|
|
219
214
|
}
|
|
220
215
|
|
|
221
216
|
/**
|
|
217
|
+
* @param {string} holder
|
|
218
|
+
* @param {string} linked_data_proof_options
|
|
219
|
+
* @param {string} key
|
|
220
|
+
* @param {string} context_map
|
|
222
221
|
* @returns {Promise<any>}
|
|
223
222
|
*/
|
|
224
|
-
export function
|
|
225
|
-
const
|
|
223
|
+
export function DIDAuth(holder, linked_data_proof_options, key, context_map) {
|
|
224
|
+
const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
225
|
+
const len0 = WASM_VECTOR_LEN;
|
|
226
|
+
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
227
|
+
const len1 = WASM_VECTOR_LEN;
|
|
228
|
+
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
229
|
+
const len2 = WASM_VECTOR_LEN;
|
|
230
|
+
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
231
|
+
const len3 = WASM_VECTOR_LEN;
|
|
232
|
+
const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
226
233
|
return ret;
|
|
227
234
|
}
|
|
228
235
|
|
|
229
236
|
/**
|
|
230
|
-
* @param {string}
|
|
231
|
-
* @param {string}
|
|
237
|
+
* @param {string} credential
|
|
238
|
+
* @param {string} proof_options
|
|
239
|
+
* @param {string} key
|
|
240
|
+
* @param {string} context_map
|
|
232
241
|
* @returns {Promise<any>}
|
|
233
242
|
*/
|
|
234
|
-
export function
|
|
235
|
-
const ptr0 = passStringToWasm0(
|
|
243
|
+
export function issueCredential(credential, proof_options, key, context_map) {
|
|
244
|
+
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
236
245
|
const len0 = WASM_VECTOR_LEN;
|
|
237
|
-
const ptr1 = passStringToWasm0(
|
|
246
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
247
|
const len1 = WASM_VECTOR_LEN;
|
|
239
|
-
const
|
|
248
|
+
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
+
const len2 = WASM_VECTOR_LEN;
|
|
250
|
+
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
+
const len3 = WASM_VECTOR_LEN;
|
|
252
|
+
const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
240
253
|
return ret;
|
|
241
254
|
}
|
|
242
255
|
|
|
243
256
|
/**
|
|
244
|
-
* @param {string}
|
|
245
|
-
* @param {string}
|
|
257
|
+
* @param {string} capability
|
|
258
|
+
* @param {string} preparation
|
|
259
|
+
* @param {string} signature
|
|
246
260
|
* @returns {Promise<any>}
|
|
247
261
|
*/
|
|
248
|
-
export function
|
|
249
|
-
const ptr0 = passStringToWasm0(
|
|
262
|
+
export function completeDelegateCapability(capability, preparation, signature) {
|
|
263
|
+
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
250
264
|
const len0 = WASM_VECTOR_LEN;
|
|
251
|
-
const ptr1 = passStringToWasm0(
|
|
265
|
+
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
266
|
const len1 = WASM_VECTOR_LEN;
|
|
253
|
-
const
|
|
267
|
+
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
|
+
const len2 = WASM_VECTOR_LEN;
|
|
269
|
+
const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
270
|
+
return ret;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @param {string} vp
|
|
275
|
+
* @param {string} proof_options
|
|
276
|
+
* @param {string} context_map
|
|
277
|
+
* @returns {Promise<any>}
|
|
278
|
+
*/
|
|
279
|
+
export function verifyPresentation(vp, proof_options, context_map) {
|
|
280
|
+
const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
+
const len1 = WASM_VECTOR_LEN;
|
|
284
|
+
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
285
|
+
const len2 = WASM_VECTOR_LEN;
|
|
286
|
+
const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
287
|
+
return ret;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} invocation
|
|
292
|
+
* @param {string} preparation
|
|
293
|
+
* @param {string} signature
|
|
294
|
+
* @returns {Promise<any>}
|
|
295
|
+
*/
|
|
296
|
+
export function completeInvokeCapability(invocation, preparation, signature) {
|
|
297
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
298
|
+
const len0 = WASM_VECTOR_LEN;
|
|
299
|
+
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
+
const len1 = WASM_VECTOR_LEN;
|
|
301
|
+
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
+
const len2 = WASM_VECTOR_LEN;
|
|
303
|
+
const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
304
|
+
return ret;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @param {string} capability
|
|
309
|
+
* @param {string} linked_data_proof_options
|
|
310
|
+
* @param {string} parents
|
|
311
|
+
* @param {string} public_key
|
|
312
|
+
* @returns {Promise<any>}
|
|
313
|
+
*/
|
|
314
|
+
export function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {
|
|
315
|
+
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
316
|
+
const len0 = WASM_VECTOR_LEN;
|
|
317
|
+
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
318
|
+
const len1 = WASM_VECTOR_LEN;
|
|
319
|
+
const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
+
const len2 = WASM_VECTOR_LEN;
|
|
321
|
+
const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
+
const len3 = WASM_VECTOR_LEN;
|
|
323
|
+
const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
324
|
+
return ret;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @param {string} url
|
|
329
|
+
* @returns {Promise<any>}
|
|
330
|
+
*/
|
|
331
|
+
export function contextLoader(url) {
|
|
332
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
|
+
const len0 = WASM_VECTOR_LEN;
|
|
334
|
+
const ret = wasm.contextLoader(ptr0, len0);
|
|
254
335
|
return ret;
|
|
255
336
|
}
|
|
256
337
|
|
|
@@ -262,11 +343,11 @@ function takeFromExternrefTable0(idx) {
|
|
|
262
343
|
/**
|
|
263
344
|
* @returns {string}
|
|
264
345
|
*/
|
|
265
|
-
export function
|
|
346
|
+
export function generateSecp256k1Key() {
|
|
266
347
|
let deferred2_0;
|
|
267
348
|
let deferred2_1;
|
|
268
349
|
try {
|
|
269
|
-
const ret = wasm.
|
|
350
|
+
const ret = wasm.generateSecp256k1Key();
|
|
270
351
|
var ptr1 = ret[0];
|
|
271
352
|
var len1 = ret[1];
|
|
272
353
|
if (ret[3]) {
|
|
@@ -281,6 +362,34 @@ export function generateEd25519Key() {
|
|
|
281
362
|
}
|
|
282
363
|
}
|
|
283
364
|
|
|
365
|
+
/**
|
|
366
|
+
* @param {string} invocation
|
|
367
|
+
* @returns {Promise<any>}
|
|
368
|
+
*/
|
|
369
|
+
export function verifyInvocationSignature(invocation) {
|
|
370
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
371
|
+
const len0 = WASM_VECTOR_LEN;
|
|
372
|
+
const ret = wasm.verifyInvocationSignature(ptr0, len0);
|
|
373
|
+
return ret;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @param {string} presentation
|
|
378
|
+
* @param {string} preparation
|
|
379
|
+
* @param {string} signature
|
|
380
|
+
* @returns {Promise<any>}
|
|
381
|
+
*/
|
|
382
|
+
export function completeIssuePresentation(presentation, preparation, signature) {
|
|
383
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
384
|
+
const len0 = WASM_VECTOR_LEN;
|
|
385
|
+
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
386
|
+
const len1 = WASM_VECTOR_LEN;
|
|
387
|
+
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
+
const len2 = WASM_VECTOR_LEN;
|
|
389
|
+
const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
390
|
+
return ret;
|
|
391
|
+
}
|
|
392
|
+
|
|
284
393
|
function passArray8ToWasm0(arg, malloc) {
|
|
285
394
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
286
395
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -313,50 +422,17 @@ export function generateEd25519KeyFromBytes(bytes) {
|
|
|
313
422
|
}
|
|
314
423
|
|
|
315
424
|
/**
|
|
316
|
-
* @
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
let deferred2_0;
|
|
320
|
-
let deferred2_1;
|
|
321
|
-
try {
|
|
322
|
-
const ret = wasm.generateSecp256k1Key();
|
|
323
|
-
var ptr1 = ret[0];
|
|
324
|
-
var len1 = ret[1];
|
|
325
|
-
if (ret[3]) {
|
|
326
|
-
ptr1 = 0; len1 = 0;
|
|
327
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
328
|
-
}
|
|
329
|
-
deferred2_0 = ptr1;
|
|
330
|
-
deferred2_1 = len1;
|
|
331
|
-
return getStringFromWasm0(ptr1, len1);
|
|
332
|
-
} finally {
|
|
333
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @param {Uint8Array} bytes
|
|
339
|
-
* @returns {string}
|
|
425
|
+
* @param {string} invocation
|
|
426
|
+
* @param {string} delegation
|
|
427
|
+
* @returns {Promise<any>}
|
|
340
428
|
*/
|
|
341
|
-
export function
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
var ptr2 = ret[0];
|
|
349
|
-
var len2 = ret[1];
|
|
350
|
-
if (ret[3]) {
|
|
351
|
-
ptr2 = 0; len2 = 0;
|
|
352
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
353
|
-
}
|
|
354
|
-
deferred3_0 = ptr2;
|
|
355
|
-
deferred3_1 = len2;
|
|
356
|
-
return getStringFromWasm0(ptr2, len2);
|
|
357
|
-
} finally {
|
|
358
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
359
|
-
}
|
|
429
|
+
export function verifyInvocation(invocation, delegation) {
|
|
430
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
431
|
+
const len0 = WASM_VECTOR_LEN;
|
|
432
|
+
const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
+
const len1 = WASM_VECTOR_LEN;
|
|
434
|
+
const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);
|
|
435
|
+
return ret;
|
|
360
436
|
}
|
|
361
437
|
|
|
362
438
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
@@ -383,70 +459,38 @@ export function createJwe(cleartext, recipients) {
|
|
|
383
459
|
}
|
|
384
460
|
|
|
385
461
|
/**
|
|
386
|
-
* @param {string}
|
|
387
|
-
* @param {string
|
|
388
|
-
* @returns {Promise<any>}
|
|
389
|
-
*/
|
|
390
|
-
export function decryptJwe(jwe, jwks) {
|
|
391
|
-
const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
392
|
-
const len0 = WASM_VECTOR_LEN;
|
|
393
|
-
const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
|
|
394
|
-
const len1 = WASM_VECTOR_LEN;
|
|
395
|
-
const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
|
|
396
|
-
return ret;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* @param {any} cleartext
|
|
401
|
-
* @param {string[]} recipients
|
|
402
|
-
* @returns {Promise<any>}
|
|
403
|
-
*/
|
|
404
|
-
export function createDagJwe(cleartext, recipients) {
|
|
405
|
-
const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
|
|
406
|
-
const len0 = WASM_VECTOR_LEN;
|
|
407
|
-
const ret = wasm.createDagJwe(cleartext, ptr0, len0);
|
|
408
|
-
return ret;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* @param {string} jwe
|
|
413
|
-
* @param {string[]} jwks
|
|
462
|
+
* @param {string} did
|
|
463
|
+
* @param {string} input_metadata
|
|
414
464
|
* @returns {Promise<any>}
|
|
415
465
|
*/
|
|
416
|
-
export function
|
|
417
|
-
const ptr0 = passStringToWasm0(
|
|
466
|
+
export function didResolver(did, input_metadata) {
|
|
467
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
418
468
|
const len0 = WASM_VECTOR_LEN;
|
|
419
|
-
const ptr1 =
|
|
469
|
+
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
420
470
|
const len1 = WASM_VECTOR_LEN;
|
|
421
|
-
const ret = wasm.
|
|
471
|
+
const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
|
|
422
472
|
return ret;
|
|
423
473
|
}
|
|
424
474
|
|
|
425
475
|
/**
|
|
426
|
-
* @param {string} method_pattern
|
|
427
|
-
* @param {string} jwk
|
|
428
476
|
* @returns {string}
|
|
429
477
|
*/
|
|
430
|
-
export function
|
|
431
|
-
let
|
|
432
|
-
let
|
|
478
|
+
export function generateEd25519Key() {
|
|
479
|
+
let deferred2_0;
|
|
480
|
+
let deferred2_1;
|
|
433
481
|
try {
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
const len1 = WASM_VECTOR_LEN;
|
|
438
|
-
const ret = wasm.keyToDID(ptr0, len0, ptr1, len1);
|
|
439
|
-
var ptr3 = ret[0];
|
|
440
|
-
var len3 = ret[1];
|
|
482
|
+
const ret = wasm.generateEd25519Key();
|
|
483
|
+
var ptr1 = ret[0];
|
|
484
|
+
var len1 = ret[1];
|
|
441
485
|
if (ret[3]) {
|
|
442
|
-
|
|
486
|
+
ptr1 = 0; len1 = 0;
|
|
443
487
|
throw takeFromExternrefTable0(ret[2]);
|
|
444
488
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
return getStringFromWasm0(
|
|
489
|
+
deferred2_0 = ptr1;
|
|
490
|
+
deferred2_1 = len1;
|
|
491
|
+
return getStringFromWasm0(ptr1, len1);
|
|
448
492
|
} finally {
|
|
449
|
-
wasm.__wbindgen_free(
|
|
493
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
450
494
|
}
|
|
451
495
|
}
|
|
452
496
|
|
|
@@ -476,164 +520,113 @@ export function didToVerificationMethod(did) {
|
|
|
476
520
|
}
|
|
477
521
|
|
|
478
522
|
/**
|
|
479
|
-
* @param {string}
|
|
480
|
-
* @param {string}
|
|
481
|
-
* @param {string} key
|
|
482
|
-
* @param {string} context_map
|
|
483
|
-
* @returns {Promise<any>}
|
|
484
|
-
*/
|
|
485
|
-
export function issueCredential(credential, proof_options, key, context_map) {
|
|
486
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
487
|
-
const len0 = WASM_VECTOR_LEN;
|
|
488
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
|
-
const len1 = WASM_VECTOR_LEN;
|
|
490
|
-
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
-
const len2 = WASM_VECTOR_LEN;
|
|
492
|
-
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
493
|
-
const len3 = WASM_VECTOR_LEN;
|
|
494
|
-
const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
495
|
-
return ret;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* @param {string} credential
|
|
500
|
-
* @param {string} linked_data_proof_options
|
|
501
|
-
* @param {string} public_key
|
|
502
|
-
* @returns {Promise<any>}
|
|
503
|
-
*/
|
|
504
|
-
export function prepareIssueCredential(credential, linked_data_proof_options, public_key) {
|
|
505
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
506
|
-
const len0 = WASM_VECTOR_LEN;
|
|
507
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
508
|
-
const len1 = WASM_VECTOR_LEN;
|
|
509
|
-
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
510
|
-
const len2 = WASM_VECTOR_LEN;
|
|
511
|
-
const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
512
|
-
return ret;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* @param {string} credential
|
|
517
|
-
* @param {string} preparation
|
|
518
|
-
* @param {string} signature
|
|
519
|
-
* @returns {Promise<any>}
|
|
520
|
-
*/
|
|
521
|
-
export function completeIssueCredential(credential, preparation, signature) {
|
|
522
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
523
|
-
const len0 = WASM_VECTOR_LEN;
|
|
524
|
-
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
-
const len1 = WASM_VECTOR_LEN;
|
|
526
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
527
|
-
const len2 = WASM_VECTOR_LEN;
|
|
528
|
-
const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
529
|
-
return ret;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* @param {string} vc
|
|
534
|
-
* @param {string} proof_options
|
|
535
|
-
* @param {string} context_map
|
|
536
|
-
* @returns {Promise<any>}
|
|
537
|
-
*/
|
|
538
|
-
export function verifyCredential(vc, proof_options, context_map) {
|
|
539
|
-
const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
540
|
-
const len0 = WASM_VECTOR_LEN;
|
|
541
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
-
const len1 = WASM_VECTOR_LEN;
|
|
543
|
-
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
544
|
-
const len2 = WASM_VECTOR_LEN;
|
|
545
|
-
const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
546
|
-
return ret;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @param {string} presentation
|
|
551
|
-
* @param {string} proof_options
|
|
552
|
-
* @param {string} key
|
|
553
|
-
* @param {string} context_map
|
|
523
|
+
* @param {string} jwe
|
|
524
|
+
* @param {string[]} jwks
|
|
554
525
|
* @returns {Promise<any>}
|
|
555
526
|
*/
|
|
556
|
-
export function
|
|
557
|
-
const ptr0 = passStringToWasm0(
|
|
527
|
+
export function decryptDagJwe(jwe, jwks) {
|
|
528
|
+
const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
558
529
|
const len0 = WASM_VECTOR_LEN;
|
|
559
|
-
const ptr1 =
|
|
530
|
+
const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
|
|
560
531
|
const len1 = WASM_VECTOR_LEN;
|
|
561
|
-
const
|
|
562
|
-
const len2 = WASM_VECTOR_LEN;
|
|
563
|
-
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
564
|
-
const len3 = WASM_VECTOR_LEN;
|
|
565
|
-
const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
532
|
+
const ret = wasm.decryptDagJwe(ptr0, len0, ptr1, len1);
|
|
566
533
|
return ret;
|
|
567
534
|
}
|
|
568
535
|
|
|
569
536
|
/**
|
|
570
|
-
* @param {string}
|
|
537
|
+
* @param {string} capability
|
|
571
538
|
* @param {string} linked_data_proof_options
|
|
572
|
-
* @param {string}
|
|
539
|
+
* @param {string} parents
|
|
540
|
+
* @param {string} key
|
|
573
541
|
* @returns {Promise<any>}
|
|
574
542
|
*/
|
|
575
|
-
export function
|
|
576
|
-
const ptr0 = passStringToWasm0(
|
|
543
|
+
export function delegateCapability(capability, linked_data_proof_options, parents, key) {
|
|
544
|
+
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
577
545
|
const len0 = WASM_VECTOR_LEN;
|
|
578
546
|
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
579
547
|
const len1 = WASM_VECTOR_LEN;
|
|
580
|
-
const ptr2 = passStringToWasm0(
|
|
548
|
+
const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
581
549
|
const len2 = WASM_VECTOR_LEN;
|
|
582
|
-
const
|
|
550
|
+
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
551
|
+
const len3 = WASM_VECTOR_LEN;
|
|
552
|
+
const ret = wasm.delegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
583
553
|
return ret;
|
|
584
554
|
}
|
|
585
555
|
|
|
586
556
|
/**
|
|
587
|
-
* @param {string}
|
|
588
|
-
* @param {string}
|
|
589
|
-
* @
|
|
557
|
+
* @param {string} method_pattern
|
|
558
|
+
* @param {string} jwk
|
|
559
|
+
* @returns {string}
|
|
560
|
+
*/
|
|
561
|
+
export function keyToDID(method_pattern, jwk) {
|
|
562
|
+
let deferred4_0;
|
|
563
|
+
let deferred4_1;
|
|
564
|
+
try {
|
|
565
|
+
const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
566
|
+
const len0 = WASM_VECTOR_LEN;
|
|
567
|
+
const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
568
|
+
const len1 = WASM_VECTOR_LEN;
|
|
569
|
+
const ret = wasm.keyToDID(ptr0, len0, ptr1, len1);
|
|
570
|
+
var ptr3 = ret[0];
|
|
571
|
+
var len3 = ret[1];
|
|
572
|
+
if (ret[3]) {
|
|
573
|
+
ptr3 = 0; len3 = 0;
|
|
574
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
575
|
+
}
|
|
576
|
+
deferred4_0 = ptr3;
|
|
577
|
+
deferred4_1 = len3;
|
|
578
|
+
return getStringFromWasm0(ptr3, len3);
|
|
579
|
+
} finally {
|
|
580
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* @param {any} cleartext
|
|
586
|
+
* @param {string[]} recipients
|
|
590
587
|
* @returns {Promise<any>}
|
|
591
588
|
*/
|
|
592
|
-
export function
|
|
593
|
-
const ptr0 =
|
|
589
|
+
export function createDagJwe(cleartext, recipients) {
|
|
590
|
+
const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
|
|
594
591
|
const len0 = WASM_VECTOR_LEN;
|
|
595
|
-
const
|
|
596
|
-
const len1 = WASM_VECTOR_LEN;
|
|
597
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
598
|
-
const len2 = WASM_VECTOR_LEN;
|
|
599
|
-
const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
592
|
+
const ret = wasm.createDagJwe(cleartext, ptr0, len0);
|
|
600
593
|
return ret;
|
|
601
594
|
}
|
|
602
595
|
|
|
603
596
|
/**
|
|
604
|
-
* @param {string}
|
|
605
|
-
* @param {string}
|
|
606
|
-
* @param {string}
|
|
597
|
+
* @param {string} invocation
|
|
598
|
+
* @param {string} target_id
|
|
599
|
+
* @param {string} linked_data_proof_options
|
|
600
|
+
* @param {string} key
|
|
607
601
|
* @returns {Promise<any>}
|
|
608
602
|
*/
|
|
609
|
-
export function
|
|
610
|
-
const ptr0 = passStringToWasm0(
|
|
603
|
+
export function invokeCapability(invocation, target_id, linked_data_proof_options, key) {
|
|
604
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
611
605
|
const len0 = WASM_VECTOR_LEN;
|
|
612
|
-
const ptr1 = passStringToWasm0(
|
|
606
|
+
const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
613
607
|
const len1 = WASM_VECTOR_LEN;
|
|
614
|
-
const ptr2 = passStringToWasm0(
|
|
608
|
+
const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
615
609
|
const len2 = WASM_VECTOR_LEN;
|
|
616
|
-
const
|
|
610
|
+
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
611
|
+
const len3 = WASM_VECTOR_LEN;
|
|
612
|
+
const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
617
613
|
return ret;
|
|
618
614
|
}
|
|
619
615
|
|
|
620
616
|
/**
|
|
621
|
-
* @param {string}
|
|
617
|
+
* @param {string} credential
|
|
622
618
|
* @param {string} linked_data_proof_options
|
|
623
|
-
* @param {string}
|
|
624
|
-
* @param {string} context_map
|
|
619
|
+
* @param {string} public_key
|
|
625
620
|
* @returns {Promise<any>}
|
|
626
621
|
*/
|
|
627
|
-
export function
|
|
628
|
-
const ptr0 = passStringToWasm0(
|
|
622
|
+
export function prepareIssueCredential(credential, linked_data_proof_options, public_key) {
|
|
623
|
+
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
624
|
const len0 = WASM_VECTOR_LEN;
|
|
630
625
|
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
631
626
|
const len1 = WASM_VECTOR_LEN;
|
|
632
|
-
const ptr2 = passStringToWasm0(
|
|
627
|
+
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
633
628
|
const len2 = WASM_VECTOR_LEN;
|
|
634
|
-
const
|
|
635
|
-
const len3 = WASM_VECTOR_LEN;
|
|
636
|
-
const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
629
|
+
const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
637
630
|
return ret;
|
|
638
631
|
}
|
|
639
632
|
|
|
@@ -649,90 +642,111 @@ export function JWKFromTezos(tz) {
|
|
|
649
642
|
}
|
|
650
643
|
|
|
651
644
|
/**
|
|
652
|
-
* @param {
|
|
653
|
-
* @
|
|
654
|
-
|
|
645
|
+
* @param {Uint8Array} bytes
|
|
646
|
+
* @returns {string}
|
|
647
|
+
*/
|
|
648
|
+
export function generateSecp256k1KeyFromBytes(bytes) {
|
|
649
|
+
let deferred3_0;
|
|
650
|
+
let deferred3_1;
|
|
651
|
+
try {
|
|
652
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
653
|
+
const len0 = WASM_VECTOR_LEN;
|
|
654
|
+
const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
|
|
655
|
+
var ptr2 = ret[0];
|
|
656
|
+
var len2 = ret[1];
|
|
657
|
+
if (ret[3]) {
|
|
658
|
+
ptr2 = 0; len2 = 0;
|
|
659
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
660
|
+
}
|
|
661
|
+
deferred3_0 = ptr2;
|
|
662
|
+
deferred3_1 = len2;
|
|
663
|
+
return getStringFromWasm0(ptr2, len2);
|
|
664
|
+
} finally {
|
|
665
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* @param {string} presentation
|
|
671
|
+
* @param {string} proof_options
|
|
655
672
|
* @param {string} key
|
|
673
|
+
* @param {string} context_map
|
|
656
674
|
* @returns {Promise<any>}
|
|
657
675
|
*/
|
|
658
|
-
export function
|
|
659
|
-
const ptr0 = passStringToWasm0(
|
|
676
|
+
export function issuePresentation(presentation, proof_options, key, context_map) {
|
|
677
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
660
678
|
const len0 = WASM_VECTOR_LEN;
|
|
661
|
-
const ptr1 = passStringToWasm0(
|
|
679
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
662
680
|
const len1 = WASM_VECTOR_LEN;
|
|
663
|
-
const ptr2 = passStringToWasm0(
|
|
681
|
+
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
664
682
|
const len2 = WASM_VECTOR_LEN;
|
|
665
|
-
const ptr3 = passStringToWasm0(
|
|
683
|
+
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
666
684
|
const len3 = WASM_VECTOR_LEN;
|
|
667
|
-
const ret = wasm.
|
|
685
|
+
const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
668
686
|
return ret;
|
|
669
687
|
}
|
|
670
688
|
|
|
671
689
|
/**
|
|
672
|
-
* @param {string}
|
|
690
|
+
* @param {string} presentation
|
|
673
691
|
* @param {string} linked_data_proof_options
|
|
674
|
-
* @param {string} parents
|
|
675
692
|
* @param {string} public_key
|
|
676
693
|
* @returns {Promise<any>}
|
|
677
694
|
*/
|
|
678
|
-
export function
|
|
679
|
-
const ptr0 = passStringToWasm0(
|
|
695
|
+
export function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {
|
|
696
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
680
697
|
const len0 = WASM_VECTOR_LEN;
|
|
681
698
|
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
682
699
|
const len1 = WASM_VECTOR_LEN;
|
|
683
|
-
const ptr2 = passStringToWasm0(
|
|
700
|
+
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
684
701
|
const len2 = WASM_VECTOR_LEN;
|
|
685
|
-
const
|
|
686
|
-
const len3 = WASM_VECTOR_LEN;
|
|
687
|
-
const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
702
|
+
const ret = wasm.prepareIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
688
703
|
return ret;
|
|
689
704
|
}
|
|
690
705
|
|
|
691
706
|
/**
|
|
692
|
-
* @param {string}
|
|
707
|
+
* @param {string} credential
|
|
693
708
|
* @param {string} preparation
|
|
694
709
|
* @param {string} signature
|
|
695
710
|
* @returns {Promise<any>}
|
|
696
711
|
*/
|
|
697
|
-
export function
|
|
698
|
-
const ptr0 = passStringToWasm0(
|
|
712
|
+
export function completeIssueCredential(credential, preparation, signature) {
|
|
713
|
+
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
714
|
const len0 = WASM_VECTOR_LEN;
|
|
700
715
|
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
716
|
const len1 = WASM_VECTOR_LEN;
|
|
702
717
|
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
703
718
|
const len2 = WASM_VECTOR_LEN;
|
|
704
|
-
const ret = wasm.
|
|
719
|
+
const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
705
720
|
return ret;
|
|
706
721
|
}
|
|
707
722
|
|
|
708
723
|
/**
|
|
709
|
-
* @
|
|
710
|
-
* @returns {Promise<any>}
|
|
724
|
+
* @returns {string}
|
|
711
725
|
*/
|
|
712
|
-
export function
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
726
|
+
export function getVersion() {
|
|
727
|
+
let deferred1_0;
|
|
728
|
+
let deferred1_1;
|
|
729
|
+
try {
|
|
730
|
+
const ret = wasm.getVersion();
|
|
731
|
+
deferred1_0 = ret[0];
|
|
732
|
+
deferred1_1 = ret[1];
|
|
733
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
734
|
+
} finally {
|
|
735
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
736
|
+
}
|
|
717
737
|
}
|
|
718
738
|
|
|
719
739
|
/**
|
|
720
|
-
* @param {string}
|
|
721
|
-
* @param {string}
|
|
722
|
-
* @param {string} linked_data_proof_options
|
|
723
|
-
* @param {string} key
|
|
740
|
+
* @param {string} did
|
|
741
|
+
* @param {string} input_metadata
|
|
724
742
|
* @returns {Promise<any>}
|
|
725
743
|
*/
|
|
726
|
-
export function
|
|
727
|
-
const ptr0 = passStringToWasm0(
|
|
744
|
+
export function resolveDID(did, input_metadata) {
|
|
745
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
746
|
const len0 = WASM_VECTOR_LEN;
|
|
729
|
-
const ptr1 = passStringToWasm0(
|
|
747
|
+
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
730
748
|
const len1 = WASM_VECTOR_LEN;
|
|
731
|
-
const
|
|
732
|
-
const len2 = WASM_VECTOR_LEN;
|
|
733
|
-
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
734
|
-
const len3 = WASM_VECTOR_LEN;
|
|
735
|
-
const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
749
|
+
const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
|
|
736
750
|
return ret;
|
|
737
751
|
}
|
|
738
752
|
|
|
@@ -757,64 +771,50 @@ export function prepareInvokeCapability(invocation, target_id, linked_data_proof
|
|
|
757
771
|
}
|
|
758
772
|
|
|
759
773
|
/**
|
|
760
|
-
* @param {string}
|
|
761
|
-
* @param {string}
|
|
762
|
-
* @param {string} signature
|
|
774
|
+
* @param {string} jwe
|
|
775
|
+
* @param {string[]} jwks
|
|
763
776
|
* @returns {Promise<any>}
|
|
764
777
|
*/
|
|
765
|
-
export function
|
|
766
|
-
const ptr0 = passStringToWasm0(
|
|
778
|
+
export function decryptJwe(jwe, jwks) {
|
|
779
|
+
const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
767
780
|
const len0 = WASM_VECTOR_LEN;
|
|
768
|
-
const ptr1 =
|
|
781
|
+
const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
|
|
769
782
|
const len1 = WASM_VECTOR_LEN;
|
|
770
|
-
const
|
|
771
|
-
const len2 = WASM_VECTOR_LEN;
|
|
772
|
-
const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
773
|
-
return ret;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* @param {string} invocation
|
|
778
|
-
* @returns {Promise<any>}
|
|
779
|
-
*/
|
|
780
|
-
export function verifyInvocationSignature(invocation) {
|
|
781
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
782
|
-
const len0 = WASM_VECTOR_LEN;
|
|
783
|
-
const ret = wasm.verifyInvocationSignature(ptr0, len0);
|
|
783
|
+
const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
|
|
784
784
|
return ret;
|
|
785
785
|
}
|
|
786
786
|
|
|
787
787
|
/**
|
|
788
|
-
* @param {string}
|
|
789
|
-
* @param {string}
|
|
788
|
+
* @param {string} vc
|
|
789
|
+
* @param {string} proof_options
|
|
790
|
+
* @param {string} context_map
|
|
790
791
|
* @returns {Promise<any>}
|
|
791
792
|
*/
|
|
792
|
-
export function
|
|
793
|
-
const ptr0 = passStringToWasm0(
|
|
793
|
+
export function verifyCredential(vc, proof_options, context_map) {
|
|
794
|
+
const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
794
795
|
const len0 = WASM_VECTOR_LEN;
|
|
795
|
-
const ptr1 = passStringToWasm0(
|
|
796
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
796
797
|
const len1 = WASM_VECTOR_LEN;
|
|
797
|
-
const
|
|
798
|
+
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
799
|
+
const len2 = WASM_VECTOR_LEN;
|
|
800
|
+
const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
798
801
|
return ret;
|
|
799
802
|
}
|
|
800
803
|
|
|
801
804
|
/**
|
|
802
|
-
* @param {string} url
|
|
803
805
|
* @returns {Promise<any>}
|
|
804
806
|
*/
|
|
805
|
-
export function
|
|
806
|
-
const
|
|
807
|
-
const len0 = WASM_VECTOR_LEN;
|
|
808
|
-
const ret = wasm.contextLoader(ptr0, len0);
|
|
807
|
+
export function clearCache() {
|
|
808
|
+
const ret = wasm.clearCache();
|
|
809
809
|
return ret;
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
813
|
-
wasm.
|
|
813
|
+
wasm.closure4007_externref_shim(arg0, arg1, arg2);
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
function
|
|
817
|
-
wasm.
|
|
816
|
+
function __wbg_adapter_200(arg0, arg1, arg2, arg3) {
|
|
817
|
+
wasm.closure4398_externref_shim(arg0, arg1, arg2, arg3);
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
@@ -888,7 +888,7 @@ function __wbg_get_imports() {
|
|
|
888
888
|
const ret = arg0.crypto;
|
|
889
889
|
return ret;
|
|
890
890
|
};
|
|
891
|
-
imports.wbg.
|
|
891
|
+
imports.wbg.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
|
|
892
892
|
const ret = arg0.crypto;
|
|
893
893
|
return ret;
|
|
894
894
|
};
|
|
@@ -915,14 +915,11 @@ function __wbg_get_imports() {
|
|
|
915
915
|
imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
|
|
916
916
|
arg0.getRandomValues(arg1);
|
|
917
917
|
};
|
|
918
|
-
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
919
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
920
|
-
}, arguments) };
|
|
921
918
|
imports.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {
|
|
922
919
|
const ret = arg0.getRandomValues;
|
|
923
920
|
return ret;
|
|
924
921
|
};
|
|
925
|
-
imports.wbg.
|
|
922
|
+
imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
|
|
926
923
|
arg0.getRandomValues(arg1);
|
|
927
924
|
}, arguments) };
|
|
928
925
|
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
@@ -1009,7 +1006,7 @@ function __wbg_get_imports() {
|
|
|
1009
1006
|
const ret = arg0.length;
|
|
1010
1007
|
return ret;
|
|
1011
1008
|
};
|
|
1012
|
-
imports.wbg.
|
|
1009
|
+
imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
|
|
1013
1010
|
const ret = arg0.msCrypto;
|
|
1014
1011
|
return ret;
|
|
1015
1012
|
};
|
|
@@ -1032,7 +1029,7 @@ function __wbg_get_imports() {
|
|
|
1032
1029
|
const a = state0.a;
|
|
1033
1030
|
state0.a = 0;
|
|
1034
1031
|
try {
|
|
1035
|
-
return
|
|
1032
|
+
return __wbg_adapter_200(a, state0.b, arg0, arg1);
|
|
1036
1033
|
} finally {
|
|
1037
1034
|
state0.a = a;
|
|
1038
1035
|
}
|
|
@@ -1087,7 +1084,7 @@ function __wbg_get_imports() {
|
|
|
1087
1084
|
const ret = arg0.next();
|
|
1088
1085
|
return ret;
|
|
1089
1086
|
}, arguments) };
|
|
1090
|
-
imports.wbg.
|
|
1087
|
+
imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) {
|
|
1091
1088
|
const ret = arg0.node;
|
|
1092
1089
|
return ret;
|
|
1093
1090
|
};
|
|
@@ -1095,7 +1092,7 @@ function __wbg_get_imports() {
|
|
|
1095
1092
|
const ret = arg0.now();
|
|
1096
1093
|
return ret;
|
|
1097
1094
|
};
|
|
1098
|
-
imports.wbg.
|
|
1095
|
+
imports.wbg.__wbg_process_5c1d670bc53614b8 = function(arg0) {
|
|
1099
1096
|
const ret = arg0.process;
|
|
1100
1097
|
return ret;
|
|
1101
1098
|
};
|
|
@@ -1113,14 +1110,14 @@ function __wbg_get_imports() {
|
|
|
1113
1110
|
imports.wbg.__wbg_randomFillSync_994ac6d9ade7a695 = function(arg0, arg1, arg2) {
|
|
1114
1111
|
arg0.randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
1115
1112
|
};
|
|
1116
|
-
imports.wbg.
|
|
1113
|
+
imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) {
|
|
1117
1114
|
arg0.randomFillSync(arg1);
|
|
1118
1115
|
}, arguments) };
|
|
1119
1116
|
imports.wbg.__wbg_require_0d6aeaec3c042c88 = function(arg0, arg1, arg2) {
|
|
1120
1117
|
const ret = arg0.require(getStringFromWasm0(arg1, arg2));
|
|
1121
1118
|
return ret;
|
|
1122
1119
|
};
|
|
1123
|
-
imports.wbg.
|
|
1120
|
+
imports.wbg.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {
|
|
1124
1121
|
const ret = module.require;
|
|
1125
1122
|
return ret;
|
|
1126
1123
|
}, arguments) };
|
|
@@ -1222,7 +1219,7 @@ function __wbg_get_imports() {
|
|
|
1222
1219
|
const ret = arg0.value;
|
|
1223
1220
|
return ret;
|
|
1224
1221
|
};
|
|
1225
|
-
imports.wbg.
|
|
1222
|
+
imports.wbg.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {
|
|
1226
1223
|
const ret = arg0.versions;
|
|
1227
1224
|
return ret;
|
|
1228
1225
|
};
|
|
@@ -1258,8 +1255,8 @@ function __wbg_get_imports() {
|
|
|
1258
1255
|
const ret = false;
|
|
1259
1256
|
return ret;
|
|
1260
1257
|
};
|
|
1261
|
-
imports.wbg.
|
|
1262
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1258
|
+
imports.wbg.__wbindgen_closure_wrapper12039 = function(arg0, arg1, arg2) {
|
|
1259
|
+
const ret = makeMutClosure(arg0, arg1, 4008, __wbg_adapter_54);
|
|
1263
1260
|
return ret;
|
|
1264
1261
|
};
|
|
1265
1262
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|