kzg

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlobCommitmentVersionKZG uint8 = 0x01
	PrecompileInputLength    int   = 192
)

Variables

This section is empty.

Functions

func Ctx

func Ctx() *gokzg4844.Context

Ctx returns a context object that stores all of the necessary configurations to allow one to create and verify blob proofs. This function is expensive to run if the crypto context isn't initialized, so production services should pre-initialize by calling InitKZGCtx.

func InitKZGCtx

func InitKZGCtx()

InitKZGCtx initializes the global context object returned via CryptoCtx

func PointEvaluationPrecompile

func PointEvaluationPrecompile(input []byte) ([]byte, error)

PointEvaluationPrecompile implements point_evaluation_precompile from EIP-4844

func SetTrustedSetupFilePath

func SetTrustedSetupFilePath(path string)

Types

type VersionedHash

type VersionedHash [32]byte

func KZGToVersionedHash

func KZGToVersionedHash(kzg gokzg4844.KZGCommitment) VersionedHash

KZGToVersionedHash implements kzg_to_versioned_hash from EIP-4844

Jump to

Keyboard shortcuts

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