@injectivelabs/wallet-ledger 1.20.5 → 1.20.7

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.
@@ -1,10 +1,10 @@
1
- const require_lib_es = require('./lib-es-BWIKEHed.cjs');
2
- const require_semver$1 = require('./semver-DDHpoi7E.cjs');
1
+ const require_lib_es = require('./lib-es-CefXAhU8.cjs');
2
+ const require_semver$1 = require('./semver-Dq3Fxoe_.cjs');
3
3
  let buffer = require("buffer");
4
4
  let events = require("events");
5
5
  events = require_lib_es.__toESM(events);
6
6
 
7
- //#region ../../../node_modules/.pnpm/@ledgerhq+hw-transport@6.32.0/node_modules/@ledgerhq/hw-transport/lib-es/Transport.js
7
+ //#region ../../../node_modules/.pnpm/@ledgerhq+hw-transport@6.35.4/node_modules/@ledgerhq/hw-transport/lib-es/Transport.js
8
8
  const DEFAULT_LOG_TYPE = "transport";
9
9
  /**
10
10
  * The Transport class defines a generic interface for communicating with a Ledger hardware wallet.
@@ -316,7 +316,7 @@ var Transport = class {
316
316
  };
317
317
 
318
318
  //#endregion
319
- //#region ../../../node_modules/.pnpm/@ledgerhq+devices@8.10.0/node_modules/@ledgerhq/devices/lib-es/hid-framing.js
319
+ //#region ../../../node_modules/.pnpm/@ledgerhq+devices@8.15.1/node_modules/@ledgerhq/devices/lib-es/hid-framing.js
320
320
  const Tag = 5;
321
321
  function asUInt16BE(value) {
322
322
  const b = buffer.Buffer.alloc(2);
@@ -348,7 +348,7 @@ const createHIDframing = (channel, packetSize) => {
348
348
  head.writeUInt8(Tag, 2);
349
349
  head.writeUInt16BE(i, 3);
350
350
  const chunk = data.slice(i * blockSize, (i + 1) * blockSize);
351
- blocks.push(buffer.Buffer.concat([head, chunk]));
351
+ blocks.push(new Uint8Array(buffer.Buffer.concat([head, chunk])));
352
352
  }
353
353
  return blocks;
354
354
  },
@@ -376,7 +376,7 @@ const createHIDframing = (channel, packetSize) => {
376
376
  var hid_framing_default = createHIDframing;
377
377
 
378
378
  //#endregion
379
- //#region ../../../node_modules/.pnpm/@ledgerhq+devices@8.10.0/node_modules/@ledgerhq/devices/lib-es/index.js
379
+ //#region ../../../node_modules/.pnpm/@ledgerhq+devices@8.15.1/node_modules/@ledgerhq/devices/lib-es/index.js
380
380
  var import_semver = /* @__PURE__ */ require_lib_es.__toESM(require_semver$1.require_semver());
381
381
  var DeviceModelId;
