Create Nonce
Creates a Burnable nonce Required: Authorized pubkey must sign the request.
Request
POST /api/nonce
Parameters
Empty
Format
The body should be wrapped in a NOSTR event, included in the content
{
"id": "eventHash",
"pubkey": "AUTHORIZED_PUB_KEY",
"kind": 1112,
"content": {}, // Empty
"tags": [],
"sig": "signature of AUTHORIZED_PUB_KEY"
}
Response
200
Valid Response
{
"success": true,
"nonce": "Nonce"
}
400
Malformed request
{
"success": false,
"reason": "Should send as NOSTR event"
}
403
Forbidden operation
{
"success": false,
"reason": "Pubkey not authorized"
}
405
Method Not Allowed
{
"success": false,
"reason": "Must use POST method"
}