GetScatter / eos-sharp

C# client library for EOS blockchains
MIT License
75 stars 48 forks source link

How to generate the public key from a private key in eos-Sharp? #40

Closed sachushaji closed 4 years ago

sachushaji commented 4 years ago

Hi,

I couldn't find much information on how to generate the associated public key if you have a private key with you in eos-sharp. I could only see public/private key pairs being generated only when we make use of generateKeyPair. Is there a functionality to generate public key if you have only the private key with you in eos-sharp?

mmcs85 commented 4 years ago

You can check it here: https://github.com/GetScatter/eos-sharp/blob/master/EosSharp/EosSharp.Core/Providers/DefaultSignProvider.cs#L27

Use Secp256K1Manager.GetPublicKey(privKeyBytes, true)