@ledgerhq/vault-common 2.4.1 → 2.4.2

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/lib/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkSDWFPIQ3js = require('./chunk-SDWFPIQ3.js');
3
+ var _chunkRMGLSD2Kjs = require('./chunk-RMGLSD2K.js');
4
4
 
5
5
 
6
- var _chunkK34PJKKUjs = require('./chunk-K34PJKKU.js');
6
+ var _chunkDYC7MJCFjs = require('./chunk-DYC7MJCF.js');
7
7
 
8
8
 
9
9
 
@@ -15,10 +15,10 @@ var _chunkK34PJKKUjs = require('./chunk-K34PJKKU.js');
15
15
 
16
16
 
17
17
 
18
- var _chunkKFDJBREOjs = require('./chunk-KFDJBREO.js');
18
+ var _chunk5FIUXT4Vjs = require('./chunk-5FIUXT4V.js');
19
19
 
20
20
 
21
- var _chunkZRIXMEBKjs = require('./chunk-ZRIXMEBK.js');
21
+ var _chunkGGTW7SXQjs = require('./chunk-GGTW7SXQ.js');
22
22
 
23
23
 
24
24
 
@@ -39,7 +39,7 @@ var _chunkZRIXMEBKjs = require('./chunk-ZRIXMEBK.js');
39
39
 
40
40
 
41
41
 
42
- var _chunk3TPBAEKCjs = require('./chunk-3TPBAEKC.js');
42
+ var _chunkVTRGMAG3js = require('./chunk-VTRGMAG3.js');
43
43
 
44
44
 
45
45
  var _chunk3L2XDBZ2js = require('./chunk-3L2XDBZ2.js');
@@ -326,8 +326,8 @@ async function bakeManifest(_manifest, pool, options = {}) {
326
326
  logger.info("\u2551 See v2.0 release of vault-cli/vault-common on GitHub. \u2551");
327
327
  logger.info("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
328
328
  }
329
- const runner = options.runner || _chunkKFDJBREOjs.createDefaultRunner_default.call(void 0, pool, options);
330
- const manifestFromGate = await _chunkK34PJKKUjs.recipeManifest.call(void 0, pool, { saveAccountsIndexes: true });
329
+ const runner = options.runner || _chunk5FIUXT4Vjs.createDefaultRunner_default.call(void 0, pool, options);
330
+ const manifestFromGate = await _chunkDYC7MJCFjs.recipeManifest.call(void 0, pool, { saveAccountsIndexes: true });
331
331
  const { rawData } = manifestFromGate;
332
332
  const {
333
333
  groupsByName,
@@ -425,49 +425,49 @@ async function bakeManifest(_manifest, pool, options = {}) {
425
425
  )
426
426
  );
427
427
  }
428
- await _chunk3TPBAEKCjs.queue.call(void 0,
428
+ await _chunkVTRGMAG3js.queue.call(void 0,
429
429
  _sortBy2.default.call(void 0, adminsAndOperators, (u) => u.device),
430
430
  genCreateAdminsAndOperators()
431
431
  );
432
432
  if (manifest.users.api) {
433
433
  logger.step("LAM users creation");
434
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.users.api, genCreateAPIUser());
434
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.users.api, genCreateAPIUser());
435
435
  }
436
436
  if (manifest.users.apiV2) {
437
437
  logger.step("API users creation");
438
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.users.apiV2, genCreateAPIV2User());
438
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.users.apiV2, genCreateAPIV2User());
439
439
  }
440
440
  }
441
441
  if (manifest.workspaceRules) {
442
442
  logger.step("Workspace rules creation");
443
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.workspaceRules, createWorkspaceRule);
443
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.workspaceRules, createWorkspaceRule);
444
444
  }
445
445
  if (manifest.groups) {
446
446
  logger.step("Groups");
447
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.groups, createGroup);
447
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.groups, createGroup);
448
448
  }
449
449
  if (manifest.whitelists) {
450
450
  logger.step("Whitelists");
451
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.whitelists, createWhitelist);
451
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.whitelists, createWhitelist);
452
452
  }
453
453
  if (manifest.tradelink) {
454
454
  logger.step("TradeLink");
455
455
  const adminDevices = await pool.getOnboardingAdminDevices();
456
- await _chunk3TPBAEKCjs.queue.call(void 0,
456
+ await _chunkVTRGMAG3js.queue.call(void 0,
457
457
  adminDevices.map((a) => ({ user: a[1], contractNames: ["TRADELINK_ADDENDUM", "TRADELINK"] })),
458
458
  approveContracts
459
459
  );
460
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.tradelink.custodians, createTradelinkCustodian);
461
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.tradelink.assetManagers, createTradelinkAssetManager);
462
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.tradelink.exchanges, createTradelinkExchange);
460
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.tradelink.custodians, createTradelinkCustodian);
461
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.tradelink.assetManagers, createTradelinkAssetManager);
462
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.tradelink.exchanges, createTradelinkExchange);
463
463
  await createTradelinkNetwork(manifest.tradelink);
