@exodus/hw-ledger 3.4.2 → 3.5.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 +12 -0
- package/README.md +1 -1
- package/lib/atoms/index.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/module/assets/ethereum.js +6 -6
- package/lib/module/device.d.ts +2 -2
- package/lib/module/discovery.js +2 -2
- package/lib/plugin/index.js +1 -1
- package/lib/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.5.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@3.4.3...@exodus/hw-ledger@3.5.0) (2025-05-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat: switch hw-ledger from metamask/eth-sig-util to our fixed impl (#12750)
|
|
11
|
+
|
|
12
|
+
## [3.4.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@3.4.2...@exodus/hw-ledger@3.4.3) (2025-03-05)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- fix: bump bip32 (#11415)
|
|
17
|
+
|
|
6
18
|
## [3.4.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@3.4.1...@exodus/hw-ledger@3.4.2) (2024-12-20)
|
|
7
19
|
|
|
8
20
|
### License
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ yarn add @exodus/hw-ledger
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/
|
|
13
|
+
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/development/using-the-sdk.md).
|
|
14
14
|
|
|
15
15
|
### API Side
|
|
16
16
|
|
package/lib/atoms/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type Params = {
|
|
|
23
23
|
export declare const walletPolicyAtomDefinition: {
|
|
24
24
|
readonly id: "walletPolicyAtom";
|
|
25
25
|
readonly type: "atom";
|
|
26
|
-
readonly factory: ({ storage }: Params) => import("@exodus/atoms").Atom<Record<string, Buffer
|
|
26
|
+
readonly factory: ({ storage }: Params) => import("@exodus/atoms").Atom<Record<string, Buffer<ArrayBufferLike>> | {}>;
|
|
27
27
|
readonly dependencies: readonly ["storage"];
|
|
28
28
|
readonly public: true;
|
|
29
29
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
|
|
|
23
23
|
readonly type: "atom";
|
|
24
24
|
readonly factory: ({ storage }: {
|
|
25
25
|
storage: import("adapters/storage-interface").Storage<Record<string, Buffer>>;
|
|
26
|
-
}) => import("libraries/atoms/lib").Atom<Record<string, Buffer
|
|
26
|
+
}) => import("libraries/atoms/lib").Atom<Record<string, Buffer<ArrayBufferLike>> | {}>;
|
|
27
27
|
readonly dependencies: readonly ["storage"];
|
|
28
28
|
readonly public: true;
|
|
29
29
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as secp256k1 from '@exodus/crypto/secp256k1';
|
|
2
2
|
import * as ethers from '@exodus/ethersproject-transactions';
|
|
3
3
|
import AppEth, { ledgerService } from '@exodus/ledgerhq-hw-app-eth';
|
|
4
|
-
import { TypedDataUtils, SignTypedDataVersion } from '@
|
|
4
|
+
import { TypedDataUtils, SignTypedDataVersion } from '@exodus/ethereumjs/eth-sig-util';
|
|
5
5
|
import assert from 'minimalistic-assert';
|
|
6
6
|
import { buildFauxXPUB } from './utils';
|
|
7
7
|
import { RequiresBlindSigningError } from '../errors';
|
|
@@ -21,11 +21,11 @@ function hashEIP712Message(typedData) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
function isEIP712Message(message) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
if (typeof message !== 'object')
|
|
25
|
+
return false;
|
|
26
|
+
const ownKeys = ['types', 'primaryType', 'domain', 'message'];
|
|
27
|
+
const candidateKeys = Object.keys(message);
|
|
28
|
+
return (candidateKeys.length === ownKeys.length && candidateKeys.every((key) => ownKeys.includes(key)));
|
|
29
29
|
}
|
|
30
30
|
async function createHandler(transport) {
|
|
31
31
|
const app = new AppEth(transport);
|
package/lib/module/device.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class LedgerDevice implements HardwareWalletDevice {
|
|
|
17
17
|
listUseableAssetNames: () => Promise<string[]>;
|
|
18
18
|
getAddress: (params: GetAddressParams) => Promise<string>;
|
|
19
19
|
getXPub: (params: GetXPubParams) => Promise<string>;
|
|
20
|
-
getPublicKey: (params: GetPublicKeyParams) => Promise<Readonly<Uint8Array
|
|
20
|
+
getPublicKey: (params: GetPublicKeyParams) => Promise<Readonly<Uint8Array<ArrayBufferLike>>>;
|
|
21
21
|
signTransaction: (params: SignTransactionParams) => Promise<import("@exodus/hw-common").Signatures>;
|
|
22
|
-
signMessage: (params: SignMessageParams) => Promise<Readonly<Uint8Array
|
|
22
|
+
signMessage: (params: SignMessageParams) => Promise<Readonly<Uint8Array<ArrayBufferLike>>>;
|
|
23
23
|
}
|
package/lib/module/discovery.js
CHANGED
|
@@ -68,7 +68,7 @@ export class LedgerDiscovery {
|
|
|
68
68
|
},
|
|
69
69
|
complete: () => { },
|
|
70
70
|
});
|
|
71
|
-
this.#bluetoothScanningAtom.set(true);
|
|
71
|
+
void this.#bluetoothScanningAtom.set(true);
|
|
72
72
|
setTimeout(() => {
|
|
73
73
|
this.stopScan();
|
|
74
74
|
resolve();
|
|
@@ -85,7 +85,7 @@ export class LedgerDiscovery {
|
|
|
85
85
|
this.#discoveredBluetoothDevices = Object.create(null);
|
|
86
86
|
}
|
|
87
87
|
if (this.#scannerBluetooth) {
|
|
88
|
-
this.#bluetoothScanningAtom.set(false);
|
|
88
|
+
void this.#bluetoothScanningAtom.set(false);
|
|
89
89
|
this.#scannerBluetooth.unsubscribe();
|
|
90
90
|
this.#scannerBluetooth = undefined;
|
|
91
91
|
}
|
package/lib/plugin/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const createHardwareWalletLedgerPlugin = ({ bluetoothStatusAtom, bluetoothScanni
|
|
|
10
10
|
};
|
|
11
11
|
const stop = () => {
|
|
12
12
|
observers.forEach((observer) => observer.unregister());
|
|
13
|
-
ledgerDiscovery.stop();
|
|
13
|
+
void ledgerDiscovery.stop();
|
|
14
14
|
};
|
|
15
15
|
const onUnlock = () => {
|
|
16
16
|
start();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/atoms/index.ts","../src/module/constants.ts","../src/module/device.ts","../src/module/discovery.ts","../src/module/errors.ts","../src/module/index.ts","../src/module/types.ts","../src/module/assets/applications.ts","../src/module/assets/basemainnet.ts","../src/module/assets/bitcoin.ts","../src/module/assets/ethereum.ts","../src/module/assets/index.ts","../src/module/assets/matic.ts","../src/module/assets/solana.ts","../src/module/assets/tronmainnet.ts","../src/module/assets/types.d.ts","../src/module/assets/utils/bip322.ts","../src/module/assets/utils/derivation-paths.ts","../src/module/assets/utils/index.ts","../src/module/assets/utils/psbt.ts","../src/module/assets/utils/xpub.ts","../src/module/management/application.ts","../src/plugin/index.ts","../src/redux/id.ts","../src/redux/index.ts","../src/redux/initial-state.ts","../src/redux/selectors/bluetoothScanning.ts","../src/redux/selectors/bluetoothStatus.ts","../src/redux/selectors/index.ts","../src/shared/types.d.ts"],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hw-ledger",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "The ledger module",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"build": "run -T tsc --build tsconfig.build.json",
|
|
23
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
|
-
"test": "
|
|
25
|
+
"test": "run -T exodus-test --jest --esbuild",
|
|
26
26
|
"zemu:install": "docker pull zondax/builder-zemu:speculos-ef9610662dc90a1eeddba7c991e3ef7c53c4e258",
|
|
27
|
-
"test:integration": "yarn zemu:install && RUN_TESTS=integration run
|
|
27
|
+
"test:integration": "yarn zemu:install && RUN_TESTS=integration run test",
|
|
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,6 +34,7 @@
|
|
|
34
34
|
"@exodus/bip322-js": "^2.0.0",
|
|
35
35
|
"@exodus/bitcoinjs": "^1.1.0",
|
|
36
36
|
"@exodus/crypto": "^1.0.0-rc.14",
|
|
37
|
+
"@exodus/ethereumjs": "^1.5.0",
|
|
37
38
|
"@exodus/ethersproject-transactions": "^5.4.2-exodus.0",
|
|
38
39
|
"@exodus/hw-common": "^3.1.0",
|
|
39
40
|
"@exodus/ledger-bitcoin": "^0.2.3-exodus.3",
|
|
@@ -43,16 +44,14 @@
|
|
|
43
44
|
"@ledgerhq/hw-app-solana": "^7.0.10",
|
|
44
45
|
"@ledgerhq/hw-app-trx": "^6.29.4",
|
|
45
46
|
"@ledgerhq/hw-transport": "^6.28.5",
|
|
46
|
-
"@metamask/eth-sig-util": "^4.0.1",
|
|
47
47
|
"bs58": "^4.0.0",
|
|
48
48
|
"bs58check": "^2.1.2",
|
|
49
49
|
"minimalistic-assert": "^1.0.1",
|
|
50
50
|
"semver": "^7.3.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@exodus/bip32": "^
|
|
53
|
+
"@exodus/bip32": "^4.0.2",
|
|
54
54
|
"@exodus/dependency-types": "^2.1.1",
|
|
55
|
-
"@ledgerhq/hw-transport-node-hid": "^6.27.17",
|
|
56
55
|
"@solana/web3.js": "^1.78.0",
|
|
57
56
|
"@types/bs58": "^4.0.1",
|
|
58
57
|
"@types/bs58check": "^2.1.0",
|
|
@@ -62,11 +61,10 @@
|
|
|
62
61
|
"bitcoinjs-lib": "^6.1.3",
|
|
63
62
|
"ecpair": "^2.1.0",
|
|
64
63
|
"p-defer": "^4.0.1",
|
|
65
|
-
"redux": "^4.2.1"
|
|
66
|
-
"tiny-secp256k1": "^2.2.3"
|
|
64
|
+
"redux": "^4.2.1"
|
|
67
65
|
},
|
|
68
66
|
"publishConfig": {
|
|
69
67
|
"access": "public"
|
|
70
68
|
},
|
|
71
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "d240d2280b73d05f29374051e763e18450b86abd"
|
|
72
70
|
}
|