pow

package
v0.0.0-...-55a0270 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateAnswerNonce

func CalculateAnswerNonce(ctx context.Context, challenge Challenge, body []byte, parallelism int) (string, error)

CalculateAnswerNonce returns the hex-encoded value for the `answer-nonce` header

Types

type Challenge

type Challenge struct {
	ChallengeNonceHex      string `json:"challengeNonce"`
	ValidDurationInMinutes int64  `json:"validDurationInMinutes"`
	LargestAllowedHashHex  string `json:"largestAllowedHash"`
}

Challenge is the body as returned from GET /api/v1.0/proof-of-work-challenge

Jump to

Keyboard shortcuts

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