Skip to content

Proof of Work Verification ​

The /pow endpoint verifies a solved proof-of-work challenge: send back the token issued with the challenge, along with the nonce you found.

Parameters ​

The request body must be JSON:

ParameterRequiredDescription
tokenYesToken issued by the challenge
nonceYesNonce found by the client

Response Fields ​

FieldTypeDescription
validbooleantrue if the proof is accepted
reasonstringWhy it was rejected — absent when valid is true

Rejection Reasons ​

ReasonMeaning
wrongThe nonce does not produce a digest with enough leading zeros
expiredThe token is older than 5 minutes
usedThe token was already redeemed — each one works exactly once
invalidThe token is malformed or not a proof-of-work token

Code Examples ​

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "token": "eyJ...",
    "nonce": "48123"
  }' \
  "https://api.sylvain.sh/v6/pow"

Try It ​

Error Handling ​

If parameters are missing or invalid, the API will return an error:

Error MessageDescription
Please provide a token (?token={token})The token is missing
Please provide a nonce (&nonce={nonce})The nonce is missing
  • GET /v6/pow - Request a challenge to solve