← All NIPs

NIP-20

Command Results

MergedBehaviour

Deprecated: now part of NIP-01. Defined the OK message a relay sends back after you publish an event, saying whether it was stored and, if not, why.

At a glance

Status
Folded into another NIP; kept only so old links work.
Last changed
Nov 16, 2023

Merged into NIP-01.

Try it

Edit the form or the JSON: both stay in sync, the badge says whether the result is valid, and tapping any field explains it.

Examples
Valid

Form
OK Relay → client
  1. The id of the event this result is about, copied from the EVENT the client sent.

  2. true if the relay stored the event (or already had it), false if it refused it.

  3. Human-readable text for the user. When the event is refused it should start with a prefix like "invalid:", "pow:", "blocked:", "rate-limited:", "restricted:", "mute:", "error:" or "auth-required:", followed by a space. It may be empty when the event is accepted.

Sent by a relay in answer to every EVENT a client publishes, so the client knows whether the event was accepted.

How this NIP works

Step 1 of 4

This NIP now lives in NIP-01

NIP-20 was folded into NIP-01, so every relay is expected to answer with OK. Read NIP-01 for the current rules; this page keeps the walkthrough for old links.

Who does what

Who does what
ClientRelay
Step 1 of 5

Ready. Press play or step forward to send the first message.

Text version
#FromToMessage
1ClientRelayAlice's client publishes a signed note to the relay.
2RelayRelayThe relay checks the id and signature, then its own rules: size limits, spam filters, membership, proof of work.
3RelayClientStored. The client can mark the note as published on this relay.
4RelayClientRefused, with a prefixed reason. Here the client is sending too fast and should back off and retry later.

In the course

No course chapter covers this NIP yet. The editor above is the quickest way in.

Replaced by

See also

Specification

Specification text is quoted in English from the nostr-protocol/nips repository. Our explanations and the interface are translated. Source on GitHub at commit 0046368

Read the spec10 words, quoted from the repository at commit 0046368.

Moved to NIP-01.