382
382
  (function(DeviceModelId$1) {
@@ -440,7 +440,7 @@ const devices = {
440
440
  usbOnly: true,
441
441
  memorySize: 1533 * 1024,
442
442
  masks: [856686592],
443
- getBlockSize: (_firmwareVersion) => 32
443
+ getBlockSize: (_firmwareVersion) => 512
444
444
  },
445
445
  [DeviceModelId.apex]: {
446
446
  id: DeviceModelId.apex,
@@ -450,7 +450,7 @@ const devices = {
450
450
  usbOnly: false,
451
451
  memorySize: 1533 * 1024,
452
452
  masks: [859832320],
453
- getBlockSize: (_firmwareVersion) => 32,
453
+ getBlockSize: (_firmwareVersion) => 512,
454
454
  bluetoothSpec: [{
455
455
  serviceUuid: "13d63400-2c97-8004-0000-4c6564676572",
456
456
  notifyUuid: "13d63400-2c97-8004-0001-4c6564676572",
@@ -466,7 +466,7 @@ const devices = {
466
466
  usbOnly: false,
467
467
  memorySize: 1533 * 1024,
468
468
  masks: [857735168],
469
- getBlockSize: (_firmwareVersion) => 32,
469
+ getBlockSize: (_firmwareVersion) => 512,
470
470
  bluetoothSpec: [{
471
471
  serviceUuid: "13d63400-2c97-6004-0000-4c6564676572",
472
472
  notifyUuid: "13d63400-2c97-6004-0001-4c6564676572",
@@ -482,7 +482,7 @@ const devices = {
482
482
  usbOnly: false,
483
483
  memorySize: 1533 * 1024,
484
484
  masks: [858783744],
485
- getBlockSize: (_firmwareVersion) => 32,
485
+ getBlockSize: (_firmwareVersion) => 512,
486
486
  bluetoothSpec: [{
487
487
  serviceUuid: "13d63400-2c97-3004-0000-4c6564676572",
488
488
  notifyUuid: "13d63400-2c97-3004-0001-4c6564676572",
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
 
28
28
  //#endregion
29
29
 
30
- //#region ../../../node_modules/.pnpm/@ledgerhq+errors@6.29.0/node_modules/@ledgerhq/errors/lib-es/helpers.js
30
+ //#region ../../../node_modules/.pnpm/@ledgerhq+errors@6.36.0/node_modules/@ledgerhq/errors/lib-es/helpers.js
31
31
  const errorClasses = {};
32
32
  const deserializers = {};
33
33
  const addCustomErrorDeserializer = (name, deserializer) => {
@@ -56,7 +56,7 @@ function isObject(value) {
56
56
  }
57
57
 
58
58
  //#endregion
59
- //#region ../../../node_modules/.pnpm/@ledgerhq+errors@6.29.0/node_modules/@ledgerhq/errors/lib-es/index.js
59
+ //#region ../../../node_modules/.pnpm/@ledgerhq+errors@6.36.0/node_modules/@ledgerhq/errors/lib-es/index.js
60
60
  const AccountNameRequiredError = createCustomErrorClass("AccountNameRequired");
61
61
  const AccountNotSupported = createCustomErrorClass("AccountNotSupported");
62
62
  const AccountAwaitingSendPendingOperations = createCustomErrorClass("AccountAwaitingSendPendingOperations");
@@ -92,6 +92,7 @@ const FirmwareNotRecognized = createCustomErrorClass("FirmwareNotRecognized");
92
92
  const HardResetFail = createCustomErrorClass("HardResetFail");
93
93
  const InvalidXRPTag = createCustomErrorClass("InvalidXRPTag");
94
94
  const InvalidAddress = createCustomErrorClass("InvalidAddress");
95
+ const InvalidTransactionError = createCustomErrorClass("InvalidTransactionError");
95
96
  const InvalidNonce = createCustomErrorClass("InvalidNonce");
96
97
  const InvalidAddressBecauseDestinationIsAlsoSource = createCustomErrorClass("InvalidAddressBecauseDestinationIsAlsoSource");
97
98
  const LatestMCUInstalledError = createCustomErrorClass("LatestMCUInstalledError");
@@ -177,6 +178,8 @@ const FeeNotLoaded = createCustomErrorClass("FeeNotLoaded");
177
178
  const FeeNotLoadedSwap = createCustomErrorClass("FeeNotLoadedSwap");
178
179
  const FeeRequired = createCustomErrorClass("FeeRequired");
179
180
  const FeeTooHigh = createCustomErrorClass("FeeTooHigh");
181
+ const ValAddressRequired = createCustomErrorClass("ValAddressRequired");
182
+ const RedelegateDstValAddressRequired = createCustomErrorClass("RedelegateDstValAddressRequired");
180
183
  const PendingOperation = createCustomErrorClass("PendingOperation");
181
184
  const SyncError = createCustomErrorClass("SyncError");
182
185
  const PairingFailed = createCustomErrorClass("PairingFailed");
@@ -188,12 +191,20 @@ const FirmwareOrAppUpdateRequired = createCustomErrorClass("FirmwareOrAppUpdateR
188
191
  const ReplacementTransactionUnderpriced = createCustomErrorClass("ReplacementTransactionUnderpriced");
189
192
  const OpReturnDataSizeLimit = createCustomErrorClass("OpReturnSizeLimit");
190
193
  const DustLimit = createCustomErrorClass("DustLimit");
194
+ const ConcordiumInsufficientFunds = createCustomErrorClass("ConcordiumInsufficientFunds");
195
+ const ConcordiumMemoTooLong = createCustomErrorClass("ConcordiumMemoTooLong");
196
+ const ConcordiumPairingExpiredError = createCustomErrorClass("ConcordiumPairingExpiredError");
197
+ const ConcordiumSessionExpiredError = createCustomErrorClass("ConcordiumSessionExpiredError");
198
+ const ConcordiumTrustedMetadataServiceError = createCustomErrorClass("ConcordiumTrustedMetadataServiceError");
199
+ const ConcordiumAddressVerificationFailedError = createCustomErrorClass("ConcordiumAddressVerificationFailedError");
200
+ const ConcordiumInvalidMaxFeeError = createCustomErrorClass("ConcordiumInvalidMaxFeeError");
191
201
  const LanguageNotFound = createCustomErrorClass("LanguageNotFound");
192
202
  const NoDBPathGiven = createCustomErrorClass("NoDBPathGiven");
193
203
  const DBWrongPassword = createCustomErrorClass("DBWrongPassword");
194
204
  const DBNotReset = createCustomErrorClass("DBNotReset");
195
205
  const SequenceNumberError = createCustomErrorClass("SequenceNumberError");
196
206
  const DisabledTransactionBroadcastError = createCustomErrorClass("DisabledTransactionBroadcastError");
207
+ const InvalidParameterError = createCustomErrorClass("InvalidParameterError");
197
208
  /**
198
209
  * Type of a Transport error used to represent all equivalent errors coming from all possible implementation of Transport
199
210
  */
@@ -224,6 +235,7 @@ const StatusCodes = {
224
235
  ACCESS_CONDITION_NOT_FULFILLED: 38916,
225
236
  ALGORITHM_NOT_SUPPORTED: 38020,
226
237
  CLA_NOT_SUPPORTED: 28160,
238
+ CLA_NOT_SUPPORTED_BOOTLOADER: 28161,
227
239
  CODE_BLOCKED: 38976,
228
240
  CODE_NOT_INITIALIZED: 38914,
229
241
  COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 27009,
@@ -272,7 +284,7 @@ const StatusCodes = {
272
284
  INVALID_RESTORE_STATE: 26179,
273
285
  INVALID_CHUNK_LENGTH: 26420,
274
286
  INVALID_BACKUP_HEADER: 26698,
275
- TRUSTCHAIN_WRONG_SEED: 45063
287
+ SW_BAD_STATE: 45063
276
288
  };
277
289
  function getAltStatusMessage(code) {
278
290
  switch (code) {
@@ -283,6 +295,7 @@ function getAltStatusMessage(code) {
283
295
  case 27264: return "Invalid data received";
284
296
  case 27392: return "Invalid parameter received";
285
297
  case 21781: return "Locked device";
298
+ case 45063: return "Unexpected state on the device";
286
299
  }
287
300
  if (28416 <= code && code <= 28671) return "Internal error, please report";
288
301
  }
@@ -1,6 +1,6 @@
1
- const require_lib_es = require('./lib-es-BWIKEHed.cjs');
1
+ const require_lib_es = require('./lib-es-CefXAhU8.cjs');
2
2
 
3
- //#region ../../../node_modules/.pnpm/@ledgerhq+logs@6.14.0/node_modules/@ledgerhq/logs/lib-es/index.js
3
+ //#region ../../../node_modules/.pnpm/@ledgerhq+logs@6.17.0/node_modules/@ledgerhq/logs/lib-es/index.js
4
4
  let id = 0;
5
5
  const subscribers = [];
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { f as __commonJSMin, m as __toESM, u as UserRefusedOnDevice } from "./lib-es-DrwRIZm6.js";
1
+ import { f as __commonJSMin, m as __toESM, u as UserRefusedOnDevice } from "./lib-es-B0_OnYuj.js";
2
2
  import { Buffer } from "buffer";
3
3
 
4
4
  //#region ../../../node_modules/.pnpm/bip32-path@0.4.2/node_modules/bip32-path/index.js
@@ -63,7 +63,7 @@ var require_bip32_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
63
63
  }));
64
64
 
65
65
  //#endregion
66
- //#region ../../../node_modules/.pnpm/@ledgerhq+hw-app-cosmos@6.33.0/node_modules/@ledgerhq/hw-app-cosmos/lib-es/Cosmos.js
66
+ //#region ../../../node_modules/.pnpm/@ledgerhq+hw-app-cosmos@6.36.4/node_modules/@ledgerhq/hw-app-cosmos/lib-es/Cosmos.js
67
67
  var import_bip32_path = /* @__PURE__ */ __toESM(require_bip32_path());
68
68
  const CHUNK_SIZE = 250;
69
69
  const CLA = 85;