Add missing EncodeAddress
barnjamin opened this issue · comments
Problem
At the moment we provide DecodeAddress and you can get EncodeAddress behavior by taking a slice and copying it into the type of Address (32 byte array) then calling .String()
on it but it is less than obvious.
Solution
Implement EncodeAddress that does this for you and matches APIs of other SDKs
Right, otherwise you have to play games like this:
var addr types.Address
copy(addr[:], pkVal[:])
which will not be obvious to many users and should be a 'conversion constructor' equivalent as part of types.Address methods.