utxo-lib 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/README.md +19 -16
  2. package/dist/src/address.d.ts.map +1 -1
  3. package/dist/src/address.js +11 -1
  4. package/dist/src/addressFormat.d.ts +1 -1
  5. package/dist/src/addressFormat.d.ts.map +1 -1
  6. package/dist/src/addressFormat.js +1 -1
  7. package/dist/src/bitgo/Musig2.d.ts +115 -17
  8. package/dist/src/bitgo/Musig2.d.ts.map +1 -1
  9. package/dist/src/bitgo/Musig2.js +283 -100
  10. package/dist/src/bitgo/PsbtUtil.d.ts +59 -0
  11. package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -0
  12. package/dist/src/bitgo/PsbtUtil.js +91 -0
  13. package/dist/src/bitgo/UtxoPsbt.d.ts +180 -47
  14. package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
  15. package/dist/src/bitgo/UtxoPsbt.js +651 -107
  16. package/dist/src/bitgo/bitcoincash/address.js +2 -2
  17. package/dist/src/bitgo/index.d.ts +11 -0
  18. package/dist/src/bitgo/index.d.ts.map +1 -1
  19. package/dist/src/bitgo/index.js +6 -2
  20. package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
  21. package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
  22. package/dist/src/bitgo/legacysafe/index.js +61 -0
  23. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +10 -0
  24. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +1 -0
  25. package/dist/src/bitgo/litecoin/LitecoinPsbt.js +17 -0
  26. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +16 -0
  27. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -0
  28. package/dist/src/bitgo/litecoin/LitecoinTransaction.js +46 -0
  29. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +10 -0
  30. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +1 -0
  31. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +15 -0
  32. package/dist/src/bitgo/litecoin/index.d.ts +4 -0
  33. package/dist/src/bitgo/litecoin/index.d.ts.map +1 -0
  34. package/dist/src/bitgo/litecoin/index.js +16 -0
  35. package/dist/src/bitgo/outputScripts.d.ts +3 -1
  36. package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
  37. package/dist/src/bitgo/outputScripts.js +18 -10
  38. package/dist/src/bitgo/parseInput.d.ts +49 -20
  39. package/dist/src/bitgo/parseInput.d.ts.map +1 -1
  40. package/dist/src/bitgo/parseInput.js +109 -25
  41. package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
  42. package/dist/src/bitgo/psbt/fromHalfSigned.js +9 -6
  43. package/dist/src/bitgo/signature.d.ts +3 -3
  44. package/dist/src/bitgo/signature.d.ts.map +1 -1
  45. package/dist/src/bitgo/signature.js +48 -16
  46. package/dist/src/bitgo/transaction.d.ts +18 -3
  47. package/dist/src/bitgo/transaction.d.ts.map +1 -1
  48. package/dist/src/bitgo/transaction.js +28 -15
  49. package/dist/src/bitgo/types.d.ts +2 -0
  50. package/dist/src/bitgo/types.d.ts.map +1 -1
  51. package/dist/src/bitgo/types.js +1 -1
  52. package/dist/src/bitgo/wallet/Psbt.d.ts +104 -12
  53. package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
  54. package/dist/src/bitgo/wallet/Psbt.js +285 -70
  55. package/dist/src/bitgo/wallet/Unspent.d.ts +28 -0
  56. package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
  57. package/dist/src/bitgo/wallet/Unspent.js +172 -68
  58. package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
  59. package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
  60. package/dist/src/bitgo/wallet/WalletOutput.js +64 -23
  61. package/dist/src/bitgo/wallet/chains.d.ts +2 -2
  62. package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
  63. package/dist/src/bitgo/wallet/chains.js +1 -1
  64. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
  65. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
  66. package/dist/src/bitgo/zcash/ZcashPsbt.js +6 -14
  67. package/dist/src/musig.d.ts +0 -1
  68. package/dist/src/musig.d.ts.map +1 -1
  69. package/dist/src/musig.js +15 -29
  70. package/dist/src/networks.d.ts +1 -2
  71. package/dist/src/networks.d.ts.map +1 -1
  72. package/dist/src/networks.js +22 -29
  73. package/dist/src/noble_ecc.d.ts.map +1 -1
  74. package/dist/src/noble_ecc.js +7 -3
  75. package/dist/src/payments/p2tr.d.ts.map +1 -1
  76. package/dist/src/payments/p2tr.js +15 -9
  77. package/dist/src/taproot.d.ts +16 -0
  78. package/dist/src/taproot.d.ts.map +1 -1
  79. package/dist/src/taproot.js +44 -2
  80. package/dist/src/testutil/index.d.ts +2 -0
  81. package/dist/src/testutil/index.d.ts.map +1 -1
  82. package/dist/src/testutil/index.js +3 -1
  83. package/dist/src/testutil/keys.d.ts +3 -0
  84. package/dist/src/testutil/keys.d.ts.map +1 -1
  85. package/dist/src/testutil/keys.js +17 -2
  86. package/dist/src/testutil/mock.d.ts +1 -1
  87. package/dist/src/testutil/mock.d.ts.map +1 -1
  88. package/dist/src/testutil/mock.js +12 -4
  89. package/dist/src/testutil/psbt.d.ts +89 -0
  90. package/dist/src/testutil/psbt.d.ts.map +1 -0
  91. package/dist/src/testutil/psbt.js +150 -0
  92. package/dist/src/testutil/transaction.d.ts +70 -0
  93. package/dist/src/testutil/transaction.d.ts.map +1 -0
  94. package/dist/src/testutil/transaction.js +107 -0
  95. package/package.json +6 -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
