NIP-20: add "invalid" message suggestion

This commit is contained in:
William Casarin 2022-11-10 11:57:13 -08:00
parent 15514283f3
commit a0b0a021a8

6
20.md
View File

@ -21,6 +21,8 @@ The `message` SHOULD provide additional information as to why the command succee
The `message` SHOULD start with `blocked:` if the pubkey or network address has been blocked, banned or is not on a whitelist. The `message` SHOULD start with `blocked:` if the pubkey or network address has been blocked, banned or is not on a whitelist.
The `message` SHOULD start with `invalid:` if the event doesn't meet some specific criteria (created_at is too far off, etc)
The `message` SHOULD start with `rate-limited:` if the event was rejected due to rate limiting techniques. The `message` SHOULD start with `rate-limited:` if the event was rejected due to rate limiting techniques.
Ephemeral events are not acknowledged with OK responses, unless there is a failure. Ephemeral events are not acknowledged with OK responses, unless there is a failure.
@ -55,6 +57,10 @@ Event rejected, rate limited
["OK", "b1a649ebe8...", false, "rate-limited: slow down there chief"] ["OK", "b1a649ebe8...", false, "rate-limited: slow down there chief"]
Event rejected, `created_at` too far off
["OK", "b1a649ebe8...", false, "invalid: event creation date is too far off from the current time. Is your system clock in sync?"]
Future Extensions Future Extensions