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 Prefix = "0x" Prefix_caps = "0X" )
Lengths of hashes and addresses in bytes.
View Source
const ( CuckooCycleLength uint8 = 12 CuckooEdgeBits uint8 = 28 )
Variables ¶
This section is empty.
Functions ¶
func FromHex ¶
FromHex returns the bytes represented by the hexadecimal string s. s may be prefixed with "0x".
func Uint32ArrayToHexString ¶
func Uint32ToHexString ¶
func Uint64ToHexString ¶
Types ¶
type BlockSolution ¶
type BlockSolution [42]uint32
type Hash ¶
type Hash [HashLength]byte
Hash represents the 32 byte Keccak256 hash of arbitrary data.
func BigToHash ¶
BigToHash sets byte representation of b to hash. If b is larger than len(h), b will be cropped from the left.
func BytesToHash ¶
BytesToHash sets b to hash. If b is larger than len(h), b will be cropped from the left.
func HexToHash ¶
HexToHash sets byte representation of s to hash. If b is larger than len(h), b will be cropped from the left.
Click to show internal directories.
Click to hide internal directories.