Versions in this module Expand all Collapse all v1 v1.0.5 Jan 22, 2020 Changes in this version + const AddressLength + const ChainMainnet + const ChainTestnet + const CoinSymbolLength + const CurrentChainID + const HashLength + var Big0 = big.NewInt(0) + var Big1 = big.NewInt(1) + var Big2 = big.NewInt(2) + var Big256 = big.NewInt(0xff) + var Big257 = big.NewInt(257) + var Big3 = big.NewInt(3) + var Big32 = big.NewInt(32) + func Bytes2Hex(d []byte) string + func CopyBytes(b []byte) (copiedBytes []byte) + func EmptyHash(h Hash) bool + func FromHex(s string, prefix string) []byte + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func IsHexAddress(s string) bool + func LeftPadBytes(slice []byte, l int) []byte + func ReplaceAtIndex(in string, r byte, i int) string + func RightPadBytes(slice []byte, l int) []byte + func ToHex(b []byte, prefix string) string + type Account struct + Address Address + Balance []Balance + MultisigData *Multisig + Nonce uint64 + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) Address + func HexToAddress(s string) Address + func StringToAddress(s string) Address + func (a *Address) Compare(a2 Address) int + func (a *Address) Set(other Address) + func (a *Address) SetBytes(b []byte) + func (a *Address) SetString(s string) + func (a *Address) Unmarshal(input []byte) error + func (a *Address) UnmarshalJSON(input []byte) error + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Big() *big.Int + func (a Address) Bytes() []byte + func (a Address) Format(s fmt.State, c rune) + func (a Address) Hash() Hash + func (a Address) Hex() string + func (a Address) MarshalJSON() ([]byte, error) + func (a Address) MarshalText() ([]byte, error) + func (a Address) Str() string + func (a Address) String() string + type AppState struct + Accounts []Account + Candidates []Candidate + Coins []Coin + FrozenFunds []FrozenFund + MaxGas uint64 + Note string + StartHeight uint64 + TotalSlashed *big.Int + UsedChecks []UsedCheck + Validators []Validator + type Balance struct + Coin CoinSymbol + Value *big.Int + type BitArray struct + Bits uint + Elems []uint64 + func NewBitArray(bits int) *BitArray + func (bA *BitArray) Bytes() []byte + func (bA *BitArray) GetIndex(i int) bool + func (bA *BitArray) MarshalJSON() ([]byte, error) + func (bA *BitArray) SetIndex(i int, v bool) bool + func (bA *BitArray) Size() uint + func (bA *BitArray) String() string + func (bA *BitArray) StringIndented(indent string) string + func (bA *BitArray) UnmarshalJSON(bz []byte) error + type Candidate struct + Commission uint + CreatedAtBlock uint + OwnerAddress Address + PubKey Pubkey + RewardAddress Address + Stakes []Stake + Status byte + TotalBipStake *big.Int + type ChainID byte + type Coin struct + Crr uint + Name string + ReserveBalance *big.Int + Symbol CoinSymbol + Volume *big.Int + type CoinSymbol [CoinSymbolLength]byte + func GetBaseCoin() CoinSymbol + func StrToCoinSymbol(s string) CoinSymbol + func (c *CoinSymbol) UnmarshalJSON(input []byte) error + func (c CoinSymbol) Bytes() []byte + func (c CoinSymbol) Compare(c2 CoinSymbol) int + func (c CoinSymbol) IsBaseCoin() bool + func (c CoinSymbol) MarshalJSON() ([]byte, error) + func (c CoinSymbol) String() string + type FrozenFund struct + Address Address + CandidateKey Pubkey + Coin CoinSymbol + Height uint64 + Value *big.Int + type Hash [HashLength]byte + func BigToHash(b *big.Int) Hash + func BytesToHash(b []byte) Hash + func HexToHash(s string) Hash + func StringToHash(s string) Hash + func (h *Hash) Set(other Hash) + func (h *Hash) SetBytes(b []byte) + func (h *Hash) SetString(s string) + func (h *Hash) UnmarshalJSON(input []byte) error + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Format(s fmt.State, c rune) + func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value + func (h Hash) Hex() string + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) Str() string + func (h Hash) String() string + func (h Hash) TerminalString() string + type Multisig struct + Addresses []Address + Threshold uint + Weights []uint + type Pubkey []byte + func (p *Pubkey) UnmarshalJSON(input []byte) error + func (p Pubkey) Compare(p2 Pubkey) int + func (p Pubkey) MarshalJSON() ([]byte, error) + func (p Pubkey) MarshalText() ([]byte, error) + func (p Pubkey) String() string + type Stake struct + BipValue *big.Int + Coin CoinSymbol + Owner Address + Value *big.Int + type StorageSize float64 + func (s StorageSize) String() string + func (s StorageSize) TerminalString() string + type UnprefixedAddress Address + func (a *UnprefixedAddress) UnmarshalText(input []byte) error + func (a UnprefixedAddress) MarshalText() ([]byte, error) + type UnprefixedHash Hash + func (h *UnprefixedHash) UnmarshalText(input []byte) error + func (h UnprefixedHash) MarshalText() ([]byte, error) + type UsedCheck string + type Validator struct + AbsentTimes *BitArray + AccumReward *big.Int + Commission uint + PubKey Pubkey + RewardAddress Address + TotalBipStake *big.Int