utxo-lib 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/bitgo/PsbtUtil.js +3 -2
- package/dist/src/bitgo/UtxoPsbt.js +49 -33
- package/dist/src/bitgo/UtxoTransaction.js +2 -2
- package/dist/src/bitgo/outputScripts.js +3 -3
- package/dist/src/bitgo/parseInput.js +2 -2
- package/dist/src/bitgo/psbt/scriptTypes.js +3 -3
- package/dist/src/bitgo/wallet/Psbt.js +11 -8
- package/dist/src/bitgo/wallet/Unspent.js +3 -2
- package/dist/src/bitgo/wallet/chains.d.ts +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +3 -2
- package/dist/src/bitgo/zcash/ZcashTransaction.js +2 -2
- package/dist/src/noble_ecc.d.ts +1 -1
- package/dist/src/noble_ecc.d.ts.map +1 -1
- package/dist/src/noble_ecc.js +5 -5
- package/dist/src/payments/p2tr.js +13 -9
- package/dist/src/payments/p2tr_ns.js +3 -2
- package/dist/src/taproot.js +4 -3
- package/dist/src/testutil/psbt.js +4 -4
- package/dist/src/transaction_builder.js +2 -2
- package/package.json +2 -1
@@ -21,7 +21,8 @@ var ProprietaryKeySubtype;
|
|
21
21
|
* Default identifierEncoding is utf-8 for identifier.
|
22
22
|
*/
|
23
23
|
function getPsbtInputProprietaryKeyVals(input, keySearch) {
|
24
|
-
|
24
|
+
var _a;
|
25
|
+
if (!((_a = input.unknownKeyVals) === null || _a === void 0 ? void 0 : _a.length)) {
|
25
26
|
return [];
|
26
27
|
}
|
27
28
|
if (keySearch && keySearch.subtype === undefined && Buffer.isBuffer(keySearch.keydata)) {
|
@@ -88,4 +89,4 @@ function withUnsafeNonSegwit(psbt, fn, unsafe = true) {
|
|
88
89
|
}
|
89
90
|
}
|
90
91
|
exports.withUnsafeNonSegwit = withUnsafeNonSegwit;
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
92
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHNidFV0aWw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