Documentation ¶
Index ¶
- Variables
- func BoolSSZ(b bool) byte
- func CalculateIndiciesLimit(maxCapacity, numItems, size uint64) uint64
- func DecodeDynamicList[T Unmarshaler](bytes []byte, start, end uint32, max uint64, version int) ([]T, error)
- func DecodeHashList(bytes []byte, start, end, max uint32) ([]common.Hash, error)
- func DecodeNumbersList(bytes []byte, start, end uint32, max uint64) ([]uint64, error)
- func DecodeOffset(x []byte) uint32
- func DecodeStaticList[T Unmarshaler](bytes []byte, start, end, bytesPerElement uint32, max uint64, version int) ([]T, error)
- func DecodeString(bytes []byte, start, end, max uint64) ([]byte, error)
- func EncodeDynamicList[T Marshaler](buf []byte, objs []T) (dst []byte, err error)
- func EncodeOffset(buf []byte, offset uint32)
- func MarshalUint64SSZ(buf []byte, x uint64)
- func OffsetSSZ(x uint32) []byte
- func Uint64SSZ(x uint64) []byte
- func UnmarshalUint64SSZ(x []byte) uint64
- type EncodableSSZ
- type HashableSSZ
- type Marshaler
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLowBufferSize = errors.New("ssz(DecodeSSZ): bad encoding size") ErrBadDynamicLength = errors.New("ssz(DecodeSSZ): bad dynamic length") ErrBadOffset = errors.New("ssz(DecodeSSZ): invalid offset") ErrBufferNotRounded = errors.New("ssz(DecodeSSZ): badly rounded operator") ErrTooBigList = errors.New("ssz(DecodeSSZ): list too big") )
View Source
var ( BaseExtraDataSSZOffsetHeader = 536 BaseExtraDataSSZOffsetBlock = 508 )
Functions ¶
func CalculateIndiciesLimit ¶
func DecodeDynamicList ¶
func DecodeHashList ¶
func DecodeNumbersList ¶
func DecodeOffset ¶
ReadOffset unmarshals a little endian uint32 to dst
func DecodeStaticList ¶
func EncodeDynamicList ¶
func EncodeOffset ¶
EncodeOffset marshals a little endian uint32 to buf
func MarshalUint64SSZ ¶
func UnmarshalUint64SSZ ¶
Types ¶
type EncodableSSZ ¶
type EncodableSSZ interface { Marshaler Unmarshaler }
type HashableSSZ ¶
Click to show internal directories.
Click to hide internal directories.