Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HashLength is the expected length of the hash. HashLength = 32 // AddressLength is the expected length of the address. AddressLength = 20 )
Lengths of hashes and addresses in bytes.
Variables ¶
View Source
var Error = errs.Class("blockchain")
Error for the package (mainly parsing errors).
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address [AddressLength]byte
Address is wallet address.
func BytesToAddress ¶
BytesToAddress create a new address from raw bytes.
func (Address) MarshalJSON ¶
MarshalJSON implements json marshalling interface.
func (*Address) UnmarshalJSON ¶
UnmarshalJSON unmarshal JSON into Address.
type Hash ¶
type Hash [HashLength]byte
Hash represents the 32 byte Keccak256 hash of arbitrary data.
func (Hash) MarshalJSON ¶
MarshalJSON implements json marshalling interface.
func (*Hash) UnmarshalJSON ¶
UnmarshalJSON unmarshal JSON into Hash.
Click to show internal directories.
Click to hide internal directories.