- psbt.addOutput({
27
- script: payment.output,
28
- value,
29
- tapTree: payment.tapTree,
30
- tapInternalKey: payment.internalPubkey,
31
- tapBip32Derivation: [0, 1, 2].map((idx) => {
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
- psbt.addOutput({
51
- script: scriptPubKey,
52
- value,
53
- bip32Derivation: [0, 1, 2].map((idx) => ({
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
- const outputIndex = psbt.txOutputs.length - 1;
60
- if (witnessScript) {
61
- psbt.updateOutput(outputIndex, { witnessScript });
98
+ }));
99
+ }
100
+ if (!output.witnessScript && witnessScript) {
101
+ update.witnessScript = witnessScript;
62
102
  }
63
- if (redeemScript) {
64
- psbt.updateOutput(outputIndex, { redeemScript });
103
+ if (!output.redeemScript && redeemScript) {
104
+ update.redeemScript = redeemScript;
65
105
  }
66
106
  }
107
+ psbt.updateOutput(outputIndex, update);
67
108
  }
68
- exports.addWalletOutputToPsbt = addWalletOutputToPsbt;
69
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2FsbGV0T3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3dhbGxldC9XYWxsZXRPdXRwdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaURBQXdDO0FBR3hDLHFDQUF5RDtBQUN6RCxvREFBd0g7QUFFeEg7Ozs7Ozs7Ozs7OztHQVlHO0FBQ0gsU0FBZ0IscUJBQXFCLENBQ25DLElBQWMsRUFDZCxjQUE4QixFQUM5QixLQUFnQixFQUNoQixLQUFhLEVBQ2IsS0FBYTtJQUViLE1BQU0sVUFBVSxHQUFHLGNBQWMsQ0FBQyxzQkFBc0IsQ0FBQyxLQUFLLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDdkUsTUFBTSxVQUFVLEdBQUcsMkJBQWtCLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDN0MsSUFBSSxVQUFVLEtBQUssTUFBTSxJQUFJLFVBQVUsS0FBSyxZQUFZLEVBQUU7UUFD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NvbnN0IHsgc2NyaXB0UHViS2V5LCB3aXRuZXNzU2NyaXB0LCByZWRlZW1TY3JpcHQgfSA9IGNyZWF0ZU91dHB1dFNjcmlwdDJvZjMod2FsbGV0S2V5cy5wdWJsaWNLZXlzLCBzY3JpcHRUeXBlKTtcbiAgICBwc2J0LmFkZE91dHB1dCh7XG4gICAgICBzY3JpcHQ6IHNjcmlwdFB1YktleSxcbiAgICAgIHZhbHVlLFxuICAgICAgYmlwMzJEZXJpdmF0aW9uOiBbMCwgMSwgMl0ubWFwKChpZHgpID0+ICh7XG4gICAgICAgIHB1YmtleTogd2FsbGV0S2V5cy50cmlwbGVbaWR4XS5wdWJsaWNLZXksXG4gICAgICAgIHBhdGg6IHdhbGxldEtleXMucGF0aHNbaWR4XSxcbiAgICAgICAgbWFzdGVyRmluZ2VycHJpbnQ6IHJvb3RXYWxsZXRLZXlzLnRyaXBsZVtpZHhdLmZpbmdlcnByaW50LFxuICAgICAgfSkpLFxuICAgIH0pO1xuICAgIGNvbnN0IG91dHB1dEluZGV4ID0gcHNidC50eE91dHB1dHMubGVuZ3RoIC0gMTtcbiAgICBpZiAod2l0bmVzc1NjcmlwdCkge1xuICAgICAgcHNidC51cGRhdGVPdXRwdXQob3V0cHV0SW5kZXgsIHsgd2l0bmVzc1NjcmlwdCB9KTtcbiAgICB9XG4gICAgaWYgKHJlZGVlbVNjcmlwdCkge1xuICAgICAgcHNidC51cGRhdGVPdXRwdXQob3V0cHV0SW5kZXgsIHsgcmVkZWVtU2NyaXB0IH0pO1xuICAgIH1cbiAgfVxufVxuIl19
109
+ exports.updateWalletOutputForPsbt = updateWalletOutputForPsbt;
110
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV2FsbGV0T3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3dhbGxldC9XYWxsZXRPdXRwdXQudHMiXSwibmFtZXM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FsbGV0S2V5cy5wdWJsaWNLZXlzLCBzY3JpcHRUeXBlKTtcbiAgICBpZiAoIXNjcmlwdFB1YktleS5lcXVhbHMob3V0cHV0U2NyaXB0KSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBjYW5ub3QgdXBkYXRlIGFuIG91dHB1dCB3aGVyZSB0aGUgc2NyaXB0cyBkbyBub3QgbWF0Y2ggLSBGYWlsaW5nLmApO1xuICAgIH1cbiAgICBpZiAoIW91dHB1dC5iaXAzMkRlcml2YXRpb24pIHtcbiAgICAgIHVwZGF0ZS5iaXAzMkRlcml2YXRpb24gPSBbMCwgMSwgMl0ubWFwKChpZHgpID0+ICh7XG4gICAgICAgIHB1YmtleTogd2FsbGV0S2V5cy50cmlwbGVbaWR4XS5wdWJsaWNLZXksXG4gICAgICAgIHBhdGg6IHdhbGxldEtleXMucGF0aHNbaWR4XSxcbiAgICAgICAgbWFzdGVyRmluZ2VycHJpbnQ6IHJvb3RXYWxsZXRLZXlzLnRyaXBsZVtpZHhdLmZpbmdlcnByaW50LFxuICAgICAgfSkpO1xuICAgIH1cbiAgICBpZiAoIW91dHB1dC53aXRuZXNzU2NyaXB0ICYmIHdpdG5lc3NTY3JpcHQpIHtcbiAgICAgIHVwZGF0ZS53aXRuZXNzU2NyaXB0ID0gd2l0bmVzc1NjcmlwdDtcbiAgICB9XG4gICAgaWYgKCFvdXRwdXQucmVkZWVtU2NyaXB0ICYmIHJlZGVlbVNjcmlwdCkge1xuICAgICAgdXBkYXRlLnJlZGVlbVNjcmlwdCA9IHJlZGVlbVNjcmlwdDtcbiAgICB9XG4gIH1cbiAgcHNidC51cGRhdGVPdXRwdXQob3V0cHV0SW5kZXgsIHVwZGF0ZSk7XG59XG4iXX0=
@@ -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 | 30 | 1 | 31 | 20 | 10 | 11 | 21 | 40 | 41)[];
22
- export declare type ChainCode = typeof chainCodes[number];
21
+ export declare const chainCodes: (0 | 30 | 1 | 31 | 10 | 11 | 20 | 21 | 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;AAClD,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAEtD;AAED;;;GAGG;AACH,oBAAY,aAAa,GAAG,QAAQ,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAcjF;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,CAiBxF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,cAAc,CAOnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAE7F;AAED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aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAE7F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAE7F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,GAAG,OAAO,CAQ9C"}
@@ -103,4 +103,4 @@ function isSegwit(v) {
103
103
  return segwitCodes.includes(v);
104
104
  }
105
105
  exports.isSegwit = isSegwit;
106
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3dhbGxldC9jaGFpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBYUE7O0dBRUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQVUsQ0FBQztBQUNqQyxRQUFBLG1CQUFtQixHQUFHLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBVSxDQUFDO0FBQ3hDLFFBQUEsZUFBZSxHQUFHLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBVSxDQUFDO0FBQ3BDLFFBQUEsY0FBYyxHQUFHLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBVSxDQUFDO0FBQ25DLFFBQUEsb0JBQW9CLEdBQUcsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFVLENBQUM7QUFDekMsUUFBQSxVQUFVLEdBQUc7SUFDeEIsR0FBRyxzQkFBYztJQUNqQixHQUFHLDJCQUFtQjtJQUN0QixHQUFHLHV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Y6IENoYWluQ29kZSk6IGJvb2xlYW4ge1xuICByZXR1cm4gdG9DaGFpblBhaXIodikuaW5kZXhPZih2KSA9PT0gMDtcbn1cblxuLyoqXG4gKiBAcmV0dXJuIHRydWUgaWZmIGNoYWluIGNvZGUgaXMgaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGlzSW50ZXJuYWxDaGFpbkNvZGUodjogQ2hhaW5Db2RlKTogYm9vbGVhbiB7XG4gIHJldHVybiB0b0NoYWluUGFpcih2KS5pbmRleE9mKHYpID09PSAxO1xufVxuXG4vKipcbiAqIEByZXR1cm4gdHJ1ZSBpZmYgY2hhaW4gY29kZSBpcyBhIHNlZ3dpdCBhZGRyZXNzXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBpc1NlZ3dpdCh2OiBDaGFpbkNvZGUpOiBib29sZWFuIHtcbiAgY29uc3Qgc2Vnd2l0Q29kZXM6IENoYWluQ29kZVtdID0gW1xuICAgIC4uLmNoYWluQ29kZXNQMnNoUDJ3c2gsXG4gICAgLi4uY2hhaW5Db2Rlc1Ayd3NoLFxuICAgIC4uLmNoYWluQ29kZXNQMnRyLFxuICAgIC4uLmNoYWluQ29kZXNQMnRyTXVzaWcyLFxuICBdO1xuICByZXR1cm4gc2Vnd2l0Q29kZXMuaW5jbHVkZXModik7XG59XG4iXX0=
@@ -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","sourceRoot":"","sources":["../../../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,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;IAI7E,yBAAyB,CAAC,UAAU,EAAE,MAAM,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(UtxoPsbt_1.PSBT_PROPRIETARY_IDENTIFIER),
14
- Buffer.of(UtxoPsbt_1.ProprietaryKeySubtype.ZEC_CONSENSUS_BRANCH_ID),
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) {
@@ -107,19 +108,10 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
107
108
  // transactions because zcash hashes the value directly. Thus, it is unnecessary to have
108
109
  // the previous transaction hash on the unspent.
109
110
  signInput(inputIndex, keyPair, sighashTypes) {
110
- return this.withUnsafeSignNonSegwitTrue(super.signInput.bind(this, inputIndex, keyPair, sighashTypes));
111
+ return PsbtUtil_1.withUnsafeNonSegwit(this, super.signInput.bind(this, inputIndex, keyPair, sighashTypes));
111
112
  }
112
113
  validateSignaturesOfInput(inputIndex, validator, pubkey) {
113
- return this.withUnsafeSignNonSegwitTrue(super.validateSignaturesOfInput.bind(this, inputIndex, validator, pubkey));
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
- }
114
+ return PsbtUtil_1.withUnsafeNonSegwit(this, super.validateSignaturesOfInput.bind(this, inputIndex, validator, pubkey));
123
115
  }
124
116
  setPropertyCheckSignatures(propName, value) {
125
117
  if (this.tx[propName] === value) {
@@ -142,4 +134,4 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
142
134
  }
143
135
  }
144
136
  exports.ZcashPsbt = ZcashPsbt;
145
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hQc2J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3pjYXNoL1pjYXNoUHNidC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQ0FBcUc7QUFDckcseURBSTRCO0FBQzVCLDhCQUEwRDtBQUMxRCxtQ0FBMEM7QUFDMUMsaURBQWlEO0FBRWpELE1BQU0sU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUV2QyxNQUFNLHVCQUF1QixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDNUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUM7SUFDZixNQUFNLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQztJQUNmLE1BQU0sQ0FBQyxJQUFJLENBQUMsc0NBQTJCLENBQUM7SUFDeEMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxnQ0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JzaW9uR3JvdXBJZCk7XG4gIH1cblxuICBzZXRFeHBpcnlIZWlnaHQoZXhwaXJ5SGVpZ2h0OiBudW1iZXIpOiB2b2lkIHtcbiAgICB0eXBlZm9yY2UodHlwZXMuVUludDMyLCBleHBpcnlIZWlnaHQpO1xuICAgIHRoaXMuc2V0UHJvcGVydHlDaGVja1NpZ25hdHVyZXMoJ2V4cGlyeUhlaWdodCcsIGV4cGlyeUhlaWdodCk7XG4gIH1cbn1cbiJdfQ==
@@ -1,4 +1,3 @@
1
- /*! musig-js - MIT License (c) 2022 Brandon Black */
2
1
  export interface MuSig {
3
2
  /**
4
3
  * Gets the X-only public key associated with this context.
@@ -1 +1 @@
1
- {"version":3,"file":"musig.d.ts","sourceRoot":"","sources":["../../src/musig.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAIpD,MAAM,WAAW,KAAK;IACpB;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;IAE5D;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;IAE5D;;;;;OAKG;IACH,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC;IAEhD;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;IAEpE;;;;;;;OAOG;IACH,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;IAEjE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,IAAI,EAAE;QACb,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,SAAS,EAAE,UAAU,CAAC;QACtB,cAAc,CAAC,EAAE,UAAU,CAAC;QAC5B,GAAG,CAA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