Versions in this module Expand all Collapse all v0 v0.6.1 Jan 21, 2020 Changes in this version + const ADDR_LEN + const Decimal + const MAX_UINT64 + const MaxBase58AddrLen + const UINT16_SIZE + const UINT256_SIZE + const UINT32_SIZE + const UINT64_SIZE + var ADDRESS_EMPTY = Address + var ErrIrregularData = errors.New("irregular data") + var ErrTooLarge = errors.New("bytes.Buffer: too large") + var ErrWriteExceedLimitedCount = errors.New("writer exceed limited count") + var UINT256_EMPTY = Uint256 + func BigIntFromNeoBytes(ba []byte) *big.Int + func BigIntToNeoBytes(data *big.Int) []byte + func FileExisted(filename string) bool + func GetNonce() uint64 + func HexToBytes(value string) ([]byte, error) + func SafeAdd(x, y uint64) (uint64, bool) + func SafeMul(x, y uint64) (uint64, bool) + func SafeSub(x, y uint64) (uint64, bool) + func ToArrayReverse(arr []byte) []byte + func ToHexString(data []byte) string + type Address [ADDR_LEN]byte + func AddressFromBase58(encoded string) (Address, error) + func AddressFromHexString(s string) (Address, error) + func AddressFromVmCode(code []byte) Address + func AddressParseFromBytes(f []byte) (Address, error) + func (f *Address) ToBase58() string + func (self *Address) Deserialize(r io.Reader) error + func (self *Address) Serialize(w io.Writer) error + func (self *Address) ToHexString() string + type Fixed64 int64 + func FromDecimal(value int64) Fixed64 + func (f *Fixed64) Deserialization(source *ZeroCopySource) error + func (f *Fixed64) Serialization(sink *ZeroCopySink) + func (f Fixed64) GetData() int64 + func (f Fixed64) String() string + type Inventory interface + Hash func() Uint256 + Type func() InventoryType + Verify func() error + type InventoryType byte + const BLOCK + const CONSENSUS + const TRANSACTION + type LimitedWriter struct + func NewLimitedWriter(w io.Writer, max uint64) *LimitedWriter + func (self *LimitedWriter) Count() uint64 + func (self *LimitedWriter) Write(buf []byte) (int, error) + type Uint256 [UINT256_SIZE]byte + func ComputeMerkleRoot(hashes []Uint256) Uint256 + func Uint256FromHexString(s string) (Uint256, error) + func Uint256ParseFromBytes(f []byte) (Uint256, error) + func (u *Uint256) Deserialize(r io.Reader) error + func (u *Uint256) Serialize(w io.Writer) error + func (u *Uint256) ToArray() []byte + func (u *Uint256) ToHexString() string + type ZeroCopySink struct + func NewZeroCopySink(b []byte) *ZeroCopySink + func (self *ZeroCopySink) BackUp(n uint64) + func (self *ZeroCopySink) Bytes() []byte + func (self *ZeroCopySink) NextBytes(n uint64) (data []byte) + func (self *ZeroCopySink) Reset() + func (self *ZeroCopySink) Size() uint64 + func (self *ZeroCopySink) WriteAddress(addr Address) + func (self *ZeroCopySink) WriteBool(data bool) + func (self *ZeroCopySink) WriteByte(c byte) + func (self *ZeroCopySink) WriteBytes(p []byte) + func (self *ZeroCopySink) WriteHash(hash Uint256) + func (self *ZeroCopySink) WriteInt16(data int16) + func (self *ZeroCopySink) WriteInt32(data int32) + func (self *ZeroCopySink) WriteInt64(data int64) + func (self *ZeroCopySink) WriteString(data string) (size uint64) + func (self *ZeroCopySink) WriteUint16(data uint16) + func (self *ZeroCopySink) WriteUint32(data uint32) + func (self *ZeroCopySink) WriteUint64(data uint64) + func (self *ZeroCopySink) WriteUint8(data uint8) + func (self *ZeroCopySink) WriteVarBytes(data []byte) (size uint64) + func (self *ZeroCopySink) WriteVarUint(data uint64) (size uint64) + type ZeroCopySource struct + func NewZeroCopySource(b []byte) *ZeroCopySource + func (self *ZeroCopySource) BackUp(n uint64) + func (self *ZeroCopySource) Len() uint64 + func (self *ZeroCopySource) NextAddress() (data Address, eof bool) + func (self *ZeroCopySource) NextBool() (data bool, irregular bool, eof bool) + func (self *ZeroCopySource) NextByte() (data byte, eof bool) + func (self *ZeroCopySource) NextBytes(n uint64) (data []byte, eof bool) + func (self *ZeroCopySource) NextHash() (data Uint256, eof bool) + func (self *ZeroCopySource) NextInt16() (data int16, eof bool) + func (self *ZeroCopySource) NextInt32() (data int32, eof bool) + func (self *ZeroCopySource) NextInt64() (data int64, eof bool) + func (self *ZeroCopySource) NextString() (data string, size uint64, irregular bool, eof bool) + func (self *ZeroCopySource) NextUint16() (data uint16, eof bool) + func (self *ZeroCopySource) NextUint32() (data uint32, eof bool) + func (self *ZeroCopySource) NextUint64() (data uint64, eof bool) + func (self *ZeroCopySource) NextUint8() (data uint8, eof bool) + func (self *ZeroCopySource) NextVarBytes() (data []byte, size uint64, irregular bool, eof bool) + func (self *ZeroCopySource) NextVarUint() (data uint64, size uint64, irregular bool, eof bool) + func (self *ZeroCopySource) Pos() uint64 + func (self *ZeroCopySource) Size() uint64 + func (self *ZeroCopySource) Skip(n uint64) (eof bool)