verifying

package
v0.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyVRFNonce added in v0.2.4

func VerifyVRFNonce(nonce *uint64, m *shared.VRFNonceMetadata, opts ...OptionFunc) error

VerifyVRFNonce ensures the validity of a nonce for a given node. AtxId is the id of the ATX that was selected by the node for its commitment.

Types

type OptionFunc added in v0.4.0

type OptionFunc func(*option) error

func WithLabelScryptParams added in v0.5.1

func WithLabelScryptParams(params config.ScryptParams) OptionFunc

func WithPowScryptParams added in v0.5.1

func WithPowScryptParams(params config.ScryptParams) OptionFunc

type ProofVerifier added in v0.7.0

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

func NewProofVerifier added in v0.7.0

func NewProofVerifier(powFlags *config.PowFlags) (*ProofVerifier, error)

NewProofVerifier creates a new proof verifier. If powFlags is nil, the recommended PoW flags will be used. The verifier must be closed after use with Close().

func (*ProofVerifier) Close

func (v *ProofVerifier) Close() error

func (*ProofVerifier) Verify added in v0.7.0

func (v *ProofVerifier) Verify(p *shared.Proof, m *shared.ProofMetadata, cfg config.Config, logger *zap.Logger, opts ...OptionFunc) error

Verify ensures the validity of a proof in respect to its metadata. It returns nil if the proof is valid or an error describing the failure, otherwise.

Jump to

Keyboard shortcuts

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