lib

package module
v0.0.0-...-50d0ec1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 6 Imported by: 0

README

Queue-it Proof-of-Work

Go Reference Go Report Card

A Golang solution for Queue-it's Proof-of-Work challenge (https://queue-it.com/blog/proof-of-work-block-bad-bots/).

Usage

Install:

go get github.com/etaaa/Queue-it-Proof-of-Work

Usage:

package main

import (
	"fmt"
	pow "github.com/etaaa/Queue-it-Proof-of-Work"
)

func main() {
	/* Get these values from the response when fetching
	the challenge at .../challengeapi/pow/challenge/... */
	input := "f02b931c-52f0-4507-9406-f1221678dc16"
	zeroCount := 2
	// Proof of Work challenge solution
	solution := pow.SolveChallenge(input, zeroCount)
	fmt.Println(solution)
}

Questions

For any questions feel free to add and DM me on Discord (eta#1656).

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SolveChallenge

func SolveChallenge(input string, zeroCount int) string

Returns the Proof of Work challenge solution

Types

This section is empty.

Jump to

Keyboard shortcuts

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