func (a Address) ToPubkeyHash() ([20]byte, error) {
	pkh, version, err := base58.CheckDecode(string(a))
	if err != nil {
		return [20]byte{}, err
	}

	if version != PhoreAddressVersion {
		return [20]byte{}, fmt.Errorf("invalid version, expecting: %d, got: %d", PhoreAddressVersion, version)
	}

	if len(pkh) != 20 {
		return [20]byte{}, fmt.Errorf("invalid address length, expected: 20, go: %d", len(pkh))
	}

	var out [20]byte
	copy(out[:], pkh)
	return out, nil
}
// ToPubkeyHash converts an address to a pubkey hash.
ToPubkeyHash converts an address to a pubkey hash.
// ToPubkeyHash converts an address to a pubkey hash .
func (a Address) ToPubkeyHash() ([20]byte, error) {
	pkh, version, err := base58.CheckDecode(string(a))
	if err != nil {
		return [20]byte{}, err
	}
	if version != PhoreAddressVersion {
		return [20]byte{}, fmt.Errorf("invalid version, expecting: %d, got: %d", PhoreAddressVersion, version)
	}
	if len(pkh) != 20 {
		return [20]byte{}, fmt.Errorf("invalid address length, expected: 20, go: %d", len(pkh))
	}
	var out [20]byte
	copy(out[:], pkh)
	return out, nil
}
func ( a Address ) ToPubkeyHash ( ) ( [ 20 ] byte , error ) { pkh , version , err := base58 . CheckDecode ( string ( a ) ) if err != nil { return [ 20 ] byte { } , err } if version != PhoreAddressVersion { return [ 20 ] byte { } , fmt . Errorf ( " " , PhoreAddressVersion , version ) } if len ( pkh ) != 20 { return [ 20 ] byte { } , fmt . Errorf ( " " , len ( pkh ) ) } var out [ 20 ] byte copy ( out [ : ] , pkh ) return out , nil }
ToPubkeyHash converts an address to a pubkey hash.
ToPubkeyHash converts an address to a pubkey hash .