@exodus/hw-ledger 3.4.0 → 3.4.2

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
+ ## [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
+
8
+ ### License
9
+
10
+ - license: re-license under MIT license (#10599)
11
+
12
+ ## [3.4.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@3.4.0...@exodus/hw-ledger@3.4.1) (2024-10-30)
13
+
14
+ ### Bug Fixes
15
+
16
+ - bump bip322 to latest ([#10231](https://github.com/ExodusMovement/exodus-hydra/issues/10231)) ([4aacf39](https://github.com/ExodusMovement/exodus-hydra/commit/4aacf399a1e8679d99f08574920463bcab6f07fa))
17
+
6
18
  ## [3.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@3.3.1...@exodus/hw-ledger@3.4.0) (2024-10-30)
7
19
 
8
20
  ### Features
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2024 Exodus Movement, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,34 @@
1
1
  # @exodus/hw-ledger
2
2
 
3
- ```mermaid
4
- flowchart LR
5
- AA[TransportFactory] --> A
6
- A[LedgerDiscovery] -->|"list()"| B(HardwareWalletDescriptor)
7
- B --> |"get()"| C(LedgerDevice)
8
- C --> |"getAddress()"| D{Pick by \nasset}
9
- D -->|bitcoin| E[BitcoinHandlers]
10
- D -->|ethereum| F[EthereumHandlers]
11
- D -->|solana| G[SolanaHandlers]
3
+ This Exodus SDK feature handles all hardware wallet actions that are specific to Ledger and implements and [interface](../../libraries/hw-common/src/types.ts) which is abstracted for all hardware wallet devices.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ yarn add @exodus/hw-ledger
12
9
  ```
13
10
 
14
11
  ## Usage
15
12
 
13
+ This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/docs-website/docs/development/using-the-sdk.md).
14
+
15
+ ### API Side
16
+
16
17
  ```typescript
17
- import createLedgerDiscover from '@exodus/hw-ledger'
18
+ import hardwareWalletLedger from '@exodus/hw-ledger'
18
19
  import Transport from '@ledgerhq/hw-transport-node-speculos'
19
20
 
20
- // Initialize transport factories depending on the platform
21
- const ledgerDiscovery = createLedgerDiscover({
22
- logger,
23
- transports: {
24
- tcp: Transport, // emulator transport over tcp
25
- },
26
- })
21
+ // Add a transportsFactories adapter to hold
22
+ // the factory funcctions that are specific to the platform.
23
+ const transportsFactories = {
24
+ tcp: Transport,
25
+ }
26
+
27
+ // Create IoC
28
+ const ioc = createIocContainer({ adapters: { transportsFactories }, config, debug })
29
+ ioc.use(hardwareWalletLedger({ bluetoothScannerTimeout: 60 * 1000 }))
30
+
31
+ // Retrieve the ledgerDiscovery through dependency injection
27
32
 
28
33
  const ledgerDescriptors = await ledgerDiscovery.list()
29
34
  // [
@@ -53,6 +58,25 @@ if (ledgerDevice) {
53
58
  }
54
59
  ```
55
60
 
61
+ ### UI Side
62
+
63
+ This package is not ment to be used directly through the UI. See [using the @exodus/hardware-wallets](../hardware-wallets/README.md) for UI usage.
64
+
65
+ ## Architecture
66
+
67
+ The discovery provides descriptors which can be used to retrieve device handles.
68
+
69
+ ```mermaid
70
+ flowchart LR
71
+ AA[TransportFactory] --> A
72
+ A[LedgerDiscovery] -->|"list()"| B(HardwareWalletDescriptor)
73
+ B --> |"get()"| C(LedgerDevice)
74
+ C --> |"getAddress()"| D{Pick by \nasset}
75
+ D -->|bitcoin| E[BitcoinHandlers]
76
+ D -->|ethereum| F[EthereumHandlers]
77
+ D -->|solana| G[SolanaHandlers]
78
+ ```
79
+
56
80
  ## Development
57
81
 
58
82
  If you're on Linux then it's highly likely that you'll want to setup your udev rules.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/hw-ledger",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "description": "The ledger module",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
9
9
  },
10
10
  "homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/features/hw-ledger",
11
- "license": "UNLICENSED",
11
+ "license": "MIT",
12
12
  "bugs": {
13
13
  "url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Ahw-ledger"
14
14
  },
@@ -23,7 +23,7 @@
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
25
  "test": "RUN_TESTS=unit run -T exodus-test --jest --esbuild",
26
- "zemu:install": "docker pull zondax/builder-zemu:speculos-745fe46f81cfc18114b94a37beaefb58a09c0fcd",
26
+ "zemu:install": "docker pull zondax/builder-zemu:speculos-ef9610662dc90a1eeddba7c991e3ef7c53c4e258",
27
27
  "test:integration": "yarn zemu:install && RUN_TESTS=integration run -T exodus-test --jest --esbuild",
28
28
  "lint": "run -T eslint .",
29
29
  "lint:fix": "yarn lint --fix",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@exodus/atoms": "^9.0.0",
34
- "@exodus/bip322-js": "^1.2.1",
34
+ "@exodus/bip322-js": "^2.0.0",
35
35
  "@exodus/bitcoinjs": "^1.1.0",
36
36
  "@exodus/crypto": "^1.0.0-rc.14",
37
37
  "@exodus/ethersproject-transactions": "^5.4.2-exodus.0",
@@ -51,19 +51,22 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@exodus/bip32": "^3.3.0",
54
- "@exodus/dependency-types": "^2.1.0",
54
+ "@exodus/dependency-types": "^2.1.1",
55
55
  "@ledgerhq/hw-transport-node-hid": "^6.27.17",
56
56
  "@solana/web3.js": "^1.78.0",
57
57
  "@types/bs58": "^4.0.1",
58
58
  "@types/bs58check": "^2.1.0",
59
59
  "@types/minimalistic-assert": "^1.0.1",
60
60
  "@types/semver": "^7.3.5",
61
- "@zondax/zemu": "^0.43.1",
61
+ "@zondax/zemu": "^0.51.0",
62
62
  "bitcoinjs-lib": "^6.1.3",
63
63
  "ecpair": "^2.1.0",
64
64
  "p-defer": "^4.0.1",
65
65
  "redux": "^4.2.1",
66
66
  "tiny-secp256k1": "^2.2.3"
67
67
  },
68
- "gitHead": "6e5284fe84bcaee8b2640f98ea0bf2f19db5e5ff"
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "gitHead": "9cef1436f1cf2fa9afa1672954ea92c63a8e0f16"
69
72
  }