Skip to content

Commit 6b316be

Browse files
committed
Fix taproot
1 parent c92d114 commit 6b316be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/HD wallet/taproot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const accountNode = root.derivePath(taprootPath);
2121
// Step 4: Generate the Taproot (P2TR) address
2222
const taprootPublicKey = accountNode.publicKey;
2323
const { address: taprootAddress } = bitcoin.payments.p2tr({
24-
internalPubkey: taprootPublicKey.subarray(1), // Use the x-only pubkey
24+
internalPubkey: Buffer.from(taprootPublicKey.subarray(1)), // Use the x-only pubkey
2525
network: bitcoin.networks.bitcoin,
2626
});
2727

0 commit comments

Comments
 (0)