@docknetwork/wallet-sdk-web 0.0.10 → 1.7.6

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.
@@ -4800,13 +4800,13 @@ const SUBSTRATE_NETWORKS = {
4800
4800
  name: 'Cheqd Mainnet',
4801
4801
  substrateUrl: null,
4802
4802
  addressPrefix: 22,
4803
- cheqdApiUrl: 'https://mainnet.cheqd.docknode.io'
4803
+ cheqdApiUrl: ['https://mainnet.cheqd.docknode.io', 'https://rpc.cheqd.net']
4804
4804
  },
4805
4805
  testnet: {
4806
4806
  name: 'Cheqd Testnet',
4807
4807
  substrateUrl: null,
4808
4808
  addressPrefix: 21,
4809
- cheqdApiUrl: 'https://testnet.cheqd.docknode.io'
4809
+ cheqdApiUrl: ['https://testnet.cheqd.docknode.io', 'https://api.cheqd.network']
4810
4810
  }};
4811
4811
 
4812
4812
  const genericDocumentNetworkResolver = async _ref => {
@@ -83796,20 +83796,20 @@ var webcrypto_es = /*#__PURE__*/Object.freeze({
83796
83796
  CryptoKey: CryptoKey$1
83797
83797
  });
83798
83798
 
83799
- var crypto_1$1;
83800
- var hasRequiredCrypto$2;
83799
+ var crypto_1;
83800
+ var hasRequiredCrypto$1;
83801
83801
 
83802
- function requireCrypto$2 () {
83803
- if (hasRequiredCrypto$2) return crypto_1$1;
83804
- hasRequiredCrypto$2 = 1;
83802
+ function requireCrypto$1 () {
83803
+ if (hasRequiredCrypto$1) return crypto_1;
83804
+ hasRequiredCrypto$1 = 1;
83805
83805
 
83806
83806
  var webcrypto = webcrypto_es;
83807
83807
  var crypto = new webcrypto.Crypto();
83808
- crypto_1$1 = crypto;
83809
- return crypto_1$1;
83808
+ crypto_1 = crypto;
83809
+ return crypto_1;
83810
83810
  }
83811
83811
 
83812
- var cryptoExports = requireCrypto$2();
83812
+ var cryptoExports = requireCrypto$1();
83813
83813
  var crypto$7 = /*@__PURE__*/getDefaultExportFromCjs(cryptoExports);
83814
83814
 
83815
83815
  let HMAC$1 = class HMAC {
@@ -97035,7 +97035,7 @@ function requireDock_crypto_wasm () {
97035
97035
  return ret;
97036
97036
  }
97037
97037
 
97038
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
97038
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } });
97039
97039
 
97040
97040
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
97041
97041
  let cachedUint8Memory0 = null;
@@ -97063,20 +97063,20 @@ function requireDock_crypto_wasm () {
97063
97063
 
97064
97064
  let WASM_VECTOR_LEN = 0;
97065
97065
 
97066
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
97066
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } });
97067
97067
 
97068
97068
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
97069
97069
  ? function (arg, view) {
97070
- return cachedTextEncoder.encodeInto(arg, view);
97071
- }
97070
+ return cachedTextEncoder.encodeInto(arg, view);
97071
+ }
97072
97072
  : function (arg, view) {
97073
- const buf = cachedTextEncoder.encode(arg);
97074
- view.set(buf);
97075
- return {
97076
- read: arg.length,
97077
- written: buf.length
97078
- };
97079
- });
97073
+ const buf = cachedTextEncoder.encode(arg);
97074
+ view.set(buf);
97075
+ return {
97076
+ read: arg.length,
97077
+ written: buf.length
97078
+ };
97079
+ });
97080
97080
 
