# Functions
BigIntToLittleEndianBytes takes a big integer and returns its bytes stored as little-endian.
Bytes1 returns integer x to bytes in little-endian format, x.to_bytes(1, 'little').
Bytes2 returns integer x to bytes in little-endian format, x.to_bytes(2, 'little').
Bytes3 returns integer x to bytes in little-endian format, x.to_bytes(3, 'little').
Bytes32 returns integer x to bytes in little-endian format, x.to_bytes(32, 'little').
Bytes4 returns integer x to bytes in little-endian format, x.to_bytes(4, 'little').
Bytes8 returns integer x to bytes in little-endian format, x.to_bytes(8, 'little').
BytesToEpochBigEndian conversion.
BytesToSlotBigEndian conversion.
BytesToUint64BigEndian conversion.
ClearBit clears the index `i` of bitlist `b`.
DecodeHexWithLength takes a string and a length in bytes, and validates whether the string is a hex and has the correct length.
DecodeHexWithMaxLength takes a string and a length in bytes, and validates whether the string is a hex and has the correct length.
EpochToBytesBigEndian conversion.
EpochToBytesLittleEndian conversion.
FromBool is a convenience method for converting a bool to a byte.
FromBytes2 returns an integer which is stored in the little-endian format(2, 'little') from a byte array.
FromBytes4 returns an integer which is stored in the little-endian format(4, 'little') from a byte array.
FromBytes48 is a convenience method for converting a fixed-size byte array to a byte slice.
FromBytes48Array is a convenience method for converting an array of fixed-size byte arrays to an array of byte slices.
FromBytes8 returns an integer which is stored in the little-endian format(8, 'little') from a byte array.
HighestBitIndex returns the index of the highest bit set from bitlist `b`.
HighestBitIndexAt returns the index of the highest bit set from bitlist `b` that is at `index` (inclusive).
IsHex checks whether the byte array is a hex number prefixed with '0x'.
IsRoot checks whether the byte array is a root.
IsValidRoot checks whether the byte array is a valid root.
LittleEndianBytesToBigInt takes bytes of a number stored as little-endian and returns a big integer.
MakeEmptyBitlists returns an empty bitlist with input size `i`.
PadTo pads a byte slice to the given size.
ReverseByteOrder Switch the endianness of a byte slice by reversing its order.
ReverseBytes32Slice will reverse the provided slice's order.
SafeCopy2d32Bytes will copy and return a non-nil 2d byte slice, otherwise it returns nil.
SafeCopy2dBytes will copy and return a non-nil 2d byte slice, otherwise it returns nil.
SafeCopy2dHexUtilBytes will copy and return a non-nil 2d hex util byte slice, otherwise it returns nil.
SafeCopyBytes will copy and return a non-nil byte slice, otherwise it returns nil.
SafeCopyRootAtIndex takes a copy of an 32-byte slice in a slice of byte slices.
SetBit sets the index `i` of bitlist `b` to 1.
SlotToBytesBigEndian conversion.
ToBool is a convenience method for converting a byte to a bool.
ToBytes returns integer x to bytes in little-endian format at the specified length.
ToBytes20 is a convenience method for converting a byte slice to a fix sized 20 byte array.
ToBytes32 is a convenience method for converting a byte slice to a fix sized 32 byte array.
ToBytes4 is a convenience method for converting a byte slice to a fix sized 4 byte array.
ToBytes48 is a convenience method for converting a byte slice to a fix sized 48 byte array.
ToBytes48Array is a convenience method for converting an array of byte slices to an array of fixed-sized byte arrays.
ToBytes64 is a convenience method for converting a byte slice to a fix sized 64 byte array.
ToBytes96 is a convenience method for converting a byte slice to a fix sized 96 byte array.
ToLowInt64 returns the lowest 8 bytes interpreted as little endian.
Trunc truncates the byte slices to 6 bytes.
Uint256ToSSZBytes takes a string representation of uint256 and returns its bytes stored as little-endian.
Uint32ToBytes4 is a convenience method for converting uint32 to a fix sized 4 byte array in big endian order.
Uint64ToBytesBigEndian conversion.
Uint64ToBytesLittleEndian conversion.
Uint64ToBytesLittleEndian32 conversion of a uint64 to a fix sized 32 byte array in little endian order.
UnsafeCastToString casts a byte slice to a string object without performing a copy.
ZeroRoot returns whether or not a root is of proper length and non-zero hash.