Documentation ¶
Index ¶
- Constants
- func Eq(x, y Value) bool
- func IsValidTupleSize(size *big.Int) bool
- func IsValidTupleSizeI64(size int64) bool
- func MarshalOperation(op Operation, wr io.Writer) error
- func MarshalOperationProof(op Operation, wr io.Writer, includeVal bool) error
- func MarshalValue(v Value, w io.Writer) error
- func MarshalValueForProof(v Value, w io.Writer) error
- func MarshalValueToBytes(val Value) []byte
- func TypeCodeName(code uint8) string
- type BasicOperation
- type CodePointValue
- func (cv CodePointValue) Clone() Value
- func (cv CodePointValue) CloneShallow() Value
- func (cv CodePointValue) Equal(val Value) bool
- func (cv CodePointValue) Hash() common.Hash
- func (cv CodePointValue) InternalTypeCode() uint8
- func (cv CodePointValue) Marshal(w io.Writer) error
- func (cv CodePointValue) MarshalForProof(w io.Writer) error
- func (cv CodePointValue) Size() int64
- func (cv CodePointValue) String() string
- func (cv CodePointValue) TypeCode() uint8
- type HashOnlyValue
- func (nv HashOnlyValue) Clone() Value
- func (nv HashOnlyValue) CloneShallow() Value
- func (nv HashOnlyValue) Equal(val Value) bool
- func (nv HashOnlyValue) Hash() common.Hash
- func (nv HashOnlyValue) InternalTypeCode() byte
- func (nv HashOnlyValue) Marshal(wr io.Writer) error
- func (tv HashOnlyValue) MarshalForProof(wr io.Writer) error
- func (nv HashOnlyValue) Size() int64
- func (nv HashOnlyValue) String() string
- func (nv HashOnlyValue) TypeCode() byte
- type ImmediateOperation
- type IntValue
- func (iv IntValue) BigInt() *big.Int
- func (iv IntValue) Clone() Value
- func (iv IntValue) CloneShallow() Value
- func (iv IntValue) Equal(val Value) bool
- func (iv IntValue) Hash() common.Hash
- func (iv IntValue) InternalTypeCode() uint8
- func (iv IntValue) Marshal(w io.Writer) error
- func (tv IntValue) MarshalForProof(wr io.Writer) error
- func (iv IntValue) Size() int64
- func (iv IntValue) String() string
- func (iv IntValue) ToBytes() [32]byte
- func (iv IntValue) TypeCode() uint8
- type Opcode
- type Operation
- type TupleValue
- func NewEmptyTuple() TupleValue
- func NewRepeatedTuple(value Value, size int64) (TupleValue, error)
- func NewSizedTupleFromReader(rd io.Reader, size byte) (TupleValue, error)
- func NewTuple2(value1 Value, value2 Value) TupleValue
- func NewTupleFromSlice(slice []Value) (TupleValue, error)
- func NewTupleOfSizeWithContents(contents [MaxTupleSize]Value, size int8) (TupleValue, error)
- func (tv TupleValue) Clone() Value
- func (tv TupleValue) CloneShallow() Value
- func (tv TupleValue) Contents() []Value
- func (tv TupleValue) Equal(val Value) bool
- func (tv TupleValue) Get(idx IntValue) (Value, error)
- func (tv TupleValue) GetByInt64(idx int64) (Value, error)
- func (tv TupleValue) Hash() common.Hash
- func (tv TupleValue) InternalTypeCode() uint8
- func (tv TupleValue) IsValidIndex(idx IntValue) bool
- func (tv TupleValue) Len() int64
- func (tv TupleValue) Marshal(wr io.Writer) error
- func (tv TupleValue) MarshalForProof(wr io.Writer) error
- func (tv TupleValue) Set(idx IntValue, val Value) (TupleValue, error)
- func (tv TupleValue) SetByInt64(idx int64, val Value) (TupleValue, error)
- func (tv TupleValue) Size() int64
- func (tv TupleValue) String() string
- func (tv TupleValue) TypeCode() uint8
- type UnmarshalError
- type Value
Constants ¶
View Source
const ( TypeCodeInt uint8 = 0 TypeCodeCodePoint uint8 = 1 TypeCodeHashOnly uint8 = 2 TypeCodeTuple uint8 = 3 )
View Source
const BytesPerInt = 32
View Source
const MaxTupleSize = 8
Variables ¶
This section is empty.
Functions ¶
func IsValidTupleSize ¶
func IsValidTupleSizeI64 ¶
func MarshalOperationProof ¶
func MarshalValueToBytes ¶ added in v0.4.0
func TypeCodeName ¶
Types ¶
type BasicOperation ¶
type BasicOperation struct {
Op Opcode
}
func NewBasicOperationFromReader ¶
func NewBasicOperationFromReader(rd io.Reader) (BasicOperation, error)
func (BasicOperation) GetOp ¶
func (op BasicOperation) GetOp() Opcode
func (BasicOperation) MarshalProof ¶
func (op BasicOperation) MarshalProof(wr io.Writer, includeVal bool) error
func (BasicOperation) String ¶ added in v0.4.0
func (op BasicOperation) String() string
func (BasicOperation) TypeCode ¶
func (op BasicOperation) TypeCode() uint8
type CodePointValue ¶
var ErrorCodePoint CodePointValue
func NewCodePointForProofFromReader ¶
func NewCodePointForProofFromReader(rd io.Reader) (CodePointValue, error)
func NewCodePointValueFromReader ¶
func NewCodePointValueFromReader(rd io.Reader) (CodePointValue, error)
func (CodePointValue) Clone ¶
func (cv CodePointValue) Clone() Value
func (CodePointValue) CloneShallow ¶
func (cv CodePointValue) CloneShallow() Value
func (CodePointValue) Equal ¶
func (cv CodePointValue) Equal(val Value) bool
func (CodePointValue) Hash ¶
func (cv CodePointValue) Hash() common.Hash
func (CodePointValue) InternalTypeCode ¶
func (cv CodePointValue) InternalTypeCode() uint8
func (CodePointValue) MarshalForProof ¶
func (cv CodePointValue) MarshalForProof(w io.Writer) error
func (CodePointValue) Size ¶
func (cv CodePointValue) Size() int64
func (CodePointValue) String ¶
func (cv CodePointValue) String() string
func (CodePointValue) TypeCode ¶
func (cv CodePointValue) TypeCode() uint8
type HashOnlyValue ¶
type HashOnlyValue struct {
// contains filtered or unexported fields
}
func NewHashOnlyValue ¶
func NewHashOnlyValue(hash common.Hash, size int64) HashOnlyValue
func NewHashOnlyValueFromReader ¶
func NewHashOnlyValueFromReader(rd io.Reader) (HashOnlyValue, error)
func NewHashOnlyValueFromValue ¶
func NewHashOnlyValueFromValue(val Value) HashOnlyValue
func (HashOnlyValue) Clone ¶
func (nv HashOnlyValue) Clone() Value
func (HashOnlyValue) CloneShallow ¶
func (nv HashOnlyValue) CloneShallow() Value
func (HashOnlyValue) Equal ¶
func (nv HashOnlyValue) Equal(val Value) bool
func (HashOnlyValue) Hash ¶
func (nv HashOnlyValue) Hash() common.Hash
func (HashOnlyValue) InternalTypeCode ¶
func (nv HashOnlyValue) InternalTypeCode() byte
func (HashOnlyValue) MarshalForProof ¶ added in v0.4.0
func (tv HashOnlyValue) MarshalForProof(wr io.Writer) error
func (HashOnlyValue) Size ¶
func (nv HashOnlyValue) Size() int64
func (HashOnlyValue) String ¶
func (nv HashOnlyValue) String() string
func (HashOnlyValue) TypeCode ¶
func (nv HashOnlyValue) TypeCode() byte
type ImmediateOperation ¶
func NewImmediateOperationFromReader ¶
func NewImmediateOperationFromReader(rd io.Reader) (ImmediateOperation, error)
func (ImmediateOperation) GetOp ¶
func (op ImmediateOperation) GetOp() Opcode
func (ImmediateOperation) MarshalProof ¶
func (op ImmediateOperation) MarshalProof(wr io.Writer, includeVal bool) error
func (ImmediateOperation) String ¶ added in v0.4.0
func (op ImmediateOperation) String() string
func (ImmediateOperation) TypeCode ¶
func (op ImmediateOperation) TypeCode() uint8
type IntValue ¶
type IntValue struct {
// contains filtered or unexported fields
}
var IntegerZero IntValue
func NewBooleanValue ¶
func NewInt64Value ¶
func NewIntValue ¶
func (IntValue) CloneShallow ¶
func (IntValue) InternalTypeCode ¶
func (IntValue) MarshalForProof ¶ added in v0.4.0
type Operation ¶
type TupleValue ¶
type TupleValue struct {
// contains filtered or unexported fields
}
func NewEmptyTuple ¶
func NewEmptyTuple() TupleValue
func NewRepeatedTuple ¶
func NewRepeatedTuple(value Value, size int64) (TupleValue, error)
func NewSizedTupleFromReader ¶
func NewSizedTupleFromReader(rd io.Reader, size byte) (TupleValue, error)
func NewTuple2 ¶
func NewTuple2(value1 Value, value2 Value) TupleValue
func NewTupleFromSlice ¶
func NewTupleFromSlice(slice []Value) (TupleValue, error)
func NewTupleOfSizeWithContents ¶
func NewTupleOfSizeWithContents(contents [MaxTupleSize]Value, size int8) (TupleValue, error)
func (TupleValue) Clone ¶
func (tv TupleValue) Clone() Value
func (TupleValue) CloneShallow ¶
func (tv TupleValue) CloneShallow() Value
func (TupleValue) Contents ¶
func (tv TupleValue) Contents() []Value
func (TupleValue) Equal ¶
func (tv TupleValue) Equal(val Value) bool
func (TupleValue) GetByInt64 ¶
func (tv TupleValue) GetByInt64(idx int64) (Value, error)
func (TupleValue) Hash ¶
func (tv TupleValue) Hash() common.Hash
func (TupleValue) InternalTypeCode ¶
func (tv TupleValue) InternalTypeCode() uint8
func (TupleValue) IsValidIndex ¶
func (tv TupleValue) IsValidIndex(idx IntValue) bool
func (TupleValue) Len ¶
func (tv TupleValue) Len() int64
func (TupleValue) MarshalForProof ¶ added in v0.4.0
func (tv TupleValue) MarshalForProof(wr io.Writer) error
func (TupleValue) Set ¶
func (tv TupleValue) Set(idx IntValue, val Value) (TupleValue, error)
func (TupleValue) SetByInt64 ¶
func (tv TupleValue) SetByInt64(idx int64, val Value) (TupleValue, error)
func (TupleValue) Size ¶
func (tv TupleValue) Size() int64
func (TupleValue) String ¶
func (tv TupleValue) String() string
func (TupleValue) TypeCode ¶
func (tv TupleValue) TypeCode() uint8
type UnmarshalError ¶
type UnmarshalError struct {
// contains filtered or unexported fields
}
func (UnmarshalError) Error ¶
func (e UnmarshalError) Error() string
Click to show internal directories.
Click to hide internal directories.