Documentation ¶
Index ¶
- Variables
- func CheckDecode(input string) (result []byte, version [2]byte, err error)
- func CheckEncode(input []byte, version [2]byte) string
- func GenerateAssetId(assetKey string) crypto.Hash
- func VerifyAddress(address string) error
- func VerifyAssetKey(assetKey string) error
- func VerifyTransactionHash(hash string) error
- type Address
- type AddressPubKey
- type AddressPubKeyHash
- type AddressScriptHash
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HorizenChainBase string HorizenChainId crypto.Hash )
View Source
var ErrChecksum = errors.New("checksum error")
ErrChecksum indicates that the checksum of a check-encoded string does not verify against the checksum.
View Source
var ErrInvalidFormat = errors.New("invalid format: version and/or checksum bytes missing")
ErrInvalidFormat indicates that the check-encoded string has an invalid format.
Functions ¶
func CheckDecode ¶
CheckDecode decodes a string that was encoded with CheckEncode and verifies the checksum.
func CheckEncode ¶
CheckEncode prepends two version bytes and appends a four byte checksum.
func GenerateAssetId ¶
func VerifyAddress ¶
func VerifyAssetKey ¶
func VerifyTransactionHash ¶
Types ¶
type AddressPubKey ¶
type AddressPubKey struct {
// contains filtered or unexported fields
}
func (*AddressPubKey) EncodeAddress ¶
func (a *AddressPubKey) EncodeAddress() string
type AddressPubKeyHash ¶
type AddressPubKeyHash struct {
// contains filtered or unexported fields
}
func (*AddressPubKeyHash) EncodeAddress ¶
func (a *AddressPubKeyHash) EncodeAddress() string
type AddressScriptHash ¶
type AddressScriptHash struct {
// contains filtered or unexported fields
}
func (*AddressScriptHash) EncodeAddress ¶
func (a *AddressScriptHash) EncodeAddress() string
EncodeAddress returns the string encoding of a pay-to-script-hash address. Part of the Address interface.
Click to show internal directories.
Click to hide internal directories.