neo-go
neo-go copied to clipboard
Compressed stringer for public keys
Is your feature request related to a problem? Please describe.
I'm always frustrated when I realize people have to do hex.EncodeToString(key.Bytes()) to get a string representation of the key in compressed form. They have https://pkg.go.dev/github.com/nspcc-dev/neo-go/pkg/crypto/keys#NewPublicKeyFromString to go the other way around, but they can't easily create this string.
Describe the solution you'd like
Some additional method to have a compressed hex string of the public key.
Describe alternatives you've considered
String() method returns uncompressed key and likely can't be changed at this point.