@injectivelabs/wallet-ledger 1.20.6 → 1.20.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Cosmos-l-IuZLXL.cjs → Cosmos-B_NOHQnN.cjs} +2 -2
- package/dist/cjs/{Eth-CvWEOFRz.cjs → Eth-Ybi7hTql.cjs} +141 -219
- package/dist/cjs/{TransportWebHID-DPqE45rT.cjs → TransportWebHID-C18Hi-M_.cjs} +9 -5
- package/dist/cjs/{TransportWebUSB-D3FMGQeX.cjs → TransportWebUSB-BjaMVGfl.cjs} +5 -5
- package/dist/cjs/index.cjs +12561 -40
- package/dist/cjs/{lib-es-DXCnHHEe.cjs → lib-es-CD0-G1Y4.cjs} +10 -10
- package/dist/cjs/{lib-es-BWIKEHed.cjs → lib-es-CefXAhU8.cjs} +16 -3
- package/dist/cjs/{semver-DDHpoi7E.cjs → semver-Dq3Fxoe_.cjs} +2 -2
- package/dist/esm/{Cosmos-DN_KoG35.js → Cosmos-CJitD21w.js} +2 -2
- package/dist/esm/{Eth-DezsK7L6.js → Eth-CCX352qZ.js} +141 -219
- package/dist/esm/{TransportWebHID-DVYevMkI.js → TransportWebHID-lwyKQnko.js} +9 -5
- package/dist/esm/{TransportWebUSB-YjY3xn9n.js → TransportWebUSB-ZTF4O-M2.js} +5 -5
- package/dist/esm/index.js +12560 -39
- package/dist/esm/{lib-es-DrwRIZm6.js → lib-es-B0_OnYuj.js} +16 -3
- package/dist/esm/{lib-es-B3JjM59t.js → lib-es-DrrkPby3.js} +10 -10
- package/dist/esm/{semver-SXdKWIAb.js → semver-DAjTm0lz.js} +2 -2
- package/package.json +11 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_lib_es = require('./lib-es-
|
|
2
|
-
const require_semver$1 = require('./semver-
|
|
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.
|
|
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.
|
|
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.
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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-
|
|
1
|
+
const require_lib_es = require('./lib-es-CefXAhU8.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../../node_modules/.pnpm/@ledgerhq+logs@6.
|
|
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-
|
|
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.
|
|
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;
|