Documentation ¶
Index ¶
Constants ¶
View Source
const HashSize = 32
HashSize of array used to store hashes. See Hash.
View Source
const MaxHashStringSize = HashSize * 2
MaxHashStringSize is the maximum length of a Hash hash string.
Variables ¶
View Source
var BitcoinMainChain = Chain{
PubKeyHashAddrID: 0x00,
}
View Source
var BitcoinTestChain = Chain{
PubKeyHashAddrID: 0x6f,
}
View Source
var (
ErrChecksumMismatch = errors.New("checksum mismatch")
)
View Source
var LitecoinMainChain = Chain{
PubKeyHashAddrID: 0x30,
}
View Source
var LitecoinTestChain = Chain{
PubKeyHashAddrID: 0x6f,
}
Functions ¶
This section is empty.
Types ¶
type Address ¶
func DecodeAddress ¶
DecodeAddress will attempt to recognize and parse address from string
type AddressPubKeyHash ¶
type AddressPubKeyHash struct {
// contains filtered or unexported fields
}
func (*AddressPubKeyHash) EncodeAddress ¶
func (a *AddressPubKeyHash) EncodeAddress() string
func (*AddressPubKeyHash) String ¶
func (a *AddressPubKeyHash) String() string
String returns human-readable string for using with fmt.Stringer
func (*AddressPubKeyHash) UnmarshalJSON ¶
func (a *AddressPubKeyHash) UnmarshalJSON(src []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type BlockHash ¶
BlockHash is used for storing hash of block
func NewHashFromStr ¶
func (BlockHash) String ¶
String returns the Hash as the hexadecimal string of the byte-reversed hash
func (*BlockHash) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.