@exodus/hw-ledger 2.4.1 → 2.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 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
+ ## [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)
7
+
8
+ ### Features
9
+
10
+ - **ledger:** add basemainnet ([#6564](https://github.com/ExodusMovement/exodus-hydra/issues/6564)) ([e156669](https://github.com/ExodusMovement/exodus-hydra/commit/e156669e8da97d7317e949f256f7005a8c9ae02c))
11
+
6
12
  ## [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
13
 
8
14
  ### Bug Fixes
@@ -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,4 +1,5 @@
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';
@@ -7,6 +8,7 @@ export const assetApplications = {
7
8
  ethereum,
8
9
  matic,
9
10
  solana,
11
+ basemainnet,
10
12
  };
11
13
  export const supportedBaseAssetNames = Object.keys(assetApplications);
12
14
  export const applicationNameToBaseAssetName = Object.entries(assetApplications).reduce((mapping, [assetName, metadata]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/hw-ledger",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "The ledger module",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "repository": {
@@ -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": "b5201feca4d6fdaa66e5573537fb308b4615653a"
70
73
  }