DEV Community

Discussion on: More on Taproot

Collapse
 
andredevjs profile image
nosfter • Edited

If you created the address using

const p2pktr = payments.p2tr({
  pubkey: toXOnly(tweakedSigner.publicKey),
  network
});
const p2pktr_addr = p2pktr.address ?? "";
Enter fullscreen mode Exit fullscreen mode

That means you can decode that address to make it kind of a pubkey

Buffer.from(bech32m.fromWords(bech32m.decode(p2pktr_addr).words))
Enter fullscreen mode Exit fullscreen mode

Question is, how do you prove that the p2pktr_addr was created using the keypair you used to generate the tweakedSigner?
Is it decoding the address an actual pub? Cause it can't be used to verify a schnorr signature