Documentation ¶
Index ¶
- Constants
- Variables
- func BigIntSetBytes(i *big.Int, bs []byte) *big.Int
- func BigIntToBytes(i *big.Int) []byte
- func BytesToInt64(bs []byte) int64
- func BytesToUint64(bs []byte) uint64
- func DecodeAny(o *codec.TypedObj) (interface{}, error)
- func EncodeAny(obj interface{}) (*codec.TypedObj, error)
- func FormatInt(v int64) string
- func FormatUint(v uint64) string
- func Int64ToBytes(v int64) []byte
- func MarshalAny(obj interface{}) ([]byte, error)
- func MustDecodeAny(o *codec.TypedObj) interface{}
- func MustEncodeAny(obj interface{}) *codec.TypedObj
- func ParseInt(s string, bits int) (int64, error)
- func ParseUint(s string, bits int) (uint64, error)
- func SetLog(file string, maxSize int, maxBackups int, localtime bool)
- func Uint64ToBytes(v uint64) []byte
- func UnmarshalAny(bs []byte) (interface{}, error)
- type Address
- func (a *Address) Bytes() []byte
- func (a *Address) CodecDecodeSelf(d *codec.Decoder)
- func (a *Address) CodecEncodeSelf(e *codec.Encoder)
- func (a *Address) Equal(a2 module.Address) bool
- func (a *Address) ID() []byte
- func (a *Address) IsContract() bool
- func (a Address) MarshalJSON() ([]byte, error)
- func (a *Address) SetBytes(b []byte) error
- func (a *Address) SetString(s string) error
- func (a *Address) SetTypeAndID(ic bool, id []byte) error
- func (a *Address) String() string
- func (a *Address) UnmarshalJSON(b []byte) error
- type HexBytes
- type HexInt
- func (i *HexInt) Bytes() []byte
- func (i *HexInt) Clone() HexInt
- func (i *HexInt) CodecDecodeSelf(d *codec.Decoder)
- func (i *HexInt) CodecEncodeSelf(e *codec.Encoder)
- func (i *HexInt) MarshalBinary() (data []byte, err error)
- func (i HexInt) MarshalJSON() ([]byte, error)
- func (i *HexInt) SetBytes(bs []byte) *big.Int
- func (i HexInt) String() string
- func (i *HexInt) UnmarshalBinary(data []byte) error
- func (i *HexInt) UnmarshalJSON(b []byte) error
- type HexInt16
- type HexInt32
- type HexInt64
- type HexUint16
- type HexUint32
- type HexUint64
- type Log
- type RawHexBytes
- type Signature
Constants ¶
View Source
const ( AddressIDBytes = 20 AddressBytes = AddressIDBytes + 1 )
View Source
const ( TypeAddress = iota + codec.TypeCustom TypeInt )
Variables ¶
View Source
var ( ErrUnknown = errors.New("Unknown error") ErrIllegalArgument = errors.New("Illegal argument") ErrInvalidState = errors.New("Invalid state") ErrUnsupported = errors.New("Unsupported") ErrNotFound = errors.New("Not found") )
View Source
var BigIntOne = big.NewInt(1)
View Source
var TypeCodec = &typeCodec{}
Functions ¶
func BigIntToBytes ¶
func BytesToInt64 ¶
func BytesToUint64 ¶
func FormatUint ¶
func Int64ToBytes ¶
func MarshalAny ¶
func MustDecodeAny ¶
func MustEncodeAny ¶
func Uint64ToBytes ¶
func UnmarshalAny ¶
Types ¶
type Address ¶
type Address [AddressBytes]byte
func NewAccountAddress ¶
func NewAddress ¶
func NewAddressFromString ¶
func NewContractAddress ¶
func (*Address) CodecDecodeSelf ¶
func (*Address) CodecEncodeSelf ¶
func (*Address) IsContract ¶
func (Address) MarshalJSON ¶
func (*Address) UnmarshalJSON ¶
type HexInt ¶
func NewHexIntFromUint64 ¶
func (*HexInt) CodecDecodeSelf ¶
func (*HexInt) CodecEncodeSelf ¶
func (*HexInt) MarshalBinary ¶
func (HexInt) MarshalJSON ¶
func (*HexInt) UnmarshalBinary ¶
func (*HexInt) UnmarshalJSON ¶
type HexInt16 ¶
type HexInt16 struct {
Value int16
}
func (*HexInt16) CodecDecodeSelf ¶
func (*HexInt16) CodecEncodeSelf ¶
func (HexInt16) MarshalJSON ¶
func (*HexInt16) UnmarshalJSON ¶
type HexInt32 ¶
type HexInt32 struct {
Value int32
}
func (*HexInt32) CodecDecodeSelf ¶
func (*HexInt32) CodecEncodeSelf ¶
func (HexInt32) MarshalJSON ¶
func (*HexInt32) UnmarshalJSON ¶
type HexInt64 ¶
type HexInt64 struct {
Value int64
}
func (*HexInt64) CodecDecodeSelf ¶
func (*HexInt64) CodecEncodeSelf ¶
func (HexInt64) MarshalJSON ¶
func (*HexInt64) UnmarshalJSON ¶
type HexUint16 ¶
type HexUint16 struct {
Value uint16
}
func (*HexUint16) CodecDecodeSelf ¶
func (*HexUint16) CodecEncodeSelf ¶
func (HexUint16) MarshalJSON ¶
func (*HexUint16) UnmarshalJSON ¶
type HexUint32 ¶
type HexUint32 struct {
Value uint32
}
func (*HexUint32) CodecDecodeSelf ¶
func (*HexUint32) CodecEncodeSelf ¶
func (HexUint32) MarshalJSON ¶
func (*HexUint32) UnmarshalJSON ¶
type HexUint64 ¶
type HexUint64 struct {
Value uint64
}
func (*HexUint64) CodecDecodeSelf ¶
func (*HexUint64) CodecEncodeSelf ¶
func (HexUint64) MarshalJSON ¶
func (*HexUint64) UnmarshalJSON ¶
type RawHexBytes ¶
type RawHexBytes []byte
func (RawHexBytes) Bytes ¶
func (rh RawHexBytes) Bytes() []byte
func (RawHexBytes) MarshalJSON ¶
func (rh RawHexBytes) MarshalJSON() ([]byte, error)
func (RawHexBytes) String ¶
func (rh RawHexBytes) String() string
func (*RawHexBytes) UnmarshalJSON ¶
func (rh *RawHexBytes) UnmarshalJSON(b []byte) error
type Signature ¶
func (*Signature) MarshalBinary ¶
func (Signature) MarshalJSON ¶
func (*Signature) UnmarshalBinary ¶
func (*Signature) UnmarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.