2017-09-12 18:02:30 +02:00
|
|
|
package address
|
|
|
|
|
|
|
|
import (
|
2020-09-01 19:45:55 +02:00
|
|
|
"github.com/lbryio/lbry.go/v2/schema/address/base58"
|
2017-09-12 18:02:30 +02:00
|
|
|
)
|
|
|
|
|
2018-02-15 20:51:51 +01:00
|
|
|
func EncodeAddress(address [addressLength]byte, blockchainName string) (string, error) {
|
2017-11-20 19:44:19 +01:00
|
|
|
buf, err := ValidateAddress(address, blockchainName)
|
2017-09-12 18:02:30 +02:00
|
|
|
if err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
return base58.EncodeBase58(buf[:]), nil
|
|
|
|
}
|