lbry.go/schema/address/encode.go
2020-09-01 13:45:55 -04:00

13 lines
306 B
Go

package address
import (
"github.com/lbryio/lbry.go/v2/schema/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
}