utxo-lib 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/dist/src/address.d.ts.map +1 -1
  2. package/dist/src/address.js +1 -11
  3. package/dist/src/addressFormat.d.ts +1 -1
  4. package/dist/src/addressFormat.d.ts.map +1 -1
  5. package/dist/src/addressFormat.js +1 -1
  6. package/dist/src/bitgo/Musig2.d.ts +17 -115
  7. package/dist/src/bitgo/Musig2.d.ts.map +1 -1
  8. package/dist/src/bitgo/Musig2.js +101 -283
  9. package/dist/src/bitgo/UtxoPsbt.d.ts +49 -173
  10. package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
  11. package/dist/src/bitgo/UtxoPsbt.js +112 -634
  12. package/dist/src/bitgo/bbc/DashPsbt.d.ts +12 -0
  13. package/dist/src/bitgo/bbc/DashPsbt.d.ts.map +1 -0
  14. package/dist/src/bitgo/bbc/DashPsbt.js +27 -0
  15. package/dist/src/bitgo/bbc/DashTransaction.d.ts +39 -0
  16. package/dist/src/bitgo/bbc/DashTransaction.d.ts.map +1 -0
  17. package/dist/src/bitgo/bbc/DashTransaction.js +109 -0
  18. package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts +14 -0
  19. package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts.map +1 -0
  20. package/dist/src/bitgo/bbc/DashTransactionBuilder.js +28 -0
  21. package/dist/src/bitgo/bbc/index.d.ts +4 -0
  22. package/dist/src/bitgo/bbc/index.d.ts.map +1 -0
  23. package/dist/src/bitgo/{litecoin → bbc}/index.js +4 -4
  24. package/dist/src/bitgo/bitcoincash/address.js +2 -2
  25. package/dist/src/bitgo/index.d.ts +0 -10
  26. package/dist/src/bitgo/index.d.ts.map +1 -1
  27. package/dist/src/bitgo/index.js +2 -5
  28. package/dist/src/bitgo/outputScripts.d.ts +1 -3
  29. package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
  30. package/dist/src/bitgo/outputScripts.js +10 -18
  31. package/dist/src/bitgo/parseInput.d.ts +20 -49
  32. package/dist/src/bitgo/parseInput.d.ts.map +1 -1
  33. package/dist/src/bitgo/parseInput.js +24 -108
  34. package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
  35. package/dist/src/bitgo/psbt/fromHalfSigned.js +6 -9
  36. package/dist/src/bitgo/signature.d.ts +3 -3
  37. package/dist/src/bitgo/signature.d.ts.map +1 -1
  38. package/dist/src/bitgo/signature.js +16 -48
  39. package/dist/src/bitgo/transaction.d.ts +3 -18
  40. package/dist/src/bitgo/transaction.d.ts.map +1 -1
  41. package/dist/src/bitgo/transaction.js +15 -28
  42. package/dist/src/bitgo/types.d.ts +0 -2
  43. package/dist/src/bitgo/types.d.ts.map +1 -1
  44. package/dist/src/bitgo/types.js +1 -1
  45. package/dist/src/bitgo/wallet/Psbt.d.ts +12 -90
  46. package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
  47. package/dist/src/bitgo/wallet/Psbt.js +71 -221
  48. package/dist/src/bitgo/wallet/Unspent.d.ts +0 -28
  49. package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
  50. package/dist/src/bitgo/wallet/Unspent.js +68 -173
  51. package/dist/src/bitgo/wallet/chains.d.ts +2 -2
  52. package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
  53. package/dist/src/bitgo/wallet/chains.js +1 -1
  54. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
  55. package/dist/src/bitgo/zcash/ZcashPsbt.js +3 -4
  56. package/dist/src/networks.d.ts +2 -1
  57. package/dist/src/networks.d.ts.map +1 -1
  58. package/dist/src/networks.js +29 -22
  59. package/dist/src/noble_ecc.d.ts.map +1 -1
  60. package/dist/src/noble_ecc.js +2 -6
  61. package/dist/src/payments/p2tr.d.ts.map +1 -1
  62. package/dist/src/payments/p2tr.js +9 -15
  63. package/dist/src/taproot.d.ts +0 -16
  64. package/dist/src/taproot.d.ts.map +1 -1
  65. package/dist/src/taproot.js +2 -44
  66. package/dist/src/testutil/index.d.ts +0 -2
  67. package/dist/src/testutil/index.d.ts.map +1 -1
  68. package/dist/src/testutil/index.js +1 -3
  69. package/dist/src/testutil/mock.d.ts +1 -1
  70. package/dist/src/testutil/mock.d.ts.map +1 -1
  71. package/dist/src/testutil/mock.js +4 -12
  72. package/package.json +4 -6
  73. package/dist/src/bitgo/PsbtUtil.d.ts +0 -54
  74. package/dist/src/bitgo/PsbtUtil.d.ts.map +0 -1
  75. package/dist/src/bitgo/PsbtUtil.js +0 -79
  76. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +0 -10
  77. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +0 -1
  78. package/dist/src/bitgo/litecoin/LitecoinPsbt.js +0 -17
  79. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +0 -16
  80. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +0 -1
  81. package/dist/src/bitgo/litecoin/LitecoinTransaction.js +0 -46
  82. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +0 -10
  83. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +0 -1
  84. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +0 -15
  85. package/dist/src/bitgo/litecoin/index.d.ts +0 -4
  86. package/dist/src/bitgo/litecoin/index.d.ts.map +0 -1
  87. package/dist/src/testutil/psbt.d.ts +0 -71
  88. package/dist/src/testutil/psbt.d.ts.map +0 -1
  89. package/dist/src/testutil/psbt.js +0 -147
  90. package/dist/src/testutil/transaction.d.ts +0 -61
  91. package/dist/src/testutil/transaction.d.ts.map +0 -1
  92. package/dist/src/testutil/transaction.js +0 -107
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addWalletUnspentToPsbt = exports.updateWalletUnspentForPsbt = exports.addReplayProtectionUnspentToPsbt = exports.updateReplayProtectionUnspentToPsbt = exports.psbtIncludesUnspentAtIndex = exports.verifySignatureWithUnspent = exports.signInputWithUnspent = exports.isWalletUnspent = void 0;
3
+ exports.addWalletUnspentToPsbt = exports.addReplayProtectionUnspentToPsbt = exports.verifySignatureWithUnspent = exports.signInputWithUnspent = exports.isWalletUnspent = void 0;
4
4
  const __1 = require("../..");
