lbryschema.go/address/encode.go

14 lines
302 B
Go
Raw Normal View History

2017-09-12 12:02:30 -04:00
package address
import (
2018-02-15 14:51:51 -05:00
"github.com/lbryio/lbryschema.go/address/base58"
2017-09-12 12:02:30 -04:00
)
2018-02-15 14:51:51 -05:00
func EncodeAddress(address [addressLength]byte, blockchainName string) (string, error) {
buf, err := ValidateAddress(address, blockchainName)
2017-09-12 12:02:30 -04:00
if err != nil {
return "", err
}
return base58.EncodeBase58(buf[:]), nil
}