Versions in this module Expand all Collapse all v0 v0.1.0 Dec 10, 2018 Changes in this version + const AddressLength + const HashLength + var Ada = BigPow(10, 3) + var Babbage = BigPow(10, 6) + var Base36Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + 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) + var Big36 = big.NewInt(36) + var Big97 = big.NewInt(97) + var Big98 = big.NewInt(98) + var BigFalse = Big0 + var BigTrue = Big1 + var Douglas = BigPow(10, 42) + var Einstein = BigPow(10, 21) + var Ether = BigPow(10, 18) + var Finney = BigPow(10, 15) + var ICAPAssetIdentError = errors.New("Invalid ICAP asset identifier") + var ICAPChecksumError = errors.New("Invalid ICAP checksum") + var ICAPClientIdentError = errors.New("Invalid ICAP client identifier") + var ICAPCountryCodeError = errors.New("Invalid ICAP country code") + var ICAPEncodingError = errors.New("Invalid ICAP encoding") + var ICAPInstCodeError = errors.New("Invalid ICAP institution code") + var ICAPLengthError = errors.New("Invalid ICAP length") + var MaxBig = String2Big("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + var Shannon = BigPow(10, 9) + var Szabo = BigPow(10, 12) + var Wei = big.NewInt(1) + func AbsolutePath(Datadir string, filename string) string + func AddressToICAP(a Address) (string, error) + func AddressToIndirectICAP(a Address, instCode string) (string, error) + func Big(num string) *big.Int + func BigCopy(src *big.Int) *big.Int + func BigD(data []byte) *big.Int + func BigMax(x, y *big.Int) *big.Int + func BigMin(x, y *big.Int) *big.Int + func BigPow(a, b int) *big.Int + func BigToBytes(num *big.Int, base int) []byte + func BitTest(num *big.Int, i int) bool + func ByteSliceToInterface(slice [][]byte) (ret []interface{}) + func Bytes2Big(data []byte) *big.Int + func Bytes2Hex(d []byte) string + func BytesToBig(data []byte) *big.Int + func BytesToNumber(b []byte) uint64 + func CopyBytes(b []byte) (copiedBytes []byte) + func CurrencyToString(num *big.Int) string + func EmptyHash(h Hash) bool + func FileExist(filePath string) bool + func FirstBitSet(v *big.Int) int + func FormatData(data string) []byte + func FromHex(s string) []byte + func HasHexPrefix(str string) bool + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func IsHex(str string) bool + func IsHexAddress(s string) bool + func LeftPadBytes(slice []byte, l int) []byte + func LeftPadString(str string, l int) string + func LoadJSON(file string, val interface{}) error + func MakeName(name, version string) string + func NumberToBytes(num interface{}, bits int) []byte + func PP(value []byte) string + func ParseData(data ...interface{}) (ret []byte) + func PrintDepricationWarning(str string) + func ReadVarInt(buff []byte) (ret uint64) + func Report(extra ...interface{}) + func RightPadBytes(slice []byte, l int) []byte + func RightPadString(str string, l int) string + func S256(x *big.Int) *big.Int + func String2Big(num string) *big.Int + func StringToByteFunc(str string, cb func(str string) []byte) (ret []byte) + func ToAddress(slice []byte) (addr []byte) + func ToHex(b []byte) string + func U256(x *big.Int) *big.Int + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) Address + func HexToAddress(s string) Address + func ICAPToAddress(s string) (Address, error) + func StringToAddress(s string) Address + func (a *Address) Set(other Address) + func (a *Address) SetBytes(b []byte) + func (a *Address) SetString(s string) + func (a *Address) UnmarshalJSON(input []byte) error + func (a Address) Big() *big.Int + func (a Address) Bytes() []byte + func (a Address) Hash() Hash + func (a Address) Hex() string + func (a Address) MarshalJSON() ([]byte, error) + func (a Address) Str() string + 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) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value + func (h Hash) Hex() string + func (h Hash) MarshalJSON() ([]byte, error) + func (h Hash) Str() string + type List struct + Length int + func EmptyList() *List + func NewList(t interface{}) *List + func (self *List) Append(v interface{}) + func (self *List) Get(i int) interface{} + func (self *List) GetAsJson(i int) interface{} + func (self *List) Interface() interface{} + func (self *List) ToJSON() string + type PrettyDuration time.Duration + func (d PrettyDuration) String() string + type StorageSize float64 + func (self StorageSize) Int64() int64 + func (self StorageSize) String() string