464
464
  if (manifest.tradelink.onboarded) {
465
465
  await onboardTradelinkNetwork(manifest.tradelink);
466
- await _chunk3TPBAEKCjs.queue.call(void 0,
466
+ await _chunkVTRGMAG3js.queue.call(void 0,
467
467
  manifest.tradelink.exchanges,
468
468
  (exchange) => onboardTradelinkEntity(exchange, "exchanges")
469
469
  );
470
- await _chunk3TPBAEKCjs.queue.call(void 0,
470
+ await _chunkVTRGMAG3js.queue.call(void 0,
471
471
  manifest.tradelink.assetManagers,
472
472
  (am) => onboardTradelinkEntity(am, "asset_managers")
473
473
  );
@@ -475,20 +475,20 @@ async function bakeManifest(_manifest, pool, options = {}) {
475
475
  }
476
476
  if (manifest.policies) {
477
477
  logger.step("Policies");
478
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.policies, createVaultPolicy);
478
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.policies, createVaultPolicy);
479
479
  }
480
480
  if (manifest.accounts) {
481
481
  logger.step("Accounts");
482
482
  manifest.accounts = _orderBy2.default.call(void 0, manifest.accounts, "contractAddress", "desc");
483
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.accounts, createAccount);
483
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.accounts, createAccount);
484
484
  }
485
485
  if (manifest.entities) {
486
486
  logger.step("Entities");
487
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.entities, createVaultEntity);
487
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.entities, createVaultEntity);
488
488
  }
489
489
  if (manifest.exchanges) {
490
490
  logger.step("Exchanges");
491
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.exchanges, createVaultExchange);
491
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.exchanges, createVaultExchange);
492
492
  }
493
493
  if (manifest.quorum) {
494
494
  logger.step("Quorum");
@@ -496,7 +496,7 @@ async function bakeManifest(_manifest, pool, options = {}) {
496
496
  }
497
497
  if (manifest.contractApprovals) {
498
498
  logger.step("Contract Approvals");
499
- await _chunk3TPBAEKCjs.queue.call(void 0, manifest.contractApprovals, approveContracts);
499
+ await _chunkVTRGMAG3js.queue.call(void 0, manifest.contractApprovals, approveContracts);
500
500
  }
501
501
  logger.success("Done");
502
502
  async function editQuorum(quorum) {
@@ -580,7 +580,7 @@ async function bakeManifest(_manifest, pool, options = {}) {
580
580
  }
581
581
  function genCreateUser(role) {
582
582
  return async function createUser(device) {
583
- const name = manifest.customUsernames && manifest.customUsernames[device] || _chunk3TPBAEKCjs.getDefaultUsername.call(void 0, role, device);
583
+ const name = manifest.customUsernames && manifest.customUsernames[device] || _chunkVTRGMAG3js.getDefaultUsername.call(void 0, role, device);
584
584
  const userID = await pool.getUserID(device);
585
585
  const findByUserID = (ud) => ud.user.user_id === userID;
586
586
  const existingUser = usersWithDevice.find(findByUserID);
@@ -1281,11 +1281,11 @@ var pathArrayToString = (path) => {
1281
1281
  if (!path[0] || !path[1]) throw new Error("Invalid path array");
1282
1282
  return `${path[0] & 268435455}'/${path[1] & 268435455}'`;
1283
1283
  };
1284
- var __DEVICE_API_NETWORK__ = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
1284
+ var __DEVICE_API_NETWORK__ = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
1285
1285
  baseURL: process.env.VAULT_DEVICE_API_URL || "https://localhost:8443/device-api"
1286
1286
  });
1287
1287
  function setDeviceAPIEndpoint(url) {
1288
- __DEVICE_API_NETWORK__ = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: url });
1288
+ __DEVICE_API_NETWORK__ = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: url });
1289
1289
  }
1290
1290
  function createAPIDevice(options = {}) {
1291
1291
  const { deviceAPISessionID, overrideSeeds, deviceAPIURL, psdModel = "STAX" } = options;
@@ -1308,7 +1308,7 @@ function createAPIDevice(options = {}) {
1308
1308
  version: 3
1309
1309
  // This is used to choose Noise Channel mode
1310
1310
  };
1311
- const deviceAPINetwork = deviceAPIURL ? _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: deviceAPIURL }) : __DEVICE_API_NETWORK__;
1311
+ const deviceAPINetwork = deviceAPIURL ? _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: deviceAPIURL }) : __DEVICE_API_NETWORK__;
1312
1312
  return deviceAPINetwork(method, url, data, requestOptions);
