Documentation ¶
Index ¶
- func BigToLittleEndian(input *big.Int) [32]byte
- func CeilLog2(x int) uint64
- func ComputeMerkleTreeFromLeaves(values []phase0.Root, numLayers uint64) ([][]phase0.Root, error)
- func ConvertTo32ByteArray(b []byte) [32]byte
- func ConvertUint64ToRoot(n uint64) phase0.Root
- func GetDepth(d uint64) uint8
- func GetSlotTimestamp(beaconState *deneb.BeaconState, blockHeader *phase0.BeaconBlockHeader) uint64
- func LogTreeByLevel(tree [][]phase0.Root)
- func NextPowerOfTwo(v uint64) uint
- func ReadFile(fileName string) ([]byte, error)
- func ValidateProof(root phase0.Root, proof [][32]byte, element phase0.Root, index uint64) bool
- type Bytes32
- type Proof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigToLittleEndian ¶
func ConvertTo32ByteArray ¶
func ConvertUint64ToRoot ¶
func GetSlotTimestamp ¶
func GetSlotTimestamp(beaconState *deneb.BeaconState, blockHeader *phase0.BeaconBlockHeader) uint64
func LogTreeByLevel ¶
func NextPowerOfTwo ¶
Types ¶
type Bytes32 ¶
type Bytes32 [32]byte
func ConvertUint64ToBytes32 ¶
func (*Bytes32) MarshalJSON ¶
func (*Bytes32) UnmarshalJSON ¶
type Proof ¶
type Proof [][32]byte
func ComputeMerkleProofFromTree ¶
This proof is from the bottom to the top
func (Proof) MarshalJSON ¶
func (Proof) ToByteSlice ¶
func (*Proof) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.