utxo-lib 1.0.9 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +19 -16
- package/dist/src/address.d.ts.map +1 -1
- package/dist/src/address.js +11 -1
- package/dist/src/addressFormat.d.ts +1 -1
- package/dist/src/addressFormat.d.ts.map +1 -1
- package/dist/src/addressFormat.js +1 -1
- package/dist/src/bitgo/Musig2.d.ts +115 -17
- package/dist/src/bitgo/Musig2.d.ts.map +1 -1
- package/dist/src/bitgo/Musig2.js +283 -100
- package/dist/src/bitgo/PsbtUtil.d.ts +59 -0
- package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -0
- package/dist/src/bitgo/PsbtUtil.js +92 -0
- package/dist/src/bitgo/UtxoPsbt.d.ts +180 -47
- package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/UtxoPsbt.js +673 -113
- package/dist/src/bitgo/UtxoTransaction.js +2 -2
- package/dist/src/bitgo/bitcoincash/address.js +2 -2
- package/dist/src/bitgo/index.d.ts +11 -0
- package/dist/src/bitgo/index.d.ts.map +1 -1
- package/dist/src/bitgo/index.js +6 -2
- package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
- package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
- package/dist/src/bitgo/legacysafe/index.js +61 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +10 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.js +17 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +16 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.js +46 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +10 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +15 -0
- package/dist/src/bitgo/litecoin/index.d.ts +4 -0
- package/dist/src/bitgo/litecoin/index.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/index.js +16 -0
- package/dist/src/bitgo/outputScripts.d.ts +3 -1
- package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
- package/dist/src/bitgo/outputScripts.js +20 -12
- package/dist/src/bitgo/parseInput.d.ts +49 -20
- package/dist/src/bitgo/parseInput.d.ts.map +1 -1
- package/dist/src/bitgo/parseInput.js +110 -26
- package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
- package/dist/src/bitgo/psbt/fromHalfSigned.js +9 -6
- package/dist/src/bitgo/psbt/scriptTypes.js +3 -3
- package/dist/src/bitgo/signature.d.ts +3 -3
- package/dist/src/bitgo/signature.d.ts.map +1 -1
- package/dist/src/bitgo/signature.js +48 -16
- package/dist/src/bitgo/transaction.d.ts +18 -3
- package/dist/src/bitgo/transaction.d.ts.map +1 -1
- package/dist/src/bitgo/transaction.js +28 -15
- package/dist/src/bitgo/types.d.ts +2 -0
- package/dist/src/bitgo/types.d.ts.map +1 -1
- package/dist/src/bitgo/types.js +1 -1
- package/dist/src/bitgo/wallet/Psbt.d.ts +104 -12
- package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Psbt.js +288 -70
- package/dist/src/bitgo/wallet/Unspent.d.ts +28 -0
- package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Unspent.js +173 -68
- package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
- package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/WalletOutput.js +64 -23
- package/dist/src/bitgo/wallet/chains.d.ts +2 -2
- package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/chains.js +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +8 -15
- package/dist/src/bitgo/zcash/ZcashTransaction.js +2 -2
- package/dist/src/musig.d.ts +0 -1
- package/dist/src/musig.d.ts.map +1 -1
- package/dist/src/musig.js +15 -29
- package/dist/src/networks.d.ts +1 -2
- package/dist/src/networks.d.ts.map +1 -1
- package/dist/src/networks.js +22 -29
- 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 +9 -5
- package/dist/src/payments/p2tr.d.ts.map +1 -1
- package/dist/src/payments/p2tr.js +25 -15
- package/dist/src/payments/p2tr_ns.js +3 -2
- package/dist/src/taproot.d.ts +16 -0
- package/dist/src/taproot.d.ts.map +1 -1
- package/dist/src/taproot.js +46 -3
- package/dist/src/testutil/index.d.ts +2 -0
- package/dist/src/testutil/index.d.ts.map +1 -1
- package/dist/src/testutil/index.js +3 -1
- package/dist/src/testutil/keys.d.ts +3 -0
- package/dist/src/testutil/keys.d.ts.map +1 -1
- package/dist/src/testutil/keys.js +17 -2
- package/dist/src/testutil/mock.d.ts +1 -1
- package/dist/src/testutil/mock.d.ts.map +1 -1
- package/dist/src/testutil/mock.js +12 -4
- package/dist/src/testutil/psbt.d.ts +89 -0
- package/dist/src/testutil/psbt.d.ts.map +1 -0
- package/dist/src/testutil/psbt.js +150 -0
- package/dist/src/testutil/transaction.d.ts +70 -0
- package/dist/src/testutil/transaction.d.ts.map +1 -0
- package/dist/src/testutil/transaction.js +107 -0
- package/dist/src/transaction_builder.js +2 -2
- package/package.json +7 -6
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addWalletOutputToPsbt = void 0;
|
3
|
+
exports.updateWalletOutputForPsbt = exports.addWalletOutputToPsbt = void 0;
|
4
4
|
const bitcoinjs_lib_1 = require("bitcoinjs-lib");
|
5
5
|
const chains_1 = require("./chains");
|
6
6
|
const outputScripts_1 = require("../outputScripts");
|
7
7
|
/**
|
8
8
|
* Add a verifiable wallet output to the PSBT. The output and all data
|
9
9
|
* needed to verify it from public keys only are added to the PSBT.
|
10
|
-
* Typically these are change outputs
|
10
|
+
* Typically these are change outputs.
|
11
11
|
*
|
12
12
|
* @param psbt the PSBT to add change output to
|
13
13
|
* @param rootWalletKeys keys that will be able to spend the output
|
@@ -22,13 +22,53 @@ function addWalletOutputToPsbt(psbt, rootWalletKeys, chain, index, value) {
|
|
22
22
|
const scriptType = chains_1.scriptTypeForChain(chain);
|
23
23
|
if (scriptType === 'p2tr' || scriptType === 'p2trMusig2') {
|
24
24
|
const payment = scriptType === 'p2tr' ? outputScripts_1.createPaymentP2tr(walletKeys.publicKeys) : outputScripts_1.createPaymentP2trMusig2(walletKeys.publicKeys);
|
25
|
+
psbt.addOutput({ script: payment.output, value });
|
26
|
+
}
|
27
|
+
else {
|
28
|
+
const { scriptPubKey: script } = outputScripts_1.createOutputScript2of3(walletKeys.publicKeys, scriptType);
|
29
|
+
psbt.addOutput({ script, value });
|
30
|
+
}
|
31
|
+
updateWalletOutputForPsbt(psbt, rootWalletKeys, psbt.data.outputs.length - 1, chain, index);
|
32
|
+
}
|
33
|
+
exports.addWalletOutputToPsbt = addWalletOutputToPsbt;
|
34
|
+
/**
|
35
|
+
* Update the wallet output with the required information when necessary. If the
|
36
|
+
* information is there already, it will skip over it.
|
37
|
+
*
|
38
|
+
* This function assumes that the output script and value have already been set.
|
39
|
+
*
|
40
|
+
* @param psbt the PSBT to update change output at
|
41
|
+
* @param rootWalletKeys keys that will be able to spend the output
|
42
|
+
* @param outputIndex output index where to update the output
|
43
|
+
* @param chain chain code to use for deriving scripts (and to determine script
|
44
|
+
* type) chain is an API parameter in the BitGo API, and may be
|
45
|
+
* any valid ChainCode
|
46
|
+
* @param index derivation index for the change address
|
47
|
+
* @param value value of the change output
|
48
|
+
*/
|
49
|
+
function updateWalletOutputForPsbt(psbt, rootWalletKeys, outputIndex, chain, index) {
|
50
|
+
if (psbt.data.outputs.length <= outputIndex) {
|
51
|
+
throw new Error(`outputIndex (${outputIndex}) is too large for the number of outputs (${psbt.data.outputs.length})`);
|
52
|
+
}
|
53
|
+
const outputScript = psbt.getOutputScript(outputIndex);
|
54
|
+
const walletKeys = rootWalletKeys.deriveForChainAndIndex(chain, index);
|
55
|
+
const scriptType = chains_1.scriptTypeForChain(chain);
|
56
|
+
const output = psbt.data.outputs[outputIndex];
|
57
|
+
const update = {};
|
58
|
+
if (scriptType === 'p2tr' || scriptType === 'p2trMusig2') {
|
59
|
+
const payment = scriptType === 'p2tr' ? outputScripts_1.createPaymentP2tr(walletKeys.publicKeys) : outputScripts_1.createPaymentP2trMusig2(walletKeys.publicKeys);
|
60
|
+
if (!payment.output || !payment.output.equals(outputScript)) {
|
61
|
+
throw new Error(`cannot update a p2tr output where the scripts do not match - Failing.`);
|
62
|
+
}
|
25
63
|
const allLeafHashes = payment.redeems.map((r) => bitcoinjs_lib_1.taproot.hashTapLeaf(r.output));
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
tapInternalKey
|
31
|
-
|
64
|
+
if (!output.tapTree) {
|
65
|
+
update.tapTree = payment.tapTree;
|
66
|
+
}
|
67
|
+
if (!output.tapInternalKey) {
|
68
|
+
update.tapInternalKey = payment.internalPubkey;
|
69
|
+
}
|
70
|
+
if (!output.tapBip32Derivation) {
|
71
|
+
update.tapBip32Derivation = [0, 1, 2].map((idx) => {
|
32
72
|
const pubkey = outputScripts_1.toXOnlyPublicKey(walletKeys.triple[idx].publicKey);
|
33
73
|
const leafHashes = [];
|
34
74
|
payment.redeems.forEach((r, idx) => {
|
@@ -42,28 +82,29 @@ function addWalletOutputToPsbt(psbt, rootWalletKeys, chain, index, value) {
|
|
42
82
|
path: walletKeys.paths[idx],
|
43
83
|
masterFingerprint: rootWalletKeys.triple[idx].fingerprint,
|
44
84
|
};
|
45
|
-
})
|
46
|
-
}
|
85
|
+
});
|
86
|
+
}
|
47
87
|
}
|
48
88
|
else {
|
49
89
|
const { scriptPubKey, witnessScript, redeemScript } = outputScripts_1.createOutputScript2of3(walletKeys.publicKeys, scriptType);
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
90
|
+
if (!scriptPubKey.equals(outputScript)) {
|
91
|
+
throw new Error(`cannot update an output where the scripts do not match - Failing.`);
|
92
|
+
}
|
93
|
+
if (!output.bip32Derivation) {
|
94
|
+
update.bip32Derivation = [0, 1, 2].map((idx) => ({
|
54
95
|
pubkey: walletKeys.triple[idx].publicKey,
|
55
96
|
path: walletKeys.paths[idx],
|
56
97
|
masterFingerprint: rootWalletKeys.triple[idx].fingerprint,
|
57
|
-
}))
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
psbt.updateOutput(outputIndex, { witnessScript });
|
98
|
+
}));
|
99
|
+
}
|
100
|
+
if (!output.witnessScript && witnessScript) {
|
101
|
+
update.witnessScript = witnessScript;
|
62
102
|
}
|
63
|
-
if (redeemScript) {
|
64
|
-
|
103
|
+
if (!output.redeemScript && redeemScript) {
|
104
|
+
update.redeemScript = redeemScript;
|
65
105
|
}
|
66
106
|
}
|
107
|
+
psbt.updateOutput(outputIndex, update);
|
67
108
|
}
|
68
|
-
exports.
|
69
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2FsbGV0T3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3dhbGxldC9XYWxsZXRPdXRwdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaURBQXdDO0FBR3hDLHFDQUF5RDtBQUN6RCxvREFBd0g7QUFFeEg7Ozs7Ozs7Ozs7OztHQVlHO0FBQ0gsU0FBZ0IscUJBQXFCLENBQ25DLElBQWMsRUFDZCxjQUE4QixFQUM5QixLQUFnQixFQUNoQixLQUFhLEVBQ2IsS0FB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dCA9IHJlZGVlbVNjcmlwdDtcbiAgICB9XG4gIH1cbiAgcHNidC51cGRhdGVPdXRwdXQob3V0cHV0SW5kZXgsIHVwZGF0ZSk7XG59XG4iXX0=
|
@@ -18,8 +18,8 @@ export declare const chainCodesP2shP2wsh: readonly [10, 11];
|
|
18
18
|
export declare const chainCodesP2wsh: readonly [20, 21];
|
19
19
|
export declare const chainCodesP2tr: readonly [30, 31];
|
20
20
|
export declare const chainCodesP2trMusig2: readonly [40, 41];
|
21
|
-
export declare const chainCodes: (0 |
|
22
|
-
export declare type ChainCode = typeof chainCodes[number];
|
21
|
+
export declare const chainCodes: (0 | 1 | 10 | 11 | 20 | 21 | 30 | 31 | 40 | 41)[];
|
22
|
+
export declare type ChainCode = (typeof chainCodes)[number];
|
23
23
|
export declare function isChainCode(n: unknown): n is ChainCode;
|
24
24
|
/**
|
25
25
|
* A script type maps to two ChainCodes:
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/wallet/chains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,cAAc,iBAAkB,CAAC;AAC9C,eAAO,MAAM,mBAAmB,mBAAoB,CAAC;AACrD,eAAO,MAAM,eAAe,mBAAoB,CAAC;AACjD,eAAO,MAAM,cAAc,mBAAoB,CAAC;AAChD,eAAO,MAAM,oBAAoB,mBAAoB,CAAC;AACtD,eAAO,MAAM,UAAU,mDAMtB,CAAC;AACF,oBAAY,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/wallet/chains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,eAAO,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YW4ge1xuICByZXR1cm4gdG9DaGFpblBhaXIodikuaW5kZXhPZih2KSA9PT0gMDtcbn1cblxuLyoqXG4gKiBAcmV0dXJuIHRydWUgaWZmIGNoYWluIGNvZGUgaXMgaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzSW50ZXJuYWxDaGFpbkNvZGUodjogQ2hhaW5Db2RlKTogYm9vbGVhbiB7XG4gIHJldHVybiB0b0NoYWluUGFpcih2KS5pbmRleE9mKHYpID09PSAxO1xufVxuXG4vKipcbiAqIEByZXR1cm4gdHJ1ZSBpZmYgY2hhaW4gY29kZSBpcyBhIHNlZ3dpdCBhZGRyZXNzXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBpc1NlZ3dpdCh2OiBDaGFpbkNvZGUpOiBib29sZWFuIHtcbiAgY29uc3Qgc2Vnd2l0Q29kZXM6IENoYWluQ29kZVtdID0gW1xuICAgIC4uLmNoYWluQ29kZXNQMnNoUDJ3c2gsXG4gICAgLi4uY2hhaW5Db2Rlc1Ayd3NoLFxuICAgIC4uLmNoYWluQ29kZXNQMnRyLFxuICAgIC4uLmNoYWluQ29kZXNQMnRyTXVzaWcyLFxuICBdO1xuICByZXR1cm4gc2Vnd2l0Q29kZXMuaW5jbHVkZXModik7XG59XG4iXX0=
|
@@ -27,7 +27,6 @@ export declare class ZcashPsbt extends UtxoPsbt<ZcashTransaction<bigint>> {
|
|
27
27
|
setDefaultsForVersion(network: Network, version: number): void;
|
28
28
|
signInput(inputIndex: number, keyPair: Signer, sighashTypes?: number[]): this;
|
29
29
|
validateSignaturesOfInput(inputIndex: number, validator: ValidateSigFunction, pubkey?: Buffer): boolean;
|
30
|
-
private withUnsafeSignNonSegwitTrue;
|
31
30
|
private setPropertyCheckSignatures;
|
32
31
|
setConsensusBranchId(consensusBranchId: number): void;
|
33
32
|
setVersionGroupId(versionGroupId: number): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ZcashPsbt.d.ts","sourceR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AAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAIvG,OAAO,CAAC,0BAA0B;IAQlC,oBAAoB,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI;IAKrD,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAK/C,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAI5C"}
|
@@ -6,12 +6,13 @@ const ZcashTransaction_1 = require("./ZcashTransaction");
|
|
6
6
|
const __1 = require("../../");
|
7
7
|
const bip174_1 = require("bip174");
|
8
8
|
const types = require("bitcoinjs-lib/src/types");
|
9
|
+
const PsbtUtil_1 = require("../PsbtUtil");
|
9
10
|
const typeforce = require('typeforce');
|
10
11
|
const CONSENSUS_BRANCH_ID_KEY = Buffer.concat([
|
11
12
|
Buffer.of(0xfc),
|
12
13
|
Buffer.of(0x05),
|
13
|
-
Buffer.from(
|
14
|
-
Buffer.of(
|
14
|
+
Buffer.from(PsbtUtil_1.PSBT_PROPRIETARY_IDENTIFIER),
|
15
|
+
Buffer.of(PsbtUtil_1.ProprietaryKeySubtype.ZEC_CONSENSUS_BRANCH_ID),
|
15
16
|
]);
|
16
17
|
class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
|
17
18
|
static transactionFromBuffer(buffer, network) {
|
@@ -29,10 +30,11 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
|
|
29
30
|
* @param opts options
|
30
31
|
*/
|
31
32
|
static fromBuffer(buffer, opts) {
|
33
|
+
var _a;
|
32
34
|
const psbt = super.fromBuffer(buffer, opts);
|
33
35
|
// Read `consensusBranchId` from the global-map
|
34
36
|
let consensusBranchId = undefined;
|
35
|
-
psbt.data.globalMap.unknownKeyVals
|
37
|
+
(_a = psbt.data.globalMap.unknownKeyVals) === null || _a === void 0 ? void 0 : _a.forEach(({ key, value }, i) => {
|
36
38
|
if (key.equals(CONSENSUS_BRANCH_ID_KEY)) {
|
37
39
|
consensusBranchId = value.readUint32LE();
|
38
40
|
}
|
@@ -107,19 +109,10 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
|
|
107
109
|
// transactions because zcash hashes the value directly. Thus, it is unnecessary to have
|
108
110
|
// the previous transaction hash on the unspent.
|
109
111
|
signInput(inputIndex, keyPair, sighashTypes) {
|
110
|
-
return
|
112
|
+
return PsbtUtil_1.withUnsafeNonSegwit(this, super.signInput.bind(this, inputIndex, keyPair, sighashTypes));
|
111
113
|
}
|
112
114
|
validateSignaturesOfInput(inputIndex, validator, pubkey) {
|
113
|
-
return
|
114
|
-
}
|
115
|
-
withUnsafeSignNonSegwitTrue(fn) {
|
116
|
-
this.__CACHE.__UNSAFE_SIGN_NONSEGWIT = true;
|
117
|
-
try {
|
118
|
-
return fn();
|
119
|
-
}
|
120
|
-
finally {
|
121
|
-
this.__CACHE.__UNSAFE_SIGN_NONSEGWIT = false;
|
122
|
-
}
|
115
|
+
return PsbtUtil_1.withUnsafeNonSegwit(this, super.validateSignaturesOfInput.bind(this, inputIndex, validator, pubkey));
|
123
116
|
}
|
124
117
|
setPropertyCheckSignatures(propName, value) {
|
125
118
|
if (this.tx[propName] === value) {
|
@@ -142,4 +135,4 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
|
|
142
135
|
}
|
143
136
|
}
|
144
137
|
exports.ZcashPsbt = ZcashPsbt;
|
145
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hQc2J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3pjYXNoL1pjYXNoUHNidC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQ0FBcUc7QUFDckcseURBSTRCO0FBQzVCLDhCQUEwRDtBQUMxRCxtQ0FBMEM7QUFDMUMsaURBQWlEO0FBRWpELE1BQU0sU0FBUyxHQU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dXNCcmFuY2hJZCk7XG4gIH1cblxuICBzZXRWZXJzaW9uR3JvdXBJZCh2ZXJzaW9uR3JvdXBJZDogbnVtYmVyKTogdm9pZCB7XG4gICAgdHlwZWZvcmNlKHR5cGVzLlVJbnQzMiwgdmVyc2lvbkdyb3VwSWQpO1xuICAgIHRoaXMuc2V0UHJvcGVydHlDaGVja1NpZ25hdHVyZXMoJ3ZlcnNpb25Hcm91cElkJywgdmVyc2lvbkdyb3VwSWQpO1xuICB9XG5cbiAgc2V0RXhwaXJ5SGVpZ2h0KGV4cGlyeUhlaWdodDogbnVtYmVyKTogdm9pZCB7XG4gICAgdHlwZWZvcmNlKHR5cGVzLlVJbnQzMiwgZXhwaXJ5SGVpZ2h0KTtcbiAgICB0aGlzLnNldFByb3BlcnR5Q2hlY2tTaWduYXR1cmVzKCdleHBpcnlIZWlnaHQnLCBleHBpcnlIZWlnaHQpO1xuICB9XG59XG4iXX0=
|
@@ -74,7 +74,7 @@ class ZcashTransaction extends UtxoTransaction_1.UtxoTransaction {
|
|
74
74
|
consensusBranchId = tx.consensusBranchId;
|
75
75
|
}
|
76
76
|
}
|
77
|
-
this.consensusBranchId = consensusBranchId
|
77
|
+
this.consensusBranchId = consensusBranchId !== null && consensusBranchId !== void 0 ? consensusBranchId : getDefaultConsensusBranchIdForVersion(network, this.version);
|
78
78
|
}
|
79
79
|
static fromBuffer(buffer, __noStrict, amountType = 'number', network) {
|
80
80
|
/* istanbul ignore next */
|
@@ -338,4 +338,4 @@ ZcashTransaction.VERSION_SAPLING = 4;
|
|
338
338
|
ZcashTransaction.VERSION4_BRANCH_CANOPY = 400;
|
339
339
|
ZcashTransaction.VERSION4_BRANCH_NU5 = 450;
|
340
340
|
ZcashTransaction.VERSION5_BRANCH_NU5 = 500;
|
341
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hUcmFuc2FjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3Vy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0b0J1ZmZlclY1KGJ1ZmZlcldyaXRlciwgdGhpcyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRvQnVmZmVyVjQoYnVmZmVyV3JpdGVyLCB0aGlzKTtcbiAgICB9XG5cbiAgICBpZiAoaW5pdGlhbE9mZnNldCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gYnVmZmVyLnNsaWNlKGluaXRpYWxPZmZzZXQsIGJ1ZmZlcldyaXRlci5vZmZzZXQpO1xuICAgIH1cbiAgICByZXR1cm4gYnVmZmVyO1xuICB9XG5cbiAgZ2V0SGFzaChmb3JXaXRuZXNzPzogYm9vbGVhbik6IEJ1ZmZlciB7XG4gICAgaWYgKGZvcldpdG5lc3MpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgaW52YWxpZCBhcmd1bWVudGApO1xuICAgIH1cbiAgICBpZiAodGhpcy52ZXJzaW9uID09PSA1KSB7XG4gICAgICByZXR1cm4gZ2V0VHhpZERpZ2VzdCh0aGlzKTtcbiAgICB9XG4gICAgcmV0dXJuIGNyeXB0by5oYXNoMjU2KHRoaXMudG9CdWZmZXIoKSk7XG4gIH1cblxuICBjbG9uZTxUTjIgZXh0ZW5kcyBudW1iZXIgfCBiaWdpbnQgPSBUTnVtYmVyPihhbW91bnRUeXBlPzogJ2JpZ2ludCcgfCAnbnVtYmVyJyk6IFpjYXNoVHJhbnNhY3Rpb248VE4yPiB7XG4gICAgcmV0dXJuIG5ldyBaY2FzaFRyYW5zYWN0aW9uPFROMj4odGhpcy5uZXR3b3JrLCB0aGlzLCBhbW91bnRUeXBlKTtcbiAgfVxufVxuIl19
|
package/dist/src/musig.d.ts
CHANGED
package/dist/src/musig.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"musig.d.ts","sourceRoot":"","sources":["../../src/musig.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"musig.d.ts","sourceRoot":"","sources":["../../src/musig.ts"],"names":[],"mappings":"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