Versions in this module Expand all Collapse all v1 v1.0.2 Aug 19, 2015 Changes in this version + const RlpEmptyList + const RlpEmptyStr + var Ada = BigPow(10, 3) + var Babbage = BigPow(10, 6) + 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 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 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 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 Char(c []byte) int + func CopyBytes(b []byte) (copiedBytes []byte) + func CurrencyToString(num *big.Int) string + func Decode(data []byte, pos uint64) (interface{}, uint64) + func DecodeWithReader(reader *bytes.Buffer) interface + func DefaultAssetPath() string + func DefaultDataDir() string + func DefaultIpcPath() string + func DeleteFromByteSlice(s [][]byte, hash []byte) [][]byte + func EmptyHash(h Hash) bool + func Encode(object interface{}) []byte + func ExpandHomePath(p string) (path string) + func FileExist(filePath string) bool + func FindFileInArchive(fn string, files []*zip.File) (index int) + 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 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 ReadFile(f *zip.File) ([]byte, error) + 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 Rlp(encoder RlpEncode) []byte + 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 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) Big() *big.Int + func (a Address) Bytes() []byte + func (a Address) Hash() Hash + func (a Address) Hex() string + func (a Address) Str() string + type Bytes []byte + func (self Bytes) String() string + type Database interface + Close func() + Delete func(key []byte) error + Flush func() error + Get func(key []byte) ([]byte, error) + Put func(key []byte, value []byte) error + type ExtPackage struct + EntryHtml string + Manifest *Manifest + func OpenPackage(fn string) (*ExtPackage, error) + 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) 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) 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 Manifest struct + Entry string + Height int + Width int + func ReadManifest(m []byte) (*Manifest, error) + type RlpEncodable interface + RlpData func() interface{} + type RlpEncode interface + RlpEncode func() []byte + type RlpEncodeDecode interface + RlpValue func() []interface{} + type RlpEncoder struct + func NewRlpEncoder() *RlpEncoder + func (coder *RlpEncoder) EncodeData(rlpData interface{}) []byte + type StorageSize float64 + func (self StorageSize) Int64() int64 + func (self StorageSize) String() string + type Value struct + Val interface{} + func EmptyValue() *Value + func NewSliceValue(s interface{}) *Value + func NewValue(val interface{}) *Value + func NewValueFromBytes(data []byte) *Value + func (self *Value) Add(other interface{}) *Value + func (self *Value) Copy() *Value + func (self *Value) DecodeRLP(s *rlp.Stream) error + func (self *Value) DeepCmp(o *Value) bool + func (self *Value) Div(other interface{}) *Value + func (self *Value) EncodeRLP(w io.Writer) error + func (self *Value) IsErr() bool + func (self *Value) Mul(other interface{}) *Value + func (self *Value) Pow(other interface{}) *Value + func (self *Value) Sub(other interface{}) *Value + func (val *Value) Append(v interface{}) *Value + func (val *Value) AppendList() *Value + func (val *Value) BigInt() *big.Int + func (val *Value) Byte() byte + func (val *Value) Bytes() []byte + func (val *Value) Cmp(o *Value) bool + func (val *Value) Err() error + func (val *Value) Get(idx int) *Value + func (val *Value) Int() int64 + func (val *Value) IsEmpty() bool + func (val *Value) IsList() bool + func (val *Value) IsNil() bool + func (val *Value) IsSlice() bool + func (val *Value) IsStr() bool + func (val *Value) Len() int + func (val *Value) NewIterator() *ValueIterator + func (val *Value) Slice() []interface{} + func (val *Value) SliceFrom(from int) *Value + func (val *Value) SliceFromTo(from, to int) *Value + func (val *Value) SliceTo(to int) *Value + func (val *Value) Str() string + func (val *Value) String() string + func (val *Value) Type() reflect.Kind + func (val *Value) Uint() uint64 + type ValueIterator struct + func (it *ValueIterator) Idx() int + func (it *ValueIterator) Len() int + func (it *ValueIterator) Next() bool + func (it *ValueIterator) Value() *Value