@exodus/hw-ledger 2.9.0 → 2.9.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.9.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.9.0...@exodus/hw-ledger@2.9.1) (2024-07-18)
7
+
8
+ **Note:** Version bump only for package @exodus/hw-ledger
9
+
6
10
  ## [2.9.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.8.1...@exodus/hw-ledger@2.9.0) (2024-07-16)
7
11
 
8
12
  ### Features
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { bluetoothStatusAtomDefinition, bluetoothScanningAtomDefinition } from './atoms';
2
2
  import ledgerDiscoveryDefinition from './module';
3
3
  import hardwareWalletLedgerPluginDefinition from './plugin';
4
- const hardwareWalletLedger = ({ bluetoothScannerTimeout = 10000, } = {}) => {
4
+ const hardwareWalletLedger = ({ bluetoothScannerTimeout = 10_000, } = {}) => {
5
5
  return {
6
6
  id: 'hardwareWalletLedger',
7
7
  definitions: [
@@ -3,6 +3,6 @@ declare const metadata: {
3
3
  applicationName: string;
4
4
  supportedVersions: string;
5
5
  }[];
6
- handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletAssetHandler<import("libraries/hw-common/lib").Message>>;
6
+ handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletAssetHandler>;
7
7
  };
8
8
  export default metadata;
@@ -3,6 +3,6 @@ declare const metadata: {
3
3
  applicationName: string;
4
4
  supportedVersions: string;
5
5
  }[];
6
- handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletAssetHandler<import("libraries/hw-common/lib").Message>>;
6
+ handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletAssetHandler>;
7
7
  };
8
8
  export default metadata;
@@ -25,12 +25,12 @@ export function assertBip44PathNumber(parts) {
25
25
  }
26
26
  export function buildBip44PathFromNumber(parts) {
27
27
  const [purpose, coin, account, chainIndex, addressIndex] = parts;
28
- const HARDENED_OFFSET = 2147483648;
28
+ const HARDENED_OFFSET = 0x80_00_00_00;
29
29
  return `m/${purpose - HARDENED_OFFSET}'/${coin - HARDENED_OFFSET}'/${account - HARDENED_OFFSET}'/${chainIndex}/${addressIndex}`;
30
30
  }
31
31
  export function splitBip44PathToNumber(derivationPath) {
32
32
  const [purpose, coin, account, change, address] = splitBip44DerivationPath(derivationPath);
33
- const HARDENED_OFFSET = 2147483648;
33
+ const HARDENED_OFFSET = 0x80_00_00_00;
34
34
  return [
35
35
  Number(purpose.replaceAll(`'`, '')) + HARDENED_OFFSET,
36
36
  Number(coin.replaceAll(`'`, '')) + HARDENED_OFFSET,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { DefaultWalletPolicy, PsbtV2, WalletPolicy } from '@exodus/ledger-bitcoin';
3
2
  export declare function assertPsbtOnlyHasAllowedDerivationPaths(psbt: PsbtV2, masterFingerprint: string, derivationPaths: string[]): void;
4
3
  export declare function tagPsbtWithDerivationPaths(psbt: PsbtV2, masterFingerprint: string, derivationPathToPublicKeyMap: Record<string, Buffer>): void;
@@ -1,2 +1 @@
1
- /// <reference types="node" />
2
1
  export declare function buildFauxXPUB(publicKey: Buffer, chainCode: Buffer): string;
@@ -1,9 +1,9 @@
1
1
  import bs58check from 'bs58check';
2
2
  export function buildFauxXPUB(publicKey, chainCode) {
3
3
  const LEN = 78;
4
- const XPUB_PREFIX = 76067358;
4
+ const XPUB_PREFIX = 0x04_88_b2_1e;
5
5
  const buffer = Buffer.allocUnsafe(LEN);
6
- const fingerprint = 0;
6
+ const fingerprint = 0x00_00_00_00;
7
7
  const depth = 0;
8
8
  const index = 0;
9
9
  buffer.writeUInt32BE(XPUB_PREFIX, 0);
@@ -1 +1 @@
1
- export const APDU_PORT = 40000;
1
+ export const APDU_PORT = 40_000;
@@ -77,7 +77,7 @@ export class LedgerDevice {
77
77
  break;
78
78
  }
79
79
  catch (err) {
80
- const APPLICATION_NOT_INSTALLED = 26631;
80
+ const APPLICATION_NOT_INSTALLED = 0x68_07;
81
81
  if (err.statusCode === APPLICATION_NOT_INSTALLED) {
82
82
  continue;
83
83
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type Transport from '@ledgerhq/hw-transport';
3
2
  export type GetInformationResponse = {
4
3
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/hw-ledger",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "The ledger module",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -19,9 +19,9 @@
19
19
  "./CHANGELOG.md"
20
20
  ],
21
21
  "scripts": {
22
- "build": "tsc --build tsconfig.build.json",
23
- "build:watch": "tsc --build tsconfig.build.json && (concurrently 'tsc --build -w tsconfig.build.json')",
24
- "clean": "tsc --build --clean",
22
+ "build": "run -T tsc --build tsconfig.build.json",
23
+ "build:watch": "run -T tsc --build tsconfig.build.json && (concurrently 'tsc --build -w tsconfig.build.json')",
24
+ "clean": "run -T tsc --build --clean",
25
25
  "test": "run -T jest --testMatch='**/*.unit.test.js' --coverageDirectory coverage/unit",
26
26
  "zemu:install": "docker pull zondax/builder-zemu:speculos-745fe46f81cfc18114b94a37beaefb58a09c0fcd",
27
27
  "test:integration": "yarn zemu:install && run -T jest --runInBand",
@@ -30,7 +30,7 @@
30
30
  "prepublishOnly": "yarn run -T build --scope @exodus/hw-ledger"
31
31
  },
32
32
  "dependencies": {
33
- "@exodus/atoms": "^7.5.1",
33
+ "@exodus/atoms": "^8.0.0",
34
34
  "@exodus/bip322-js": "^1.1.0-exodus.4",
35
35
  "@exodus/bitcoinjs-lib": "^6.1.5-exodus.0",
36
36
  "@exodus/ethersproject-transactions": "^5.4.2-exodus.0",
@@ -69,8 +69,7 @@
69
69
  "jest-when": "^3.5.2",
70
70
  "redux": "^4.2.1",
71
71
  "tiny-secp256k1": "^2.2.3",
72
- "ts-jest": "^29.0.3",
73
- "typescript": "^4.7.3"
72
+ "ts-jest": "^29.0.3"
74
73
  },
75
- "gitHead": "03f1666538fa7d596c729b77a380f891f7e747e4"
74
+ "gitHead": "a76a22c96445bcaa05e18de0e0c323cf9dd04cba"
76
75
  }