@exodus/hw-ledger 1.1.0 → 1.2.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 +6 -0
- package/lib/index.d.ts +12 -2
- package/lib/index.js +12 -2
- package/lib/{assets → module/assets}/ethereum.js +1 -3
- package/lib/{assets → module/assets}/polygon.d.ts +1 -1
- package/lib/{device.js → module/device.js} +3 -5
- package/lib/{discovery.d.ts → module/discovery.d.ts} +1 -1
- package/lib/{discovery.js → module/discovery.js} +1 -1
- package/lib/module/index.d.ts +2 -0
- package/lib/module/index.js +2 -0
- package/package.json +6 -6
- /package/lib/{assets → module/assets}/bitcoin.d.ts +0 -0
- /package/lib/{assets → module/assets}/bitcoin.js +0 -0
- /package/lib/{assets → module/assets}/ethereum.d.ts +0 -0
- /package/lib/{assets → module/assets}/index.d.ts +0 -0
- /package/lib/{assets → module/assets}/index.js +0 -0
- /package/lib/{assets → module/assets}/polygon.js +0 -0
- /package/lib/{assets → module/assets}/solana.d.ts +0 -0
- /package/lib/{assets → module/assets}/solana.js +0 -0
- /package/lib/{assets → module/assets}/utils.d.ts +0 -0
- /package/lib/{assets → module/assets}/utils.js +0 -0
- /package/lib/{constants.d.ts → module/constants.d.ts} +0 -0
- /package/lib/{constants.js → module/constants.js} +0 -0
- /package/lib/{device.d.ts → module/device.d.ts} +0 -0
- /package/lib/{errors.d.ts → module/errors.d.ts} +0 -0
- /package/lib/{errors.js → module/errors.js} +0 -0
- /package/lib/{management → module/management}/application.d.ts +0 -0
- /package/lib/{management → module/management}/application.js +0 -0
- /package/lib/{types.d.ts → module/types.d.ts} +0 -0
- /package/lib/{types.js → module/types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [1.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@1.1.0...@exodus/hw-ledger@1.2.0) (2023-11-27)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- make hw-ledger a feature ([#4882](https://github.com/ExodusMovement/exodus-hydra/issues/4882)) ([33d93fb](https://github.com/ExodusMovement/exodus-hydra/commit/33d93fb0f4bb507e3788c0450a3e413e79815433))
|
|
11
|
+
|
|
6
12
|
## [1.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@1.0.0...@exodus/hw-ledger@1.1.0) (2023-08-21)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const hardwareWalletLedger: () => {
|
|
2
|
+
id: string;
|
|
3
|
+
definitions: {
|
|
4
|
+
definition: {
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
factory: (deps: import("./module").Dependencies) => import("./module").LedgerDiscovery;
|
|
8
|
+
dependencies: string[];
|
|
9
|
+
};
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export default hardwareWalletLedger;
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import ledgerDiscoveryDefinition from './module';
|
|
2
|
+
const hardwareWalletLedger = () => {
|
|
3
|
+
return {
|
|
4
|
+
id: 'hardwareWalletLedger',
|
|
5
|
+
definitions: [
|
|
6
|
+
{
|
|
7
|
+
definition: ledgerDiscoveryDefinition,
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default hardwareWalletLedger;
|
|
@@ -97,9 +97,7 @@ async function createHandler(transport) {
|
|
|
97
97
|
const { domainSeparator, hashStructMessage } = hashEIP712Message(message.EIP712Message);
|
|
98
98
|
return app.signEIP712HashedMessage(params.derivationPath, domainSeparator.toString('hex'), hashStructMessage.toString('hex'));
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
throw err;
|
|
102
|
-
}
|
|
100
|
+
throw err;
|
|
103
101
|
});
|
|
104
102
|
}
|
|
105
103
|
else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const metadata: {
|
|
2
2
|
applicationName: string;
|
|
3
3
|
supportedVersions: string;
|
|
4
|
-
handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("
|
|
4
|
+
handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletDevice>;
|
|
5
5
|
};
|
|
6
6
|
export default metadata;
|
|
@@ -110,10 +110,10 @@ function transformToCommonError(_err) {
|
|
|
110
110
|
if (err.name === 'LockedDeviceError') {
|
|
111
111
|
return new DeviceLockedError();
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
if (err.name === 'UserRefusedOnDevice') {
|
|
114
114
|
return new UserRefusedError();
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
if ([
|
|
117
117
|
'HwTransportError',
|
|
118
118
|
'TransportError',
|
|
119
119
|
'TransportRaceCondition',
|
|
@@ -123,7 +123,5 @@ function transformToCommonError(_err) {
|
|
|
123
123
|
].includes(err.name)) {
|
|
124
124
|
return new DeviceConnectionError(err);
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
return err;
|
|
128
|
-
}
|
|
126
|
+
return err;
|
|
129
127
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ExodusModule from '@exodus/module';
|
|
2
|
-
import { Logger } from '
|
|
2
|
+
import { Logger } from '../shared/types';
|
|
3
3
|
import type { HardwareWalletDescriptor, HardwareWalletDiscovery } from '@exodus/hw-common';
|
|
4
4
|
import type { TransportFactory } from './types';
|
|
5
5
|
export type Dependencies = {
|
|
@@ -2,7 +2,7 @@ import ExodusModule from '@exodus/module';
|
|
|
2
2
|
import { APDU_PORT } from './constants';
|
|
3
3
|
import { LedgerDevice } from './device';
|
|
4
4
|
import { UnknownTransportError } from './errors';
|
|
5
|
-
const MODULE_ID = '
|
|
5
|
+
const MODULE_ID = 'ledgerDiscovery';
|
|
6
6
|
export class LedgerDiscovery extends ExodusModule {
|
|
7
7
|
#transportsFactories;
|
|
8
8
|
constructor({ logger, transportsFactories }) {
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/hw-ledger",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The ledger module",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/
|
|
10
|
+
"homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/features/hw-ledger",
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Ahw-ledger"
|
|
14
14
|
},
|
|
15
|
+
"main": "lib/index.js",
|
|
15
16
|
"files": [
|
|
16
17
|
"lib",
|
|
17
18
|
"./README.md",
|
|
@@ -23,8 +24,7 @@
|
|
|
23
24
|
"clean": "tsc --build --clean",
|
|
24
25
|
"test": "jest --testMatch='**/*.unit.test.js' --coverageDirectory coverage/unit",
|
|
25
26
|
"zemu:install": "docker pull zondax/builder-zemu:speculos-745fe46f81cfc18114b94a37beaefb58a09c0fcd",
|
|
26
|
-
"test:integration
|
|
27
|
-
"coverage:merge": "istanbul-combine -p summary -r json-summary -r lcov coverage/integration/coverage-final.json coverage/unit/coverage-final.json",
|
|
27
|
+
"test:integration": "yarn zemu:install && jest --runInBand",
|
|
28
28
|
"lint": "eslint . --ignore-path ../../.gitignore",
|
|
29
29
|
"lint:fix": "yarn lint --fix"
|
|
30
30
|
},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@exodus/bip32": "^2.0.0",
|
|
47
|
-
"@exodus/module": "^1.2.
|
|
47
|
+
"@exodus/module": "^1.2.2",
|
|
48
48
|
"@ledgerhq/hw-transport-node-hid": "^6.27.17",
|
|
49
49
|
"@ledgerhq/hw-transport-node-speculos": "^6.27.16",
|
|
50
50
|
"@types/bs58": "^4.0.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"ts-jest": "^29.0.3",
|
|
62
62
|
"typescript": "^4.7.3"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "df9526a0bdc326e1a9918c3f76ba2197bf42a920"
|
|
65
65
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|