1313
1313
  };
1314
1314
  const getPublicKey = async (transport, path, secp256k1 = true) => {
@@ -1905,7 +1905,7 @@ function createInteractions(device) {
1905
1905
  const finalizePairing = {
1906
1906
  responseKey: "pairing_payload",
1907
1907
  action: ({ onboardingRegisterChallenge, transport, u2f_key }) => {
1908
- const secure_channel = _chunk3TPBAEKCjs.extractSecureChannel.call(void 0,
1908
+ const secure_channel = _chunkVTRGMAG3js.extractSecureChannel.call(void 0,
1909
1909
  onboardingRegisterChallenge,
1910
1910
  u2f_key.pubKey.toUpperCase()
1911
1911
  );
@@ -1920,7 +1920,7 @@ function createInteractions(device) {
1920
1920
  const onboardingRegisterDevice = {
1921
1921
  responseKey: "u2f_register",
1922
1922
  action: async ({ u2f_key, onboardingRegisterChallenge, role, username, transport }) => {
1923
- const secure_channel = _chunk3TPBAEKCjs.extractSecureChannel.call(void 0,
1923
+ const secure_channel = _chunkVTRGMAG3js.extractSecureChannel.call(void 0,
1924
1924
  onboardingRegisterChallenge,
1925
1925
  u2f_key.pubKey.toUpperCase()
1926
1926
  );
@@ -2112,8 +2112,8 @@ var createDevicesPool = (options, { logger = _vaultutils.SILENT_LOGGER } = {}) =
2112
2112
  recordStore
2113
2113
  });
2114
2114
  const { loginFlow, readOnlyLoginFlow, registerUserFlow, approveFlow, approveFlowWithoutHSM } = interactions;
2115
- const workspace = _chunk3TPBAEKCjs.getWorkspaceFromGate.call(void 0, gate);
2116
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2115
+ const workspace = _chunkVTRGMAG3js.getWorkspaceFromGate.call(void 0, gate);
2116
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2117
2117
  baseURL: gate,
2118
2118
  networkDelay
2119
2119
  });
@@ -2156,7 +2156,7 @@ var createDevicesPool = (options, { logger = _vaultutils.SILENT_LOGGER } = {}) =
2156
2156
  };
2157
2157
  const injectToken = () => _token;
2158
2158
  if (!_token || process.env.NODE_ENV === "test") {
2159
- const network2 = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2159
+ const network2 = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2160
2160
  baseURL: gate,
2161
2161
  interceptToken,
2162
2162
  injectToken,
@@ -2170,7 +2170,7 @@ var createDevicesPool = (options, { logger = _vaultutils.SILENT_LOGGER } = {}) =
2170
2170
  throw new Error("Could not extract token from login");
2171
2171
  }
2172
2172
  }
2173
- const authNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2173
+ const authNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2174
2174
  baseURL: gate,
2175
2175
  token: _token,
2176
2176
  networkDelay
@@ -2273,7 +2273,7 @@ var createDevicesPool = (options, { logger = _vaultutils.SILENT_LOGGER } = {}) =
2273
2273
  }
2274
2274
  }
2275
2275
  };
2276
- const apiNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2276
+ const apiNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2277
2277
  baseURL: lamURL || "",
2278
2278
  networkDelay
2279
2279
  });
@@ -2336,7 +2336,7 @@ var createDevicesPool_default = createDevicesPool;
2336
2336
 
2337
2337
  // src/createFaucet.ts
2338
2338
  var createPralineFaucet = (url) => async (opts) => {
2339
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2339
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2340
2340
  baseURL: url
2341
2341
  });
2342
2342
  const { recipient, amount } = opts;
@@ -2375,13 +2375,13 @@ async function createPledge({
2375
2375
  }, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2376
2376
  const gateAccount = accountsByName[account.name];
2377
2377
  if (!gateAccount) throw new Error(`Can't find account with name ${account.name}`);
2378
- const apiNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2378
+ const apiNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2379
2379
  baseURL: apiGateway
2380
2380
  });
2381
2381
  logger.info(`Authenticate for ${apiUser.name}`);
