func ParseAddress(s string) (Address, error) {
	if len(s) != AddressLen && len(s) != AddressLenOld {
		return Address{}, ErrAddressLen
	}
	if strings.HasPrefix(s, AddressPrefix) {
		s = s[5:]
	} else if strings.HasPrefix(s, AddressPrefixOld) {
		s = s[4:]
	} else {
		return Address{}, ErrAddressPrefix
	}
	key, err := AddressEncoding.DecodeString("1111" + s[:52])
	if err != nil {
		return Address{}, ErrAddressEncoding
	}
	checksum, err := AddressEncoding.DecodeString(s[52:])
	if err != nil {
		return Address{}, ErrAddressEncoding
	}
	var address Address
	copy(address[:], key[3:])
	if !bytes.Equal(address.Checksum(), checksum) {
		return Address{}, ErrAddressChecksum
	}
	return address, nil
}
ParseAddress parses the given Nano address string to a public key.
package nano
import (
	"bytes"
	"encoding/base32"
	"errors"
	"strings"
	"github.com/alexbakker/gonano/nano/crypto/ed25519"
	"github.com/alexbakker/gonano/nano/internal/util"
	"golang.org/x/crypto/blake2b"
)
const (
	AddressLen = 64
	AddressLenOld = 65
	AddressSize = ed25519.PublicKeySize
	AddressPrefix = "nano_"
	AddressPrefixOld = "xrb_"
	AddressEncodingAlphabet = "13456789abcdefghijkmnopqrstuwxyz"
)
var (
	AddressEncoding = base32.NewEncoding(AddressEncodingAlphabet)
	ErrAddressLen      = errors.New("bad address length")
	ErrAddressPrefix   = errors.New("bad address prefix")
	ErrAddressEncoding = errors.New("bad address encoding")
	ErrAddressChecksum = errors.New("bad address checksum")
)
type Address [AddressSize]byte