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