@exodus/hw-ledger 2.13.0 → 3.0.0
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 +14 -0
- package/lib/module/assets/bitcoin.d.ts +4 -0
- package/lib/module/device.js +1 -1
- package/lib/module/discovery.d.ts +0 -1
- package/lib/module/discovery.js +2 -10
- package/lib/module/errors.d.ts +0 -4
- package/lib/module/errors.js +0 -6
- package/lib/module/management/application.d.ts +1 -1
- package/lib/module/management/application.js +1 -1
- package/package.json +6 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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
|
+
## [3.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.13.1...@exodus/hw-ledger@3.0.0) (2024-10-15)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- remove `getFirstDevice` from hardware wallet discovery (#9821)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- remove `getFirstDevice` from hardware wallet discovery ([#9821](https://github.com/ExodusMovement/exodus-hydra/issues/9821)) ([ad3e902](https://github.com/ExodusMovement/exodus-hydra/commit/ad3e902fd9e27dfccd8311089b6d966767cc6d0a))
|
|
15
|
+
|
|
16
|
+
## [2.13.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.13.0...@exodus/hw-ledger@2.13.1) (2024-10-09)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @exodus/hw-ledger
|
|
19
|
+
|
|
6
20
|
## [2.13.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.12.0...@exodus/hw-ledger@2.13.0) (2024-10-03)
|
|
7
21
|
|
|
8
22
|
### Features
|
|
@@ -7,6 +7,10 @@ export interface BitcoinMessage {
|
|
|
7
7
|
address: string;
|
|
8
8
|
message: Bytes;
|
|
9
9
|
};
|
|
10
|
+
bip137Message?: {
|
|
11
|
+
address: string;
|
|
12
|
+
message: Bytes;
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
15
|
declare function createHandler(transport: Transport, walletPolicyAtom?: Atom<Record<string, Buffer>>): Promise<HardwareWalletAssetHandler<BitcoinMessage>>;
|
|
12
16
|
declare const metadata: {
|
package/lib/module/device.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import semver from 'semver';
|
|
2
2
|
import { AssetUnsupportedError, DeviceLockedError, DeviceConnectionError, UserRefusedError, } from '@exodus/hw-common';
|
|
3
3
|
import { applicationNameToBaseAssetNames, assetApplications, supportedBaseAssetNames, } from './assets';
|
|
4
|
-
import applicationFactory from './management/application';
|
|
4
|
+
import { createApplicationManager as applicationFactory } from './management/application';
|
|
5
5
|
import { UnsupportedVersionError, ApplicationNotFoundError } from './errors';
|
|
6
6
|
export class LedgerDevice {
|
|
7
7
|
#transportFactory;
|
|
@@ -18,7 +18,6 @@ export declare class LedgerDiscovery implements HardwareWalletDiscovery {
|
|
|
18
18
|
scan: () => Promise<void>;
|
|
19
19
|
stopScan: (clearDevices?: boolean) => void;
|
|
20
20
|
list: () => Promise<HardwareWalletDescriptor[]>;
|
|
21
|
-
getFirstDevice: () => Promise<import("@exodus/hw-common").HardwareWalletDevice<import("@exodus/hw-common").Message>>;
|
|
22
21
|
stop: () => Promise<void>;
|
|
23
22
|
}
|
|
24
23
|
declare const _default: {
|
package/lib/module/discovery.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getInfosForServiceUuid, identifyUSBProductId } from '@exodus/ledgerhq-devices';
|
|
2
2
|
import { APDU_PORT } from './constants';
|
|
3
3
|
import { LedgerDevice } from './device';
|
|
4
|
-
import {
|
|
4
|
+
import { UnknownTransportError } from './errors';
|
|
5
5
|
const MODULE_ID = 'ledgerDiscovery';
|
|
6
6
|
export class LedgerDiscovery {
|
|
7
7
|
#logger;
|
|
@@ -114,8 +114,7 @@ export class LedgerDiscovery {
|
|
|
114
114
|
break;
|
|
115
115
|
case 'bluetooth':
|
|
116
116
|
const bluetoothDeviceList = Object.values(this.#discoveredBluetoothDevices).map((bluetoothDevice) => {
|
|
117
|
-
const deviceModel = getInfosForServiceUuid(bluetoothDevice.serviceUUIDs?.[0] ?? '')
|
|
118
|
-
?.deviceModel;
|
|
117
|
+
const deviceModel = getInfosForServiceUuid(bluetoothDevice.serviceUUIDs?.[0] ?? '')?.deviceModel;
|
|
119
118
|
return {
|
|
120
119
|
name: bluetoothDevice.localName ?? deviceModel?.productName,
|
|
121
120
|
manufacturer: 'ledger',
|
|
@@ -149,13 +148,6 @@ export class LedgerDiscovery {
|
|
|
149
148
|
}
|
|
150
149
|
return descriptors;
|
|
151
150
|
};
|
|
152
|
-
getFirstDevice = async () => {
|
|
153
|
-
const devices = await this.list();
|
|
154
|
-
if (devices[0]) {
|
|
155
|
-
return devices[0].get();
|
|
156
|
-
}
|
|
157
|
-
throw new NoDeviceFoundError();
|
|
158
|
-
};
|
|
159
151
|
stop = async () => {
|
|
160
152
|
this.#statusBluetooth?.unsubscribe();
|
|
161
153
|
};
|
package/lib/module/errors.d.ts
CHANGED
|
@@ -3,10 +3,6 @@ export declare class UnknownTransportError extends HardwareWalletError {
|
|
|
3
3
|
name: string;
|
|
4
4
|
constructor(transportName?: string);
|
|
5
5
|
}
|
|
6
|
-
export declare class NoDeviceFoundError extends HardwareWalletError {
|
|
7
|
-
name: string;
|
|
8
|
-
constructor();
|
|
9
|
-
}
|
|
10
6
|
export declare class ApplicationNotFoundError extends HardwareWalletError {
|
|
11
7
|
name: string;
|
|
12
8
|
supportedApplications: string[];
|
package/lib/module/errors.js
CHANGED
|
@@ -5,12 +5,6 @@ export class UnknownTransportError extends HardwareWalletError {
|
|
|
5
5
|
super(`unknown transport type ${transportName || ''}`);
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export class NoDeviceFoundError extends HardwareWalletError {
|
|
9
|
-
name = 'NoDeviceFoundError';
|
|
10
|
-
constructor() {
|
|
11
|
-
super(`unable to find a connected device`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
8
|
export class ApplicationNotFoundError extends HardwareWalletError {
|
|
15
9
|
name = 'ApplicationNotFoundError';
|
|
16
10
|
supportedApplications;
|
|
@@ -11,7 +11,7 @@ export type ListAppResponse = {
|
|
|
11
11
|
blocks?: number;
|
|
12
12
|
flags?: number;
|
|
13
13
|
}[];
|
|
14
|
-
export
|
|
14
|
+
export declare function createApplicationManager(transport: Transport): Promise<{
|
|
15
15
|
getInformation: () => Promise<GetInformationResponse>;
|
|
16
16
|
listApplications: () => Promise<ListAppResponse>;
|
|
17
17
|
openApplication: (name: string) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hw-ledger",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "The ledger module",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "run -T tsc --build tsconfig.build.json",
|
|
23
|
-
"build:watch": "run -T tsc --build tsconfig.build.json &&
|
|
23
|
+
"build:watch": "run -T tsc --build tsconfig.build.json && run -T tsc --build -w tsconfig.build.json",
|
|
24
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
|
-
"test:integration": "yarn zemu:install && run -T jest --
|
|
27
|
+
"test:integration": "yarn zemu:install && run -T exodus-test --jest --esbuild",
|
|
28
28
|
"lint": "run -T eslint .",
|
|
29
29
|
"lint:fix": "yarn lint --fix",
|
|
30
30
|
"prepublishOnly": "yarn run -T build --scope @exodus/hw-ledger"
|
|
@@ -34,7 +34,7 @@
|
|
|
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",
|
|
37
|
-
"@exodus/hw-common": "^2.5.
|
|
37
|
+
"@exodus/hw-common": "^2.5.1",
|
|
38
38
|
"@exodus/ledger-bitcoin": "^0.2.3-exodus.3",
|
|
39
39
|
"@exodus/ledgerhq-devices": "^8.1.0-exodus.3",
|
|
40
40
|
"@exodus/ledgerhq-hw-app-eth": "^6.33.7-exodus.8",
|
|
@@ -50,26 +50,20 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@exodus/bip32": "^3.3.0",
|
|
53
|
-
"@exodus/
|
|
53
|
+
"@exodus/dependency-types": "^2.1.0",
|
|
54
54
|
"@ledgerhq/hw-transport-node-hid": "^6.27.17",
|
|
55
|
-
"@ledgerhq/hw-transport-node-speculos": "^6.27.16",
|
|
56
55
|
"@solana/web3.js": "^1.78.0",
|
|
57
56
|
"@types/bs58": "^4.0.1",
|
|
58
57
|
"@types/bs58check": "^2.1.0",
|
|
59
|
-
"@types/create-hash": "^1.2.6",
|
|
60
|
-
"@types/jest-when": "^3.5.2",
|
|
61
58
|
"@types/minimalistic-assert": "^1.0.1",
|
|
62
59
|
"@types/secp256k1": "^4.0.3",
|
|
63
60
|
"@types/semver": "^7.3.5",
|
|
64
61
|
"@zondax/zemu": "^0.43.1",
|
|
65
62
|
"bitcoinjs-lib": "^6.1.3",
|
|
66
|
-
"concurrently": "^7.6.0",
|
|
67
63
|
"ecpair": "^2.1.0",
|
|
68
|
-
"istanbul-combine": "^0.3.0",
|
|
69
|
-
"jest-when": "^3.5.2",
|
|
70
64
|
"redux": "^4.2.1",
|
|
71
65
|
"tiny-secp256k1": "^2.2.3",
|
|
72
66
|
"ts-jest": "^29.0.3"
|
|
73
67
|
},
|
|
74
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "50ae8273c930389d0054db9207c7f1d9b0f6ed77"
|
|
75
69
|
}
|