types

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Equal = iota
	Modified
	Added
	Deleted
)
View Source
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.
View Source
const OMIT_FLAG = "omit"
View Source
const SQUASH_FLAG = "squash"
View Source
const SSZ_TAG = "ssz"

Variables

This section is empty.

Functions

func BasicSeriesDryCheck added in v0.1.4

func BasicSeriesDryCheck(dr *DecodingReader, bytesLen uint64, bytesLimit uint64, isBoolElem bool) error

func BigEndianBasicSeriesHTR

func BigEndianBasicSeriesHTR(h MerkleFn, p unsafe.Pointer, bytesLen uint64, bytesLimit uint64, elemSize uint8) [32]byte

counter-part of LittleEndianBasicSeriesHTR

func BigToLittleEndianChunk

func BigToLittleEndianChunk(data [32]byte, elemSize uint8) (out [32]byte)

func CallSeries added in v0.1.2

func CallSeries(fn func(i uint64, p unsafe.Pointer), length uint64, elemMemSize uintptr, p unsafe.Pointer)

func DecodeFixedSeries

func DecodeFixedSeries(decFn DecoderFn, length uint64, elemMemSize uintptr, dr *DecodingReader, p unsafe.Pointer) error

func DecodeFixedSlice

func DecodeFixedSlice(decFn DecoderFn, elemLen uint64, bytesLen uint64, limit uint64, alloc ptrutil.SliceAllocationFn, elemMemSize uintptr, dr *DecodingReader, p unsafe.Pointer) error

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 DecodeVarSeriesFuzzMode(elem SSZ, length uint64, elemMemSize uintptr, dr *DecodingReader, p unsafe.Pointer) error

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 DryCheckFixedSeries(dryCheckFn DryCheckFn, length uint64, dr *DecodingReader) error

func DryCheckFixedSlice added in v0.1.4

func DryCheckFixedSlice(dryCheckFn DryCheckFn, elemLen uint64, bytesLen uint64, limit uint64, dr *DecodingReader) error

func DryCheckVarSeries added in v0.1.4

func DryCheckVarSeries(dryCheckFn DryCheckFn, length uint64, dr *DecodingReader) error

func DryCheckVarSlice added in v0.1.4

func DryCheckVarSlice(dryCheckFn DryCheckFn, minElemLen uint64, bytesLen uint64, limit uint64, dr *DecodingReader) error

func EncodeFixedSeries

func EncodeFixedSeries(encFn EncoderFn, length uint64, elemMemSize uintptr, eb *EncodingWriter, p unsafe.Pointer) error

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

func LittleEndianBasicSeriesEncode(eb *EncodingWriter, p unsafe.Pointer, bytesLen uint64) error

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 ReadListLimit added in v0.1.0

func ReadListLimit(typ reflect.Type) (uint64, error)

func ReadVarSeriesOffsets added in v0.1.4

func ReadVarSeriesOffsets(length uint64, dr *DecodingReader) ([]uint64, error)

func ReadVarSliceOffsets added in v0.1.4

func ReadVarSliceOffsets(minElemLen uint64, bytesLen uint64, limit uint64, dr *DecodingReader) ([]uint64, error)

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

type FieldPtrFn func(p unsafe.Pointer) unsafe.Pointer

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)

func GetBasicSSZElemType

func GetBasicSSZElemType(kind reflect.Kind) (SSZ, error)

func SSZFactory

func SSZFactory(typ reflect.Type) (SSZ, error)

The default SSZ factory

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

func (*SSZBasicList) Pretty added in v0.1.2

func (v *SSZBasicList) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBasicList) SizeOf added in v0.1.1

func (v *SSZBasicList) SizeOf(p unsafe.Pointer) 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

func (*SSZBasicVector) Pretty added in v0.1.2

func (v *SSZBasicVector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBasicVector) SizeOf added in v0.1.1

func (v *SSZBasicVector) SizeOf(p unsafe.Pointer) 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.

func (*SSZBitlist) Pretty added in v0.1.2

func (v *SSZBitlist) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBitlist) SizeOf added in v0.1.1

func (v *SSZBitlist) SizeOf(p unsafe.Pointer) uint64

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

func (*SSZBitvector) Pretty added in v0.1.2

func (v *SSZBitvector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBitvector) SizeOf added in v0.1.1

func (v *SSZBitvector) SizeOf(p unsafe.Pointer) uint64

type SSZBool added in v0.1.5

type SSZBool struct{}

func (SSZBool) Decode added in v0.1.5

func (v SSZBool) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (SSZBool) DryCheck added in v0.1.5

func (v SSZBool) DryCheck(dr *DecodingReader) error

func (SSZBool) Encode added in v0.1.5

func (v SSZBool) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (SSZBool) FixedLen added in v0.1.5

func (v SSZBool) FixedLen() uint64

func (SSZBool) FuzzMaxLen added in v0.1.5

func (v SSZBool) FuzzMaxLen() uint64

func (SSZBool) FuzzMinLen added in v0.1.5

func (v SSZBool) FuzzMinLen() uint64

func (SSZBool) HashTreeRoot added in v0.1.5

func (v SSZBool) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)

func (SSZBool) IsFixed added in v0.1.5

func (v SSZBool) IsFixed() bool

func (SSZBool) MaxLen added in v0.1.5

func (v SSZBool) MaxLen() uint64

func (SSZBool) MinLen added in v0.1.5

func (v SSZBool) MinLen() uint64

func (SSZBool) Pretty added in v0.1.5

func (v SSZBool) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (SSZBool) SizeOf added in v0.1.5

func (v SSZBool) SizeOf(p unsafe.Pointer) uint64

type SSZBytes

type SSZBytes struct {
	// contains filtered or unexported fields
}

func NewSSZBytes

func NewSSZBytes(typ reflect.Type) (*SSZBytes, error)

func (*SSZBytes) Decode

func (v *SSZBytes) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (*SSZBytes) DryCheck added in v0.1.4

func (v *SSZBytes) DryCheck(dr *DecodingReader) error

func (*SSZBytes) Encode

func (v *SSZBytes) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (*SSZBytes) FixedLen

func (v *SSZBytes) FixedLen() uint64

func (*SSZBytes) FuzzMaxLen added in v0.1.0

func (v *SSZBytes) FuzzMaxLen() uint64

func (*SSZBytes) FuzzMinLen added in v0.1.0

func (v *SSZBytes) FuzzMinLen() uint64

func (*SSZBytes) HashTreeRoot

func (v *SSZBytes) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte

func (*SSZBytes) IsFixed

func (v *SSZBytes) IsFixed() bool

func (*SSZBytes) MaxLen added in v0.1.0

func (v *SSZBytes) MaxLen() uint64

func (*SSZBytes) MinLen

func (v *SSZBytes) MinLen() uint64

func (*SSZBytes) Pretty added in v0.1.2

func (v *SSZBytes) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBytes) SizeOf added in v0.1.1

func (v *SSZBytes) SizeOf(p unsafe.Pointer) uint64

type SSZBytesN

type SSZBytesN struct {
	// contains filtered or unexported fields
}

func NewSSZBytesN

func NewSSZBytesN(typ reflect.Type) (*SSZBytesN, error)

func (*SSZBytesN) Decode

func (v *SSZBytesN) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (*SSZBytesN) DryCheck added in v0.1.4

func (v *SSZBytesN) DryCheck(dr *DecodingReader) error

func (*SSZBytesN) Encode

func (v *SSZBytesN) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (*SSZBytesN) FixedLen

func (v *SSZBytesN) FixedLen() uint64

func (*SSZBytesN) FuzzMaxLen added in v0.1.0

func (v *SSZBytesN) FuzzMaxLen() uint64

func (*SSZBytesN) FuzzMinLen added in v0.1.0

func (v *SSZBytesN) FuzzMinLen() uint64

func (*SSZBytesN) HashTreeRoot

func (v *SSZBytesN) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte

func (*SSZBytesN) IsFixed

func (v *SSZBytesN) IsFixed() bool

func (*SSZBytesN) MaxLen added in v0.1.0

func (v *SSZBytesN) MaxLen() uint64

func (*SSZBytesN) MinLen

func (v *SSZBytesN) MinLen() uint64

func (*SSZBytesN) Pretty added in v0.1.2

func (v *SSZBytesN) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZBytesN) SizeOf added in v0.1.1

func (v *SSZBytesN) SizeOf(p unsafe.Pointer) uint64

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 SSZFactoryFn

type SSZFactoryFn func(typ reflect.Type) (SSZ, error)

type SSZFuzzInfo added in v0.1.4

type SSZFuzzInfo interface {
	// The minimum length to read the object from fuzzing mode
	FuzzMinLen() uint64
	// The maximum length to read the object from fuzzing mode
	FuzzMaxLen() uint64
}

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) Decode

func (v *SSZList) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (*SSZList) DryCheck added in v0.1.4

func (v *SSZList) DryCheck(dr *DecodingReader) error

func (*SSZList) Encode

func (v *SSZList) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (*SSZList) FixedLen

func (v *SSZList) FixedLen() uint64

func (*SSZList) FuzzMaxLen added in v0.1.0

func (v *SSZList) FuzzMaxLen() uint64

func (*SSZList) FuzzMinLen added in v0.1.0

func (v *SSZList) FuzzMinLen() uint64

func (*SSZList) HashTreeRoot

func (v *SSZList) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte

func (*SSZList) IsFixed

func (v *SSZList) IsFixed() bool

func (*SSZList) MaxLen added in v0.1.0

func (v *SSZList) MaxLen() uint64

func (*SSZList) MinLen

func (v *SSZList) MinLen() uint64

func (*SSZList) Pretty added in v0.1.2

func (v *SSZList) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZList) SizeOf added in v0.1.1

func (v *SSZList) SizeOf(p unsafe.Pointer) uint64

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 NewSSZPtr

func NewSSZPtr(factory SSZFactoryFn, typ reflect.Type) (*SSZPtr, error)

func (*SSZPtr) Decode

func (v *SSZPtr) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (*SSZPtr) DryCheck added in v0.1.4

func (v *SSZPtr) DryCheck(dr *DecodingReader) error

func (*SSZPtr) Encode

func (v *SSZPtr) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (*SSZPtr) FixedLen

func (v *SSZPtr) FixedLen() uint64

func (*SSZPtr) FuzzMaxLen added in v0.1.0

func (v *SSZPtr) FuzzMaxLen() uint64

func (*SSZPtr) FuzzMinLen added in v0.1.0

func (v *SSZPtr) FuzzMinLen() uint64

func (*SSZPtr) HashTreeRoot

func (v *SSZPtr) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte

func (*SSZPtr) IsFixed

func (v *SSZPtr) IsFixed() bool

func (*SSZPtr) MaxLen added in v0.1.0

func (v *SSZPtr) MaxLen() uint64

func (*SSZPtr) MinLen

func (v *SSZPtr) MinLen() uint64

func (*SSZPtr) Pretty added in v0.1.2

func (v *SSZPtr) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZPtr) SizeOf added in v0.1.1

func (v *SSZPtr) SizeOf(p unsafe.Pointer) uint64

type SSZUint8 added in v0.1.5

type SSZUint8 struct{}

func (SSZUint8) Decode added in v0.1.5

func (t SSZUint8) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (SSZUint8) DryCheck added in v0.1.5

func (t SSZUint8) DryCheck(dr *DecodingReader) error

func (SSZUint8) Encode added in v0.1.5

func (t SSZUint8) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (SSZUint8) FixedLen added in v0.1.5

func (t SSZUint8) FixedLen() uint64

func (SSZUint8) FuzzMaxLen added in v0.1.5

func (t SSZUint8) FuzzMaxLen() uint64

func (SSZUint8) FuzzMinLen added in v0.1.5

func (t SSZUint8) FuzzMinLen() uint64

func (SSZUint8) HashTreeRoot added in v0.1.5

func (t SSZUint8) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)

func (SSZUint8) IsFixed added in v0.1.5

func (t SSZUint8) IsFixed() bool

func (SSZUint8) MaxLen added in v0.1.5

func (t SSZUint8) MaxLen() uint64

func (SSZUint8) MinLen added in v0.1.5

func (t SSZUint8) MinLen() uint64

func (SSZUint8) Pretty added in v0.1.5

func (t SSZUint8) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (SSZUint8) SizeOf added in v0.1.5

func (t SSZUint8) SizeOf(p unsafe.Pointer) uint64

type SSZUint16 added in v0.1.5

type SSZUint16 struct{}

func (SSZUint16) Decode added in v0.1.5

func (t SSZUint16) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (SSZUint16) DryCheck added in v0.1.5

func (t SSZUint16) DryCheck(dr *DecodingReader) error

func (SSZUint16) Encode added in v0.1.5

func (t SSZUint16) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (SSZUint16) FixedLen added in v0.1.5

func (t SSZUint16) FixedLen() uint64

func (SSZUint16) FuzzMaxLen added in v0.1.5

func (t SSZUint16) FuzzMaxLen() uint64

func (SSZUint16) FuzzMinLen added in v0.1.5

func (t SSZUint16) FuzzMinLen() uint64

func (SSZUint16) HashTreeRoot added in v0.1.5

func (t SSZUint16) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)

func (SSZUint16) IsFixed added in v0.1.5

func (t SSZUint16) IsFixed() bool

func (SSZUint16) MaxLen added in v0.1.5

func (t SSZUint16) MaxLen() uint64

func (SSZUint16) MinLen added in v0.1.5

func (t SSZUint16) MinLen() uint64

func (SSZUint16) Pretty added in v0.1.5

func (t SSZUint16) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (SSZUint16) SizeOf added in v0.1.5

func (t SSZUint16) SizeOf(p unsafe.Pointer) uint64

type SSZUint32 added in v0.1.5

type SSZUint32 struct{}

func (SSZUint32) Decode added in v0.1.5

func (t SSZUint32) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (SSZUint32) DryCheck added in v0.1.5

func (t SSZUint32) DryCheck(dr *DecodingReader) error

func (SSZUint32) Encode added in v0.1.5

func (t SSZUint32) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (SSZUint32) FixedLen added in v0.1.5

func (t SSZUint32) FixedLen() uint64

func (SSZUint32) FuzzMaxLen added in v0.1.5

func (t SSZUint32) FuzzMaxLen() uint64

func (SSZUint32) FuzzMinLen added in v0.1.5

func (t SSZUint32) FuzzMinLen() uint64

func (SSZUint32) HashTreeRoot added in v0.1.5

func (t SSZUint32) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)

func (SSZUint32) IsFixed added in v0.1.5

func (t SSZUint32) IsFixed() bool

func (SSZUint32) MaxLen added in v0.1.5

func (t SSZUint32) MaxLen() uint64

func (SSZUint32) MinLen added in v0.1.5

func (t SSZUint32) MinLen() uint64

func (SSZUint32) Pretty added in v0.1.5

func (t SSZUint32) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (SSZUint32) SizeOf added in v0.1.5

func (t SSZUint32) SizeOf(p unsafe.Pointer) uint64

type SSZUint64 added in v0.1.5

type SSZUint64 struct{}

func (SSZUint64) Decode added in v0.1.5

func (t SSZUint64) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (SSZUint64) DryCheck added in v0.1.5

func (t SSZUint64) DryCheck(dr *DecodingReader) error

func (SSZUint64) Encode added in v0.1.5

func (t SSZUint64) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (SSZUint64) FixedLen added in v0.1.5

func (t SSZUint64) FixedLen() uint64

func (SSZUint64) FuzzMaxLen added in v0.1.5

func (t SSZUint64) FuzzMaxLen() uint64

func (SSZUint64) FuzzMinLen added in v0.1.5

func (t SSZUint64) FuzzMinLen() uint64

func (SSZUint64) HashTreeRoot added in v0.1.5

func (t SSZUint64) HashTreeRoot(h MerkleFn, p unsafe.Pointer) (out [32]byte)

func (SSZUint64) IsFixed added in v0.1.5

func (t SSZUint64) IsFixed() bool

func (SSZUint64) MaxLen added in v0.1.5

func (t SSZUint64) MaxLen() uint64

func (SSZUint64) MinLen added in v0.1.5

func (t SSZUint64) MinLen() uint64

func (SSZUint64) Pretty added in v0.1.5

func (t SSZUint64) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (SSZUint64) SizeOf added in v0.1.5

func (t SSZUint64) SizeOf(p unsafe.Pointer) uint64

type SSZVector

type SSZVector struct {
	// contains filtered or unexported fields
}

func NewSSZVector

func NewSSZVector(factory SSZFactoryFn, typ reflect.Type) (*SSZVector, error)

func (*SSZVector) Decode

func (v *SSZVector) Decode(dr *DecodingReader, p unsafe.Pointer) error

func (*SSZVector) DryCheck added in v0.1.4

func (v *SSZVector) DryCheck(dr *DecodingReader) error

func (*SSZVector) Encode

func (v *SSZVector) Encode(eb *EncodingWriter, p unsafe.Pointer) error

func (*SSZVector) FixedLen

func (v *SSZVector) FixedLen() uint64

func (*SSZVector) FuzzMaxLen added in v0.1.0

func (v *SSZVector) FuzzMaxLen() uint64

func (*SSZVector) FuzzMinLen added in v0.1.0

func (v *SSZVector) FuzzMinLen() uint64

func (*SSZVector) HashTreeRoot

func (v *SSZVector) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte

func (*SSZVector) IsFixed

func (v *SSZVector) IsFixed() bool

func (*SSZVector) MaxLen added in v0.1.0

func (v *SSZVector) MaxLen() uint64

func (*SSZVector) MinLen

func (v *SSZVector) MinLen() uint64

func (*SSZVector) Pretty added in v0.1.2

func (v *SSZVector) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer)

func (*SSZVector) SizeOf added in v0.1.1

func (v *SSZVector) SizeOf(p unsafe.Pointer) uint64

type SignedSSZ

type SignedSSZ interface {
	SSZ
	SigningRoot(h MerkleFn, p unsafe.Pointer) [32]byte
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL