You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refined functions related to the Ledger Hardware Wallet and PSBT finalizers.
28
+
- These refinements greatly simplify and enhance the library's usability. See details below.
29
+
30
+
-**Finalizers Update**:
31
+
- Deprecated `updatePsbt` in favor of `updatePsbtAsInput`.
32
+
- The new function returns the finalizer directly instead of the input number.
33
+
- This change eliminates the need to explicitly call the `finalizePsbtInput` method of the Output class.
34
+
- Previous implementations were error-prone due to the need to keep track of the input number of the PSBT input being finalized and the Output instance of the previous output.
35
+
36
+
-**Ledger Enhancements**:
37
+
- Simplified the signer's requirements before v2.0.0, which previously required tracking the Output instances of each input and passing them to the signer.
38
+
- The essential information is now directly extracted from the PSBT, facilitating usability.
39
+
- Unified `ledgerClient` and `ledgerState` parameters into a new type `LedgerManager`, which also includes an instance to the Elliptic Curve Library (`ecc`).
40
+
- To initialize: `const ledgerManager = {ledgerClient, ledgerState: {}, ecc};`, where `import * as ecc from '@bitcoinerlab/secp256k1'`.
41
+
42
+
-**Deprecation Notices**:
43
+
- While the old functions and classes with former signatures remain available in 2.0.0, they are now deprecated.
44
+
- Transitioning to v2.0.0 requires no immediate action, but you may encounter "deprecated" warnings if your code editor supports typedoc/jsdoc linting.
45
+
- It's highly recommended to start updating to the new functions and classes.
46
+
47
+
-**Key Updates to Consider**:
48
+
- Substitute `new Descriptor({expression})` with `new Output({descriptor})`.
49
+
- Transition from `expand({expression})` to `expand({descriptor})`.
50
+
- Use `updatePsbtAsInput` as `updatePsbt` is now deprecated.
51
+
- Introduced `updatePsbtAsOutput` for completeness.
52
+
- Opt for finalizers returned by `updatePsbtAsInput` as `finalizePsbtInput` and `finalizePsbt` have been deprecated.
53
+
54
+
-**Additional Ledger Updates**:
55
+
- Functions previously expecting `ledgerClient` and `ledgerState` should now receive `ledgerManager` instead.
56
+
- This change affects multiple functions, including `signLedger`, all Ledger script expression functions and also: `keyExpressionLedger`, `registerLedgerWallet`, `getLedgerMasterFingerPrint`, and `assertLedgerApp`.
57
+
-`signLedger` and `signInputLedger` no longer necessitate passing an instance to the former `Descriptor` class. All relevant information is automatically retrieved from the psbt now.
58
+
59
+
-**Testing Enhancements**:
60
+
-**Deprecated Function Testing**:
61
+
- Retained old tests, now suffixed with `-deprecated`, to continue testing the deprecated functions and classes.
62
+
-**New API Testing**:
63
+
- Introduced additional tests specifically designed to evaluate the new API's functionality.
64
+
65
+
-**Documentation Enhancements**:
66
+
- Extensively documented all methods using typedoc.
67
+
- This facilitates the generation of a comprehensive API reference for developers.
68
+
- Updated the README.md to mirror the latest changes, optimizing clarity by referencing the API for intricate details.
9
69
10
70
### Fixed
11
71
12
72
-**Descriptor Buffer Comparison**:
13
-
-Addressed a bug related to buffer comparisons in `src/descriptors.ts`.
14
-
-Modified the comparison logic for `witnessScript` and `redeemScript` to handle cases where one of the buffers may be `undefined`.
15
-
- Introduced the `eqBuffers` function to compare two buffers, ensuring that it correctly handles`undefined` values.
16
-
- This fix ensures accurate and error-free descriptor comparisons, particularly crucial for finalizing psbt indexes.
17
-
- Refer to[issue-20](https://github.com/bitcoinerlab/descriptors/issues/20) for more details.
73
+
-Resolved a bug associated with buffer comparisons in `src/descriptors.ts`.
74
+
-Adjusted the comparison logic for `witnessScript` and `redeemScript` to manage scenarios where one buffer may be `undefined`.
75
+
- Introduced the `eqBuffers` function for accurate buffer comparisons, particularly when handling`undefined` values.
76
+
- This correction is vital for precise descriptor comparisons, especially when determining psbt indexes.
77
+
- For an in-depth analysis, consult[issue-20](https://github.com/bitcoinerlab/descriptors/issues/20).
18
78
19
-
## [1.1.1] - 2023-10-12
79
+
## [1.1.1] - 2023-9-12
20
80
21
81
### Changed
22
82
@@ -26,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
86
- The new approach bypasses this by using a direct `require` statement. For more details on the underlying issue, refer to [this React Native discussion](https://github.com/react-native-community/discussions-and-proposals/issues/120).
27
87
- This update ensures smoother integration for developers using this library in React Native projects.
0 commit comments