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 BytesToHash ¶ added in v1.66.1
BytesToHash create a new hash from raw bytes.
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.