97081
97081
  function passStringToWasm0(arg, malloc, realloc) {
97082
97082
 
@@ -97151,7 +97151,7 @@ function requireDock_crypto_wasm () {
97151
97151
  // primitive types
97152
97152
  const type = typeof val;
97153
97153
  if (type == 'number' || type == 'boolean' || val == null) {
97154
- return `${val}`;
97154
+ return `${val}`;
97155
97155
  }
97156
97156
  if (type == 'string') {
97157
97157
  return `"${val}"`;
@@ -97179,7 +97179,7 @@ function requireDock_crypto_wasm () {
97179
97179
  if (length > 0) {
97180
97180
  debug += debugString(val[0]);
97181
97181
  }
97182
- for(let i = 1; i < length; i++) {
97182
+ for (let i = 1; i < length; i++) {
97183
97183
  debug += ', ' + debugString(val[i]);
97184
97184
  }
97185
97185
  debug += ']';
@@ -106295,122 +106295,128 @@ function requireDock_crypto_wasm () {
106295
106295
  function __wbg_get_imports() {
106296
106296
  const imports = {};
106297
106297
  imports.wbg = {};
106298
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
106298
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
106299
106299
  takeObject(arg0);
106300
106300
  };
106301
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
106301
+ imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
106302
106302
  const ret = getStringFromWasm0(arg0, arg1);
106303
106303
  return addHeapObject(ret);
106304
106304
  };
106305
- imports.wbg.__wbindgen_is_string = function(arg0) {
106306
- const ret = typeof(getObject(arg0)) === 'string';
106305
+ imports.wbg.__wbindgen_is_string = function (arg0) {
106306
+ const ret = typeof (getObject(arg0)) === 'string';
106307
106307
  return ret;
106308
106308
  };
106309
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
106309
+ imports.wbg.__wbindgen_is_undefined = function (arg0) {
106310
106310
  const ret = getObject(arg0) === undefined;
106311
106311
  return ret;
106312
106312
  };
106313
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
106313
+ imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
106314
106314
  const ret = getObject(arg0);
106315
106315
  return addHeapObject(ret);
106316
106316
  };
106317
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
106317
+ imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
106318
106318
  const obj = getObject(arg1);
106319
- const ret = typeof(obj) === 'string' ? obj : undefined;
106319
+ const ret = typeof (obj) === 'string' ? obj : undefined;
106320
106320
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
106321
106321
  var len1 = WASM_VECTOR_LEN;
106322
106322
  getInt32Memory0()[arg0 / 4 + 1] = len1;
106323
106323
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
106324
106324
  };
106325
- imports.wbg.__wbindgen_as_number = function(arg0) {
106325
+ imports.wbg.__wbindgen_as_number = function (arg0) {
106326
106326
  const ret = +getObject(arg0);
106327
106327
  return ret;
106328
106328
  };
106329
- imports.wbg.__wbindgen_number_new = function(arg0) {
106329
+ imports.wbg.__wbindgen_number_new = function (arg0) {
106330
106330
  const ret = arg0;
106331
106331
  return addHeapObject(ret);
106332
106332
  };
106333
- imports.wbg.__wbindgen_is_object = function(arg0) {
106333
+ imports.wbg.__wbindgen_is_object = function (arg0) {
106334
106334
  const val = getObject(arg0);
106335
- const ret = typeof(val) === 'object' && val !== null;
106335
+ const ret = typeof (val) === 'object' && val !== null;
106336
106336
  return ret;
106337
106337
  };
106338
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
106338
+ imports.wbg.__wbindgen_in = function (arg0, arg1) {
106339
106339
  const ret = getObject(arg0) in getObject(arg1);
106340
106340
  return ret;
106341
106341
  };
106342
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
106342
+ imports.wbg.__wbindgen_error_new = function (arg0, arg1) {
106343
106343
  const ret = new Error(getStringFromWasm0(arg0, arg1));
106344
106344
  return addHeapObject(ret);
106345
106345
  };
106346
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
106347
- const ret = typeof(getObject(arg0)) === 'bigint';
106346
+ imports.wbg.__wbindgen_is_bigint = function (arg0) {
106347
+ const ret = typeof (getObject(arg0)) === 'bigint';
106348
106348
  return ret;
106349
106349
  };
106350
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
106350
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
106351
106351
  const ret = BigInt.asUintN(64, arg0);
106352
106352
  return addHeapObject(ret);
106353
106353
  };
106354
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
106354
+ imports.wbg.__wbindgen_jsval_eq = function (arg0, arg1) {
106355
106355
  const ret = getObject(arg0) === getObject(arg1);
106356
106356
  return ret;
106357
106357
  };
106358
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
106358
+ imports.wbg.__wbindgen_number_get = function (arg0, arg1) {
106359
106359
  const obj = getObject(arg1);
106360
- const ret = typeof(obj) === 'number' ? obj : undefined;
106360
+ const ret = typeof (obj) === 'number' ? obj : undefined;
106361
106361
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
106362
106362
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
106363
106363
  };
106364
- imports.wbg.__wbindgen_ge = function(arg0, arg1) {
106364
+ imports.wbg.__wbindgen_ge = function (arg0, arg1) {
106365
106365
  const ret = getObject(arg0) >= getObject(arg1);
106366
106366
  return ret;
106367
106367
  };
106368
- imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function(arg0) {
106368
+ imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function (arg0) {
106369
106369
  const ret = getObject(arg0).crypto;
106370
106370
  return addHeapObject(ret);
106371
106371
  };
106372
- imports.wbg.__wbg_process_b02b3570280d0366 = function(arg0) {
106372
+ imports.wbg.__wbg_process_b02b3570280d0366 = function (arg0) {
106373
106373
  const ret = getObject(arg0).process;
106374
106374
  return addHeapObject(ret);
106375
106375
  };
106376
- imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function(arg0) {
106376
+ imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function (arg0) {
106377
106377
  const ret = getObject(arg0).versions;
106378
106378
  return addHeapObject(ret);
106379
106379
  };
106380
- imports.wbg.__wbg_node_43b1089f407e4ec2 = function(arg0) {
106380
+ imports.wbg.__wbg_node_43b1089f407e4ec2 = function (arg0) {
106381
106381
  const ret = getObject(arg0).node;
106382
106382
  return addHeapObject(ret);
106383
106383
  };
106384
- imports.wbg.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () {
106385
- const ret = commonjsRequire;
106386
- return addHeapObject(ret);
106387
- }, arguments) };
106388
- imports.wbg.__wbindgen_is_function = function(arg0) {
106389
- const ret = typeof(getObject(arg0)) === 'function';
106384
+ imports.wbg.__wbg_require_9a7e0f667ead4995 = function () {
106385
+ return handleError(function () {
106386
+ const ret = commonjsRequire;
106387
+ return addHeapObject(ret);
106388
+ }, arguments)
106389
+ };
106390
+ imports.wbg.__wbindgen_is_function = function (arg0) {
106391
+ const ret = typeof (getObject(arg0)) === 'function';
106390
106392
  return ret;
106391
106393
  };
106392
- imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) {
106394
+ imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function (arg0) {
106393
106395
  const ret = getObject(arg0).msCrypto;
106394
106396
  return addHeapObject(ret);
106395
106397
  };
106396
- imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) {
106397
- getObject(arg0).randomFillSync(takeObject(arg1));
106398
- }, arguments) };
106399
- imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) {
106400
- getObject(arg0).getRandomValues(getObject(arg1));
106401
- }, arguments) };
106402
- imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
106398
+ imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function () {
106399
+ return handleError(function (arg0, arg1) {
106400
+ getObject(arg0).randomFillSync(takeObject(arg1));
106401
+ }, arguments)
106402
+ };
106403
+ imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function () {
106404
+ return handleError(function (arg0, arg1) {
106405
+ getObject(arg0).getRandomValues(getObject(arg1));
106406
+ }, arguments)
106407
+ };
106408
+ imports.wbg.__wbg_new_abda76e883ba8a5f = function () {
106403
106409
  const ret = new Error();
106404
106410
  return addHeapObject(ret);
106405
106411
  };
106406
- imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
106412
+ imports.wbg.__wbg_stack_658279fe44541cf6 = function (arg0, arg1) {
106407
106413
  const ret = getObject(arg1).stack;
106408
106414
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
106409
106415
  const len1 = WASM_VECTOR_LEN;
106410
106416
  getInt32Memory0()[arg0 / 4 + 1] = len1;
106411
106417
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
106412
106418
  };
106413
- imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
106419
+ imports.wbg.__wbg_error_f851667af71bcfc6 = function (arg0, arg1) {
106414
106420
  let deferred0_0;
106415
106421
  let deferred0_1;
106416
106422
  try {
@@ -106421,19 +106427,19 @@ function requireDock_crypto_wasm () {
106421
106427
  wasm.__wbindgen_free(deferred0_0, deferred0_1);
106422
106428
  }
106423
106429
  };
106424
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
106430
+ imports.wbg.__wbindgen_bigint_from_i64 = function (arg0) {
106425
106431
  const ret = arg0;
106426
106432
  return addHeapObject(ret);
106427
106433
  };
106428
- imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
106434
+ imports.wbg.__wbindgen_bigint_from_u128 = function (arg0, arg1) {
106429
106435
  const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
106430
106436
  return addHeapObject(ret);
106431
106437
  };
106432
- imports.wbg.__wbindgen_shr = function(arg0, arg1) {
106438
+ imports.wbg.__wbindgen_shr = function (arg0, arg1) {
106433
106439
  const ret = getObject(arg0) >> getObject(arg1);
106434
106440
  return addHeapObject(ret);
106435
106441
  };
106436
- imports.wbg.__wbg_instanceof_Global_68951a6a6244ac6e = function(arg0) {
106442
+ imports.wbg.__wbg_instanceof_Global_68951a6a6244ac6e = function (arg0) {
106437
106443
  let result;
106438
106444
  try {
106439
106445
  result = getObject(arg0) instanceof WebAssembly.Global;
@@ -106443,122 +106449,136 @@ function requireDock_crypto_wasm () {
106443
106449
  const ret = result;
106444
106450
  return ret;
106445
106451
  };
106446
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
106452
+ imports.wbg.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
106447
106453
  const ret = getObject(arg0) == getObject(arg1);
106448
106454
  return ret;
106449
106455
  };
106450
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
106456
+ imports.wbg.__wbindgen_boolean_get = function (arg0) {
106451
106457
  const v = getObject(arg0);
106452
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
106458
+ const ret = typeof (v) === 'boolean' ? (v ? 1 : 0) : 2;
106453
106459
  return ret;
106454
106460
  };
106455
- imports.wbg.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
106461
+ imports.wbg.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function () {
106456
106462
  const ret = Symbol;
106457
106463
  return addHeapObject(ret);
106458
106464
  };
106459
- imports.wbg.__wbindgen_is_symbol = function(arg0) {
106460
- const ret = typeof(getObject(arg0)) === 'symbol';
106465
+ imports.wbg.__wbindgen_is_symbol = function (arg0) {
106466
+ const ret = typeof (getObject(arg0)) === 'symbol';
106461
106467
  return ret;
106462
106468
  };
106463
- imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
106469
+ imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function (arg0, arg1) {
106464
106470
  const ret = getObject(arg0)[getObject(arg1)];
106465
106471
  return addHeapObject(ret);
106466
106472
  };
106467
- imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
106473
+ imports.wbg.__wbg_set_f975102236d3c502 = function (arg0, arg1, arg2) {
106468
106474
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
106469
106475
  };
106470
- imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
106476
+ imports.wbg.__wbg_get_7303ed2ef026b2f5 = function (arg0, arg1) {
106471
106477
  const ret = getObject(arg0)[arg1 >>> 0];
106472
106478
  return addHeapObject(ret);
106473
106479
  };
106474
- imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) {
106480
+ imports.wbg.__wbg_length_820c786973abdd8a = function (arg0) {
106475
106481
  const ret = getObject(arg0).length;
106476
106482
  return ret;
106477
106483
  };
106478
- imports.wbg.__wbg_new_0394642eae39db16 = function() {
106484
+ imports.wbg.__wbg_new_0394642eae39db16 = function () {
106479
106485
  const ret = new Array();
106480
106486
  return addHeapObject(ret);
106481
106487
  };
106482
- imports.wbg.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
106488
+ imports.wbg.__wbg_BigInt_9523742cb675bb6f = function (arg0) {
106483
106489
  const ret = BigInt(getObject(arg0));
106484
106490
  return addHeapObject(ret);
106485
106491
  };
106486
- imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
106492
+ imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function (arg0, arg1) {
106487
106493
  const ret = new Function(getStringFromWasm0(arg0, arg1));
106488
106494
  return addHeapObject(ret);
106489
106495
  };
106490
- imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function() {
106496
+ imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function () {
106491
106497
  const ret = new Map();
106492
106498
  return addHeapObject(ret);
106493
106499
  };
106494
- imports.wbg.__wbg_next_f4bc0e96ea67da68 = function(arg0) {
106500
+ imports.wbg.__wbg_next_f4bc0e96ea67da68 = function (arg0) {
106495
106501
  const ret = getObject(arg0).next;
106496
106502
  return addHeapObject(ret);
106497
106503
  };
106498
- imports.wbg.__wbg_next_ec061e48a0e72a96 = function() { return handleError(function (arg0) {
106499
- const ret = getObject(arg0).next();
106500
- return addHeapObject(ret);
106501
- }, arguments) };
106502
- imports.wbg.__wbg_done_b6abb27d42b63867 = function(arg0) {
106504
+ imports.wbg.__wbg_next_ec061e48a0e72a96 = function () {
106505
+ return handleError(function (arg0) {
106506
+ const ret = getObject(arg0).next();
106507
+ return addHeapObject(ret);
106508
+ }, arguments)
106509
+ };
106510
+ imports.wbg.__wbg_done_b6abb27d42b63867 = function (arg0) {
106503
106511
  const ret = getObject(arg0).done;
106504
106512
  return ret;
106505
106513
  };
106506
- imports.wbg.__wbg_value_2f4ef2036bfad28e = function(arg0) {
106514
+ imports.wbg.__wbg_value_2f4ef2036bfad28e = function (arg0) {
106507
106515
  const ret = getObject(arg0).value;
106508
106516
  return addHeapObject(ret);
106509
106517
  };
106510
- imports.wbg.__wbg_iterator_7c7e58f62eb84700 = function() {
106518
+ imports.wbg.__wbg_iterator_7c7e58f62eb84700 = function () {
106511
106519
  const ret = Symbol.iterator;
106512
106520
  return addHeapObject(ret);
106513
106521
  };
106514
- imports.wbg.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
106515
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
106516
- return addHeapObject(ret);
106517
- }, arguments) };
106518
- imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
106519
- const ret = getObject(arg0).call(getObject(arg1));
106520
- return addHeapObject(ret);
106521
- }, arguments) };
106522
- imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() {
106522
+ imports.wbg.__wbg_get_f53c921291c381bd = function () {
106523
+ return handleError(function (arg0, arg1) {
106524
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
106525
+ return addHeapObject(ret);
106526
+ }, arguments)
106527
+ };
106528
+ imports.wbg.__wbg_call_557a2f2deacc4912 = function () {
106529
+ return handleError(function (arg0, arg1) {
106530
+ const ret = getObject(arg0).call(getObject(arg1));
106531
+ return addHeapObject(ret);
106532
+ }, arguments)
106533
+ };
106534
+ imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function () {
106523
106535
  const ret = new Object();
106524
106536
  return addHeapObject(ret);
106525
106537
  };
106526
- imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
106527
- const ret = self.self;
106528
- return addHeapObject(ret);
106529
- }, arguments) };
106530
- imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
106531
- const ret = window.window;
106532
- return addHeapObject(ret);
106533
- }, arguments) };
106534
- imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
106535
- const ret = globalThis.globalThis;
106536
- return addHeapObject(ret);
106537
- }, arguments) };
106538
- imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
106539
- const ret = commonjsGlobal.global;
106540
- return addHeapObject(ret);
106541
- }, arguments) };
106542
- imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
106538
+ imports.wbg.__wbg_self_742dd6eab3e9211e = function () {
106539
+ return handleError(function () {
106540
+ const ret = self.self;
106541
+ return addHeapObject(ret);
106542
+ }, arguments)
106543
+ };
106544
+ imports.wbg.__wbg_window_c409e731db53a0e2 = function () {
106545
+ return handleError(function () {
106546
+ const ret = window.window;
106547
+ return addHeapObject(ret);
106548
+ }, arguments)
106549
+ };
106550
+ imports.wbg.__wbg_globalThis_b70c095388441f2d = function () {
106551
+ return handleError(function () {
106552
+ const ret = globalThis.globalThis;
106553
+ return addHeapObject(ret);
106554
+ }, arguments)
106555
+ };
106556
+ imports.wbg.__wbg_global_1c72617491ed7194 = function () {
106557
+ return handleError(function () {
106558
+ const ret = commonjsGlobal.global;
106559
+ return addHeapObject(ret);
106560
+ }, arguments)
106561
+ };
106562
+ imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function (arg0) {
106543
106563
  const ret = new Array(arg0 >>> 0);
106544
106564
  return addHeapObject(ret);
106545
106565
  };
