Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Errors = CommonErrors{
"nil receiver", "nil parameter", "nil buffer", "zero length parameter", "index out of bounds", "invalid type", "zero length buffer",
}
Errors gives a short readable reference to indicate a common error string
var StringCodings = []string{
"bytes",
"string",
"decimal",
"hex",
"base32",
"base58check",
"base64",
}
StringCodings is a list of the names of encoding types for the stringer
Functions ¶
Types ¶
type Address ¶
type Address string
Address is used as the key for searching for public keys (addresses also), scripts, transactions and blocks, generated using the hash160 function, which is a sha256 followed by ripemd160.
type Array ¶
type Array interface { SetElem(index int, in interface{}) Array GetElem(index int) (out interface{}) Len() int }
Array is an interface to access elements of a buffer
type Buffer ¶
type Buffer interface { Bytes() (out *[]byte) Copy(in *[]byte) Buffer Zero() Buffer Free() Buffer IsEqual(*[]byte) bool }
Buffer is a generic interface for []byte buffers
type Coder ¶
type Coder interface { GetCoding() (out *string) SetCoding(in string) Coder ListCodings() (out *[]string) }
Coder is an interface for encoding raw bytes in various base number formats
type CommonErrors ¶
type CommonErrors struct {
NilRec, NilParam, NilBuf, ZeroLen, OutOfBounds, InvalidType, ZeroLenBuf string
}
CommonErrors are common error values from library functions
type H160 ¶
type H160 interface {
GetAddress() Address
}
H160 is a 20 byte hash created with hash160.Sum that is used as a key for scripts and addresses
type H256 ¶
type H256 interface {
GetHash() Hash
}
H256 is a 32 byte hash created with SHA256 that is used for transactions, blocks, and message hashes
type Hash ¶
type Hash string
Hash is a 256 byte hash stored as a string for use with maps, used for block hashes, transaction hashes, message hashes, and other things
type MerkleTx ¶
type MerkleTx struct { HashBlock [32]byte MerkleBranch [32]byte Index int64 // contains filtered or unexported fields }
MerkleTx is the merkle tree hash data for a transaction