@exodus/bitcoin-api 4.7.0 → 4.8.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 +20 -0
- package/package.json +2 -2
- package/src/tx-send/batch-tx.js +24 -3
- package/src/tx-sign/default-sign-hardware.js +7 -2
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.8.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.8.0...@exodus/bitcoin-api@4.8.1) (2025-12-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: add redeemScript to input via hardware wallet (#7039)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [4.8.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.7.0...@exodus/bitcoin-api@4.8.0) (2025-11-26)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* feat: allow spending utxo from previous multisigs (#7004)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [4.7.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@4.6.0...@exodus/bitcoin-api@4.7.0) (2025-11-17)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.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": "
|
|
63
|
+
"gitHead": "f4afd4b4ade5a5bb4d5f8342ba41b6852eaf3f81"
|
|
64
64
|
}
|
package/src/tx-send/batch-tx.js
CHANGED
|
@@ -79,11 +79,32 @@ export const getCreateBatchTransaction = ({
|
|
|
79
79
|
purpose: utxo.address.meta.purpose ?? 86,
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const assetConfig = await assetClientInterface.getAssetConfig({
|
|
83
|
+
assetName,
|
|
84
|
+
walletAccount,
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
let multisigDataIndex = assetConfig.multisigDataLength
|
|
88
|
+
? assetConfig.multisigDataLength - 1
|
|
89
|
+
: 0
|
|
90
|
+
let [address, xpub] = await Promise.all([
|
|
91
|
+
assetClientInterface.getAddress({
|
|
92
|
+
...addressOpts,
|
|
93
|
+
multisigDataIndex,
|
|
94
|
+
}),
|
|
84
95
|
assetClientInterface.getExtendedPublicKey(addressOpts),
|
|
85
96
|
])
|
|
86
|
-
|
|
97
|
+
while (String(address) !== String(utxo.address)) {
|
|
98
|
+
if (multisigDataIndex === 0) {
|
|
99
|
+
throw new Error(`Address does not match ${String(address)} - ${String(utxo.address)}`)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
multisigDataIndex--
|
|
103
|
+
address = await assetClientInterface.getAddress({
|
|
104
|
+
...addressOpts,
|
|
105
|
+
multisigDataIndex,
|
|
106
|
+
})
|
|
107
|
+
}
|
|
87
108
|
|
|
88
109
|
const hdkey = BIP32.fromXPub(xpub)
|
|
89
110
|
const masterFingerprint = Buffer.alloc(4)
|
|
@@ -110,14 +110,19 @@ export function applySignatures(psbt, signatures, inputsToSign) {
|
|
|
110
110
|
tapKeySig: signature.signature,
|
|
111
111
|
})
|
|
112
112
|
} else {
|
|
113
|
-
|
|
113
|
+
const updateData = {
|
|
114
114
|
partialSig: [
|
|
115
115
|
{
|
|
116
116
|
pubkey: signature.publicKey,
|
|
117
117
|
signature: signature.signature,
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
|
-
}
|
|
120
|
+
}
|
|
121
|
+
if (signature.redeemScript) {
|
|
122
|
+
updateData.redeemScript = signature.redeemScript
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
psbt.data.updateInput(inputIndex, updateData)
|
|
121
126
|
}
|
|
122
127
|
} else {
|
|
123
128
|
throw new Error(
|