Skip to content

Commit bff562d

Browse files
committed
fixup
1 parent 2ab5c92 commit bff562d

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

test/integration/taproot.spec.ts

+35-23
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
105105
output: leafScript,
106106
};
107107

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+
);
113116

114117
// amount from faucet
115118
const amount = 42e4;
@@ -206,12 +209,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
206209
redeemVersion: 192,
207210
};
208211

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+
);
215221

216222
// amount from faucet
217223
const amount = 42e4;
@@ -280,12 +286,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
280286
redeemVersion: 192,
281287
};
282288

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+
);
289298

290299
// amount from faucet
291300
const amount = 42e4;
@@ -376,12 +385,15 @@ describe('bitcoinjs-lib (transaction with taproot)', () => {
376385
redeemVersion: 192,
377386
};
378387

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+
);
385397

386398
// amount from faucet
387399
const amount = 42e4;

0 commit comments

Comments
 (0)