@@ -105,11 +105,14 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
105
105
output : leafScript ,
106
106
} ;
107
107
108
- const { output, address, hash } = bitcoin . payments . p2tr ( {
109
- internalPubkey : toXOnly ( internalKey . publicKey ) ,
110
- scriptTree,
111
- network : regtest ,
112
- } ) ;
108
+ const { output, address, hash } = bitcoin . payments . p2tr (
109
+ {
110
+ internalPubkey : toXOnly ( internalKey . publicKey ) ,
111
+ scriptTree,
112
+ network : regtest ,
113
+ } ,
114
+ { tweakFn : ecc . xOnlyPointAddTweak } ,
115
+ ) ;
113
116
114
117
// amount from faucet
115
118
const amount = 42e4 ;
@@ -206,12 +209,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
206
209
redeemVersion : 192 ,
207
210
} ;
208
211
209
- const { output, address } = bitcoin . payments . p2tr ( {
210
- internalPubkey : toXOnly ( internalKey . publicKey ) ,
211
- scriptTree,
212
- redeem,
213
- network : regtest ,
214
- } ) ;
212
+ const { output, address } = bitcoin . payments . p2tr (
213
+ {
214
+ internalPubkey : toXOnly ( internalKey . publicKey ) ,
215
+ scriptTree,
216
+ redeem,
217
+ network : regtest ,
218
+ } ,
219
+ { tweakFn : ecc . xOnlyPointAddTweak } ,
220
+ ) ;
215
221
216
222
// amount from faucet
217
223
const amount = 42e4 ;
@@ -280,12 +286,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
280
286
redeemVersion : 192 ,
281
287
} ;
282
288
283
- const { output, address } = bitcoin . payments . p2tr ( {
284
- internalPubkey : toXOnly ( internalKey . publicKey ) ,
285
- scriptTree,
286
- redeem,
287
- network : regtest ,
288
- } ) ;
289
+ const { output, address } = bitcoin . payments . p2tr (
290
+ {
291
+ internalPubkey : toXOnly ( internalKey . publicKey ) ,
292
+ scriptTree,
293
+ redeem,
294
+ network : regtest ,
295
+ } ,
296
+ { tweakFn : ecc . xOnlyPointAddTweak } ,
297
+ ) ;
289
298
290
299
// amount from faucet
291
300
const amount = 42e4 ;
@@ -376,12 +385,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
376
385
redeemVersion : 192 ,
377
386
} ;
378
387
379
- const { output, address } = bitcoin . payments . p2tr ( {
380
- internalPubkey : toXOnly ( internalKey . publicKey ) ,
381
- scriptTree,
382
- redeem,
383
- network : regtest ,
384
- } ) ;
388
+ const { output, address } = bitcoin . payments . p2tr (
389
+ {
390
+ internalPubkey : toXOnly ( internalKey . publicKey ) ,
391
+ scriptTree,
392
+ redeem,
393
+ network : regtest ,
394
+ } ,
395
+ { tweakFn : ecc . xOnlyPointAddTweak } ,
396
+ ) ;
385
397
386
398
// amount from faucet
387
399
const amount = 42e4 ;
0 commit comments