Skip to content
moxon home

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.

posthttps://api.moxon.dev/v5/pow
Try itpost/v5/pow

Parameters

The request body must be JSON:

  • tokenstringrequired

    Token issued by the challenge

  • noncenumberrequired

    Nonce found by the client

Response Fields

  • validboolean

    true if the proof is accepted

  • reasonstring

    Why 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

Error Handling

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

  • 400Please provide a token (?token={token})The token is missing
  • 400Please provide a nonce (&nonce={nonce})The nonce is missing
  • get/v5/pow - Request a challenge to solve