utxo-lib 1.0.8 → 1.1.0
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/base_crypto.d.ts +14 -0
- package/dist/src/base_crypto.d.ts.map +1 -0
- package/dist/src/base_crypto.js +215 -0
- 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 -101
- 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 +91 -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 +657 -121
- 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 +285 -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 +172 -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 +7 -16
- package/dist/src/bitgo/zcash/ZcashTransaction.js +2 -2
- package/dist/src/musig.d.ts +390 -0
- package/dist/src/musig.d.ts.map +1 -0
- package/dist/src/musig.js +447 -0
- 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 +11 -7
- package/dist/src/payments/p2tr.d.ts.map +1 -1
- package/dist/src/payments/p2tr.js +21 -19
- package/dist/src/payments/p2tr_ns.js +2 -3
- package/dist/src/taproot.d.ts +16 -0
- package/dist/src/taproot.d.ts.map +1 -1
- package/dist/src/taproot.js +45 -4
- 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 +6 -7
@@ -1,10 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.parsePubScript = exports.parseSignatureScript2Of3 = exports.parseSignatureScript = exports.
|
3
|
+
exports.parsePubScript = exports.parsePubScript2Of3 = exports.parseSignatureScript2Of3 = exports.parseSignatureScript = exports.getLeafVersion = exports.calculateScriptPathLevel = exports.isValidControlBock = exports.isPlaceholderSignature = void 0;
|
4
|
+
/* eslint no-redeclare: 0 */
|
4
5
|
const opcodes = require("bitcoin-ops");
|
5
6
|
const bitcoinjs_lib_1 = require("bitcoinjs-lib");
|
6
|
-
const outputScripts_1 = require("./outputScripts");
|
7
7
|
const types_1 = require("./types");
|
8
|
+
const outputScripts_1 = require("./outputScripts");
|
8
9
|
function isPlaceholderSignature(v) {
|
9
10
|
if (Buffer.isBuffer(v)) {
|
10
11
|
return v.length === 0;
|
@@ -39,13 +40,13 @@ exports.calculateScriptPathLevel = calculateScriptPathLevel;
|
|
39
40
|
/**
|
40
41
|
* @return leaf version for P2TR control block.
|
41
42
|
*/
|
42
|
-
function
|
43
|
+
function getLeafVersion(controlBlock) {
|
43
44
|
if (Buffer.isBuffer(controlBlock) && controlBlock.length > 0) {
|
44
45
|
return controlBlock[0] & 0xfe;
|
45
46
|
}
|
46
47
|
throw new Error('unexpected leafVersion.');
|
47
48
|
}
|
48
|
-
exports.
|
49
|
+
exports.getLeafVersion = getLeafVersion;
|
49
50
|
function emptyMatchResult() {
|
50
51
|
return {
|
51
52
|
':pubkey': [],
|
@@ -89,7 +90,7 @@ function matchScript(script, pattern) {
|
|
89
90
|
case 'OP_CHECKSIGVERIFY':
|
90
91
|
return e === opcodes[p];
|
91
92
|
case ':pubkey':
|
92
|
-
return Buffer.isBuffer(e) && e.length === 33;
|
93
|
+
return Buffer.isBuffer(e) && (e.length === 33 || e.length === 65);
|
93
94
|
case ':pubkey-xonly':
|
94
95
|
return Buffer.isBuffer(e) && e.length === 32;
|
95
96
|
case ':signature':
|
@@ -227,7 +228,24 @@ const parseP2wsh2Of3 = (p) => {
|
|
227
228
|
}
|
228
229
|
return parseP2ms(p.witness, 'p2wsh');
|
229
230
|
};
|
230
|
-
const
|
231
|
+
const parseTaprootKeyPath2Of3 = (p) => {
|
232
|
+
if (!isNativeSegwit(p)) {
|
233
|
+
return new MatchError(`expected native segwit`);
|
234
|
+
}
|
235
|
+
const match = matchScript(p.witness, [':signature']);
|
236
|
+
if (match instanceof MatchError) {
|
237
|
+
return match;
|
238
|
+
}
|
239
|
+
const signatures = match[':signature'];
|
240
|
+
if (isPlaceholderSignature(signatures[0])) {
|
241
|
+
throw new Error(`invalid taproot key path signature`);
|
242
|
+
}
|
243
|
+
return {
|
244
|
+
scriptType: 'taprootKeyPathSpend',
|
245
|
+
signatures,
|
246
|
+
};
|
247
|
+
};
|
248
|
+
const parseTaprootScriptPath2Of3 = (p) => {
|
231
249
|
if (!isNativeSegwit(p)) {
|
232
250
|
return new MatchError(`expected native segwit`);
|
233
251
|
}
|
@@ -243,9 +261,9 @@ const parseP2tr2Of3 = (p) => {
|
|
243
261
|
}
|
244
262
|
const [controlBlock] = match[':control-block'];
|
245
263
|
const scriptPathLevel = calculateScriptPathLevel(controlBlock);
|
246
|
-
const leafVersion =
|
264
|
+
const leafVersion = getLeafVersion(controlBlock);
|
247
265
|
return {
|
248
|
-
scriptType: '
|
266
|
+
scriptType: 'taprootScriptPathSpend',
|
249
267
|
pubScript: match[':script'][0].buffer,
|
250
268
|
publicKeys: match[':script'][0].match[':pubkey-xonly'],
|
251
269
|
signatures: match[':signature'],
|
@@ -265,10 +283,17 @@ const parseP2tr2Of3 = (p) => {
|
|
265
283
|
*/
|
266
284
|
function parseSignatureScript(input) {
|
267
285
|
const decScript = bitcoinjs_lib_1.script.decompile(input.script);
|
268
|
-
const parsers = [
|
286
|
+
const parsers = [
|
287
|
+
parseP2sh2Of3,
|
288
|
+
parseP2shP2wsh2Of3,
|
289
|
+
parseP2wsh2Of3,
|
290
|
+
parseTaprootKeyPath2Of3,
|
291
|
+
parseTaprootScriptPath2Of3,
|
292
|
+
parseP2shP2pk,
|
293
|
+
];
|
269
294
|
for (const f of parsers) {
|
270
295
|
const parsed = f({
|
271
|
-
script:
|
296
|
+
script: decScript?.length === 0 ? null : decScript,
|
272
297
|
witness: input.witness.length === 0 ? null : input.witness,
|
273
298
|
});
|
274
299
|
if (parsed instanceof MatchError) {
|
@@ -281,19 +306,42 @@ function parseSignatureScript(input) {
|
|
281
306
|
exports.parseSignatureScript = parseSignatureScript;
|
282
307
|
function parseSignatureScript2Of3(input) {
|
283
308
|
const result = parseSignatureScript(input);
|
284
|
-
if (!outputScripts_1.isScriptType2Of3(result.scriptType)
|
309
|
+
if (!outputScripts_1.isScriptType2Of3(result.scriptType) &&
|
310
|
+
result.scriptType !== 'taprootKeyPathSpend' &&
|
311
|
+
result.scriptType !== 'taprootScriptPathSpend') {
|
285
312
|
throw new Error(`invalid script type`);
|
286
313
|
}
|
287
314
|
if (!result.signatures) {
|
288
315
|
throw new Error(`missing signatures`);
|
289
316
|
}
|
290
|
-
if (result.
|
317
|
+
if (result.scriptType !== 'taprootKeyPathSpend' &&
|
318
|
+
result.publicKeys.length !== 3 &&
|
319
|
+
(result.publicKeys.length !== 2 || result.scriptType !== 'taprootScriptPathSpend')) {
|
291
320
|
throw new Error(`unexpected pubkey count`);
|
292
321
|
}
|
293
322
|
return result;
|
294
323
|
}
|
295
324
|
exports.parseSignatureScript2Of3 = parseSignatureScript2Of3;
|
325
|
+
const parseP2shP2pkPubScript = (pubScript, scriptType) => {
|
326
|
+
if (scriptType !== 'p2shP2pk') {
|
327
|
+
throw new Error('invalid script type');
|
328
|
+
}
|
329
|
+
const match = matchScript([pubScript], [{ ':script': [':pubkey', 'OP_CHECKSIG'] }]);
|
330
|
+
if (match instanceof MatchError) {
|
331
|
+
return match;
|
332
|
+
}
|
333
|
+
const [script] = match[':script'];
|
334
|
+
return {
|
335
|
+
scriptType,
|
336
|
+
publicKeys: script.match[':pubkey'],
|
337
|
+
pubScript: pubScript,
|
338
|
+
redeemScript: pubScript,
|
339
|
+
};
|
340
|
+
};
|
296
341
|
const parseP2msPubScript = (pubScript, scriptType) => {
|
342
|
+
if (scriptType === 'taprootScriptPathSpend' || scriptType === 'taprootKeyPathSpend' || scriptType === 'p2shP2pk') {
|
343
|
+
throw new Error('invalid script type');
|
344
|
+
}
|
297
345
|
const match = matchScript([pubScript], [{ ':script': ['OP_2', ':pubkey', ':pubkey', ':pubkey', 'OP_3', 'OP_CHECKMULTISIG'] }]);
|
298
346
|
if (match instanceof MatchError) {
|
299
347
|
return match;
|
@@ -310,35 +358,71 @@ const parseP2msPubScript = (pubScript, scriptType) => {
|
|
310
358
|
witnessScript: scriptType === 'p2shP2wsh' || scriptType === 'p2wsh' ? redeemScript.buffer : undefined,
|
311
359
|
};
|
312
360
|
};
|
313
|
-
const
|
361
|
+
const parseTaprootKeyPathPubScript = (pubScript, scriptType) => {
|
362
|
+
if (scriptType === 'p2sh' ||
|
363
|
+
scriptType === 'p2wsh' ||
|
364
|
+
scriptType === 'p2shP2wsh' ||
|
365
|
+
scriptType === 'taprootScriptPathSpend' ||
|
366
|
+
scriptType === 'p2shP2pk') {
|
367
|
+
throw new Error('invalid script type');
|
368
|
+
}
|
369
|
+
const match = matchScript([pubScript], [{ ':script': ['OP_1', ':pubkey-xonly'] }]);
|
370
|
+
if (match instanceof MatchError) {
|
371
|
+
return match;
|
372
|
+
}
|
373
|
+
const [script] = match[':script'];
|
374
|
+
return {
|
375
|
+
scriptType: 'taprootKeyPathSpend',
|
376
|
+
publicKeys: script.match[':pubkey-xonly'],
|
377
|
+
pubScript: pubScript,
|
378
|
+
};
|
379
|
+
};
|
380
|
+
const parseTaprootScriptPathPubScript = (pubScript, scriptType) => {
|
381
|
+
if (scriptType === 'p2sh' ||
|
382
|
+
scriptType === 'p2wsh' ||
|
383
|
+
scriptType === 'p2shP2wsh' ||
|
384
|
+
scriptType === 'taprootKeyPathSpend' ||
|
385
|
+
scriptType === 'p2shP2pk') {
|
386
|
+
throw new Error('invalid script type');
|
387
|
+
}
|
314
388
|
const match = matchScript([pubScript], [{ ':script': [':pubkey-xonly', 'OP_CHECKSIGVERIFY', ':pubkey-xonly', 'OP_CHECKSIG'] }]);
|
315
389
|
if (match instanceof MatchError) {
|
316
390
|
return match;
|
317
391
|
}
|
318
392
|
return {
|
319
|
-
scriptType
|
393
|
+
scriptType,
|
320
394
|
pubScript: match[':script'][0].buffer,
|
321
395
|
publicKeys: match[':script'][0].match[':pubkey-xonly'],
|
322
396
|
};
|
323
397
|
};
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
398
|
+
function parsePubScript2Of3(inputPubScript, scriptType) {
|
399
|
+
const result = scriptType === 'taprootKeyPathSpend'
|
400
|
+
? parseTaprootKeyPathPubScript(inputPubScript, scriptType)
|
401
|
+
: scriptType === 'taprootScriptPathSpend'
|
402
|
+
? parseTaprootScriptPathPubScript(inputPubScript, scriptType)
|
403
|
+
: parseP2msPubScript(inputPubScript, scriptType);
|
404
|
+
if (result instanceof MatchError) {
|
405
|
+
throw new Error(result.message);
|
406
|
+
}
|
407
|
+
if ((result.scriptType === 'taprootKeyPathSpend' && result.publicKeys.length !== 1) ||
|
408
|
+
(result.scriptType === 'taprootScriptPathSpend' && result.publicKeys.length !== 2) ||
|
409
|
+
(outputScripts_1.isScriptType2Of3(result.scriptType) && result.publicKeys.length !== 3)) {
|
410
|
+
throw new Error('unexpected pubkey count');
|
411
|
+
}
|
412
|
+
return result;
|
413
|
+
}
|
414
|
+
exports.parsePubScript2Of3 = parsePubScript2Of3;
|
331
415
|
function parsePubScript(inputPubScript, scriptType) {
|
332
|
-
const result = scriptType === '
|
333
|
-
?
|
334
|
-
:
|
416
|
+
const result = scriptType === 'p2shP2pk'
|
417
|
+
? parseP2shP2pkPubScript(inputPubScript, scriptType)
|
418
|
+
: parsePubScript2Of3(inputPubScript, scriptType);
|
335
419
|
if (result instanceof MatchError) {
|
336
420
|
throw new Error(result.message);
|
337
421
|
}
|
338
|
-
if (result.
|
422
|
+
if (result.scriptType === 'p2shP2pk' && result.publicKeys.length !== 1) {
|
339
423
|
throw new Error('unexpected pubkey count');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N0ZWQgcHVia2V5IGNvdW50Jyk7XG4gIH1cblxuICByZXR1cm4gcmVzdWx0O1xufVxuIl19
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fromHalfSigned.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/psbt/fromHalfSigned.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"fromHalfSigned.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/psbt/fromHalfSigned.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAc,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAiB,QAAQ,EAAiC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,wBAAgB,cAAc,CAC5B,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,EAC3B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,GACnD,eAAe,CA+DjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,eAAe,EAAE,CAOnG"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.unsign = exports.getInputUpdate = void 0;
|
4
|
+
const assert = require("assert");
|
4
5
|
const __1 = require("../..");
|
5
6
|
const parseInput_1 = require("../parseInput");
|
6
7
|
const signature_1 = require("../signature");
|
@@ -15,7 +16,9 @@ function getInputUpdate(tx, vin, prevOuts) {
|
|
15
16
|
return nonWitnessUtxo ? { nonWitnessUtxo } : {};
|
16
17
|
}
|
17
18
|
const parsedInput = parseInput_1.parseSignatureScript(tx.ins[vin]);
|
19
|
+
assert.ok(parsedInput.scriptType !== 'taprootKeyPathSpend');
|
18
20
|
function getPartialSigs() {
|
21
|
+
assert.ok(parsedInput.scriptType !== 'taprootKeyPathSpend');
|
19
22
|
return signature_1.getSignaturesWithPublicKeys(tx, vin, prevOuts, parsedInput.publicKeys).flatMap((signature, i) => signature
|
20
23
|
? [
|
21
24
|
{
|
@@ -28,7 +31,10 @@ function getInputUpdate(tx, vin, prevOuts) {
|
|
28
31
|
// Because Zcash directly hashes the value for non-segwit transactions, we do not need to check indirectly
|
29
32
|
// with the previous transaction. Therefore, we can treat Zcash non-segwit transactions as Bitcoin
|
30
33
|
// segwit transactions
|
31
|
-
if (
|
34
|
+
if (parsedInput.scriptType !== 'taprootScriptPathSpend' &&
|
35
|
+
!outputScripts_1.hasWitnessData(parsedInput.scriptType) &&
|
36
|
+
!nonWitnessUtxo &&
|
37
|
+
__1.getMainnet(tx.network) !== __1.networks.zcash) {
|
32
38
|
throw new Error(`scriptType ${parsedInput.scriptType} requires prevTx Buffer`);
|
33
39
|
}
|
34
40
|
switch (parsedInput.scriptType) {
|
@@ -46,10 +52,7 @@ function getInputUpdate(tx, vin, prevOuts) {
|
|
46
52
|
redeemScript: parsedInput.redeemScript,
|
47
53
|
witnessScript: parsedInput.witnessScript,
|
48
54
|
});
|
49
|
-
case '
|
50
|
-
if (!('controlBlock' in parsedInput)) {
|
51
|
-
throw new Error(`keypath not implemented`);
|
52
|
-
}
|
55
|
+
case 'taprootScriptPathSpend':
|
53
56
|
const leafHash = __1.taproot.getTapleafHash(__1.ecc, parsedInput.controlBlock, parsedInput.pubScript);
|
54
57
|
return {
|
55
58
|
tapLeafScript: [
|
@@ -88,4 +91,4 @@ function unsign(tx, prevOuts) {
|
|
88
91
|
});
|
89
92
|
}
|
90
93
|
exports.unsign = unsign;
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUhhbGZTaWduZW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x5IHNpZ25lZCB0cmFuc2FjdGlvbiBhbmQgcmVtb3ZlcyB0aGUgc2NyaXB0cyBhbmQgc2lnbmF0dXJlcy5cbiAqXG4gKiBJbnB1dHMgbXVzdCBiZSBvbmUgb2Y6XG4gKiAgLSBwMnNoUDJwa1xuICogIC0gcDJzaCAyLW9mLTNcbiAqICAtIHAyc2hQMndzaCAyLW9mLTNcbiAqICAtIHAyd3NoIDItb2YtM1xuICogIC0gcDJ0ciBzY3JpcHQgcGF0aCAyLW9mLTJcbiAqXG4gKiBAcGFyYW0gdHggdGhlIHBhcnRpYWxseSBzaWduZWQgdHJhbnNhY3Rpb25cbiAqIEBwYXJhbSBwcmV2T3V0c1xuICpcbiAqIEByZXR1cm4gdGhlIHJlbW92ZWQgc2NyaXB0cyBhbmQgc2lnbmF0dXJlcywgcmVhZHkgdG8gYmUgYWRkZWQgdG8gYSBQU0JUXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiB1bnNpZ24odHg6IFV0eG9UcmFuc2FjdGlvbjxiaWdpbnQ+LCBwcmV2T3V0czogVHhPdXRwdXQ8YmlnaW50PltdKTogUHNidElucHV0VXBkYXRlW10ge1xuICByZXR1cm4gdHguaW5zLm1hcCgoaW5wdXQsIHZpbikgPT4ge1xuICAgIGNvbnN0IHVwZGF0ZSA9IGdldElucHV0VXBkYXRlKHR4LCB2aW4sIHByZXZPdXRzKTtcbiAgICBpbnB1dC53aXRuZXNzID0gW107XG4gICAgaW5wdXQuc2NyaXB0ID0gQnVmZmVyLmFsbG9jKDApO1xuICAgIHJldHVybiB1cGRhdGU7XG4gIH0pO1xufVxuIl19
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isSegwit = exports.isTaproot = exports.isP2wpkh = exports.isP2wsh = void 0;
|
4
4
|
const opcodes = require("bitcoin-ops");
|
5
5
|
function isP2wsh(scriptPubkey, redeemScript) {
|
6
|
-
const witnessProgramCandidate = redeemScript
|
6
|
+
const witnessProgramCandidate = redeemScript ?? scriptPubkey;
|
7
7
|
return witnessProgramCandidate[0] === opcodes.OP_0 && witnessProgramCandidate.length === 34;
|
8
8
|
}
|
9
9
|
exports.isP2wsh = isP2wsh;
|
10
10
|
function isP2wpkh(scriptPubkey, redeemScript) {
|
11
|
-
const witnessProgramCandidate = redeemScript
|
11
|
+
const witnessProgramCandidate = redeemScript ?? scriptPubkey;
|
12
12
|
return witnessProgramCandidate[0] === opcodes.OP_0 && witnessProgramCandidate.length === 22;
|
13
13
|
}
|
14
14
|
exports.isP2wpkh = isP2wpkh;
|
@@ -20,4 +20,4 @@ function isSegwit(scriptPubkey, redeemScript) {
|
|
20
20
|
return isTaproot(scriptPubkey) || isP2wsh(scriptPubkey, redeemScript) || isP2wpkh(scriptPubkey, redeemScript);
|
21
21
|
}
|
22
22
|
exports.isSegwit = isSegwit;
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NyaXB0VHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vcHNidC9zY3JpcHRUeXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx1Q0FBdUM7QUFFdkMsU0FBZ0IsT0FBTyxDQUFDLFlBQW9CLEVBQUUsWUFBcUI7SUFDakUsTUFBTSx1QkFBdUIsR0FBRyxZQUFZLElBQUksWUFBWSxDQUFDO0lBQzdELE9BQU8sdUJBQXVCLENBQUMsQ0FBQyxDQUFDLEtBQUssT0FBTyxDQUFDLElBQUksSUFBSSx1QkFBdUIsQ0FBQyxNQUFNLEtBQUssRUFBRSxDQUFDO0FBQzlGLENBQUM7QUFIRCwwQkFHQztBQUVELFNBQWdCLFFBQVEsQ0FBQyxZQUFvQixFQUFFLFlBQXFCO0lBQ2xFLE1BQU0sdUJBQXVCLEdBQUcsWUFBW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jcmlwdD86IEJ1ZmZlcik6IGJvb2xlYW4ge1xuICBjb25zdCB3aXRuZXNzUHJvZ3JhbUNhbmRpZGF0ZSA9IHJlZGVlbVNjcmlwdCA/PyBzY3JpcHRQdWJrZXk7XG4gIHJldHVybiB3aXRuZXNzUHJvZ3JhbUNhbmRpZGF0ZVswXSA9PT0gb3Bjb2Rlcy5PUF8wICYmIHdpdG5lc3NQcm9ncmFtQ2FuZGlkYXRlLmxlbmd0aCA9PT0gMjI7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1RhcHJvb3Qoc2NyaXB0UHVia2V5OiBCdWZmZXIpOiBib29sZWFuIHtcbiAgcmV0dXJuIHNjcmlwdFB1YmtleVswXSA9PT0gb3Bjb2Rlcy5PUF8xICYmIHNjcmlwdFB1YmtleS5sZW5ndGggPT09IDM0O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNTZWd3aXQoc2NyaXB0UHVia2V5OiBCdWZmZXIsIHJlZGVlbVNjcmlwdD86IEJ1ZmZlcik6IGJvb2xlYW4ge1xuICByZXR1cm4gaXNUYXByb290KHNjcmlwdFB1YmtleSkgfHwgaXNQMndzaChzY3JpcHRQdWJrZXksIHJlZGVlbVNjcmlwdCkgfHwgaXNQMndwa2goc2NyaXB0UHVia2V5LCByZWRlZW1TY3JpcHQpO1xufVxuIl19
|
@@ -3,7 +3,7 @@ import { BIP32Interface } from 'bip32';
|
|
3
3
|
import { TxOutput } from 'bitcoinjs-lib';
|
4
4
|
import { UtxoTransaction } from './UtxoTransaction';
|
5
5
|
import { UtxoTransactionBuilder } from './UtxoTransactionBuilder';
|
6
|
-
import { ScriptType2Of3 } from './outputScripts';
|
6
|
+
import { ScriptType, ScriptType2Of3 } from './outputScripts';
|
7
7
|
import { Triple } from './types';
|
8
8
|
import { Network } from '../networks';
|
9
9
|
/**
|
@@ -40,7 +40,7 @@ export declare type SignatureVerification = {
|
|
40
40
|
* @param inputIndex
|
41
41
|
* @param amount - must be set for segwit transactions and BIP143 transactions
|
42
42
|
* @param verificationSettings
|
43
|
-
* @param prevOutputs - must be set for p2tr transactions
|
43
|
+
* @param prevOutputs - must be set for p2tr and p2trMusig2 transactions
|
44
44
|
* @returns SignatureVerification[] - in order of parsed non-empty signatures
|
45
45
|
*/
|
46
46
|
export declare function getSignatureVerifications<TNumber extends number | bigint>(transaction: UtxoTransaction<TNumber>, inputIndex: number, amount: TNumber, verificationSettings?: VerificationSettings, prevOutputs?: TxOutput<TNumber>[]): SignatureVerification[];
|
@@ -78,7 +78,7 @@ export declare function verifySignatureWithPublicKeys<TNumber extends number | b
|
|
78
78
|
* @return true iff signature is valid
|
79
79
|
*/
|
80
80
|
export declare function verifySignatureWithPublicKey<TNumber extends number | bigint>(transaction: UtxoTransaction<TNumber>, inputIndex: number, prevOutputs: TxOutput<TNumber>[], publicKey: Buffer): boolean;
|
81
|
-
export declare function getDefaultSigHash(network: Network, scriptType?:
|
81
|
+
export declare function getDefaultSigHash(network: Network, scriptType?: ScriptType): number;
|
82
82
|
export declare function signInputP2shP2pk<TNumber extends number | bigint>(txBuilder: UtxoTransactionBuilder<TNumber>, vin: number, keyPair: BIP32Interface): void;
|
83
83
|
export declare function signInput2Of3<TNumber extends number | bigint>(txBuilder: UtxoTransactionBuilder<TNumber>, vin: number, scriptType: ScriptType2Of3, pubkeys: Triple<Buffer>, keyPair: BIP32Interface, cosigner: Buffer, amount: TNumber): void;
|
84
84
|
//# sourceMappingURL=signature.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../../src/bitgo/signature.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAwB,QAAQ,EAAmB,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,c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