Documentation ¶
Index ¶
- Variables
- func BigFromBuffer(buffer *bytes.Buffer) (*big.Int, error)
- func BigToBytes(val *big.Int) []byte
- func SizeToBytes(val int) []byte
- func ToBytesWithType(value CLValue) ([]byte, error)
- func TrimByteSize(buf *bytes.Buffer) (size uint32, err error)
- type Any
- type Bool
- type ByteArray
- type CLValue
- func FromBuffer(buffer *bytes.Buffer) (CLValue, error)
- func FromBufferByType(buf *bytes.Buffer, sourceType cltype.CLType) (result CLValue, err error)
- func FromBytes(source []byte) (CLValue, error)
- func FromBytesByType(source []byte, clType cltype.CLType) (CLValue, error)
- func NewAnyFromBytes(data []byte) *CLValue
- func NewCLAny(data []byte) CLValue
- func NewCLBool(val bool) CLValue
- func NewCLByteArray(val []byte) CLValue
- func NewCLInt32(val int32) CLValue
- func NewCLInt64(val int64) *CLValue
- func NewCLKey(data key.Key) CLValue
- func NewCLList(elementType cltype.CLType) CLValue
- func NewCLMap(keyType cltype.CLType, valType cltype.CLType) CLValue
- func NewCLOption(inner CLValue) CLValue
- func NewCLPublicKey(data keypair.PublicKey) CLValue
- func NewCLResult(innerOk, innerErr cltype.CLType, value CLValue, isSuccess bool) CLValue
- func NewCLString(val string) *CLValue
- func NewCLTuple1(val CLValue) CLValue
- func NewCLTuple2(val1 CLValue, val2 CLValue) CLValue
- func NewCLTuple3(val1 CLValue, val2 CLValue, val3 CLValue) CLValue
- func NewCLUInt128(val *big.Int) *CLValue
- func NewCLUInt256(val *big.Int) *CLValue
- func NewCLUInt32(val uint32) *CLValue
- func NewCLUInt512(val *big.Int) *CLValue
- func NewCLUInt64(val uint64) *CLValue
- func NewCLUint8(val uint8) *CLValue
- func NewCLUnit() *CLValue
- func NewCLUref(data key.URef) CLValue
- type IValue
- type Int32
- type Int64
- type List
- type Map
- func (m *Map) Append(key CLValue, val CLValue) error
- func (m *Map) Bytes() []byte
- func (m *Map) Data() []Tuple2
- func (m *Map) Find(key string) (CLValue, bool)
- func (m *Map) FindAny(keys []string) (CLValue, bool)
- func (m *Map) Get(key string) CLValue
- func (m *Map) Len() int
- func (m *Map) Map() map[string]CLValue
- func (m *Map) String() string
- type Option
- type Result
- type String
- type Tuple1
- type Tuple2
- type Tuple3
- type UInt128
- type UInt256
- type UInt32
- type UInt512
- type UInt64
- type UInt8
- type Unit
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBoolValueIsInvalid = errors.New("invalid bool value")
)
View Source
var ErrUnitByteNotEmpty = errors.New("byte source for unit type should be empty")
View Source
var (
ErrUnsupportedCLType = errors.New("buffer constructor is not found")
)
Functions ¶
func BigToBytes ¶
func SizeToBytes ¶
func ToBytesWithType ¶
Types ¶
type CLValue ¶
type CLValue struct { Type cltype.CLType Bool *Bool I32 *Int32 I64 *Int64 UI8 *UInt8 UI32 *UInt32 UI64 *UInt64 UI128 *UInt128 UI256 *UInt256 UI512 *UInt512 Unit *Unit Uref *key.URef Key *key.Key Option *Option List *List ByteArray *ByteArray Result *Result StringVal *String Map *Map Tuple1 *Tuple1 Tuple2 *Tuple2 Tuple3 *Tuple3 Any *Any PublicKey *keypair.PublicKey }
func FromBufferByType ¶
func NewAnyFromBytes ¶
func NewCLByteArray ¶
func NewCLInt32 ¶
func NewCLInt64 ¶
func NewCLOption ¶
func NewCLPublicKey ¶ added in v0.9.6
func NewCLResult ¶
func NewCLString ¶
func NewCLTuple1 ¶
func NewCLTuple2 ¶
func NewCLUInt128 ¶
func NewCLUInt256 ¶
func NewCLUInt32 ¶
func NewCLUInt512 ¶
func NewCLUInt64 ¶
func NewCLUint8 ¶
func (CLValue) GetValueByType ¶
func (CLValue) ToBytesWithType ¶
type List ¶
func NewListFromBuffer ¶
type Map ¶
func NewMapFromBuffer ¶
type Tuple1 ¶
type Tuple1 struct {
// contains filtered or unexported fields
}
func NewTuple1FromBuffer ¶
func NewTuple1FromBytes ¶
type Tuple3 ¶
type Tuple3 struct { Inner1 CLValue Inner2 CLValue Inner3 CLValue // contains filtered or unexported fields }
func NewTuple3FromBuffer ¶
func NewTuple3FromBytes ¶
type UInt128 ¶
type UInt128 struct {
// contains filtered or unexported fields
}
func NewUint128FromBytes ¶
type UInt256 ¶
type UInt256 struct {
// contains filtered or unexported fields
}
func NewUint256FromBytes ¶
type UInt512 ¶
type UInt512 struct {
// contains filtered or unexported fields
}
func NewUint512FromBytes ¶
func (UInt512) MarshalJSON ¶
func (*UInt512) UnmarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.