106546
- imports.wbg.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
106566
+ imports.wbg.__wbg_set_b4da98d504ac6091 = function (arg0, arg1, arg2) {
106547
106567
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
106548
106568
  };
106549
- imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
106569
+ imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function (arg0) {
106550
106570
  const ret = Array.from(getObject(arg0));
106551
106571
  return addHeapObject(ret);
106552
106572
  };
106553
- imports.wbg.__wbg_isArray_04e59fb73f78ab5b = function(arg0) {
106573
+ imports.wbg.__wbg_isArray_04e59fb73f78ab5b = function (arg0) {
106554
106574
  const ret = Array.isArray(getObject(arg0));
106555
106575
  return ret;
106556
106576
  };
106557
- imports.wbg.__wbg_push_109cfc26d02582dd = function(arg0, arg1) {
106577
+ imports.wbg.__wbg_push_109cfc26d02582dd = function (arg0, arg1) {
106558
106578
  const ret = getObject(arg0).push(getObject(arg1));
106559
106579
  return ret;
106560
106580
  };
106561
- imports.wbg.__wbg_instanceof_ArrayBuffer_ef2632aa0d4bfff8 = function(arg0) {
106581
+ imports.wbg.__wbg_instanceof_ArrayBuffer_ef2632aa0d4bfff8 = function (arg0) {
106562
106582
  let result;
106563
106583
  try {
106564
106584
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -106568,22 +106588,22 @@ function requireDock_crypto_wasm () {
106568
106588
  const ret = result;
106569
106589
  return ret;
106570
106590
  };
106571
- imports.wbg.__wbg_entries_251d437c1b5de416 = function(arg0) {
106591
+ imports.wbg.__wbg_entries_251d437c1b5de416 = function (arg0) {
106572
106592
  const ret = getObject(arg0).entries();
106573
106593
  return addHeapObject(ret);
106574
106594
  };
106575
- imports.wbg.__wbg_values_37eb2197bdbdfdd8 = function(arg0) {
106595
+ imports.wbg.__wbg_values_37eb2197bdbdfdd8 = function (arg0) {
106576
106596
  const ret = getObject(arg0).values();
106577
106597
  return addHeapObject(ret);
106578
106598
  };
106579
- imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
106599
+ imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function (arg0, arg1, arg2) {
106580
106600
  const ret = getObject(arg1).toString(arg2);
106581
106601
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
106582
106602
  const len1 = WASM_VECTOR_LEN;
106583
106603
  getInt32Memory0()[arg0 / 4 + 1] = len1;
106584
106604
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
106585
106605
  };
106586
- imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
106606
+ imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function (arg0) {
106587
106607
  let result;
106588
106608
  try {
106589
106609
  result = getObject(arg0) instanceof Function;
@@ -106593,66 +106613,68 @@ function requireDock_crypto_wasm () {
106593
106613
  const ret = result;
106594
106614
  return ret;
106595
106615
  };
106596
- imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
106597
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
106598
- return addHeapObject(ret);
106599
- }, arguments) };
106600
- imports.wbg.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
106616
+ imports.wbg.__wbg_call_587b30eea3e09332 = function () {
106617
+ return handleError(function (arg0, arg1, arg2) {
106618
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
106619
+ return addHeapObject(ret);
106620
+ }, arguments)
106621
+ };
106622
+ imports.wbg.__wbg_bind_7d5ce7224bedd5b8 = function (arg0, arg1, arg2) {
106601
106623
  const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
106602
106624
  return addHeapObject(ret);
106603
106625
  };
106604
- imports.wbg.__wbg_get_ee04a929b42f2cae = function(arg0, arg1) {
106626
+ imports.wbg.__wbg_get_ee04a929b42f2cae = function (arg0, arg1) {
106605
106627
  const ret = getObject(arg0).get(getObject(arg1));
106606
106628
  return addHeapObject(ret);
106607
106629
  };
106608
- imports.wbg.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
106630
+ imports.wbg.__wbg_set_da7be7bf0e037b14 = function (arg0, arg1, arg2) {
106609
106631
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
106610
106632
  return addHeapObject(ret);
106611
106633
  };
106612
- imports.wbg.__wbg_entries_039ff76b77e573c1 = function(arg0) {
106634
+ imports.wbg.__wbg_entries_039ff76b77e573c1 = function (arg0) {
106613
106635
  const ret = getObject(arg0).entries();
106614
106636
  return addHeapObject(ret);
106615
106637
  };
106616
- imports.wbg.__wbg_isSafeInteger_2088b01008075470 = function(arg0) {
106638
+ imports.wbg.__wbg_isSafeInteger_2088b01008075470 = function (arg0) {
106617
106639
  const ret = Number.isSafeInteger(getObject(arg0));
106618
106640
  return ret;
106619
106641
  };
106620
- imports.wbg.__wbg_valueOf_393207f7572c73ba = function(arg0) {
106642
+ imports.wbg.__wbg_valueOf_393207f7572c73ba = function (arg0) {
106621
106643
  const ret = getObject(arg0).valueOf();
106622
106644
  return ret;
106623
106645
  };
106624
- imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
106646
+ imports.wbg.__wbg_constructor_f2623999a1f453eb = function (arg0) {
106625
106647
  const ret = getObject(arg0).constructor;
106626
106648
  return addHeapObject(ret);
106627
106649
  };
106628
- imports.wbg.__wbg_entries_13e011453776468f = function(arg0) {
106650
+ imports.wbg.__wbg_entries_13e011453776468f = function (arg0) {
106629
106651
  const ret = Object.entries(getObject(arg0));
106630
106652
  return addHeapObject(ret);
106631
106653
  };
106632
- imports.wbg.__wbg_values_ab94410c1dc594fb = function(arg0) {
106654
+ imports.wbg.__wbg_values_ab94410c1dc594fb = function (arg0) {
106633
106655
  const ret = getObject(arg0).values();
106634
106656
  return addHeapObject(ret);
106635
106657
  };
106636
- imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
106658
+ imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function (arg0) {
106637
106659
  const ret = getObject(arg0).buffer;
106638
106660
  return addHeapObject(ret);
106639
106661
  };
106640
- imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
106662
+ imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function (arg0, arg1, arg2) {
106641
106663
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
106642
106664
  return addHeapObject(ret);
106643
106665
  };
106644
- imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
106666
+ imports.wbg.__wbg_new_09938a7d020f049b = function (arg0) {
106645
106667
  const ret = new Uint8Array(getObject(arg0));
106646
106668
  return addHeapObject(ret);
106647
106669
  };
106648
- imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
106670
+ imports.wbg.__wbg_set_3698e3ca519b3c3c = function (arg0, arg1, arg2) {
106649
106671
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
106650
106672
  };
106651
- imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
106673
+ imports.wbg.__wbg_length_0aab7ffd65ad19ed = function (arg0) {
106652
106674
  const ret = getObject(arg0).length;
106653
106675
  return ret;
106654
106676
  };
106655
- imports.wbg.__wbg_instanceof_Uint8Array_1349640af2da2e88 = function(arg0) {
106677
+ imports.wbg.__wbg_instanceof_Uint8Array_1349640af2da2e88 = function (arg0) {
106656
106678
  let result;
106657
106679
  try {
106658
106680
  result = getObject(arg0) instanceof Uint8Array;
@@ -106662,47 +106684,57 @@ function requireDock_crypto_wasm () {
106662
106684
  const ret = result;
106663
106685
  return ret;
106664
106686
  };
106665
- imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
106687
+ imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function (arg0) {
106666
106688
  const ret = new Uint8Array(arg0 >>> 0);
106667
106689
  return addHeapObject(ret);
106668
106690
  };
106669
- imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
106691
+ imports.wbg.__wbg_subarray_d82be056deb4ad27 = function (arg0, arg1, arg2) {
106670
106692
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
106671
106693
  return addHeapObject(ret);
106672
106694
  };
106673
- imports.wbg.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
106674
- const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
106675
- return addHeapObject(ret);
106676
- }, arguments) };
106677
- imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
106678
- const ret = Reflect.getPrototypeOf(getObject(arg0));
106679
- return addHeapObject(ret);
106680
- }, arguments) };
106681
- imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
106682
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
106683
- return ret;
106684
- }, arguments) };
106685
- imports.wbg.__wbg_new_d5513c182d79afcb = function() { return handleError(function (arg0, arg1) {
106686
- const ret = new WebAssembly.Instance(getObject(arg0), getObject(arg1));
106687
- return addHeapObject(ret);
106688
- }, arguments) };
106689
- imports.wbg.__wbg_exports_311291a1333429a3 = function(arg0) {
106695
+ imports.wbg.__wbg_apply_46ea2bb0ad750196 = function () {
106696
+ return handleError(function (arg0, arg1, arg2) {
106697
+ const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
106698
+ return addHeapObject(ret);
106699
+ }, arguments)
106700
+ };
106701
+ imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function () {
106702
+ return handleError(function (arg0) {
106703
+ const ret = Reflect.getPrototypeOf(getObject(arg0));
106704
+ return addHeapObject(ret);
106705
+ }, arguments)
106706
+ };
106707
+ imports.wbg.__wbg_set_07da13cc24b69217 = function () {
106708
+ return handleError(function (arg0, arg1, arg2) {
106709
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
106710
+ return ret;
106711
+ }, arguments)
106712
+ };
106713
+ imports.wbg.__wbg_new_d5513c182d79afcb = function () {
106714
+ return handleError(function (arg0, arg1) {
106715
+ const ret = new WebAssembly.Instance(getObject(arg0), getObject(arg1));
106716
+ return addHeapObject(ret);
106717
+ }, arguments)
106718
+ };
106719
+ imports.wbg.__wbg_exports_311291a1333429a3 = function (arg0) {
106690
106720
  const ret = getObject(arg0).exports;
106691
106721
  return addHeapObject(ret);
106692
106722
  };
106693
- imports.wbg.__wbg_new_5e81aea3ac1b5637 = function() { return handleError(function (arg0) {
106694
- const ret = new WebAssembly.Module(getObject(arg0));
106695
- return addHeapObject(ret);
106696
- }, arguments) };
106697
- imports.wbg.__wbg_exports_12505982ae149cb0 = function(arg0) {
106723
+ imports.wbg.__wbg_new_5e81aea3ac1b5637 = function () {
106724
+ return handleError(function (arg0) {
106725
+ const ret = new WebAssembly.Module(getObject(arg0));
106726
+ return addHeapObject(ret);
106727
+ }, arguments)
106728
+ };
106729
+ imports.wbg.__wbg_exports_12505982ae149cb0 = function (arg0) {
106698
106730
  const ret = WebAssembly.Module.exports(getObject(arg0));
106699
106731
  return addHeapObject(ret);
106700
106732
  };
106701
- imports.wbg.__wbg_imports_e63d0b7b63c4e1ff = function(arg0) {
106733
+ imports.wbg.__wbg_imports_e63d0b7b63c4e1ff = function (arg0) {
106702
106734
  const ret = WebAssembly.Module.imports(getObject(arg0));
106703
106735
  return addHeapObject(ret);
106704
106736
  };
106705
- imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
106737
+ imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function (arg0) {
106706
106738
  let result;
106707
106739
  try {
106708
106740
  result = getObject(arg0) instanceof WebAssembly.Table;
@@ -106712,11 +106744,13 @@ function requireDock_crypto_wasm () {
106712
106744
  const ret = result;
106713
106745
  return ret;
106714
106746
  };
106715
- imports.wbg.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
106716
- const ret = getObject(arg0).get(arg1 >>> 0);
106717
- return addHeapObject(ret);
106718
- }, arguments) };
106719
- imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
106747
+ imports.wbg.__wbg_get_b5def15f90c3e295 = function () {
106748
+ return handleError(function (arg0, arg1) {
106749
+ const ret = getObject(arg0).get(arg1 >>> 0);
106750
+ return addHeapObject(ret);
106751
+ }, arguments)
106752
+ };
106753
+ imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function (arg0) {
106720
106754
  let result;
106721
106755
  try {
106722
106756
  result = getObject(arg0) instanceof WebAssembly.Memory;
@@ -106726,27 +106760,27 @@ function requireDock_crypto_wasm () {
106726
106760
  const ret = result;
106727
106761
  return ret;
106728
106762
  };
106729
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
106763
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function (arg0, arg1) {
106730
106764
  const v = getObject(arg1);
106731
- const ret = typeof(v) === 'bigint' ? v : undefined;
106765
+ const ret = typeof (v) === 'bigint' ? v : undefined;
106732
106766
  getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
106733
106767
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
106734
106768
  };
106735
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
106769
+ imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
106736
106770
  const ret = debugString(getObject(arg1));
106737
106771
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
106738
106772
  const len1 = WASM_VECTOR_LEN;
106739
106773
  getInt32Memory0()[arg0 / 4 + 1] = len1;
106740
106774
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
106741
106775
  };
106742
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
106776
+ imports.wbg.__wbindgen_throw = function (arg0, arg1) {
106743
106777
  throw new Error(getStringFromWasm0(arg0, arg1));
106744
106778
  };
106745
- imports.wbg.__wbindgen_memory = function() {
106779
+ imports.wbg.__wbindgen_memory = function () {
106746
106780
  const ret = wasm.memory;
106747
106781
  return addHeapObject(ret);
106748
106782
  };
106749
- imports.wbg.__wbindgen_function_table = function() {
106783
+ imports.wbg.__wbindgen_function_table = function () {
106750
106784
  const ret = wasm.__wbindgen_export_2;
106751
106785
  return addHeapObject(ret);
106752
106786
  };
@@ -204567,6 +204601,195 @@ class DIDService {
204567
204601
  }
204568
204602
  const didService = new DIDService();
204569
204603
 
204604
+ var hkdf_1;
204605
+ var hasRequiredHkdf;
204606
+
204607
+ function requireHkdf () {
204608
+ if (hasRequiredHkdf) return hkdf_1;
204609
+ hasRequiredHkdf = 1;
204610
+
204611
+ /**
204612
+ * @file
204613
+ *
204614
+ * Copyright 2018 FutoIn Project (https://futoin.org)
204615
+ * Copyright 2018 Andrey Galkin <andrey@futoin.org>
204616
+ *
204617
+ * Licensed under the Apache License, Version 2.0 (the "License");
204618
+ * you may not use this file except in compliance with the License.
204619
+ * You may obtain a copy of the License at
204620
+ *
204621
+ * http://www.apache.org/licenses/LICENSE-2.0
204622
+ *
204623
+ * Unless required by applicable law or agreed to in writing, software
204624
+ * distributed under the License is distributed on an "AS IS" BASIS,
204625
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204626
+ * See the License for the specific language governing permissions and
204627
+ * limitations under the License.
204628
+ */
204629
+
204630
+ const { Buffer } = requireBuffer$1();
204631
+ const { createHash, createHmac } = requireCryptoBrowserify();
204632
+
204633
+ const g_digestLenCache = {};
204634
+
204635
+ /**
204636
+ * Get expected hash length.
204637
+ *
204638
+ * @func
204639
+ * @alias hkdf.hash_length
204640
+ * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204641
+ * @returns {integer} hash digest byte length
204642
+ *
204643
+ * @note Values are hardcoded with fallback for unknown algorithms.
204644
+ */
204645
+ const hash_length = ( hash ) => {
204646
+ switch ( hash ) {
204647
+ case 'sha256': return 32;
204648
+ case 'sha512': return 64;
204649
+ case 'sha224': return 28;
204650
+ case 'sha384': return 48;
204651
+ case 'sha3-256': return 32;
204652
+ case 'sha3-512': return 64;
204653
+ case 'sha3-224': return 28;
204654
+ case 'sha3-384': return 48;
204655
+ case 'blake2s256': return 32;
204656
+ case 'blake2b512': return 64;
204657
+ case 'sha1': return 20;
204658
+ case 'md5': return 16;
204659
+ default: {
204660
+ let len = g_digestLenCache[hash];
204661
+
204662
+ if ( len === undefined ) {
204663
+ len = createHash( hash ).digest().length;
204664
+ g_digestLenCache[hash] = len;
204665
+ }
204666
+
204667
+ return len;
204668
+ }
204669
+ }
204670
+ };
204671
+
204672
+ /**
204673
+ * HKDF extract action.
204674
+ *
204675
+ * @func
204676
+ * @alias hkdf.extract
204677
+ * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204678
+ * @param {integer} hash_len - Hash digest length
204679
+ * @param {Buffer|string} ikm - Initial Keying Material
204680
+ * @param {Buffer|string} salt - Optional salt (recommended)
204681
+ * @returns {Buffer} A buffer with pseudorandom key
204682
+ *
204683
+ * @note Values are hardcoded with fallback for unknown algorithms.
204684
+ */
204685
+ const hkdf_extract = ( hash, hash_len, ikm, salt ) => {
204686
+ const b_ikm = Buffer.isBuffer( ikm ) ? ikm : Buffer.from( ikm );
204687
+ const b_salt = ( salt && salt.length ) ? Buffer.from( salt ) : Buffer.alloc( hash_len, 0 );
204688
+
204689
+ return createHmac( hash, b_salt ).update( b_ikm ).digest();
204690
+ };
204691
+
204692
+ /**
204693
+ * HKDF expand action.
204694
+ *
204695
+ * @func
204696
+ * @alias hkdf.expand
204697
+ * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204698
+ * @param {integer} hash_len - Hash digest length
204699
+ * @param {Buffer|string} prk - A buffer with pseudorandom key
204700
+ * @param {integer} length - length of output keying material in octets
204701
+ * @param {Buffer|string} info - Optional context (safe to skip)
204702
+ * @returns {Buffer} A buffer with output keying material
204703
+ *
204704
+ * @note Values are hardcoded with fallback for unknown algorithms.
204705
+ */
204706
+ const hkdf_expand = ( hash, hash_len, prk, length, info ) => {
204707
+ const b_info = Buffer.isBuffer( info ) ? info : Buffer.from( info || '' );
204708
+ const info_len = b_info.length;
204709
+
204710
+ const steps = Math.ceil( length / hash_len );
204711
+
204712
+ if ( steps > 0xFF ) {
204713
+ throw new Error( `OKM length ${length} is too long for ${hash} hash` );
204714
+ }
204715
+
204716
+ // use single buffer with unnecessary create/copy/move operations
204717
+ const t = Buffer.alloc( hash_len * steps + info_len + 1 );
204718
+
204719
+ for ( let c = 1, start = 0, end = 0; c <= steps; ++c ) {
204720
+ // add info
204721
+ b_info.copy( t, end );
204722
+ // add counter
204723
+ t[ end + info_len ] = c;
204724
+
204725
+ createHmac( hash, prk )
204726
+ // use view: T(C) = T(C-1) | info | C
204727
+ .update( t.slice( start, end + info_len + 1 ) )
204728
+ .digest()
204729
+ // put back to the same buffer
204730
+ .copy( t, end );
204731
+
204732
+ start = end; // used for T(C-1) start
204733
+ end += hash_len; // used for T(C-1) end & overall end
204734
+ }
204735
+
204736
+ return t.slice( 0, length );
204737
+ };
204738
+
204739
+ /**
204740
+ * HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
204741
+ *
204742
+ * @param {Buffer|string} ikm - Initial Keying Material
204743
+ * @param {integer} length - Required byte length of output
204744
+ * @param {Buffer|string} salt='' - Optional salt (recommended)
204745
+ * @param {Buffer|string} info='' - Optional context (safe to skip)
204746
+ * @param {string} hash='SHA-256' - HMAC hash function to use
204747
+ * @returns {Buffer} Raw buffer with derived key of @p length bytes
204748
+ */
204749
+ function hkdf( ikm, length, { salt='', info='', hash='SHA-256' } = {} ) {
204750
+ hash = hash.toLowerCase().replace( '-', '' );
204751
+
204752
+ // 0. Hash length
204753
+ const hash_len = hash_length( hash );
204754
+
204755
+ // 1. extract
204756
+ const prk = hkdf_extract( hash, hash_len, ikm, salt );
204757
+
204758
+ // 2. expand
204759
+ return hkdf_expand( hash, hash_len, prk, length, info );
204760
+ }
204761
+
204762
+ Object.defineProperties( hkdf, {
204763
+ hash_length : {
204764
+ configurable: false,
204765
+ enumerable: false,
204766
+ writable: false,
204767
+ value: hash_length,
204768
+ },
204769
+ extract : {
204770
+ configurable: false,
204771
+ enumerable: false,
204772
+ writable: false,
204773
+ value: hkdf_extract,
204774
+ },
204775
+ expand : {
204776
+ configurable: false,
204777
+ enumerable: false,
204778
+ writable: false,
204779
+ value: hkdf_expand,
204780
+ },
204781
+ } );
204782
+
204783
+ hkdf_1 = hkdf;
204784
+ return hkdf_1;
204785
+ }
204786
+
204787
+ var hkdfExports = requireHkdf();
204788
+ var hkdf = /*@__PURE__*/getDefaultExportFromCjs(hkdfExports);
204789
+
204790
+ const HKDF_LENGTH = 32;
204791
+ const HKDF_HASH = 'SHA-256';
204792
+
204570
204793
  /**
204571
204794
  * Service class for managing Encrypted Data Vaults
204572
204795
  * @class
@@ -204582,7 +204805,7 @@ class EDVService {
204582
204805
  _defineProperty(this, "storageInterface", void 0);
204583
204806
  _defineProperty(this, "insertQueue", Promise.resolve());
204584
204807
  _defineProperty(this, "controller", void 0);
204585
- _defineProperty(this, "rpcMethods", [EDVService.prototype.generateKeys, EDVService.prototype.deriveKeys, EDVService.prototype.getController, EDVService.prototype.initialize, EDVService.prototype.find, EDVService.prototype.update, EDVService.prototype.insert, EDVService.prototype.delete]);
204808
+ _defineProperty(this, "rpcMethods", [EDVService.prototype.generateKeys, EDVService.prototype.deriveKeys, EDVService.prototype.getController, EDVService.prototype.initialize, EDVService.prototype.find, EDVService.prototype.update, EDVService.prototype.insert, EDVService.prototype.delete, EDVService.prototype.deriveBiometricKey, EDVService.prototype.deriveBiometricEncryptionKey, EDVService.prototype.encryptMasterKey, EDVService.prototype.decryptMasterKey]);
204586
204809
  this.name = serviceName$5;
204587
204810
  }
204588
204811
 
@@ -204809,6 +205032,91 @@ class EDVService {
204809
205032
  delete(params) {
204810
205033
  return this.storageInterface.delete(params);
204811
205034
  }
205035
+
205036
+ /**
205037
+ * Derives a key from biometric data using HKDF
205038
+ * @param {Buffer} biometricData - Biometric data from provider
205039
+ * @param {string} identifier - User's identifier as salt (email, phone number, etc.)
205040
+ * @returns {Buffer} Derived key
205041
+ * @example
205042
+ * const key = edvService.deriveBiometricKey(biometricData, 'user@example.com');
205043
+ */
205044
+ deriveBiometricKey(biometricData, identifier) {
205045
+ const salt = identifier;
205046
+ return hkdf(biometricData, HKDF_LENGTH, {
205047
+ salt,
205048
+ hash: HKDF_HASH
205049
+ });
205050
+ }
205051
+
205052
+ /**
205053
+ * Generates a key for encrypting/decrypting the master key
205054
+ * @param {Buffer} biometricData - Biometric data from provider
205055
+ * @param {string} identifier - User's identifier as salt (email, phone number, etc.)
205056
+ * @returns {Promise<Object>} Encryption key and IV for AES encryption
205057
+ * @returns {Buffer} returns.key - Encryption key
205058
+ * @returns {Buffer} returns.iv - Initialization vector
205059
+ * @example
205060
+ * const { key, iv } = await edvService.deriveBiometricEncryptionKey(biometricData, 'user@example.com');
205061
+ */
205062
+ async deriveBiometricEncryptionKey(biometricData, identifier) {
205063
+ const key = this.deriveBiometricKey(biometricData, identifier);
205064
+ const randomBytes = crypto$7.getRandomValues(new Uint8Array(16));
205065
+ const iv = bufferExports.Buffer.from(randomBytes);
205066
+ return {
205067
+ key,
205068
+ iv
205069
+ };
205070
+ }
205071
+
205072
+ /**
205073
+ * Encrypts the master key using a key derived from biometric data
205074
+ * @param {Uint8Array} masterKey - The CloudWalletVault master key to encrypt
205075
+ * @param {Buffer} encryptionKey - Key derived from biometric data
205076
+ * @param {Buffer} iv - Initialization vector
205077
+ * @returns {Promise<Uint8Array>} Encrypted master key
205078
+ * @example
205079
+ * const encrypted = await edvService.encryptMasterKey(masterKey, encryptionKey, iv);
205080
+ */
205081
+ async encryptMasterKey(masterKey, encryptionKey, iv) {
205082
+ const keyData = new Uint8Array(encryptionKey);
205083
+ const ivData = new Uint8Array(iv);
205084
+ const key = await crypto$7.subtle.importKey('raw', keyData, {
205085
+ name: 'AES-GCM'
205086
+ }, false, ['encrypt']);
205087
+ const encryptedBuffer = await crypto$7.subtle.encrypt({
205088
+ name: 'AES-GCM',
205089
+ iv: ivData
205090
+ }, key, masterKey);
205091
+ return new Uint8Array(encryptedBuffer);
205092
+ }
205093
+
205094
+ /**
205095
+ * Decrypts the master key using biometric-derived key
205096
+ * @param {Uint8Array} encryptedKey - The encrypted master key
205097
+ * @param {Buffer} decryptionKey - Key derived from biometric data
205098
+ * @param {Buffer} iv - Initialization vector
205099
+ * @returns {Promise<Uint8Array>} The decrypted master key
205100
+ * @throws {Error} If decryption fails
205101
+ * @example
205102
+ * const masterKey = await edvService.decryptMasterKey(encryptedKey, decryptionKey, iv);
205103
+ */
205104
+ async decryptMasterKey(encryptedKey, decryptionKey, iv) {
205105
+ try {
205106
+ const keyData = new Uint8Array(decryptionKey);
205107
+ const ivData = new Uint8Array(iv);
205108
+ const key = await crypto$7.subtle.importKey('raw', keyData, {
205109
+ name: 'AES-GCM'
205110
+ }, false, ['decrypt']);
205111
+ const decryptedBuffer = await crypto$7.subtle.decrypt({
205112
+ name: 'AES-GCM',
205113
+ iv: ivData
205114
+ }, key, encryptedKey);
205115
+ return new Uint8Array(decryptedBuffer);
205116
+ } catch (error) {
205117
+ throw new Error('Decryption failed: Invalid key or corrupted data');
205118
+ }
205119
+ }
204812
205120
  }
204813
205121
 
204814
205122
  /**
@@ -204847,206 +205155,6 @@ class EDVService {
204847
205155
  */
204848
205156
  const edvService = new EDVService();
204849
205157
 
204850
- var hkdf_1;
204851
- var hasRequiredHkdf;
204852
-
204853
- function requireHkdf () {
204854
- if (hasRequiredHkdf) return hkdf_1;
204855
- hasRequiredHkdf = 1;
204856
-
204857
- /**
204858
- * @file
204859
- *
204860
- * Copyright 2018 FutoIn Project (https://futoin.org)
204861
- * Copyright 2018 Andrey Galkin <andrey@futoin.org>
204862
- *
204863
- * Licensed under the Apache License, Version 2.0 (the "License");
204864
- * you may not use this file except in compliance with the License.
204865
- * You may obtain a copy of the License at
204866
- *
204867
- * http://www.apache.org/licenses/LICENSE-2.0
204868
- *
204869
- * Unless required by applicable law or agreed to in writing, software
204870
- * distributed under the License is distributed on an "AS IS" BASIS,
204871
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204872
- * See the License for the specific language governing permissions and
204873
- * limitations under the License.
204874
- */
204875
-
204876
- const { Buffer } = requireBuffer$1();
204877
- const { createHash, createHmac } = requireCryptoBrowserify();
204878
-
204879
- const g_digestLenCache = {};
204880
-
204881
- /**
204882
- * Get expected hash length.
204883
- *
204884
- * @func
204885
- * @alias hkdf.hash_length
204886
- * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204887
- * @returns {integer} hash digest byte length
204888
- *
204889
- * @note Values are hardcoded with fallback for unknown algorithms.
204890
- */
204891
- const hash_length = ( hash ) => {
204892
- switch ( hash ) {
204893
- case 'sha256': return 32;
204894
- case 'sha512': return 64;
204895
- case 'sha224': return 28;
204896
- case 'sha384': return 48;
204897
- case 'sha3-256': return 32;
204898
- case 'sha3-512': return 64;
204899
- case 'sha3-224': return 28;
204900
- case 'sha3-384': return 48;
204901
- case 'blake2s256': return 32;
204902
- case 'blake2b512': return 64;
204903
- case 'sha1': return 20;
204904
- case 'md5': return 16;
204905
- default: {
204906
- let len = g_digestLenCache[hash];
204907
-
204908
- if ( len === undefined ) {
204909
- len = createHash( hash ).digest().length;
204910
- g_digestLenCache[hash] = len;
204911
- }
204912
-
204913
- return len;
204914
- }
204915
- }
204916
- };
204917
-
204918
- /**
204919
- * HKDF extract action.
204920
- *
204921
- * @func
204922
- * @alias hkdf.extract
204923
- * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204924
- * @param {integer} hash_len - Hash digest length
204925
- * @param {Buffer|string} ikm - Initial Keying Material
204926
- * @param {Buffer|string} salt - Optional salt (recommended)
204927
- * @returns {Buffer} A buffer with pseudorandom key
204928
- *
204929
- * @note Values are hardcoded with fallback for unknown algorithms.
204930
- */
204931
- const hkdf_extract = ( hash, hash_len, ikm, salt ) => {
204932
- const b_ikm = Buffer.isBuffer( ikm ) ? ikm : Buffer.from( ikm );
204933
- const b_salt = ( salt && salt.length ) ? Buffer.from( salt ) : Buffer.alloc( hash_len, 0 );
204934
-
204935
- return createHmac( hash, b_salt ).update( b_ikm ).digest();
204936
- };
204937
-
204938
- /**
204939
- * HKDF expand action.
204940
- *
204941
- * @func
204942
- * @alias hkdf.expand
204943
- * @param {string} hash - Hash algorithm (as in underlying Node.js crypto library)
204944
- * @param {integer} hash_len - Hash digest length
204945
- * @param {Buffer|string} prk - A buffer with pseudorandom key
204946
- * @param {integer} length - length of output keying material in octets
204947
- * @param {Buffer|string} info - Optional context (safe to skip)
204948
- * @returns {Buffer} A buffer with output keying material
204949
- *
204950
- * @note Values are hardcoded with fallback for unknown algorithms.
204951
- */
204952
- const hkdf_expand = ( hash, hash_len, prk, length, info ) => {
204953
- const b_info = Buffer.isBuffer( info ) ? info : Buffer.from( info || '' );
204954
- const info_len = b_info.length;
204955
-
204956
- const steps = Math.ceil( length / hash_len );
204957
-
204958
- if ( steps > 0xFF ) {
204959
- throw new Error( `OKM length ${length} is too long for ${hash} hash` );
204960
- }
204961
-
204962
- // use single buffer with unnecessary create/copy/move operations
204963
- const t = Buffer.alloc( hash_len * steps + info_len + 1 );
204964
-
204965
- for ( let c = 1, start = 0, end = 0; c <= steps; ++c ) {
204966
- // add info
204967
- b_info.copy( t, end );
204968
- // add counter
204969
- t[ end + info_len ] = c;
204970
-
204971
- createHmac( hash, prk )
204972
- // use view: T(C) = T(C-1) | info | C
204973
- .update( t.slice( start, end + info_len + 1 ) )
204974
- .digest()
204975
- // put back to the same buffer
204976
- .copy( t, end );
204977
-
204978
- start = end; // used for T(C-1) start
204979
- end += hash_len; // used for T(C-1) end & overall end
204980
- }
204981
-
204982
- return t.slice( 0, length );
204983
- };
204984
-
204985
- /**
204986
- * HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
204987
- *
204988
- * @param {Buffer|string} ikm - Initial Keying Material
204989
- * @param {integer} length - Required byte length of output
204990
- * @param {Buffer|string} salt='' - Optional salt (recommended)
204991
- * @param {Buffer|string} info='' - Optional context (safe to skip)
204992
- * @param {string} hash='SHA-256' - HMAC hash function to use
204993
- * @returns {Buffer} Raw buffer with derived key of @p length bytes
204994
- */
204995
- function hkdf( ikm, length, { salt='', info='', hash='SHA-256' } = {} ) {
204996
- hash = hash.toLowerCase().replace( '-', '' );
204997
-
204998
- // 0. Hash length
204999
- const hash_len = hash_length( hash );
205000
-
205001
- // 1. extract
205002
- const prk = hkdf_extract( hash, hash_len, ikm, salt );
205003
-
205004
- // 2. expand
205005
- return hkdf_expand( hash, hash_len, prk, length, info );
205006
- }
205007
-
205008
- Object.defineProperties( hkdf, {
205009
- hash_length : {
205010
- configurable: false,
205011
- enumerable: false,
205012
- writable: false,
205013
- value: hash_length,
205014
- },
205015
- extract : {
205016
- configurable: false,
205017
- enumerable: false,
205018
- writable: false,
205019
- value: hkdf_extract,
205020
- },
205021
- expand : {
205022
- configurable: false,
205023
- enumerable: false,
205024
- writable: false,
205025
- value: hkdf_expand,
205026
- },
205027
- } );
205028
-
205029
- hkdf_1 = hkdf;
205030
- return hkdf_1;
205031
- }
205032
-
205033
- requireHkdf();
205034
-
205035
- var crypto_1;
205036
- var hasRequiredCrypto$1;
205037
-
205038
- function requireCrypto$1 () {
205039
- if (hasRequiredCrypto$1) return crypto_1;
205040
- hasRequiredCrypto$1 = 1;
205041
-
205042
- var webcrypto = webcrypto_es;
205043
- var crypto = new webcrypto.Crypto();
205044
- crypto_1 = crypto;
205045
- return crypto_1;
205046
- }
205047
-
205048
- requireCrypto$1();
205049
-
205050
205158
  const crypto$2 = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
205051
205159
 
205052
205160
  /**
@@ -482108,7 +482216,7 @@ function requirePassword () {
482108
482216
  value: true
482109
482217
  });
482110
482218
 
482111
- var crypto = requireCrypto$2();
482219
+ var crypto = requireCrypto$1();
482112
482220
 
482113
482221
 
482114
482222
 
@@ -482159,7 +482267,7 @@ function requireDockWallet () {
482159
482267
 
482160
482268
  var constants = requireConstants();
482161
482269
 
482162
- requireCrypto$2();
482270
+ requireCrypto$1();
482163
482271
 
482164
482272
  var methods_contentsCrypto = requireContentsCrypto();
482165
482273
 
@@ -482395,7 +482503,7 @@ function requireStorageWallet () {
482395
482503
 
482396
482504
  requireConstants();
482397
482505
 
482398
- requireCrypto$2();
482506
+ requireCrypto$1();
482399
482507
 
482400
482508
  requireContentsCrypto();
482401
482509
 
@@ -538272,10 +538380,10 @@ const EPSILON_NUMBER = 0.001;
538272
538380
  const EPSILON_INT = 1;
538273
538381
  const MAX_DATE_PLACEHOLDER = 884541351600000;
538274
538382
  const MIN_DATE_PLACEHOLDER = -17592186044415;
538275
- const MAX_INTEGER = 100 ** 9;
538276
- const MIN_INTEGER = -4294967295;
538277
- const MAX_NUMBER = 100 ** 5;
538278
- const MIN_NUMBER = -4294967294;
538383
+ const MAX_INTEGER = Number.MAX_SAFE_INTEGER;
538384
+ const MIN_INTEGER = Number.MIN_SAFE_INTEGER;
538385
+ const MAX_NUMBER = Number.MAX_SAFE_INTEGER;
538386
+ const MIN_NUMBER = Number.MIN_SAFE_INTEGER;
538279
538387
 
538280
538388
  /*
538281
538389
  PEX Filter rules:
@@ -562258,32 +562366,7 @@ const PRESENTATION_CONTEXT = [W3C_CREDENTIALS_V1];
562258
562366
  * @param params - Delegation parameters
562259
562367
  * @returns Signed delegation credential
562260
562368
  */
562261
- async function issueDelegationCredential(keyPair, params) {
562262
- const {
562263
- id,
562264
- issuerDid,
562265
- delegateDid,
562266
- mayClaim,
562267
- context,
562268
- types,
562269
- additionalSubjectProperties = {},
562270
- previousCredentialId = null,
562271
- rootCredentialId
562272
- } = params;
562273
- const credential = {
562274
- '@context': context,
562275
- id,
562276
- type: types,
562277
- issuer: issuerDid,
562278
- issuanceDate: new Date().toISOString(),
562279
- credentialSubject: {
562280
- id: delegateDid,
562281
- [MAY_CLAIM_IRI]: mayClaim,
562282
- ...additionalSubjectProperties
562283
- },
562284
- rootCredentialId: undefined,
562285
- previousCredentialId
562286
- };
562369
+ async function issueDelegationCredential(keyPair, credential) {
562287
562370
  const preparedKey = prepareKeyForSigning(keyPair);
562288
562371
  return issueCredential(preparedKey, credential);
562289
562372
  }
@@ -562294,30 +562377,7 @@ async function issueDelegationCredential(keyPair, params) {
562294
562377
  * @param params - Credential parameters
562295
562378
  * @returns Signed credential
562296
562379
  */
562297
- async function issueDelegatedCredential(keyPair, params) {
562298
- const {
562299
- id,
562300
- issuerDid,
562301
- subjectDid,
562302
- claims,
562303
- rootCredentialId,
562304
- previousCredentialId,
562305
- context,
562306
- types
562307
- } = params;
562308
- const credential = {
562309
- '@context': context,
562310
- id,
562311
- type: types,
562312
- issuer: issuerDid,
562313
- issuanceDate: new Date().toISOString(),
562314
- credentialSubject: {
562315
- id: subjectDid,
562316
- ...claims
562317
- },
562318
- rootCredentialId,
562319
- previousCredentialId
562320
- };
562380
+ async function issueDelegatedCredential(keyPair, credential) {
562321
562381
  const preparedKey = prepareKeyForSigning(keyPair);
562322
562382
  return issueCredential(preparedKey, credential);
562323
562383
  }
@@ -568048,33 +568108,6 @@ async function initialize(_ref) {
568048
568108
  throw new Error("Failed to create data store: ".concat(error.message));
568049
568109
  }
568050
568110
 
568051
- // Initialize wallet
568052
- let wallet;
568053
- try {
568054
- wallet = await createWallet({
568055
- dataStore
568056
- });
568057
- } catch (error) {
568058
- throw new Error("Failed to create wallet: ".concat(error.message));
568059
- }
568060
-
568061
- // Initialize providers
568062
- let didProvider, credentialProvider, messageProvider;
568063
- try {
568064
- didProvider = createDIDProvider({
568065
- wallet
568066
- });
568067
- credentialProvider = await createCredentialProvider({
568068
- wallet
568069
- });
568070
- messageProvider = createMessageProvider({
568071
- wallet,
568072
- didProvider
568073
- });
568074
- } catch (error) {
568075
- throw new Error("Failed to initialize wallet providers: ".concat(error.message));
568076
- }
568077
-
568078
568111
  // Recover or set master key
568079
568112
  if (mnemonic) {
568080
568113
  try {
@@ -568084,7 +568117,9 @@ async function initialize(_ref) {
568084
568117
  }
568085
568118
  }
568086
568119
 
568087
- // Initialize cloud wallet
568120
+ // Initialize cloud wallet and pull documents before creating the wallet
568121
+ // This ensures existing DIDs are loaded from the cloud before wallet creation,
568122
+ // preventing duplicate DID creation
568088
568123
  let cloudWallet;
568089
568124
  try {
568090
568125
  cloudWallet = await initializeCloudWallet({
@@ -568103,6 +568138,33 @@ async function initialize(_ref) {
568103
568138
  } catch (error) {
568104
568139
  console.warn('Warning: Failed to pull documents from cloud wallet. You may need to sync manually.', error.message);
568105
568140
  }
568141
+
568142
+ // Initialize wallet after cloud sync so existing DIDs are found in the data store
568143
+ let wallet;
568144
+ try {
568145
+ wallet = await createWallet({
568146
+ dataStore
568147
+ });
568148
+ } catch (error) {
568149
+ throw new Error("Failed to create wallet: ".concat(error.message));
568150
+ }
568151
+
568152
+ // Initialize providers
568153
+ let didProvider, credentialProvider, messageProvider;
568154
+ try {
568155
+ didProvider = createDIDProvider({
568156
+ wallet
568157
+ });
568158
+ credentialProvider = await createCredentialProvider({
568159
+ wallet
568160
+ });
568161
+ messageProvider = createMessageProvider({
568162
+ wallet,
568163
+ didProvider
568164
+ });
568165
+ } catch (error) {
568166
+ throw new Error("Failed to initialize wallet providers: ".concat(error.message));
568167
+ }
568106
568168
  return {
568107
568169
  wallet,
568108
568170
  messageProvider,
@@ -568196,13 +568258,9 @@ async function initialize(_ref) {
568196
568258
  * const result = await wallet.submitPresentation({
568197
568259
  * credentials: [
568198
568260
  * {
568199
- * id: 'credential-123',
568200
- * attributesToReveal: ['name', 'dateOfBirth']
568261
+ * id: 'https://creds-testnet.truvera.io/c7f3e722287d1ea98c136ad5df8066209c5e9b44c6251af0860d62e9a3a21a76',
568262
+ * attributesToReveal: ['credentialSubject.fullName', 'credentialSubject.age']
568201
568263
  * },
568202
- * {
568203
- * id: 'credential-456',
568204
- * attributesToReveal: ['email']
568205
- * }
568206
568264
  * ],
568207
568265
  * proofRequestUrl: 'https://creds-staging.truvera.io/proof/77ae2c67-678e-4cb6-8c5d-a4dd4a1a19f1'
568208
568266
  * });
@@ -568212,6 +568270,9 @@ async function initialize(_ref) {
568212
568270
  credentials,
568213
568271
  proofRequestUrl
568214
568272
  } = _ref2;
568273
+ // ensure blockchain is connected
568274
+ await blockchainService.ensureBlockchainReady();
568275
+
568215
568276
  // Validate inputs
568216
568277
  if (!credentials || !Array.isArray(credentials) || credentials.length === 0) {
568217
568278
  throw new Error('Invalid credentials: Must provide a non-empty array of credentials');