Versions in this module Expand all Collapse all v1 v1.0.0 Apr 12, 2019 Changes in this version + const AddressCancel + const AddressLength + const AddressStake + const AddressTypeCancel + const AddressTypeCross + const AddressTypeERC20 + const AddressTypeEarlyReward + const AddressTypeEvidence + const AddressTypeNormal + const AddressTypeStake + const AddressTypeUnStake + const AddressUnStake + const DiffLength + const HashLength + const NonceLength + var Big0 = big.NewInt(0) + var Big1 = big.NewInt(1) + var Big2 = big.NewInt(2) + var Big256 = big.NewInt(256) + var Big257 = big.NewInt(257) + var Big3 = big.NewInt(3) + var Big32 = big.NewInt(32) + func AbsolutePath(Datadir string, filename string) string + func Bytes2Hex(d []byte) string + func CopyBytes(b []byte) (copiedBytes []byte) + func FileExist(filePath string) bool + func FromHex(s string) []byte + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func LeftPadBytes(slice []byte, l int) []byte + func LoadJSON(file string, val interface{}) error + func MakeName(name, version string) string + func RightPadBytes(slice []byte, l int) []byte + func ToHex(b []byte) string + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) (result Address) + func HexToAddress(s string) Address + func StringToAddress(s string) Address + func (addr *Address) Clear() + func (addr *Address) SetBytes(b []byte) + func (addr *Address) UnmarshalJSON(input []byte) error + func (addr Address) Big() *big.Int + func (addr Address) Bytes() []byte + func (addr Address) GetAddressType() TxType + func (addr Address) GetAddressTypeStr() string + func (addr Address) Hash() Hash + func (addr Address) Hex() string + func (addr Address) InSlice(addresses []Address) bool + func (addr Address) IsEmpty() bool + func (addr Address) IsEqual(oaddr Address) bool + func (addr Address) IsEqualWithoutType(oaddr Address) bool + func (addr Address) MarshalJSON() ([]byte, error) + func (addr Address) Str() string + func (addr Address) String() string + type BlockNonce [NonceLength]byte + func BlockNonceFromHex(hexStr string) (result BlockNonce) + func BlockNonceFromInt(i uint32) (result BlockNonce) + func EncodeNonce(i uint64) BlockNonce + func (bn *BlockNonce) UnmarshalJSON(input []byte) error + func (bn BlockNonce) Hex() string + func (bn BlockNonce) IsEqual(obn BlockNonce) bool + func (bn BlockNonce) MarshalJSON() ([]byte, error) + type Difficulty [DiffLength]byte + func BigToDiff(b *big.Int) Difficulty + func BytesToDiff(b []byte) (result Difficulty) + func HexToDiff(s string) Difficulty + func StringToDiff(s string) Difficulty + func (d *Difficulty) SetBytes(b []byte) + func (d *Difficulty) UnmarshalJSON(input []byte) error + func (d Difficulty) Big() *big.Int + func (d Difficulty) Bytes() []byte + func (d Difficulty) DiffToTarget() (target Hash) + func (d Difficulty) Equal(d2 Difficulty) bool + func (d Difficulty) Hex() string + func (d Difficulty) HexWithout0x() string + func (d Difficulty) MarshalJSON() ([]byte, error) + func (d Difficulty) Str() string + type Hash [HashLength]byte + func BigToHash(b *big.Int) Hash + func BytesToHash(b []byte) (result Hash) + func CopyHash(h *Hash) *Hash + func HexToHash(s string) Hash + func RlpHashKeccak256(v interface{}) (h Hash) + func StringToHash(s string) Hash + func (h *Hash) Clear() + func (h *Hash) SetBytes(b []byte) + func (h *Hash) UnmarshalJSON(input []byte) error + func (h Hash) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Cmp(oh Hash) (res int) + func (h Hash) Hex() string + func (h Hash) HexWithout0x() string + func (h Hash) IsEmpty() bool + func (h Hash) IsEqual(oh Hash) bool + func (h Hash) MarshalJSON() ([]byte, error) + func (h Hash) Str() string + func (h Hash) String() string + func (h Hash) ValidHashForDifficulty(difficulty Difficulty) bool + type PrettyDuration time.Duration + func (d PrettyDuration) String() string + type StorageSize float64 + func (s StorageSize) String() string + func (s StorageSize) TerminalString() string + type TxType int + func (txType TxType) String() string + type UnprefixedAddress Address