horizen

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

func CheckDecode(input string) (result []byte, version [2]byte, err error)

CheckDecode decodes a string that was encoded with CheckEncode and verifies the checksum.

func CheckEncode

func CheckEncode(input []byte, version [2]byte) string

CheckEncode prepends two version bytes and appends a four byte checksum.

func GenerateAssetId

func GenerateAssetId(assetKey string) crypto.Hash

func VerifyAddress

func VerifyAddress(address string) error

func VerifyAssetKey

func VerifyAssetKey(assetKey string) error

func VerifyTransactionHash

func VerifyTransactionHash(hash string) error

Types

type Address

type Address interface {
	EncodeAddress() string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL