Help Bitcoin Public Key Why can't I convert the taproot public key through the private key? #1602
-
#include <stdio.h> int main() {
} I need t2pr public key I need an example, can anyone help me? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
Such a conversion is wrong taproot public key |
Beta Was this translation helpful? Give feedback.
-
What's the problem you're having with that code? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
In NBitcoin var privBytes = new byte[] { 0x7d, 0x48, 0x1e, 0x43, 0x55, 0xd5, 0x1c, 0x82,
0x4e, 0x8d, 0x02, 0xe6, 0x17, 0xd0, 0xe1, 0x88,
0xba, 0x97, 0x68, 0x5e, 0x55, 0xf8, 0x65, 0x57,
0xd1, 0xd8, 0x3d, 0x64, 0xd1, 0xc8, 0x95, 0x4b};
var key = new Key(privBytes);
Console.WriteLine("33 bytes pubkey: " + key.PubKey.ToHex());
var full = key.PubKey.GetTaprootFullPubKey();
Console.WriteLine("32 bytes output key: " + full.OutputKey.ToString());
Console.WriteLine("32 bytes internal key: " + full.InternalKey.ToString()); Result:
|
Beta Was this translation helpful? Give feedback.
In NBitcoin
Result: