kzg

package
v0.1.1-experimental.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 6 Imported by: 0

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

func (b Blob) MarshalText() ([]byte, error)

MarshalText returns the hex representation of b.

func (*Blob) UnmarshalJSON

func (b *Blob) UnmarshalJSON(input []byte) error

UnmarshalJSON parses a blob in hex syntax.

type Claim

type Claim [32]byte

Claim is a claimed evaluation value in a specific point.

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.

type Point

type Point [32]byte

Point is a BLS field element.

type Proof

type Proof [48]byte

Proof is a KZG proof.

Jump to

Keyboard shortcuts

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