Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob [131072]byte
Blob represents an EIP-4844 data blob.
func (Blob) MarshalText ¶
MarshalText returns the hex representation of b.
func (*Blob) UnmarshalJSON ¶
UnmarshalJSON parses a blob in hex syntax.
type Commitment ¶
type Commitment [48]byte
Commitment is a KZG commitment.
func (Commitment) HashTreeRoot ¶
func (c Commitment) HashTreeRoot() ([32]byte, error)
HashTreeRoot returns the hash tree root of the commitment.
func (Commitment) MarshalText ¶
func (c Commitment) MarshalText() ([]byte, error)
MarshalText returns the hex representation of c.
func (Commitment) ToHashChunks ¶
func (c Commitment) ToHashChunks() [][32]byte
ToHashChunks converts this KZG commitment into a set of hash chunks.
func (Commitment) ToVersionedHash ¶
func (c Commitment) ToVersionedHash() primitives.ExecutionHash
ToVersionedHash converts this KZG commitment into a versioned hash as per the Ethereum 2.0 specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/beacon-chain.md#kzg_commitment_to_versioned_hash
func (*Commitment) UnmarshalJSON ¶
func (c *Commitment) UnmarshalJSON(input []byte) error
UnmarshalJSON parses a commitment in hex syntax.
type Commitments ¶
type Commitments []Commitment
Commitments represents a slice of KZG commitments.
func CommitmentsFromBz ¶
func CommitmentsFromBz[T ~[]byte](slices []T) Commitments
CommitmentsFromBz converts byte slices to commitments.
func (Commitments) ToVersionedHashes ¶
func (c Commitments) ToVersionedHashes() []primitives.ExecutionHash
ToVersionedHashes converts the commitments to a set of versioned hashes. It is simplify a convenience method for converting a slice of commitments to a slice of versioned hashes.