5
5
  const outputScripts_1 = require("../outputScripts");
6
6
  const address_1 = require("../../address");
@@ -8,10 +8,6 @@ const signature_1 = require("../signature");
8
8
  const Unspent_1 = require("../Unspent");
9
9
  const chains_1 = require("./chains");
10
10
  const Musig2_1 = require("../Musig2");
11
- const transaction_1 = require("../transaction");
12
- const parseInput_1 = require("../parseInput");
13
- const utils_1 = require("bip174/src/lib/utils");
14
- const PsbtUtil_1 = require("../PsbtUtil");
15
11
  function isWalletUnspent(u) {
16
12
  return u.chain !== undefined;
17
13
  }
@@ -35,225 +31,124 @@ exports.signInputWithUnspent = signInputWithUnspent;
35
31
  * @return triple of booleans indicating a valid signature for each pubkey
36
32
  */
37
33
  function verifySignatureWithUnspent(tx, inputIndex, unspents, walletKeys) {
38
- var _a, _b;
39
34
  if (tx.ins.length !== unspents.length) {
40
35
  throw new Error(`input length must match unspents length`);
41
36
  }
42
- const input = tx.ins[inputIndex];
43
- /* istanbul ignore next */
44
- if (!input) {
45
- throw new Error(`no input at index ${inputIndex}`);
46
- }
47
37
  const unspent = unspents[inputIndex];
48
- if (!isWalletUnspent(unspent) || (!((_a = input.script) === null || _a === void 0 ? void 0 : _a.length) && !((_b = input.witness) === null || _b === void 0 ? void 0 : _b.length))) {
38
+ if (!isWalletUnspent(unspent)) {
49
39
  return [false, false, false];
50
40
  }
51
- const parsedInput = parseInput_1.parseSignatureScript(input);
52
- const prevOutputs = unspents.map((u) => Unspent_1.toOutput(u, tx.network));
53
- // If it is a taproot keyPathSpend input, the only valid signature combinations is user-bitgo. We can
54
- // only verify that the aggregated signature is valid, not that the individual partial-signature is valid.
55
- // Therefore, we can only say that either all partial signatures are valid, or none are.
56
- if (parsedInput.scriptType === 'taprootKeyPathSpend') {
57
- const result = signature_1.getSignatureVerifications(tx, inputIndex, unspent.value, undefined, prevOutputs);
58
- return result.length === 1 && result[0].signature ? [true, false, true] : [false, false, false];
59
- }
60
- return signature_1.verifySignatureWithPublicKeys(tx, inputIndex, prevOutputs, walletKeys.deriveForChainAndIndex(unspent.chain, unspent.index).publicKeys);
41
+ return signature_1.verifySignatureWithPublicKeys(tx, inputIndex, unspents.map((u) => Unspent_1.toOutput(u, tx.network)), walletKeys.deriveForChainAndIndex(unspent.chain, unspent.index).publicKeys);
61
42
  }
62
43
  exports.verifySignatureWithUnspent = verifySignatureWithUnspent;
44
+ function addReplayProtectionUnspentToPsbt(psbt, u, redeemScript,
63
45
  /**
64
- * @param psbt
65
- * @param inputIndex
66
- * @param id Unspent ID
67
- * @returns true iff the unspent ID on the unspent and psbt input match
68
- */
69
- function psbtIncludesUnspentAtIndex(psbt, inputIndex, id) {
70
- utils_1.checkForInput(psbt.data.inputs, inputIndex);
71
- const { txid, vout } = Unspent_1.parseOutputId(id);
72
- const psbtOutPoint = Unspent_1.getOutputIdForInput(psbt.txInputs[inputIndex]);
73
- return psbtOutPoint.txid === txid && psbtOutPoint.vout === vout;
74
- }
75
- exports.psbtIncludesUnspentAtIndex = psbtIncludesUnspentAtIndex;
76
- /**
77
- * Update the psbt input at the given index
78
- * @param psbt
79
- * @param inputIndex
80
- * @param u
81
- * @param redeemScript Only overrides if there is no redeemScript in the input currently
46
+ * @deprecated
82
47
  */
83
- function updateReplayProtectionUnspentToPsbt(psbt, inputIndex, u, redeemScript) {
84
- if (!psbtIncludesUnspentAtIndex(psbt, inputIndex, u.id)) {
85
- throw new Error(`unspent does not correspond to psbt input`);
86
- }
87
- const input = utils_1.checkForInput(psbt.data.inputs, inputIndex);
88
- if (redeemScript && !input.redeemScript) {
89
- psbt.updateInput(inputIndex, { redeemScript });
48
+ network = psbt.network) {
49
+ if (network !== psbt.network) {
50
+ throw new Error(`network parameter does not match psbt.network`);
90
51
  }
52
+ const { txid, vout } = Unspent_1.toPrevOutput(u, psbt.network);
53
+ const isZcash = __1.getMainnet(psbt.network) !== __1.networks.zcash;
91
54
  // Because Zcash directly hashes the value for non-segwit transactions, we do not need to check indirectly
92
55
  // with the previous transaction. Therefore, we can treat Zcash non-segwit transactions as Bitcoin
93
56
  // segwit transactions
94
- const isZcash = __1.getMainnet(psbt.network) === __1.networks.zcash;
95
57
  if (!Unspent_1.isUnspentWithPrevTx(u) && !isZcash) {
96
58
  throw new Error('Error, require previous tx to add to PSBT');
97
59
  }
98
- if (isZcash && !input.witnessUtxo) {
99
- const { script, value } = Unspent_1.toPrevOutput(u, psbt.network);
100
- psbt.updateInput(inputIndex, { witnessUtxo: { script, value } });
101
- }
102
- else if (!isZcash && !input.nonWitnessUtxo) {
103
- psbt.updateInput(inputIndex, { nonWitnessUtxo: u.prevTx });
104
- }
105
- }
106
- exports.updateReplayProtectionUnspentToPsbt = updateReplayProtectionUnspentToPsbt;
107
- function addUnspentToPsbt(psbt, id) {
108
- const { txid, vout } = Unspent_1.parseOutputId(id);
109
60
  psbt.addInput({
110
61
  hash: txid,
111
62
  index: vout,
63
+ redeemScript,
112
64
  });
113
- }
114
- function addReplayProtectionUnspentToPsbt(psbt, u, redeemScript,
115
- /**
116
- * @deprecated
117
- */
118
- network = psbt.network) {
119
- if (psbt.network !== network) {
120
- throw new Error('psbt network does not match network');
65
+ if (!isZcash) {
66
+ psbt.updateInput(vout, { nonWitnessUtxo: u.prevTx });
121
67
  }
122
- addUnspentToPsbt(psbt, u.id);
123
- updateReplayProtectionUnspentToPsbt(psbt, psbt.inputCount - 1, u, redeemScript);
124
68
  }
125
69
  exports.addReplayProtectionUnspentToPsbt = addReplayProtectionUnspentToPsbt;
70
+ function addWalletUnspentToPsbt(psbt, u, rootWalletKeys, signer, cosigner,
126
71
  /**
127
- * Update the PSBT with the unspent data for the input at the given index if the data is not there already.
128
- *
129
- * @param psbt
130
- * @param inputIndex
131
- * @param u
132
- * @param rootWalletKeys
133
- * @param signer
134
- * @param cosigner
72
+ * @deprecated
135
73
  */
136
- function updateWalletUnspentForPsbt(psbt, inputIndex, u, rootWalletKeys, signer, cosigner) {
137
- if (!psbtIncludesUnspentAtIndex(psbt, inputIndex, u.id)) {
138
- throw new Error(`unspent does not correspond to psbt input`);
74
+ network = psbt.network) {
75
+ if (network !== psbt.network) {
76
+ throw new Error(`network parameter does not match psbt.network`);
139
77
  }
140
- const input = utils_1.checkForInput(psbt.data.inputs, inputIndex);
78
+ const { txid, vout, script, value } = Unspent_1.toPrevOutput(u, psbt.network);
79
+ const walletKeys = rootWalletKeys.deriveForChainAndIndex(u.chain, u.index);
80
+ const scriptType = outputScripts_1.scriptTypeForChain(u.chain);
81
+ psbt.addInput({
82
+ hash: txid,
83
+ index: vout,
84
+ witnessUtxo: {
85
+ script,
86
+ value,
87
+ },
88
+ });
89
+ const inputIndex = psbt.inputCount - 1;
141
90
  // Because Zcash directly hashes the value for non-segwit transactions, we do not need to check indirectly
142
91
  // with the previous transaction. Therefore, we can treat Zcash non-segwit transactions as Bitcoin
143
92
  // segwit transactions
144
- const isZcashOrSegwit = chains_1.isSegwit(u.chain) || __1.getMainnet(psbt.network) === __1.networks.zcash;
145
- if (isZcashOrSegwit && !input.witnessUtxo) {
146
- const { script, value } = Unspent_1.toPrevOutput(u, psbt.network);
147
- psbt.updateInput(inputIndex, { witnessUtxo: { script, value } });
148
- }
149
- else if (!isZcashOrSegwit) {
93
+ if (!chains_1.isSegwit(u.chain) && __1.getMainnet(psbt.network) !== __1.networks.zcash) {
150
94
  if (!Unspent_1.isUnspentWithPrevTx(u)) {
151
95
  throw new Error('Error, require previous tx to add to PSBT');
152
96
  }
153
- if (!input.witnessUtxo && !input.nonWitnessUtxo) {
154
- // Force the litecoin transaction to have no MWEB advanced transaction flag
155
- if (__1.getMainnet(psbt.network) === __1.networks.litecoin) {
156
- u.prevTx = transaction_1.createTransactionFromBuffer(u.prevTx, psbt.network, { amountType: 'bigint' }).toBuffer();
157
- }
158
- psbt.updateInput(inputIndex, { nonWitnessUtxo: u.prevTx });
159
- }
160
- }
161
- const walletKeys = rootWalletKeys.deriveForChainAndIndex(u.chain, u.index);
162
- const scriptType = outputScripts_1.scriptTypeForChain(u.chain);
163
- const sighashType = signature_1.getDefaultSigHash(psbt.network, scriptType);
164
- if (psbt.data.inputs[inputIndex].sighashType === undefined) {
165
- psbt.updateInput(inputIndex, { sighashType });
97
+ psbt.updateInput(inputIndex, { nonWitnessUtxo: u.prevTx });
166
98
  }
167
99
  const isBackupFlow = signer === 'backup' || cosigner === 'backup';
168
100
  if (scriptType === 'p2tr' || (scriptType === 'p2trMusig2' && isBackupFlow)) {
169
- if (input.tapLeafScript && input.tapBip32Derivation) {
170
- return;
171
- }
172
101
  const createSpendScriptP2trFn = scriptType === 'p2tr' ? outputScripts_1.createSpendScriptP2tr : outputScripts_1.createSpendScriptP2trMusig2;
173
102
  const { controlBlock, witnessScript, leafVersion, leafHash } = createSpendScriptP2trFn(walletKeys.publicKeys, [
174
103
  walletKeys[signer].publicKey,
175
104
  walletKeys[cosigner].publicKey,
176
105
  ]);
177
- if (!input.tapLeafScript) {
178
- psbt.updateInput(inputIndex, {
179
- tapLeafScript: [{ controlBlock, script: witnessScript, leafVersion }],
180
- });
181
- }
182
- if (!input.tapBip32Derivation) {
183
- psbt.updateInput(inputIndex, {
184
- tapBip32Derivation: [signer, cosigner].map((key) => ({
185
- leafHashes: [leafHash],
186
- pubkey: outputScripts_1.toXOnlyPublicKey(walletKeys[key].publicKey),
187
- path: rootWalletKeys.getDerivationPath(rootWalletKeys[key], u.chain, u.index),
188
- masterFingerprint: rootWalletKeys[key].fingerprint,
189
- })),
190
- });
191
- }
106
+ psbt.updateInput(inputIndex, {
107
+ tapLeafScript: [{ controlBlock, script: witnessScript, leafVersion }],
108
+ tapBip32Derivation: [signer, cosigner].map((key) => ({
109
+ leafHashes: [leafHash],
110
+ pubkey: outputScripts_1.toXOnlyPublicKey(walletKeys[key].publicKey),
111
+ path: rootWalletKeys.getDerivationPath(rootWalletKeys[key], u.chain, u.index),
112
+ masterFingerprint: rootWalletKeys[key].fingerprint,
113
+ })),
114
+ });
192
115
  }
193
116
  else if (scriptType === 'p2trMusig2') {
194
117
  const { internalPubkey: tapInternalKey, outputPubkey: tapOutputKey, taptreeRoot, } = outputScripts_1.createKeyPathP2trMusig2(walletKeys.publicKeys);
195
- if (psbt.getProprietaryKeyVals(inputIndex, {
196
- identifier: PsbtUtil_1.PSBT_PROPRIETARY_IDENTIFIER,
197
- subtype: PsbtUtil_1.ProprietaryKeySubtype.MUSIG2_PARTICIPANT_PUB_KEYS,
198
- }).length === 0) {
199
- const participantsKeyValData = Musig2_1.encodePsbtMusig2Participants({
200
- tapOutputKey,
201
- tapInternalKey,
202
- participantPubKeys: [walletKeys.user.publicKey, walletKeys.bitgo.publicKey],
203
- });
204
- psbt.addProprietaryKeyValToInput(inputIndex, participantsKeyValData);
205
- }
206
- if (!input.tapInternalKey) {
207
- psbt.updateInput(inputIndex, {
208
- tapInternalKey: tapInternalKey,
209
- });
210
- }
211
- if (!input.tapMerkleRoot) {
212
- psbt.updateInput(inputIndex, {
213
- tapMerkleRoot: taptreeRoot,
214
- });
215
- }
216
- if (!input.tapBip32Derivation) {
217
- psbt.updateInput(inputIndex, {
218
- tapBip32Derivation: [signer, cosigner].map((key) => ({
219
- leafHashes: [],
220
- pubkey: outputScripts_1.toXOnlyPublicKey(walletKeys[key].publicKey),
221
- path: rootWalletKeys.getDerivationPath(rootWalletKeys[key], u.chain, u.index),
222
- masterFingerprint: rootWalletKeys[key].fingerprint,
223
- })),
224
- });
225
- }
118
+ const participantPubKeys = [walletKeys.user.publicKey, walletKeys.bitgo.publicKey];
119
+ const participantsKeyValData = Musig2_1.encodePsbtMusig2ParticipantsKeyValData({
120
+ tapOutputKey,
121
+ tapInternalKey,
122
+ participantPubKeys,
123
+ });
124
+ psbt.addProprietaryKeyValToInput(inputIndex, participantsKeyValData);
125
+ psbt.updateInput(inputIndex, {
126
+ tapInternalKey: tapInternalKey,
127
+ tapMerkleRoot: taptreeRoot,
128
+ tapBip32Derivation: [signer, cosigner].map((key) => ({
129
+ leafHashes: [],
130
+ pubkey: outputScripts_1.toXOnlyPublicKey(walletKeys[key].publicKey),
131
+ path: rootWalletKeys.getDerivationPath(rootWalletKeys[key], u.chain, u.index),
132
+ masterFingerprint: rootWalletKeys[key].fingerprint,
133
+ })),
134
+ });
226
135
  }
227
136
  else {
228
- if (!input.bip32Derivation) {
229
- psbt.updateInput(inputIndex, {
230
- bip32Derivation: [0, 1, 2].map((idx) => ({
231
- pubkey: walletKeys.triple[idx].publicKey,
232
- path: walletKeys.paths[idx],
233
- masterFingerprint: rootWalletKeys.triple[idx].fingerprint,
234
- })),
235
- });
236
- }
237
137
  const { witnessScript, redeemScript } = outputScripts_1.createOutputScript2of3(walletKeys.publicKeys, scriptType);
238
- if (witnessScript && !input.witnessScript) {
138
+ psbt.updateInput(inputIndex, {
139
+ bip32Derivation: [0, 1, 2].map((idx) => ({
140
+ pubkey: walletKeys.triple[idx].publicKey,
141
+ path: walletKeys.paths[idx],
142
+ masterFingerprint: rootWalletKeys.triple[idx].fingerprint,
143
+ })),
144
+ });
145
+ if (witnessScript) {
239
146
  psbt.updateInput(inputIndex, { witnessScript });
240
147
  }
241
- if (redeemScript && !input.redeemScript) {
148
+ if (redeemScript) {
242
149
  psbt.updateInput(inputIndex, { redeemScript });
243
150
  }
244
151
  }
245
152
  }
246
- exports.updateWalletUnspentForPsbt = updateWalletUnspentForPsbt;
247
- function addWalletUnspentToPsbt(psbt, u, rootWalletKeys, signer, cosigner,
248
- /**
249
- * @deprecated
250
- */
251
- network = psbt.network) {
252
- if (psbt.network !== network) {
253
- throw new Error('psbt network does not match network');
254
- }
255
- addUnspentToPsbt(psbt, u.id);
256
- updateWalletUnspentForPsbt(psbt, psbt.inputCount - 1, u, rootWalletKeys, signer, cosigner);
257
- }
258
153
  exports.addWalletUnspentToPsbt = addWalletUnspentToPsbt;
259
- //# sourceMappingURL=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pY0tleSxcbiAgICBdKTtcbiAgICBpZiAoIWlucHV0LnRhcExlYWZTY3JpcHQpIHtcbiAgICAgIHBzYnQudXBkYXRlSW5wdXQoaW5wdXRJbmRleCwge1xuICAgICAgICB0YXBMZWFmU2NyaXB0OiBbeyBjb250cm9sQmxvY2ssIHNjcmlwdDogd2l0bmVzc1NjcmlwdCwgbGVhZlZlcnNpb24gfV0sXG4gICAgICB9KTtcbiAgICB9XG4gICAgaWYgKCFpbnB1dC50YXBCaXAzMkRlcml2YXRpb24pIHtcbiAgICAgIHBzYnQudXBkYXRlSW5wdXQoaW5wdXRJbmRleCwge1xuICAgICAgICB0YXBCaXAzMkRlcml2YXRpb246IFtzaWduZXIsIGNvc2lnbmVyXS5tYXAoKGtleSkgPT4gKHtcbiAgICAgICAgICBsZWFmSGFzaGVzOiBbbGVhZkhhc2hdLFxuICAgICAgICAgIHB1YmtleTogdG9YT25seVB1YmxpY0tleSh3YWxsZXRLZXlzW2tleV0ucHVibGljS2V5KSxcbiAgICAgICAgICBwYXRoOiByb290V2FsbGV0S2V5cy5nZXREZXJpdmF0aW9uUGF0aChyb290V2FsbGV0S2V5c1trZXldLCB1LmNoYWluLCB1LmluZGV4KSxcbiAgICAgICAgICBtYXN0ZXJGaW5nZXJwcmludDogcm9vdFdhbGxldEtleXNba2V5XS5maW5nZXJwcmludCxcbiAgICAgICAgfSkpLFxuICAgICAgfSk7XG4gICAgfVxuICB9IGVsc2UgaWYgKHNjcmlwdFR5cGUgPT09ICdwMnRyTXVzaWcyJykge1xuICAgIGNvbnN0IHtcbiAgICAgIGludGVybmFsUHVia2V5OiB0YXBJbnRlcm5hbEtleSxcbiAgICAgIG91dHB1dFB1YmtleTogdGFwT3V0cHV0S2V5LFxuICAgICAgdGFwdHJlZVJvb3QsXG4gICAgfSA9IGNyZWF0ZUtleVBhdGhQMnRyTXVzaWcyKHdhbGxldEtleXMucHVibGljS2V5cyk7XG5cbiAgICBpZiAoXG4gICAgICBwc2J0LmdldFByb3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ICAgIGlmICh3aXRuZXNzU2NyaXB0KSB7XG4gICAgICBwc2J0LnVwZGF0ZUlucHV0KGlucHV0SW5kZXgsIHsgd2l0bmVzc1NjcmlwdCB9KTtcbiAgICB9XG4gICAgaWYgKHJlZGVlbVNjcmlwdCkge1xuICAgICAgcHNidC51cGRhdGVJbnB1dChpbnB1dEluZGV4LCB7IHJlZGVlbVNjcmlwdCB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
@@ -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 | 10 | 11 | 20 | 21 | 31 | 40 | 41)[];
22
- export declare type ChainCode = (typeof chainCodes)[number];
21
+ export declare const chainCodes: (0 | 30 | 1 | 10 | 31 | 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,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AACpD,wBAAgB,WAAW,CAAC,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M,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;;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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3dhbGxldC9jaGFpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBYUE7O0dBRUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQVUsQ0FBQ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OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAsB9D,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,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,2BAA2B;IASnC,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,13 +6,12 @@ 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");
10
9
  const typeforce = require('typeforce');
11
10
  const CONSENSUS_BRANCH_ID_KEY = Buffer.concat([
12
11
  Buffer.of(0xfc),
13
12
  Buffer.of(0x05),
14
- Buffer.from(PsbtUtil_1.PSBT_PROPRIETARY_IDENTIFIER),
15
- Buffer.of(PsbtUtil_1.ProprietaryKeySubtype.ZEC_CONSENSUS_BRANCH_ID),
13
+ Buffer.from(UtxoPsbt_1.PSBT_PROPRIETARY_IDENTIFIER),
14
+ Buffer.of(UtxoPsbt_1.ProprietaryKeySubtype.ZEC_CONSENSUS_BRANCH_ID),
16
15
  ]);
17
16
  class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
18
17
  static transactionFromBuffer(buffer, network) {
@@ -144,4 +143,4 @@ class ZcashPsbt extends UtxoPsbt_1.UtxoPsbt {
144
143
  }
145
144
  }
146
145
  exports.ZcashPsbt = ZcashPsbt;
147
- //# sourceMappingURL=data:application/json;base64,eyJ2ZX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ElkJywgdmVyc2lvbkdyb3VwSWQpO1xuICB9XG5cbiAgc2V0RXhwaXJ5SGVpZ2h0KGV4cGlyeUhlaWdodDogbnVtYmVyKTogdm9pZCB7XG4gICAgdHlwZWZvcmNlKHR5cGVzLlVJbnQzMiwgZXhwaXJ5SGVpZ2h0KTtcbiAgICB0aGlzLnNldFByb3BlcnR5Q2hlY2tTaWduYXR1cmVzKCdleHBpcnlIZWlnaHQnLCBleHBpcnlIZWlnaHQpO1xuICB9XG59XG4iXX0=
@@ -1,4 +1,4 @@
1
- export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'ecash' | 'ecashTest' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest';
1
+ export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'ecash' | 'ecashTest' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest' | 'bbc';
2
2
  export declare type Network = {
3
3
  messagePrefix: string;
4
4
  pubKeyHash: number;
@@ -19,6 +19,7 @@ export declare type Network = {
19
19
  * @deprecated
20
20
  */
21
21
  coin: string;
22
+ forkChain?: string;
22
23
  };
23
24
  export declare const networks: Record<NetworkName, Network>;
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/networks.ts"],"names":[],"mappings":"AAqCA,oBAAY,WAAW,GACnB,SAAS,GACT,SAAS,GACT,aAAa,GACb,oBAAoB,GACpB,OAAO,GACP,WAAW,GACX,aAAa,GACb,oBAAoB,GACpB,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,UAAU,GACV,U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