pow

package
v0.0.0-...-d687121 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSolution

func GenerateSolution(privKey ed25519.PrivateKey, p Parameters) (*protocol.ProofOfWork, error)

Types

type Decoded

type Decoded struct {
	PubKey  ed25519.PublicKey
	Subject string
}

func VerifySolution

func VerifySolution(req *protocol.ProofOfWork, p Parameters) (*Decoded, error)

type Parameters

type Parameters struct {
	GetSubject func(pubKey ed25519.PublicKey) string
	Expires    time.Duration
	Difficulty int
}

Jump to

Keyboard shortcuts

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