lbry.go/address/encode.go

14 lines
265 B
Go
Raw Normal View History

2017-09-12 18:02:30 +02:00
package address
import (
"./base58"
)
func EncodeAddress(address [address_length]byte, blockchainName string) (string, error) {
buf, err := ValidateAddress(address, blockchainName)
2017-09-12 18:02:30 +02:00
if err != nil {
return "", err
}
return base58.EncodeBase58(buf[:]), nil
}