lbry.go/address/encode.go
2018-02-15 14:51:51 -05:00

13 lines
302 B
Go

package address
import (
"github.com/lbryio/lbryschema.go/address/base58"
)
func EncodeAddress(address [addressLength]byte, blockchainName string) (string, error) {
buf, err := ValidateAddress(address, blockchainName)
if err != nil {
return "", err
}
return base58.EncodeBase58(buf[:]), nil
}