@exodus/bitcoin-api 5.1.3 → 5.2.1

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,24 @@
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
+ ## [5.2.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@5.2.0...@exodus/bitcoin-api@5.2.1) (2026-11-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * speed up Bitcoin history refreshes and report scan failures ([#9439](https://github.com/ExodusMovement/assets/issues/9439)) ([3e5034f](https://github.com/ExodusMovement/assets/commit/3e5034f11c37ea6b7683bdbe45d995d92b40b280))
12
+
13
+
14
+
15
+ ## [5.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@5.1.3...@exodus/bitcoin-api@5.2.0) (2026-11-23)
16
+
17
+
18
+ ### Features
19
+
20
+ * report fee accuracy from getFeeAsync ([#9396](https://github.com/ExodusMovement/assets/issues/9396)) ([802d833](https://github.com/ExodusMovement/assets/commit/802d83377125651b00c882ca7165ab2ee99712a5))
21
+
22
+
23
+
6
24
  ## [5.1.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@5.1.2...@exodus/bitcoin-api@5.1.3) (2026-11-20)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "5.1.3",
3
+ "version": "5.2.1",
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",
@@ -60,5 +60,5 @@
60
60
  "type": "git",
61
61
  "url": "git+https://github.com/ExodusMovement/assets.git"
62
62
  },
63
- "gitHead": "542f0821665b4771aeecab4ce2a2e9614a2515c1"
63
+ "gitHead": "93bdf266e3882ed6f2ca7ed5ccee3fd31e98dbe7"
64
64
  }
@@ -1,8 +1,13 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- export const getFeeAsyncFactory = ({ createTx, assetClientInterface }) => {
3
+ export const getFeeAsyncFactory = ({
4
+ createTx,
5
+ assetClientInterface,
6
+ fallbackFeeAccuracy = 'max',
7
+ }) => {
4
8
  assert(createTx, 'createTx is required')
5
9
  assert(assetClientInterface, 'assetClientInterface is required')
10
+ assert(['max', 'estimate'].includes(fallbackFeeAccuracy), 'invalid fallbackFeeAccuracy')
6
11
 
7
12
  return async ({ asset, walletAccount, toAddress, amount, isSendAll, ...extraCreateTxParams }) => {
8
13
  assert(asset, 'asset is required')
@@ -20,7 +25,7 @@ export const getFeeAsyncFactory = ({ createTx, assetClientInterface }) => {
20
25
  ...extraCreateTxParams,
21
26
  })
22
27
 
23
- return { fee }
28
+ return { fee, feeAccuracy: 'exact' }
24
29
  } catch {
25
30
  const { customFee, taprootInputWitnessSize } = extraCreateTxParams
26
31
  const assetName = asset.name
@@ -40,7 +45,7 @@ export const getFeeAsyncFactory = ({ createTx, assetClientInterface }) => {
40
45
  receiveAddress: toAddress,
41
46
  taprootInputWitnessSize,
42
47
  })
43
- return { fee }
48
+ return { fee, feeAccuracy: fallbackFeeAccuracy }
44
49
  }
45
50
  }
46
51
  }
@@ -297,11 +297,12 @@ export class BitcoinMonitorScanner {
297
297
  }
298
298
  const items = listOfTxs.flat()
299
299
  if (!this.#verifyNewSentTransactions) return items
300
- const authenticated = []
301
- for (const item of items) {
302
- authenticated.push(await readAuthenticatedHistory({ item, asset, loadTransaction }))
300
+ // Only pending history needs authentication. RBF creation checks it again before use.
301
+ for (const [index, item] of items.entries()) {
302
+ if (item.confirmations > 0) continue
303
+ items[index] = await readAuthenticatedHistory({ item, asset, loadTransaction })
303
304
  }
304
- return authenticated
305
+ return items
305
306
  }
306
307
 
307
308
  const gapSearchParameters = newChains.map(({ purpose, chain }) => {
@@ -485,7 +486,9 @@ export class BitcoinMonitorScanner {
485
486
  })
486
487
 
487
488
  allTxs.forEach((txItem) => {
488
- const isCoinbase = txItem.vin.length === 0
489
+ const isCoinbase =
490
+ txItem.vin.length === 0 ||
491
+ (txItem.vin.length === 1 && Object.keys(txItem.vin[0]).length === 0)
489
492
 
490
493
  const txLogItem = {
491
494
  txId: txItem.txid,
@@ -827,6 +830,7 @@ export class BitcoinMonitorScanner {
827
830
  // The extra refresh results can remove stored UTXOs outside today's gap
828
831
  // range. Match those outpoints even when their addresses are absent from addrMap.
829
832
  for (const item of [...allTxs, ...storedUtxoAddressTxs]) {
833
+ if (item.confirmations > 0) continue
830
834
  if (verifiedIds.has(item.wtxid)) continue
831
835
  if (
832
836
  !item.vin.some(