Documentation
¶
Index ¶
- Constants
- func BasicSeriesDryCheck(dr *DecodingReader, bytesLen uint64, bytesLimit uint64, isBoolElem bool) error
- func BigEndianBasicSeriesHTR(h MerkleFn, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64, ...) [32]byte
- func BigToLittleEndianChunk(data [32]byte, elemSize uint8) (out [32]byte)
- func CallSeries(fn func(i uint64, p unsafe.Pointer), length uint64, elemMemSize uintptr, ...)
- func DecodeFixedSeries(decFn DecoderFn, length uint64, elemMemSize uintptr, dr *DecodingReader, ...) error
- func DecodeFixedSlice(decFn DecoderFn, elemLen uint64, bytesLen uint64, limit uint64, ...) error
- func DecodeVarSeries(decFn DecoderFn, length uint64, elemMemSize uintptr, dr *DecodingReader, ...) error
- func DecodeVarSeriesFuzzMode(elem SSZ, length uint64, elemMemSize uintptr, dr *DecodingReader, ...) error
- func DecodeVarSlice(decFn DecoderFn, minElemLen uint64, bytesLen uint64, limit uint64, ...) error
- func DryCheckFixedSeries(dryCheckFn DryCheckFn, length uint64, dr *DecodingReader) error
- func DryCheckFixedSlice(dryCheckFn DryCheckFn, elemLen uint64, bytesLen uint64, limit uint64, ...) error
- func DryCheckVarSeries(dryCheckFn DryCheckFn, length uint64, dr *DecodingReader) error
- func DryCheckVarSlice(dryCheckFn DryCheckFn, minElemLen uint64, bytesLen uint64, limit uint64, ...) error
- func EncodeFixedSeries(encFn EncoderFn, length uint64, elemMemSize uintptr, eb *EncodingWriter, ...) error
- func EncodeVarSeries(encFn EncoderFn, sizeFn SizeFn, length uint64, elemMemSize uintptr, ...) error
- func LittleEndianBasicSeriesDecode(dr *DecodingReader, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64, ...) error
- func LittleEndianBasicSeriesEncode(eb *EncodingWriter, p unsafe.Pointer, bytesLen uint64) error
- func LittleEndianBasicSeriesHTR(h MerkleFn, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64) [32]byte
- func ReadListLimit(typ reflect.Type) (uint64, error)
- func ReadVarSeriesOffsets(length uint64, dr *DecodingReader) ([]uint64, error)
- func ReadVarSliceOffsets(minElemLen uint64, bytesLen uint64, limit uint64, dr *DecodingReader) ([]uint64, error)
- type Change
- type ChangeMode
- type ContainerField
- type FieldPtrFn
- type SSZ
- type SSZBasicList
- func (v *SSZBasicList) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBasicList) DryCheck(dr *DecodingReader) error
- func (v *SSZBasicList) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBasicList) FixedLen() uint64
- func (v *SSZBasicList) FuzzMaxLen() uint64
- func (v *SSZBasicList) FuzzMinLen() uint64
- func (v *SSZBasicList) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBasicList) IsFixed() bool
- func (v *SSZBasicList) MaxLen() uint64
- func (v *SSZBasicList) MinLen() uint64
- func (v *SSZBasicList) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBasicList) SizeOf(p unsafe.Pointer) uint64
- type SSZBasicVector
- func (v *SSZBasicVector) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBasicVector) DryCheck(dr *DecodingReader) error
- func (v *SSZBasicVector) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBasicVector) FixedLen() uint64
- func (v *SSZBasicVector) FuzzMaxLen() uint64
- func (v *SSZBasicVector) FuzzMinLen() uint64
- func (v *SSZBasicVector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBasicVector) IsFixed() bool
- func (v *SSZBasicVector) MaxLen() uint64
- func (v *SSZBasicVector) MinLen() uint64
- func (v *SSZBasicVector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBasicVector) SizeOf(p unsafe.Pointer) uint64
- type SSZBitlist
- func (v *SSZBitlist) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBitlist) DryCheck(dr *DecodingReader) error
- func (v *SSZBitlist) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBitlist) FixedLen() uint64
- func (v *SSZBitlist) FuzzMaxLen() uint64
- func (v *SSZBitlist) FuzzMinLen() uint64
- func (v *SSZBitlist) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBitlist) IsFixed() bool
- func (v *SSZBitlist) MaxLen() uint64
- func (v *SSZBitlist) MinLen() uint64
- func (v *SSZBitlist) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBitlist) SizeOf(p unsafe.Pointer) uint64
- type SSZBitvector
- func (v *SSZBitvector) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBitvector) DryCheck(dr *DecodingReader) error
- func (v *SSZBitvector) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBitvector) FixedLen() uint64
- func (v *SSZBitvector) FuzzMaxLen() uint64
- func (v *SSZBitvector) FuzzMinLen() uint64
- func (v *SSZBitvector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBitvector) IsFixed() bool
- func (v *SSZBitvector) MaxLen() uint64
- func (v *SSZBitvector) MinLen() uint64
- func (v *SSZBitvector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBitvector) SizeOf(p unsafe.Pointer) uint64
- type SSZBool
- func (v SSZBool) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v SSZBool) DryCheck(dr *DecodingReader) error
- func (v SSZBool) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v SSZBool) FixedLen() uint64
- func (v SSZBool) FuzzMaxLen() uint64
- func (v SSZBool) FuzzMinLen() uint64
- func (v SSZBool) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)
- func (v SSZBool) IsFixed() bool
- func (v SSZBool) MaxLen() uint64
- func (v SSZBool) MinLen() uint64
- func (v SSZBool) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v SSZBool) SizeOf(p unsafe.Pointer) uint64
- type SSZBytes
- func (v *SSZBytes) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBytes) DryCheck(dr *DecodingReader) error
- func (v *SSZBytes) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBytes) FixedLen() uint64
- func (v *SSZBytes) FuzzMaxLen() uint64
- func (v *SSZBytes) FuzzMinLen() uint64
- func (v *SSZBytes) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBytes) IsFixed() bool
- func (v *SSZBytes) MaxLen() uint64
- func (v *SSZBytes) MinLen() uint64
- func (v *SSZBytes) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBytes) SizeOf(p unsafe.Pointer) uint64
- type SSZBytesN
- func (v *SSZBytesN) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZBytesN) DryCheck(dr *DecodingReader) error
- func (v *SSZBytesN) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZBytesN) FixedLen() uint64
- func (v *SSZBytesN) FuzzMaxLen() uint64
- func (v *SSZBytesN) FuzzMinLen() uint64
- func (v *SSZBytesN) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZBytesN) IsFixed() bool
- func (v *SSZBytesN) MaxLen() uint64
- func (v *SSZBytesN) MinLen() uint64
- func (v *SSZBytesN) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZBytesN) SizeOf(p unsafe.Pointer) uint64
- type SSZContainer
- func (v *SSZContainer) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZContainer) DryCheck(dr *DecodingReader) error
- func (v *SSZContainer) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZContainer) FixedLen() uint64
- func (v *SSZContainer) FuzzMaxLen() uint64
- func (v *SSZContainer) FuzzMinLen() uint64
- func (v *SSZContainer) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZContainer) IsFixed() bool
- func (v *SSZContainer) MaxLen() uint64
- func (v *SSZContainer) MinLen() uint64
- func (v *SSZContainer) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZContainer) SigningRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZContainer) SizeOf(p unsafe.Pointer) uint64
- func (v *SSZContainer) SquashFields() []ContainerField
- type SSZFactoryFn
- type SSZFuzzInfo
- type SSZInfo
- type SSZList
- func (v *SSZList) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZList) DryCheck(dr *DecodingReader) error
- func (v *SSZList) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZList) FixedLen() uint64
- func (v *SSZList) FuzzMaxLen() uint64
- func (v *SSZList) FuzzMinLen() uint64
- func (v *SSZList) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZList) IsFixed() bool
- func (v *SSZList) MaxLen() uint64
- func (v *SSZList) MinLen() uint64
- func (v *SSZList) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZList) SizeOf(p unsafe.Pointer) uint64
- type SSZMemory
- type SSZPtr
- func (v *SSZPtr) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZPtr) DryCheck(dr *DecodingReader) error
- func (v *SSZPtr) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZPtr) FixedLen() uint64
- func (v *SSZPtr) FuzzMaxLen() uint64
- func (v *SSZPtr) FuzzMinLen() uint64
- func (v *SSZPtr) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZPtr) IsFixed() bool
- func (v *SSZPtr) MaxLen() uint64
- func (v *SSZPtr) MinLen() uint64
- func (v *SSZPtr) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZPtr) SizeOf(p unsafe.Pointer) uint64
- type SSZUint8
- func (t SSZUint8) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (t SSZUint8) DryCheck(dr *DecodingReader) error
- func (t SSZUint8) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (t SSZUint8) FixedLen() uint64
- func (t SSZUint8) FuzzMaxLen() uint64
- func (t SSZUint8) FuzzMinLen() uint64
- func (t SSZUint8) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)
- func (t SSZUint8) IsFixed() bool
- func (t SSZUint8) MaxLen() uint64
- func (t SSZUint8) MinLen() uint64
- func (t SSZUint8) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (t SSZUint8) SizeOf(p unsafe.Pointer) uint64
- type SSZUint16
- func (t SSZUint16) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (t SSZUint16) DryCheck(dr *DecodingReader) error
- func (t SSZUint16) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (t SSZUint16) FixedLen() uint64
- func (t SSZUint16) FuzzMaxLen() uint64
- func (t SSZUint16) FuzzMinLen() uint64
- func (t SSZUint16) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)
- func (t SSZUint16) IsFixed() bool
- func (t SSZUint16) MaxLen() uint64
- func (t SSZUint16) MinLen() uint64
- func (t SSZUint16) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (t SSZUint16) SizeOf(p unsafe.Pointer) uint64
- type SSZUint32
- func (t SSZUint32) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (t SSZUint32) DryCheck(dr *DecodingReader) error
- func (t SSZUint32) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (t SSZUint32) FixedLen() uint64
- func (t SSZUint32) FuzzMaxLen() uint64
- func (t SSZUint32) FuzzMinLen() uint64
- func (t SSZUint32) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)
- func (t SSZUint32) IsFixed() bool
- func (t SSZUint32) MaxLen() uint64
- func (t SSZUint32) MinLen() uint64
- func (t SSZUint32) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (t SSZUint32) SizeOf(p unsafe.Pointer) uint64
- type SSZUint64
- func (t SSZUint64) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (t SSZUint64) DryCheck(dr *DecodingReader) error
- func (t SSZUint64) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (t SSZUint64) FixedLen() uint64
- func (t SSZUint64) FuzzMaxLen() uint64
- func (t SSZUint64) FuzzMinLen() uint64
- func (t SSZUint64) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)
- func (t SSZUint64) IsFixed() bool
- func (t SSZUint64) MaxLen() uint64
- func (t SSZUint64) MinLen() uint64
- func (t SSZUint64) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (t SSZUint64) SizeOf(p unsafe.Pointer) uint64
- type SSZVector
- func (v *SSZVector) Decode(dr *DecodingReader, p unsafe.Pointer) error
- func (v *SSZVector) DryCheck(dr *DecodingReader) error
- func (v *SSZVector) Encode(eb *EncodingWriter, p unsafe.Pointer) error
- func (v *SSZVector) FixedLen() uint64
- func (v *SSZVector) FuzzMaxLen() uint64
- func (v *SSZVector) FuzzMinLen() uint64
- func (v *SSZVector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
- func (v *SSZVector) IsFixed() bool
- func (v *SSZVector) MaxLen() uint64
- func (v *SSZVector) MinLen() uint64
- func (v *SSZVector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
- func (v *SSZVector) SizeOf(p unsafe.Pointer) uint64
- type SignedSSZ
- type SquashableFields
Constants ¶
const ( Equal = iota Modified Added Deleted )
const BYTES_PER_LENGTH_OFFSET = 4
Note: when this is changed,
don't forget to change the ReadOffset/WriteOffset calls that handle the length value in this allocated space.
const OMIT_FLAG = "omit"
const SQUASH_FLAG = "squash"
const SSZ_TAG = "ssz"
Variables ¶
This section is empty.
Functions ¶
func BasicSeriesDryCheck ¶ added in v0.1.4
func BigEndianBasicSeriesHTR ¶
func BigEndianBasicSeriesHTR(h MerkleFn, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64, elemSize uint8) [32]byte
counter-part of LittleEndianBasicSeriesHTR
func BigToLittleEndianChunk ¶
func CallSeries ¶ added in v0.1.2
func DecodeFixedSeries ¶
func DecodeFixedSlice ¶
func DecodeVarSeries ¶
func DecodeVarSeries(decFn DecoderFn, length uint64, elemMemSize uintptr, dr *DecodingReader, p unsafe.Pointer) error
pointer must point to start of the series contents
func DecodeVarSeriesFuzzMode ¶
func DecodeVarSlice ¶
func DecodeVarSlice(decFn DecoderFn, minElemLen uint64, bytesLen uint64, limit uint64, alloc ptrutil.SliceAllocationFn, elemMemSize uintptr, dr *DecodingReader, p unsafe.Pointer) error
pointer must point to the slice header to decode into (new space is allocated for contents and bound to the slice header when necessary)
func DryCheckFixedSeries ¶ added in v0.1.4
func DryCheckFixedSlice ¶ added in v0.1.4
func DryCheckVarSeries ¶ added in v0.1.4
func DryCheckVarSlice ¶ added in v0.1.4
func EncodeFixedSeries ¶
func EncodeVarSeries ¶
func EncodeVarSeries(encFn EncoderFn, sizeFn SizeFn, length uint64, elemMemSize uintptr, eb *EncodingWriter, p unsafe.Pointer) error
pointer must point to start of the series contents
func LittleEndianBasicSeriesDecode ¶
func LittleEndianBasicSeriesDecode(dr *DecodingReader, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64, isBoolElem bool) error
WARNING: for little-endian architectures only, or the elem-length has to be 1 byte
func LittleEndianBasicSeriesEncode ¶
WARNING: for little-endian architectures only, or the elem-length has to be 1 byte
func LittleEndianBasicSeriesHTR ¶
func LittleEndianBasicSeriesHTR(h MerkleFn, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64) [32]byte
WARNING: for little-endian architectures only, or the elem-length has to be 1 byte
func ReadVarSeriesOffsets ¶ added in v0.1.4
Types ¶
type Change ¶ added in v0.1.2
type Change struct {
Path string
Mode ChangeMode
Description string
}
type ChangeMode ¶ added in v0.1.2
type ChangeMode byte
type ContainerField ¶
type ContainerField struct {
// contains filtered or unexported fields
}
func (*ContainerField) Wrap ¶ added in v0.1.0
func (c *ContainerField) Wrap(name string, memOffset uintptr) ContainerField
type FieldPtrFn ¶ added in v0.1.0
func GetOffsetPtrFn ¶ added in v0.1.0
func GetOffsetPtrFn(memOffset uintptr) FieldPtrFn
func (FieldPtrFn) WrapOffset ¶ added in v0.1.0
func (fn FieldPtrFn) WrapOffset(memOffset uintptr) FieldPtrFn
type SSZ ¶
type SSZ interface {
SSZFuzzInfo
SSZInfo
SSZMemory
}
func DefaultSSZFactory ¶
func DefaultSSZFactory(factory SSZFactoryFn, typ reflect.Type) (SSZ, error)
type SSZBasicList ¶
type SSZBasicList struct {
// contains filtered or unexported fields
}
func NewSSZBasicList ¶
func NewSSZBasicList(typ reflect.Type) (*SSZBasicList, error)
func (*SSZBasicList) Decode ¶
func (v *SSZBasicList) Decode(dr *DecodingReader, p unsafe.Pointer) error
func (*SSZBasicList) DryCheck ¶ added in v0.1.4
func (v *SSZBasicList) DryCheck(dr *DecodingReader) error
func (*SSZBasicList) Encode ¶
func (v *SSZBasicList) Encode(eb *EncodingWriter, p unsafe.Pointer) error
func (*SSZBasicList) FixedLen ¶
func (v *SSZBasicList) FixedLen() uint64
func (*SSZBasicList) FuzzMaxLen ¶ added in v0.1.0
func (v *SSZBasicList) FuzzMaxLen() uint64
func (*SSZBasicList) FuzzMinLen ¶ added in v0.1.0
func (v *SSZBasicList) FuzzMinLen() uint64
func (*SSZBasicList) HashTreeRoot ¶
func (v *SSZBasicList) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZBasicList) IsFixed ¶
func (v *SSZBasicList) IsFixed() bool
func (*SSZBasicList) MaxLen ¶ added in v0.1.0
func (v *SSZBasicList) MaxLen() uint64
func (*SSZBasicList) MinLen ¶
func (v *SSZBasicList) MinLen() uint64
type SSZBasicVector ¶
type SSZBasicVector struct {
// contains filtered or unexported fields
}
func NewSSZBasicVector ¶
func NewSSZBasicVector(typ reflect.Type) (*SSZBasicVector, error)
func (*SSZBasicVector) Decode ¶
func (v *SSZBasicVector) Decode(dr *DecodingReader, p unsafe.Pointer) error
func (*SSZBasicVector) DryCheck ¶ added in v0.1.4
func (v *SSZBasicVector) DryCheck(dr *DecodingReader) error
func (*SSZBasicVector) Encode ¶
func (v *SSZBasicVector) Encode(eb *EncodingWriter, p unsafe.Pointer) error
func (*SSZBasicVector) FixedLen ¶
func (v *SSZBasicVector) FixedLen() uint64
func (*SSZBasicVector) FuzzMaxLen ¶ added in v0.1.0
func (v *SSZBasicVector) FuzzMaxLen() uint64
func (*SSZBasicVector) FuzzMinLen ¶ added in v0.1.0
func (v *SSZBasicVector) FuzzMinLen() uint64
func (*SSZBasicVector) HashTreeRoot ¶
func (v *SSZBasicVector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZBasicVector) IsFixed ¶
func (v *SSZBasicVector) IsFixed() bool
func (*SSZBasicVector) MaxLen ¶ added in v0.1.0
func (v *SSZBasicVector) MaxLen() uint64
func (*SSZBasicVector) MinLen ¶
func (v *SSZBasicVector) MinLen() uint64
type SSZBitlist ¶ added in v0.1.0
type SSZBitlist struct {
// contains filtered or unexported fields
}
func NewSSZBitlist ¶ added in v0.1.0
func NewSSZBitlist(typ reflect.Type) (*SSZBitlist, error)
func (*SSZBitlist) Decode ¶ added in v0.1.0
func (v *SSZBitlist) Decode(dr *DecodingReader, p unsafe.Pointer) error
func (*SSZBitlist) DryCheck ¶ added in v0.1.4
func (v *SSZBitlist) DryCheck(dr *DecodingReader) error
func (*SSZBitlist) Encode ¶ added in v0.1.0
func (v *SSZBitlist) Encode(eb *EncodingWriter, p unsafe.Pointer) error
func (*SSZBitlist) FixedLen ¶ added in v0.1.0
func (v *SSZBitlist) FixedLen() uint64
in bytes (rounded up), not bits
func (*SSZBitlist) FuzzMaxLen ¶ added in v0.1.0
func (v *SSZBitlist) FuzzMaxLen() uint64
in bytes (rounded up), not bits
func (*SSZBitlist) FuzzMinLen ¶ added in v0.1.0
func (v *SSZBitlist) FuzzMinLen() uint64
in bytes (rounded up), not bits
func (*SSZBitlist) HashTreeRoot ¶ added in v0.1.0
func (v *SSZBitlist) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZBitlist) IsFixed ¶ added in v0.1.0
func (v *SSZBitlist) IsFixed() bool
func (*SSZBitlist) MaxLen ¶ added in v0.1.0
func (v *SSZBitlist) MaxLen() uint64
in bytes (rounded up), not bits
func (*SSZBitlist) MinLen ¶ added in v0.1.0
func (v *SSZBitlist) MinLen() uint64
in bytes (rounded up), not bits. Includes the delimiting 1 bit.
type SSZBitvector ¶ added in v0.1.0
type SSZBitvector struct {
// contains filtered or unexported fields
}
func NewSSZBitvector ¶ added in v0.1.0
func NewSSZBitvector(typ reflect.Type) (*SSZBitvector, error)
func (*SSZBitvector) Decode ¶ added in v0.1.0
func (v *SSZBitvector) Decode(dr *DecodingReader, p unsafe.Pointer) error
func (*SSZBitvector) DryCheck ¶ added in v0.1.4
func (v *SSZBitvector) DryCheck(dr *DecodingReader) error
func (*SSZBitvector) Encode ¶ added in v0.1.0
func (v *SSZBitvector) Encode(eb *EncodingWriter, p unsafe.Pointer) error
func (*SSZBitvector) FixedLen ¶ added in v0.1.0
func (v *SSZBitvector) FixedLen() uint64
in bytes (rounded up), not bits
func (*SSZBitvector) FuzzMaxLen ¶ added in v0.1.0
func (v *SSZBitvector) FuzzMaxLen() uint64
in bytes (rounded up), not bits
func (*SSZBitvector) FuzzMinLen ¶ added in v0.1.0
func (v *SSZBitvector) FuzzMinLen() uint64
in bytes (rounded up), not bits
func (*SSZBitvector) HashTreeRoot ¶ added in v0.1.0
func (v *SSZBitvector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZBitvector) IsFixed ¶ added in v0.1.0
func (v *SSZBitvector) IsFixed() bool
func (*SSZBitvector) MaxLen ¶ added in v0.1.0
func (v *SSZBitvector) MaxLen() uint64
in bytes (rounded up), not bits
func (*SSZBitvector) MinLen ¶ added in v0.1.0
func (v *SSZBitvector) MinLen() uint64
in bytes (rounded up), not bits
type SSZBool ¶ added in v0.1.5
type SSZBool struct{}
func (SSZBool) FuzzMaxLen ¶ added in v0.1.5
func (SSZBool) FuzzMinLen ¶ added in v0.1.5
func (SSZBool) HashTreeRoot ¶ added in v0.1.5
type SSZBytes ¶
type SSZBytes struct {
// contains filtered or unexported fields
}
func (*SSZBytes) FuzzMaxLen ¶ added in v0.1.0
func (*SSZBytes) FuzzMinLen ¶ added in v0.1.0
func (*SSZBytes) HashTreeRoot ¶
type SSZBytesN ¶
type SSZBytesN struct {
// contains filtered or unexported fields
}
func (*SSZBytesN) FuzzMaxLen ¶ added in v0.1.0
func (*SSZBytesN) FuzzMinLen ¶ added in v0.1.0
func (*SSZBytesN) HashTreeRoot ¶
type SSZContainer ¶
type SSZContainer struct {
Fields []ContainerField
// contains filtered or unexported fields
}
func NewSSZContainer ¶
func NewSSZContainer(factory SSZFactoryFn, typ reflect.Type) (*SSZContainer, error)
func (*SSZContainer) Decode ¶
func (v *SSZContainer) Decode(dr *DecodingReader, p unsafe.Pointer) error
func (*SSZContainer) DryCheck ¶ added in v0.1.4
func (v *SSZContainer) DryCheck(dr *DecodingReader) error
func (*SSZContainer) Encode ¶
func (v *SSZContainer) Encode(eb *EncodingWriter, p unsafe.Pointer) error
func (*SSZContainer) FixedLen ¶
func (v *SSZContainer) FixedLen() uint64
func (*SSZContainer) FuzzMaxLen ¶ added in v0.1.0
func (v *SSZContainer) FuzzMaxLen() uint64
func (*SSZContainer) FuzzMinLen ¶ added in v0.1.0
func (v *SSZContainer) FuzzMinLen() uint64
func (*SSZContainer) HashTreeRoot ¶
func (v *SSZContainer) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZContainer) IsFixed ¶
func (v *SSZContainer) IsFixed() bool
func (*SSZContainer) MaxLen ¶ added in v0.1.0
func (v *SSZContainer) MaxLen() uint64
func (*SSZContainer) MinLen ¶
func (v *SSZContainer) MinLen() uint64
func (*SSZContainer) Pretty ¶ added in v0.1.2
func (v *SSZContainer) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
func (*SSZContainer) SigningRoot ¶
func (v *SSZContainer) SigningRoot(h MerkleFn, p unsafe.Pointer) [32]byte
func (*SSZContainer) SizeOf ¶ added in v0.1.1
func (v *SSZContainer) SizeOf(p unsafe.Pointer) uint64
func (*SSZContainer) SquashFields ¶ added in v0.1.0
func (v *SSZContainer) SquashFields() []ContainerField
type SSZFuzzInfo ¶ added in v0.1.4
type SSZInfo ¶ added in v0.1.4
type SSZInfo interface {
// The minimum length of the object.
// If the object is fixed-len, this should equal FixedLen()
MinLen() uint64
// The maximum length of the object.
// If the object is fixed-len, this should equal FixedLen()
MaxLen() uint64
// The length of the fixed-size part
FixedLen() uint64
// If the type is fixed-size
IsFixed() bool
// Check the format of serialized data, without decoding the contents into memory
DryCheck(dr *DecodingReader) error
}
type SSZList ¶
type SSZList struct {
// contains filtered or unexported fields
}
func NewSSZList ¶
func NewSSZList(factory SSZFactoryFn, typ reflect.Type) (*SSZList, error)
func (*SSZList) FuzzMaxLen ¶ added in v0.1.0
func (*SSZList) FuzzMinLen ¶ added in v0.1.0
func (*SSZList) HashTreeRoot ¶
type SSZMemory ¶ added in v0.1.4
type SSZMemory interface {
// Gets the encoded size of the data under the given pointer.
SizeOf(p unsafe.Pointer) uint64
// Reads object data from pointer, writes ssz-encoded data to EncodingWriter
// Returns (n, err), forwarded from the io.Writer being encoded into.
Encode(eb *EncodingWriter, p unsafe.Pointer) error
// Reads from input, populates object with read data
Decode(dr *DecodingReader, p unsafe.Pointer) error
// Hashes the object read at the given pointer
HashTreeRoot(h MerkleFn, pointer unsafe.Pointer) [32]byte
// Pretty print
Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)
}
type SSZPtr ¶
type SSZPtr struct {
// contains filtered or unexported fields
}
proxies SSZ behavior to the SSZ type of the object being pointed to.
func (*SSZPtr) FuzzMaxLen ¶ added in v0.1.0
func (*SSZPtr) FuzzMinLen ¶ added in v0.1.0
type SSZUint8 ¶ added in v0.1.5
type SSZUint8 struct{}
func (SSZUint8) FuzzMaxLen ¶ added in v0.1.5
func (SSZUint8) FuzzMinLen ¶ added in v0.1.5
func (SSZUint8) HashTreeRoot ¶ added in v0.1.5
type SSZUint16 ¶ added in v0.1.5
type SSZUint16 struct{}
func (SSZUint16) FuzzMaxLen ¶ added in v0.1.5
func (SSZUint16) FuzzMinLen ¶ added in v0.1.5
func (SSZUint16) HashTreeRoot ¶ added in v0.1.5
type SSZUint32 ¶ added in v0.1.5
type SSZUint32 struct{}
func (SSZUint32) FuzzMaxLen ¶ added in v0.1.5
func (SSZUint32) FuzzMinLen ¶ added in v0.1.5
func (SSZUint32) HashTreeRoot ¶ added in v0.1.5
type SSZUint64 ¶ added in v0.1.5
type SSZUint64 struct{}
func (SSZUint64) FuzzMaxLen ¶ added in v0.1.5
func (SSZUint64) FuzzMinLen ¶ added in v0.1.5
func (SSZUint64) HashTreeRoot ¶ added in v0.1.5
type SSZVector ¶
type SSZVector struct {
// contains filtered or unexported fields
}
func NewSSZVector ¶
func NewSSZVector(factory SSZFactoryFn, typ reflect.Type) (*SSZVector, error)
func (*SSZVector) FuzzMaxLen ¶ added in v0.1.0
func (*SSZVector) FuzzMinLen ¶ added in v0.1.0
func (*SSZVector) HashTreeRoot ¶
type SignedSSZ ¶
SSZ definitions may also provide a way to compute a special hash-tree-root, for self-signed objects.
type SquashableFields ¶ added in v0.1.0
type SquashableFields interface {
// Get the ContainerFields
SquashFields() []ContainerField
}