@exodus/bitcoin-api 4.15.5 → 4.15.7

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,26 @@
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
+ ## [4.15.7](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.15.6...@exodus/bitcoin-api@4.15.7) (2026-06-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix(bitcoin-api): pass isSendAll to selectUtxos in batch-tx (#7994)
13
+
14
+
15
+
16
+ ## [4.15.6](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.15.5...@exodus/bitcoin-api@4.15.6) (2026-06-03)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+
22
+ * fix: remove stale stored UTXOs during refresh (#8184)
23
+
24
+
25
+
6
26
  ## [4.15.5](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.15.4...@exodus/bitcoin-api@4.15.5) (2026-06-02)
7
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "4.15.5",
3
+ "version": "4.15.7",
4
4
  "description": "Bitcoin transaction and fee monitors, RPC with the blockchain node, other networking code.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -63,5 +63,5 @@
63
63
  "type": "git",
64
64
  "url": "git+https://github.com/ExodusMovement/assets.git"
65
65
  },
66
- "gitHead": "58cae1e2c4b158a7eb55b8817ea23f26583ae1f1"
66
+ "gitHead": "046974709fffbbc24c47b833d8775d1f4decd839"
67
67
  }
@@ -258,6 +258,14 @@ export class BitcoinMonitorScanner {
258
258
  // newChains moves receive to 7. The second loop then scans receive 8..12
259
259
  // and change 7..7. This keeps expanding until the fetched address batch has no txs.
260
260
  let allTxs = []
261
+ const scannedAddressSet = new Set()
262
+ const fetchStoredUtxoAddressTxs = async ({ storedUtxoAddresses }) => {
263
+ const storedOnlyAddresses = [...storedUtxoAddresses].filter(
264
+ (storedUtxoAddress) => !scannedAddressSet.has(storedUtxoAddress)
265
+ )
266
+ return fetchAllTxs(storedOnlyAddresses)
267
+ }
268
+
261
269
  for (let fetchCount = 0; ; fetchCount++) {
262
270
  const chainObjects = gapSearchParameters.flatMap(
263
271
  ({ purpose, chain, startAddressIndexes, endAddressIndexes }) => {
@@ -289,6 +297,7 @@ export class BitcoinMonitorScanner {
289
297
  }
290
298
 
291
299
  const addresses = await aggregateAddresses(chainObjects)
300
+ addresses.forEach((address) => scannedAddressSet.add(address))
292
301
 
293
302
  if (fetchCount === 0) {
294
303
  // in compatibility mode, the receive address could be different
@@ -299,6 +308,7 @@ export class BitcoinMonitorScanner {
299
308
  })
300
309
  if (!addresses.includes(receiveAddress.toString())) {
301
310
  addresses.push(receiveAddress.toString())
311
+ scannedAddressSet.add(receiveAddress.toString())
302
312
  addrMap[receiveAddress.toString()] = receiveAddress
303
313
  }
304
314
  }
@@ -370,6 +380,16 @@ export class BitcoinMonitorScanner {
370
380
  }
371
381
 
372
382
  allTxs = orderTxs(allTxs)
383
+ let storedUtxoAddressTxs = []
384
+ if (refresh) {
385
+ const storedUtxoAddresses = new Set(
386
+ storedUtxos
387
+ .toArray()
388
+ .map((utxo) => utxo.address?.toString())
389
+ .filter(Boolean)
390
+ )
391
+ storedUtxoAddressTxs = await fetchStoredUtxoAddressTxs({ storedUtxoAddresses })
392
+ }
373
393
 
374
394
  // post process TX data
375
395
  // NOTE: this can be optimized
@@ -379,6 +399,14 @@ export class BitcoinMonitorScanner {
379
399
  const newTxs = []
380
400
  const existingTxs = []
381
401
 
402
+ storedUtxoAddressTxs.forEach((txItem) => {
403
+ txItem.vin.forEach((vin) => {
404
+ if (Object.keys(vin).length === 0) return
405
+
406
+ vinTxids[`${vin.txid}-${vin.vout}`] = true
407
+ })
408
+ })
409
+
382
410
  allTxs.forEach((txItem) => {
383
411
  const isCoinbase = txItem.vin.length === 0
384
412
 
@@ -50,6 +50,7 @@ export const getCreateBatchTransaction = ({
50
50
  amount,
51
51
  feeRate: feeData.feePerKB,
52
52
  receiveAddresses,
53
+ isSendAll,
53
54
  getFeeEstimator: (asset, { feePerKB, ...options }) =>
54
55
  getFeeEstimator(asset, feePerKB, options),
55
56
  unconfirmedTxAncestor,