3

I am having trouble finding examples showing a known WIF to a valid mainnet P2TR address.

I am working on a tool and want to see if my P2TR conversions/encodings are outputting the correct P2TR address.

For example, a known Private Key (empty string brain wallet):
L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1

I am getting the following P2TR:
bc1pw74tdcrxlzn5r8z6ku2vztr86fgq0m245s72mjktf4afwzsf8ugs0gs8zu

Is this the correct P2TR for this private key. Any way I can test/confirm this is correct?

Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
m1xolyd1an
  • 5,566
  • 2
  • 14
  • 30
  • I've been working on a set of wallet-focused test vectors for BIP341: https://github.com/bitcoin/bips/pull/1225 – Pieter Wuille Nov 10 '21 at 05:49
  • 1
    If I use that WIF key directly as output pubkey (not recommended) I get `bc1p5d9enu3v0yxyud4jk0pvxk3kmvrzymjpc6f0eq4ck44vr32qck7scr6tj5`. If I use the procedure in BIP341 (tweaking it with H_TapTweak(xonly_pubkey))), I get `bc1ps7qmhrpjnkwrraxwparm4drmvk4jdj6rlg4gtwm0q0je3r7afhnspef95z`. – Pieter Wuille Nov 10 '21 at 06:08

1 Answers1

2

Meanwhile, BIP341 has been updated to link to a set of test vectors covering scriptPubKey computation, keypath spending, and control block construction.

Murch
  • 71,155
  • 33
  • 180
  • 600