@exodus/hw-ledger 2.4.1 → 2.5.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,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
+ ## [2.5.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.5.0...@exodus/hw-ledger@2.5.1) (2024-05-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - order base & eth ([#7126](https://github.com/ExodusMovement/exodus-hydra/issues/7126)) ([63b7408](https://github.com/ExodusMovement/exodus-hydra/commit/63b7408dac094fa0a0d178fd2a4b0e89e74fdbcf))
11
+
12
+ ## [2.5.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.4.1...@exodus/hw-ledger@2.5.0) (2024-04-18)
13
+
14
+ ### Features
15
+
16
+ - **ledger:** add basemainnet ([#6564](https://github.com/ExodusMovement/exodus-hydra/issues/6564)) ([e156669](https://github.com/ExodusMovement/exodus-hydra/commit/e156669e8da97d7317e949f256f7005a8c9ae02c))
17
+
6
18
  ## [2.4.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.4.0...@exodus/hw-ledger@2.4.1) (2024-03-15)
7
19
 
8
20
  ### Bug Fixes
package/lib/index.d.ts CHANGED
@@ -3,10 +3,10 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
3
3
  id: string;
4
4
  definitions: {
5
5
  definition: {
6
- id: string;
7
- type: string;
8
- factory: (deps: import("./module").Dependencies) => import("./module").LedgerDiscovery;
9
- dependencies: string[];
6
+ readonly id: "ledgerDiscovery";
7
+ readonly type: "module";
8
+ readonly factory: (deps: import("./module").Dependencies) => import("./module").LedgerDiscovery;
9
+ readonly dependencies: readonly ["config", "logger", "transportsFactories"];
10
10
  };
11
11
  config: {
12
12
  bluetoothScannerTimeout: number;
@@ -0,0 +1,8 @@
1
+ declare const metadata: {
2
+ applications: {
3
+ applicationName: string;
4
+ supportedVersions: string;
5
+ }[];
6
+ handler: (transport: import("@ledgerhq/hw-transport").default) => Promise<import("libraries/hw-common/lib").HardwareWalletAssetHandler<import("libraries/hw-common/lib").Message>>;
7
+ };
8
+ export default metadata;
@@ -0,0 +1,11 @@
1
+ import ethereum from './ethereum';
2
+ const metadata = {
3
+ applications: [
4
+ {
5
+ applicationName: 'Ethereum',
6
+ supportedVersions: '^1.10.0',
7
+ },
8
+ ],
9
+ handler: ethereum.handler,
10
+ };
11
+ export default metadata;
@@ -47,11 +47,19 @@ async function createHandler(transport) {
47
47
  assert(Array.isArray(params.derivationPaths) && params.derivationPaths.length === 1, 'derivationsPath array must be one element long');
48
48
  assert(Buffer.isBuffer(params.signableTransaction), 'signableTransaction must be Buffer');
49
49
  const deserializedTransaction = ethers.parse(params.signableTransaction);
50
- if (params.assetName === 'ethereum') {
51
- deserializedTransaction.chainId = 1;
52
- }
53
- else if (params.assetName === 'matic') {
54
- deserializedTransaction.chainId = 137;
50
+ switch (params.assetName) {
51
+ case 'ethereum': {
52
+ deserializedTransaction.chainId = 1;
53
+ break;
54
+ }
55
+ case 'matic': {
56
+ deserializedTransaction.chainId = 137;
57
+ break;
58
+ }
59
+ case 'basemainnet': {
60
+ deserializedTransaction.chainId = 8453;
61
+ break;
62
+ }
55
63
  }
56
64
  delete deserializedTransaction.r;
57
65
  delete deserializedTransaction.s;
@@ -1,12 +1,14 @@
1
1
  import bitcoin from './bitcoin';
2
+ import basemainnet from './basemainnet';
2
3
  import ethereum from './ethereum';
3
4
  import matic from './matic';
4
5
  import solana from './solana';
5
6
  export const assetApplications = {
7
+ basemainnet,
6
8
  bitcoin,
7
- ethereum,
8
9
  matic,
9
10
  solana,
11
+ ethereum,
10
12
  };
11
13
  export const supportedBaseAssetNames = Object.keys(assetApplications);
12
14
  export const applicationNameToBaseAssetName = Object.entries(assetApplications).reduce((mapping, [assetName, metadata]) => {
@@ -20,9 +20,9 @@ export declare class LedgerDiscovery extends ExodusModule implements HardwareWal
20
20
  getFirstDevice: () => Promise<import("@exodus/hw-common").HardwareWalletDevice<import("@exodus/hw-common").Message>>;
21
21
  }
22
22
  declare const _default: {
23
- id: string;
24
- type: string;
25
- factory: (deps: Dependencies) => LedgerDiscovery;
26
- dependencies: string[];
23
+ readonly id: "ledgerDiscovery";
24
+ readonly type: "module";
25
+ readonly factory: (deps: Dependencies) => LedgerDiscovery;
26
+ readonly dependencies: readonly ["config", "logger", "transportsFactories"];
27
27
  };
28
28
  export default _default;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@exodus/hw-ledger",
3
- "version": "2.4.1",
3
+ "version": "2.5.1",
4
4
  "description": "The ledger module",
5
- "author": "Exodus Movement Inc.",
5
+ "author": "Exodus Movement, Inc.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
@@ -24,7 +24,7 @@
24
24
  "clean": "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 && jest --runInBand",
27
+ "test:integration": "yarn zemu:install && run -T jest --runInBand",
28
28
  "lint": "run -T eslint . --ignore-path ../../.gitignore",
29
29
  "lint:fix": "yarn lint --fix",
30
30
  "prepublishOnly": "yarn run -T build --scope @exodus/hw-ledger"
@@ -52,6 +52,7 @@
52
52
  "@exodus/ledgerhq-devices": "^8.1.0-exodus.2",
53
53
  "@ledgerhq/hw-transport-node-hid": "^6.27.17",
54
54
  "@ledgerhq/hw-transport-node-speculos": "^6.27.16",
55
+ "@solana/web3.js": "^1.78.0",
55
56
  "@types/bs58": "^4.0.1",
56
57
  "@types/bs58check": "^2.1.0",
57
58
  "@types/create-hash": "^1.2.6",
@@ -59,12 +60,14 @@
59
60
  "@types/minimalistic-assert": "^1.0.1",
60
61
  "@types/secp256k1": "^4.0.3",
61
62
  "@zondax/zemu": "^0.43.1",
63
+ "bitcoinjs-lib": "^6.1.3",
62
64
  "concurrently": "^7.6.0",
65
+ "ecpair": "^2.1.0",
63
66
  "istanbul-combine": "^0.3.0",
64
67
  "jest-when": "^3.5.2",
65
68
  "tiny-secp256k1": "^2.2.3",
66
69
  "ts-jest": "^29.0.3",
67
70
  "typescript": "^4.7.3"
68
71
  },
69
- "gitHead": "76208b526d07f6e7b2bd9c23b10f7ed2b9d38f0c"
72
+ "gitHead": "c34c770e5b16f0fe2f0edaadfa5016cce7cbd1bb"
70
73
  }