@exodus/bitcoin-api 4.8.3 → 4.8.4

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,15 @@
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.8.4](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.8.3...@exodus/bitcoin-api@4.8.4) (2026-02-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **bitcoin-api:** Fix non-BTC nested‑segwit redeem script ([#7357](https://github.com/ExodusMovement/assets/issues/7357)) ([#7381](https://github.com/ExodusMovement/assets/issues/7381)) ([c049583](https://github.com/ExodusMovement/assets/commit/c04958336885777f66b845db72a0900c935cbab0))
12
+
13
+
14
+
6
15
  ## [4.8.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.8.2...@exodus/bitcoin-api@4.8.3) (2025-12-16)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "4.8.3",
3
+ "version": "4.8.4",
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": "84be327e5d39ecfd0e36abc038f33f7f3b9c33b8"
63
+ "gitHead": "bd87fd7045fd427d4fb972aacb3877af10247aec"
64
64
  }
@@ -20,9 +20,9 @@ function canParseTx(rawTxBuffer, Transaction) {
20
20
  }
21
21
  }
22
22
 
23
- function getWrappedSegwitRedeemScript({ publicKey, address, context = '' }) {
24
- const p2wpkh = payments.p2wpkh({ pubkey: publicKey })
25
- const p2sh = payments.p2sh({ redeem: p2wpkh })
23
+ function getWrappedSegwitRedeemScript({ publicKey, address, network, context = '' }) {
24
+ const p2wpkh = payments.p2wpkh({ pubkey: publicKey, network })
25
+ const p2sh = payments.p2sh({ redeem: p2wpkh, network })
26
26
 
27
27
  if (address !== p2sh.address) {
28
28
  throw new Error(`Expected P2SH script to be a nested p2wpkh${context ? ' for ' + context : ''}`)
@@ -105,6 +105,7 @@ function createPsbtInput({
105
105
  psbtInput.redeemScript = getWrappedSegwitRedeemScript({
106
106
  publicKey,
107
107
  address: input.address,
108
+ network: asset.coinInfo.toBitcoinJS(),
108
109
  context: `input address ${input.address}`,
109
110
  })
110
111
  }
@@ -170,6 +171,7 @@ function createPsbtOutput({ address, amount, asset, addressPathsMap, purposeXPub
170
171
  psbtOutput.redeemScript = getWrappedSegwitRedeemScript({
171
172
  publicKey,
172
173
  address,
174
+ network: asset.coinInfo.toBitcoinJS(),
173
175
  context: `output address ${address}`,
174
176
  })
175
177
  }
@@ -64,8 +64,9 @@ export function createSignWithWallet({
64
64
  // P2WPKH. Exodus doesn't use P2SH addresses so we should only ever be
65
65
  // signing a P2SH input if we are importing a private key
66
66
  // BIP143: As a default policy, only compressed public keys are accepted in P2WPKH and P2WSH
67
- const p2wpkh = payments.p2wpkh({ pubkey: publicKey })
68
- const p2sh = payments.p2sh({ redeem: p2wpkh })
67
+ const network = coinInfo.toBitcoinJS()
68
+ const p2wpkh = payments.p2wpkh({ pubkey: publicKey, network })
69
+ const p2sh = payments.p2sh({ redeem: p2wpkh, network })
69
70
  if (address === p2sh.address) {
70
71
  // Set the redeem script in the psbt in case it's missing.
71
72
  if (!Buffer.isBuffer(input.redeemScript)) {