handler

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: GPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidVrfProve = errors.New("invalid vrf prove")
	ErrStorageNonce    = errors.New("storage previous nonce failed")

	NonceStorageKey = []byte("nonceStorageKey")
)

Functions

This section is empty.

Types

type VrfHandler

type VrfHandler struct {
	// contains filtered or unexported fields
}

func GetVrfHandlerInstance

func GetVrfHandlerInstance() *VrfHandler

func NewVrfHandler

func NewVrfHandler(genesisNonce []byte) *VrfHandler

func (*VrfHandler) GenerateNonce

func (vh *VrfHandler) GenerateNonce(currentBlockNumber *big.Int, parentHash common.Hash) ([]byte, error)

func (*VrfHandler) Load

func (vh *VrfHandler) Load(hash common.Hash) ([][]byte, error)

func (*VrfHandler) SetPrivateKey

func (vh *VrfHandler) SetPrivateKey(privateKey *ecdsa.PrivateKey)

func (*VrfHandler) Storage

func (vh *VrfHandler) Storage(blockNumber *big.Int, parentHash common.Hash, blockHash common.Hash, nonce []byte) error

func (*VrfHandler) VerifyVrf

func (vh *VrfHandler) VerifyVrf(pk *ecdsa.PublicKey, currentBlockNumber *big.Int, parentBlockHash common.Hash,
	blockHash common.Hash, proof []byte) error

Jump to

Keyboard shortcuts

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