Skip to content

Commit

Permalink
feat: Extend transaction history with spent outputs and attributions
Browse files Browse the repository at this point in the history
- Enhanced Discovery class to support fetching and storing spent transaction outputs (STXOs) along with UTXOs.
- Implemented detailed attribution for transactions, distinguishing between received and sent transactions.
- Updated internal functions to support the new functionality:
  - `coreDeriveTxosByOutput` now derives both UTXOs and STXOs.
  - `deriveUtxosAndBalanceByOutputFactory` and related memoized functions updated to handle STXOs.
  - Introduced `deriveAttributions` to compute transaction attributions.
  - `deriveHistoryByOutputFactory` and related functions updated to optionally include attributions.
- Adjusted Discovery class methods to accommodate these changes:
  - `getUtxosAndBalance` now returns both UTXOs and STXOs.
  - `getHistory` now optionally includes transaction attributions.
- Updated integration tests to validate the new functionality.
- Bumped version to 1.1.0.

Other changes:
- Updated package dependencies.
- Improved TypeDoc comments for enhanced clarity and accuracy.
  • Loading branch information
landabaso committed May 30, 2024
1 parent 23f60a0 commit c6bddda
Show file tree
Hide file tree
Showing 7 changed files with 619 additions and 229 deletions.
110 changes: 62 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@bitcoinerlab/discovery",
"description": "A TypeScript library for retrieving Bitcoin funds from ranged descriptors, leveraging @bitcoinerlab/explorer for standardized access to multiple blockchain explorers.",
"homepage": "https://github.com/bitcoinerlab/discovery",
"version": "1.0.4",
"version": "1.1.0",
"author": "Jose-Luis Landabaso",
"license": "MIT",
"prettier": "@bitcoinerlab/configs/prettierConfig.json",
Expand Down Expand Up @@ -43,11 +43,11 @@
"dist"
],
"dependencies": {
"@bitcoinerlab/descriptors": "^2.0.1",
"@bitcoinerlab/explorer": "^0.1.2",
"@bitcoinerlab/secp256k1": "^1.0.5",
"@bitcoinerlab/descriptors": "^2.1.0",
"@bitcoinerlab/explorer": "^0.1.3",
"@bitcoinerlab/secp256k1": "^1.1.1",
"@types/memoizee": "^0.4.8",
"bitcoinjs-lib": "^6.1.3",
"bitcoinjs-lib": "^6.1.5",
"immer": "^9.0.21",
"lodash.clonedeep": "^4.5.0",
"memoizee": "^0.4.15",
Expand Down
Loading

0 comments on commit c6bddda

Please sign in to comment.