Skip to content

Commit ddef6c8

Browse files
committed
Declare tapscript version mask like the BIP
1 parent a04b9d5 commit ddef6c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/payments/p2tr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const verifyecc_1 = require('./verifyecc');
1212
const OPS = bscript.OPS;
1313
const TAPROOT_WITNESS_VERSION = 0x01;
1414
const ANNEX_PREFIX = 0x50;
15-
const LEAF_VERSION_MASK = 0b11111110;
15+
const LEAF_VERSION_MASK = 0xfe;
1616
function p2tr(a, opts) {
1717
if (
1818
!a.address &&

ts_src/payments/p2tr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { verifyEcc } from './verifyecc';
1919
const OPS = bscript.OPS;
2020
const TAPROOT_WITNESS_VERSION = 0x01;
2121
const ANNEX_PREFIX = 0x50;
22-
const LEAF_VERSION_MASK = 0b11111110;
22+
const LEAF_VERSION_MASK = 0xfe;
2323

2424
export function p2tr(a: Payment, opts?: PaymentOpts): Payment {
2525
if (

0 commit comments

Comments
 (0)