Package-level declarations

Types

Link copied to clipboard

A challenge generator used to construct a challenge out of the provided metadata.

Link copied to clipboard

A common binding interface for metadata necessary to pass into the challenge constructors.

Link copied to clipboard

A challenge metadata provider is used to generate a metadata necessary to construct a challenge.

Link copied to clipboard

A common binding interface for challenge types. Currently, the client only supports SHA-256 as a challenge, but it is set up to support other types with ease.

Link copied to clipboard
interface ChallengeVerifier<in T : ChallengeType<*>>

A challenge verifier is used to check the work that the client did. The general idea here is that the client has to perform the work N times, where N is pseudo-random, while the server only has to do that same work one time - to verify the result that the client sent. The complexity of the work to perform is configurable by the server.

Link copied to clipboard
interface ChallengeWorker

A worker is used to perform the verifications of the data sent by the client for our proof of work requests. While the work itself is relatively cheap, servers may wish to perform the work on other threads - this interface allows doing that.

Link copied to clipboard

The default challenge worker will perform the work on the calling thread. The SHA-256 challenges are fairly inexpensive and the overhead of switching threads is similar to the work itself done.