@exodus/bitcoin-api 4.1.5 → 4.2.0

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
+ ## [4.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.1.6...@exodus/bitcoin-api@4.2.0) (2025-11-03)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: support legacy chain index needed by desktop only (#6630)
13
+
14
+
15
+
16
+ ## [4.1.6](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.1.5...@exodus/bitcoin-api@4.1.6) (2025-10-16)
17
+
18
+ **Note:** Version bump only for package @exodus/bitcoin-api
19
+
20
+
21
+
22
+
23
+
6
24
  ## [4.1.5](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.1.4...@exodus/bitcoin-api@4.1.5) (2025-10-16)
7
25
 
8
26
  **Note:** Version bump only for package @exodus/bitcoin-api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "4.1.5",
3
+ "version": "4.2.0",
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": "d6f680d217f82d3b165372a7bc728899b719a398"
63
+ "gitHead": "14f8fec5af3540def38f0537859d49509c58d2e7"
64
64
  }
@@ -25,6 +25,8 @@ export class BitcoinMonitorScanner {
25
25
  #yieldToUI
26
26
  #ordinalsEnabled
27
27
  #ordinalChainIndex
28
+ #extraChainIndexEnabled
29
+ #extraChainIndex
28
30
  #gapLimit
29
31
  #refreshGapLimit
30
32
  constructor({
@@ -36,6 +38,8 @@ export class BitcoinMonitorScanner {
36
38
  txFetchLimitResolver = ({ refresh }) => (refresh ? 50 : 10),
37
39
  ordinalsEnabled,
38
40
  ordinalChainIndex,
41
+ extraChainIndexEnabled,
42
+ extraChainIndex,
39
43
  gapLimit = 10,
40
44
  refreshGapLimit = 10,
41
45
  }) {
@@ -55,6 +59,8 @@ export class BitcoinMonitorScanner {
55
59
  this.#shouldExcludeVoutUtxo = shouldExcludeVoutUtxo
56
60
  this.#ordinalsEnabled = ordinalsEnabled
57
61
  this.#ordinalChainIndex = ordinalChainIndex
62
+ this.#extraChainIndexEnabled = extraChainIndexEnabled
63
+ this.#extraChainIndex = extraChainIndex
58
64
  this.#gapLimit = gapLimit
59
65
  this.#refreshGapLimit = refreshGapLimit
60
66
  }
@@ -314,6 +320,22 @@ export class BitcoinMonitorScanner {
314
320
  })
315
321
  }
316
322
 
323
+ if (
324
+ fetchCount === 0 &&
325
+ this.#extraChainIndexEnabled &&
326
+ this.#extraChainIndex &&
327
+ this.#extraChainIndex > 1 &&
328
+ purposes.includes(44)
329
+ ) {
330
+ // this is for the legacy special chain index
331
+ chainObjects.push({
332
+ purpose: 44,
333
+ chainIndex: this.#extraChainIndex,
334
+ startAddressIndex: 0,
335
+ endAddressIndex: 0,
336
+ })
337
+ }
338
+
317
339
  const addresses = await aggregateAddresses(chainObjects)
318
340
 
319
341
  if (fetchCount === 0) {
@@ -83,7 +83,7 @@ export const getCreateBatchTransaction = ({
83
83
  assetClientInterface.getAddress(addressOpts),
84
84
  assetClientInterface.getExtendedPublicKey(addressOpts),
85
85
  ])
86
- assert(String(address) === String(utxo.address))
86
+ assert(String(address) === String(utxo.address), 'address mismatch')
87
87
 
88
88
  const hdkey = BIP32.fromXPub(xpub)
89
89
  const masterFingerprint = Buffer.alloc(4)
@@ -118,7 +118,7 @@ const getPrepareSendTransaction = async ({
118
118
  })
119
119
 
120
120
  // Set default values for options
121
- const { isRbfAllowed = true, ...restOptions } = options || {}
121
+ const { isRbfAllowed = true, ...restOptions } = options || Object.create(null)
122
122
 
123
123
  return createTx({
124
124
  asset,