remote

package
v2.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ApiActionGenerate = "/api/generate_work"
	ApiActionValidate = "/api/validate_work"
	ApiActionCancel   = "/api/cancel_work"
)

Variables

This section is empty.

Functions

func CancelWork

func CancelWork(dataHash []byte) error

func GenerateWork

func GenerateWork(dataHash []byte, difficulty *big.Int) (*string, error)

func InitRawUrl

func InitRawUrl(rawurl string)

func VaildateWork

func VaildateWork(dataHash []byte, threshold *big.Int, work []byte) (bool, error)

func Working

func Working() bool

Types

type ResponseJson

type ResponseJson struct {
	Code  int         `json:"code"`
	Data  interface{} `json:"data"`
	Error string      `json:"error"`
	Msg   string      `json:"msg"`
}

Jump to

Keyboard shortcuts

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