It’s based on a revers SHA512_224 function with a dynamic difficulty.
New generated “POW” are saved in memeory tree using “github.com/google/btree”.
Challenge request contains an ID, a target, the needed difficulty and an expiration time.
As usua the documentation can be find at godoc.org.
Install the package with:
go get gopkg.it/astein58/pow.v1
Generate a challenge request:
challengeRequest, _ := powGetChallenge(2, time.Now()) // build a request with the default expiration time (5 minutes)