Skip to content

Get the puzzle a browser solves before a build

GET
/api/demo/proof
curl --request GET \
--url https://forge.example.com/api/demo/proof \
--header 'Authorization: Bearer <token>'

Answers a challenge and how many leading zero bits are asked. Find a whole number such that the SHA-256 of the challenge, a dot and the number begins with that many zero bits, and send <challenge>.<number> in the header X-Demo-Proof with a draft’s first message. A challenge lasts five minutes and is taken once.

OK

Media typeapplication/json
object
challenge
required
string
bits
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
expiresIn
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example generated

{
"challenge": "example",
"bits": 1,
"expiresIn": 1
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}