koinos / koinos-util-golang

A utility library used by Koinos Golang applications.
MIT License
2 stars 1 forks source link

[BUG]: Set compressed byte when encoding a WIF #38

Closed mvandeberg closed 1 year ago

mvandeberg commented 1 year ago

Is there an existing issue for this?

Current behavior

Similarly to https://github.com/koinos/koinos-crypto-cpp/issues/30, util-golang encodes WIF's by default with out the compression byte. Because our addresses used compressed public keys, we should set the compressed byte when encoding a WIF.

Expected behavior

WIF is currently 5JtU2c2MHKb8xSeNvsZJpxZRXeRg6iq6uwc6EUtDA9zsWM6B4c5, but should be L1xAJ5axX33g7iBynn9bggE7GGBuaFdK6g1t6W52fQiRvQi73evQ. This corresponds to address 13Sqw4TrwdZ8RZ9UVfqqA2i3mrbeumcWba (Useful for testing).

Steps to reproduce

No response

Environment

- OS:

Anything else?

No response