2382
- const workspace = _chunk3TPBAEKCjs.getWorkspaceFromGate.call(void 0, gate);
2383
- const bearerToken = await _chunkKFDJBREOjs.authenticate.call(void 0, pool, apiNetwork, workspace, apiUser, logger);
2384
- const pledge = await _chunkKFDJBREOjs.getTradelinkPledge.call(void 0, {
2382
+ const workspace = _chunkVTRGMAG3js.getWorkspaceFromGate.call(void 0, gate);
2383
+ const bearerToken = await _chunk5FIUXT4Vjs.authenticate.call(void 0, pool, apiNetwork, workspace, apiUser, logger);
2384
+ const pledge = await _chunk5FIUXT4Vjs.getTradelinkPledge.call(void 0, {
2385
2385
  apiNetwork,
2386
2386
  workspace,
2387
2387
  gateAccount,
@@ -2395,8 +2395,8 @@ async function createPledge({
2395
2395
  const admin = await pool.login(4);
2396
2396
  tokens = await fetchTokens_default(admin, { logger });
2397
2397
  }
2398
- const unit = _chunk3TPBAEKCjs.getAccountUnit.call(void 0, account, tokens);
2399
- const serializedAmount = _chunk3TPBAEKCjs.serializeUnitValue.call(void 0, unit, amount);
2398
+ const unit = _chunkVTRGMAG3js.getAccountUnit.call(void 0, account, tokens);
2399
+ const serializedAmount = _chunkVTRGMAG3js.serializeUnitValue.call(void 0, unit, amount);
2400
2400
  const data = {
2401
2401
  type: "CREATE_PLEDGE_INCREMENT",
2402
2402
  data: {
@@ -2421,7 +2421,7 @@ async function createPledge({
2421
2421
  });
2422
2422
  logger.info(`Approving pledge ${pledgeRequestResp.id}`);
2423
2423
  logger.info("Decode challenge");
2424
- const apiChallenge = await _chunkKFDJBREOjs.decodeChallenge.call(void 0, {
2424
+ const apiChallenge = await _chunk5FIUXT4Vjs.decodeChallenge.call(void 0, {
2425
2425
  apiNetwork,
2426
2426
  workspace,
2427
2427
  bearerToken,
@@ -2430,7 +2430,7 @@ async function createPledge({
2430
2430
  });
2431
2431
  logger.info(apiChallenge.decodedChallenge);
2432
2432
  logger.info("Sign and approve");
2433
- return await _chunkKFDJBREOjs.signAndApprove.call(void 0, {
2433
+ return await _chunk5FIUXT4Vjs.signAndApprove.call(void 0, {
2434
2434
  apiNetwork,
2435
2435
  workspace,
2436
2436
  bearerToken,
@@ -2457,20 +2457,20 @@ async function createSettlement({
2457
2457
  }, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2458
2458
  const gateAccount = accountsByName[account.name];
2459
2459
  if (!gateAccount) throw new Error(`Can't find account with name ${account.name}`);
2460
- const apiNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, {
2460
+ const apiNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, {
2461
2461
  baseURL: apiGateway
2462
2462
  });
2463
2463
  logger.info(`Authenticate for ${apiUser.name}`);
2464
- const workspace = _chunk3TPBAEKCjs.getWorkspaceFromGate.call(void 0, gate);
2465
- const bearerToken = await _chunkKFDJBREOjs.authenticate.call(void 0, pool, apiNetwork, workspace, apiUser, logger);
2466
- const pledge = await _chunkKFDJBREOjs.getTradelinkPledge.call(void 0, {
2464
+ const workspace = _chunkVTRGMAG3js.getWorkspaceFromGate.call(void 0, gate);
2465
+ const bearerToken = await _chunk5FIUXT4Vjs.authenticate.call(void 0, pool, apiNetwork, workspace, apiUser, logger);
2466
+ const pledge = await _chunk5FIUXT4Vjs.getTradelinkPledge.call(void 0, {
2467
2467
  apiNetwork,
2468
2468
  workspace,
2469
2469
  gateAccount,
2470
2470
  bearerToken,
2471
2471
  exchange
2472
2472
  });
2473
- const recipient = await _chunkKFDJBREOjs.getTradelinkRecipient.call(void 0, { pool, gateAccount, pledge });
2473
+ const recipient = await _chunk5FIUXT4Vjs.getTradelinkRecipient.call(void 0, { pool, gateAccount, pledge });
2474
2474
  const settlementAmount = Math.floor(pledge.amount * percentage / 100);
2475
2475
  let txIntent = {
2476
2476
  account_id: gateAccount.id,
@@ -2566,10 +2566,10 @@ async function deploy(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2566
2566
  const now = Date.now();
2567
2567
  logger.step(`Deploying ${payload.name}`);
2568
2568
  const url = remoteURL.replace(/https:\/\/(.*?)\./, `https://${payload.name}.`);
2569
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2569
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2570
2570
  const deployment = await network("POST", "/deploy", payload);
2571
2571
  const gateURL = `https://${deployment.instance.name}.${deployment.instance.host}/gate/minivault`;
2572
- const gateNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: gateURL });
2572
+ const gateNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: gateURL });
2573
2573
  let state = toSimplifiedState(deployment);
2574
2574
  const logState = () => {
2575
2575
  const step = deployment.steps.find((s) => s.key === state.currentStep);
@@ -2607,14 +2607,14 @@ async function deploy(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2607
2607
  await gateNetwork("GET", "/onboarding/state");
2608
2608
  resolve();
2609
2609
  } catch (e2) {
2610
- await _chunk3TPBAEKCjs.wait.call(void 0, 3e3);
2610
+ await _chunkVTRGMAG3js.wait.call(void 0, 3e3);
2611
2611
  pollGate();
2612
2612
  }
2613
2613
  }
2614
2614
  if (useHTTPPolling) {
2615
2615
  logger.info("Using HTTP polling strategy (will not output deployment steps)");
2616
2616
  logger.info("Waiting 30 seconds for domain to be deployed...");
2617
- await _chunk3TPBAEKCjs.wait.call(void 0, 3e4);
2617
+ await _chunkVTRGMAG3js.wait.call(void 0, 3e4);
2618
2618
  logger.info("Waiting for Gate to be ready...");
2619
2619
  pollGate();
2620
2620
  } else {
@@ -2634,7 +2634,7 @@ async function deploy(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2634
2634
 
2635
2635
  async function destroy(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2636
2636
  const { remoteURL = DEFAULT_VAULT_REMOTE_URL, name } = opts;
2637
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2637
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2638
2638
  await network("DELETE", `/instances/${name}`);
2639
2639
  logger.success(`Successfully destroyed instance ${name}`);
2640
2640
  if (opts.wait) {
@@ -2659,7 +2659,7 @@ async function destroy(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2659
2659
  async function getMVInstances(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2660
2660
  const { remoteURL = DEFAULT_VAULT_REMOTE_URL } = opts;
2661
2661
  logger.info("Fetching instances...");
2662
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2662
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: `${remoteURL}/api` });
2663
2663
  const instances = await network("GET", "/instances");
2664
2664
  return instances;
2665
2665
  }
@@ -2702,8 +2702,8 @@ async function send({
2702
2702
  const admin = await pool.login(4);
2703
2703
  tokens = await fetchTokens_default(admin, { logger });
2704
2704
  }
2705
- const unit = _chunk3TPBAEKCjs.getAccountUnit.call(void 0, account, tokens);
2706
- const serializedAmount = _chunk3TPBAEKCjs.serializeUnitValue.call(void 0, unit, transaction.amount);
2705
+ const unit = _chunkVTRGMAG3js.getAccountUnit.call(void 0, account, tokens);
2706
+ const serializedAmount = _chunkVTRGMAG3js.serializeUnitValue.call(void 0, unit, transaction.amount);
2707
2707
  const matchingRule = getMatchingMultiAuthRule({
2708
2708
  account,
2709
2709
  transaction,
@@ -2935,7 +2935,7 @@ async function upgrade(opts, { logger = _vaultutils.SILENT_LOGGER } = {}) {
2935
2935
  const now = Date.now();
2936
2936
  logger.step(`Upgrading ${payload.name}`);
2937
2937
  const socket = _socketioclient2.default.call(void 0, remoteURL);
2938
- const network = _chunkZRIXMEBKjs.createNetwork.call(void 0, { baseURL: remoteURL });
2938
+ const network = _chunkGGTW7SXQjs.createNetwork.call(void 0, { baseURL: remoteURL });
2939
2939
  const { jobID } = await network("PUT", "/api/upgrade", payload);
2940
2940
  let resolve = null;
2941
2941
  let reject = null;
@@ -3006,7 +3006,7 @@ function validateManifest(_manifest) {
3006
3006
  }
3007
3007
  if ("currency" in account) {
3008
3008
  try {
3009
- _chunk3TPBAEKCjs.getCryptoCurrencyById.call(void 0, account.currency);
3009
+ _chunkVTRGMAG3js.getCryptoCurrencyById.call(void 0, account.currency);
3010
3010
  } catch (e) {
3011
3011
  throw Error(`Invalid account currency: "${account.currency}"`);
3012
3012
  }
@@ -3106,7 +3106,7 @@ function validateManifest(_manifest) {
3106
3106
  manifest.whitelists.forEach((whitelist) => {
3107
3107
  whitelist.addresses.map((address) => {
3108
3108
  try {
3109
- _chunk3TPBAEKCjs.getCryptoCurrencyById.call(void 0, address.currency);
3109
+ _chunkVTRGMAG3js.getCryptoCurrencyById.call(void 0, address.currency);
3110
3110
  } catch (e) {
3111
3111
  throw Error(`Invalid whitelist currency: "${address.currency}"`);
3112
3112
  }
@@ -3179,7 +3179,7 @@ async function wipeBackend(wipeOpts, runnableOpts = {}) {
3179
3179
  }
3180
3180
  logger.step("Wiping backend data");
3181
3181
  const gateNetworkOptions = { baseURL: wipeOpts.gate };
3182
- const gateNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, gateNetworkOptions);
3182
+ const gateNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, gateNetworkOptions);
3183
3183
  try {
3184
3184
  await gateNetwork("POST", "/maintenance/wipe");
3185
3185
  } catch (e4) {
@@ -3192,7 +3192,7 @@ async function wipeBackend(wipeOpts, runnableOpts = {}) {
3192
3192
  if (wipeOpts.lam) {
3193
3193
  const lamNetworkOptions = { baseURL: wipeOpts.lam };
3194
3194
  const headersAPILam = wipeOpts.lamAPIKey ? { headers: { "X-Ledger-API-Key": wipeOpts.lamAPIKey } } : {};
3195
- const lamNetwork = _chunkZRIXMEBKjs.createNetwork.call(void 0, lamNetworkOptions);
3195
+ const lamNetwork = _chunkGGTW7SXQjs.createNetwork.call(void 0, lamNetworkOptions);
3196
3196
  logger.step("Wiping LAM data");
3197
3197
  try {
3198
3198
  const lamWipeResponse = await lamNetwork(
@@ -3209,7 +3209,7 @@ async function wipeBackend(wipeOpts, runnableOpts = {}) {
3209
3209
  }
3210
3210
  }
3211
3211
  logger.step("Resetting HSM compartment");
3212
- const hsmBridge = _chunkSDWFPIQ3js.createHSMBridge_default.call(void 0, wipeOpts);
3212
+ const hsmBridge = _chunkRMGLSD2Kjs.createHSMBridge_default.call(void 0, wipeOpts);
3213
3213
  await hsmBridge.resetCompartment(wipeOpts.hsmCompartmentID, runnableOpts);
3214
3214
  logger.success("Wiped backend data");
3215
3215
  }
@@ -3265,5 +3265,5 @@ var wipeBackend_default = wipeBackend;
3265
3265
 
3266
3266
 
3267
3267
 
3268
- exports.DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES = DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES; exports.DEFAULT_VAULT_REMOTE_URL = DEFAULT_VAULT_REMOTE_URL; exports.GateGroupRequestTypeDefs = _chunkIAJMQIH7js.GateGroupRequestTypeDefs; exports.LIGHT_EVM_CURRENCIES = _chunk3TPBAEKCjs.LIGHT_EVM_CURRENCIES; exports.bakeManifest = bakeManifest; exports.createAPIDevice = createAPIDevice_default; exports.createConfigCatEnvironment = createConfigCatEnvironment; exports.createDevicesPool = createDevicesPool_default; exports.createFaucet = createFaucet_default; exports.createInteractions = createInteractions; exports.createNetwork = _chunkZRIXMEBKjs.createNetwork; exports.createPledge = createPledge_default; exports.createSettlement = createSettlement_default; exports.deleteConfigCatEnvironment = deleteConfigCatEnvironment; exports.deploy = deploy; exports.deserializeUnitValue = _chunk3TPBAEKCjs.deserializeUnitValue; exports.destroy = destroy; exports.device = device_exports; exports.extractSecureChannel = _chunk3TPBAEKCjs.extractSecureChannel; exports.feesLevels = _chunkIAJMQIH7js.feesLevels; exports.fetchTokens = fetchTokens_default; exports.genSeed = genSeed_default; exports.getAccountTypeByCurrency = _chunk3TPBAEKCjs.getAccountTypeByCurrency; exports.getAccountUnit = _chunk3TPBAEKCjs.getAccountUnit; exports.getAuthTokens = _chunkKFDJBREOjs.getAuthTokens; exports.getCryptoCurrencyById = _chunk3TPBAEKCjs.getCryptoCurrencyById; exports.getCurrencyOrToken = _chunk3TPBAEKCjs.getCurrencyOrToken; exports.getCurrencyUnit = _chunk3TPBAEKCjs.getCurrencyUnit; exports.getDefaultUsername = _chunk3TPBAEKCjs.getDefaultUsername; exports.getGateAccountUnit = _chunk3TPBAEKCjs.getGateAccountUnit; exports.getMVInstances = getMVInstances; exports.getTokenUnit = _chunk3TPBAEKCjs.getTokenUnit; exports.getWorkspaceFromGate = _chunk3TPBAEKCjs.getWorkspaceFromGate; exports.listCryptoCurrencies = _chunk3TPBAEKCjs.listCryptoCurrencies; exports.performRequest = _chunkKFDJBREOjs.performRequest; exports.prepareRequest = _chunkKFDJBREOjs.prepareRequest_default; exports.queue = _chunk3TPBAEKCjs.queue; exports.recipeManifest = _chunkK34PJKKUjs.recipeManifest; exports.reviewAPIRequest = _chunkKFDJBREOjs.reviewAPIRequest_default; exports.send = send_default; exports.serializeUnitValue = _chunk3TPBAEKCjs.serializeUnitValue; exports.setConfigCatFeatureFlagValues = setConfigCatFeatureFlagValues; exports.setDeviceAPIEndpoint = setDeviceAPIEndpoint; exports.unwrapConnection = _chunk3TPBAEKCjs.unwrapConnection; exports.upgrade = upgrade; exports.validateManifest = validateManifest; exports.vaultCoins = _chunk3TPBAEKCjs.vaultCoins; exports.wait = _chunk3TPBAEKCjs.wait; exports.wipeBackend = wipeBackend_default; exports.xpubToExtendedPubKey = _chunk3TPBAEKCjs.xpubToExtendedPubKey;
3268
+ exports.DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES = DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES; exports.DEFAULT_VAULT_REMOTE_URL = DEFAULT_VAULT_REMOTE_URL; exports.GateGroupRequestTypeDefs = _chunkIAJMQIH7js.GateGroupRequestTypeDefs; exports.LIGHT_EVM_CURRENCIES = _chunkVTRGMAG3js.LIGHT_EVM_CURRENCIES; exports.bakeManifest = bakeManifest; exports.createAPIDevice = createAPIDevice_default; exports.createConfigCatEnvironment = createConfigCatEnvironment; exports.createDevicesPool = createDevicesPool_default; exports.createFaucet = createFaucet_default; exports.createInteractions = createInteractions; exports.createNetwork = _chunkGGTW7SXQjs.createNetwork; exports.createPledge = createPledge_default; exports.createSettlement = createSettlement_default; exports.deleteConfigCatEnvironment = deleteConfigCatEnvironment; exports.deploy = deploy; exports.deserializeUnitValue = _chunkVTRGMAG3js.deserializeUnitValue; exports.destroy = destroy; exports.device = device_exports; exports.extractSecureChannel = _chunkVTRGMAG3js.extractSecureChannel; exports.feesLevels = _chunkIAJMQIH7js.feesLevels; exports.fetchTokens = fetchTokens_default; exports.genSeed = genSeed_default; exports.getAccountTypeByCurrency = _chunkVTRGMAG3js.getAccountTypeByCurrency; exports.getAccountUnit = _chunkVTRGMAG3js.getAccountUnit; exports.getAuthTokens = _chunk5FIUXT4Vjs.getAuthTokens; exports.getCryptoCurrencyById = _chunkVTRGMAG3js.getCryptoCurrencyById; exports.getCurrencyOrToken = _chunkVTRGMAG3js.getCurrencyOrToken; exports.getCurrencyUnit = _chunkVTRGMAG3js.getCurrencyUnit; exports.getDefaultUsername = _chunkVTRGMAG3js.getDefaultUsername; exports.getGateAccountUnit = _chunkVTRGMAG3js.getGateAccountUnit; exports.getMVInstances = getMVInstances; exports.getTokenUnit = _chunkVTRGMAG3js.getTokenUnit; exports.getWorkspaceFromGate = _chunkVTRGMAG3js.getWorkspaceFromGate; exports.listCryptoCurrencies = _chunkVTRGMAG3js.listCryptoCurrencies; exports.performRequest = _chunk5FIUXT4Vjs.performRequest; exports.prepareRequest = _chunk5FIUXT4Vjs.prepareRequest_default; exports.queue = _chunkVTRGMAG3js.queue; exports.recipeManifest = _chunkDYC7MJCFjs.recipeManifest; exports.reviewAPIRequest = _chunk5FIUXT4Vjs.reviewAPIRequest_default; exports.send = send_default; exports.serializeUnitValue = _chunkVTRGMAG3js.serializeUnitValue; exports.setConfigCatFeatureFlagValues = setConfigCatFeatureFlagValues; exports.setDeviceAPIEndpoint = setDeviceAPIEndpoint; exports.unwrapConnection = _chunkVTRGMAG3js.unwrapConnection; exports.upgrade = upgrade; exports.validateManifest = validateManifest; exports.vaultCoins = _chunkVTRGMAG3js.vaultCoins; exports.wait = _chunkVTRGMAG3js.wait; exports.wipeBackend = wipeBackend_default; exports.xpubToExtendedPubKey = _chunkVTRGMAG3js.xpubToExtendedPubKey;
3269
3269
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkK34PJKKUjs = require('./chunk-K34PJKKU.js');
5
- require('./chunk-3TPBAEKC.js');
4
+ var _chunkDYC7MJCFjs = require('./chunk-DYC7MJCF.js');
5
+ require('./chunk-VTRGMAG3.js');
6
6
  require('./chunk-PZ5AY32C.js');
7
7
 
8
8
 
9
9
 
10
- exports.default = _chunkK34PJKKUjs.recipeManifest; exports.getDeviceIndex = _chunkK34PJKKUjs.getDeviceIndex;
10
+ exports.default = _chunkDYC7MJCFjs.recipeManifest; exports.getDeviceIndex = _chunkDYC7MJCFjs.getDeviceIndex;
11
11
  //# sourceMappingURL=recipeManifest.js.map
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkKFDJBREOjs = require('./chunk-KFDJBREO.js');
4
- require('./chunk-ZRIXMEBK.js');
5
- require('./chunk-3TPBAEKC.js');
3
+ var _chunk5FIUXT4Vjs = require('./chunk-5FIUXT4V.js');
4
+ require('./chunk-GGTW7SXQ.js');
5
+ require('./chunk-VTRGMAG3.js');
6
6
  require('./chunk-3L2XDBZ2.js');
7
7
  require('./chunk-PZ5AY32C.js');
8
8
 
9
9
 
10
- exports.default = _chunkKFDJBREOjs.reviewAPIRequest_default;
10
+ exports.default = _chunk5FIUXT4Vjs.reviewAPIRequest_default;
11
11
  //# sourceMappingURL=reviewAPIRequest.js.map
package/lib/utils.js CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
 
18
- var _chunk3TPBAEKCjs = require('./chunk-3TPBAEKC.js');
18
+ var _chunkVTRGMAG3js = require('./chunk-VTRGMAG3.js');
19
19
  require('./chunk-PZ5AY32C.js');
20
20
 
21
21
 
@@ -34,5 +34,5 @@ require('./chunk-PZ5AY32C.js');
34
34
 
35
35
 
36
36
 
37
- exports.LIGHT_EVM_CURRENCIES = _chunk3TPBAEKCjs.LIGHT_EVM_CURRENCIES; exports.deserializeUnitValue = _chunk3TPBAEKCjs.deserializeUnitValue; exports.extractSecureChannel = _chunk3TPBAEKCjs.extractSecureChannel; exports.getAccountTypeByCurrency = _chunk3TPBAEKCjs.getAccountTypeByCurrency; exports.getAccountUnit = _chunk3TPBAEKCjs.getAccountUnit; exports.getCurrencyOrToken = _chunk3TPBAEKCjs.getCurrencyOrToken; exports.getCurrencyUnit = _chunk3TPBAEKCjs.getCurrencyUnit; exports.getDefaultUsername = _chunk3TPBAEKCjs.getDefaultUsername; exports.getGateAccountUnit = _chunk3TPBAEKCjs.getGateAccountUnit; exports.getTokenUnit = _chunk3TPBAEKCjs.getTokenUnit; exports.getWorkspaceFromGate = _chunk3TPBAEKCjs.getWorkspaceFromGate; exports.queue = _chunk3TPBAEKCjs.queue; exports.serializeUnitValue = _chunk3TPBAEKCjs.serializeUnitValue; exports.unwrapConnection = _chunk3TPBAEKCjs.unwrapConnection; exports.wait = _chunk3TPBAEKCjs.wait; exports.xpubToExtendedPubKey = _chunk3TPBAEKCjs.xpubToExtendedPubKey;
37
+ exports.LIGHT_EVM_CURRENCIES = _chunkVTRGMAG3js.LIGHT_EVM_CURRENCIES; exports.deserializeUnitValue = _chunkVTRGMAG3js.deserializeUnitValue; exports.extractSecureChannel = _chunkVTRGMAG3js.extractSecureChannel; exports.getAccountTypeByCurrency = _chunkVTRGMAG3js.getAccountTypeByCurrency; exports.getAccountUnit = _chunkVTRGMAG3js.getAccountUnit; exports.getCurrencyOrToken = _chunkVTRGMAG3js.getCurrencyOrToken; exports.getCurrencyUnit = _chunkVTRGMAG3js.getCurrencyUnit; exports.getDefaultUsername = _chunkVTRGMAG3js.getDefaultUsername; exports.getGateAccountUnit = _chunkVTRGMAG3js.getGateAccountUnit; exports.getTokenUnit = _chunkVTRGMAG3js.getTokenUnit; exports.getWorkspaceFromGate = _chunkVTRGMAG3js.getWorkspaceFromGate; exports.queue = _chunkVTRGMAG3js.queue; exports.serializeUnitValue = _chunkVTRGMAG3js.serializeUnitValue; exports.unwrapConnection = _chunkVTRGMAG3js.unwrapConnection; exports.wait = _chunkVTRGMAG3js.wait; exports.xpubToExtendedPubKey = _chunkVTRGMAG3js.xpubToExtendedPubKey;
38
38
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/vault-common",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/LedgerHQ/vault-ts",
6
6
  "license": "BSD-2-Clause",