paritytech / libsecp256k1

Pure Rust Implementation of secp256k1.
Apache License 2.0
175 stars 84 forks source link

Add Conversion from Affine to PublicKey #80

Closed Gauthamastro closed 2 years ago

Gauthamastro commented 3 years ago

PR adds core::convert From trait for PublicKey to convert an Affine to PublicKey

Gauthamastro commented 2 years ago

@sorpaas I have implemented TryFrom, not really sure if my "if" condition is correct. Let me know

sorpaas commented 2 years ago

Please also revert those formatting change. I'm not sure it's correct since the code should have been rustfmt-ed.

Gauthamastro commented 2 years ago

@sorpaas @dvdplm I have fixed the formatting issue =)