diff options
| author | William Casarin <jb55@jb55.com> | 2022-11-10 11:57:13 -0800 |
|---|---|---|
| committer | William Casarin <jb55@jb55.com> | 2022-11-10 11:57:52 -0800 |
| commit | a0b0a021a86b3433f8ce331e85091b6d8c90b4ef (patch) | |
| tree | 5018f639c1d0a2f32f113083369d44a24eccdf87 | |
| parent | 15514283f3a5c51e21e596ff413da2ccc4a70b6e (diff) | |
NIP-20: add "invalid" message suggestion
| -rw-r--r-- | 20.md | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -21,6 +21,8 @@ The `message` SHOULD provide additional information as to why the command succee | |||
| 21 | 21 | ||
| 22 | The `message` SHOULD start with `blocked:` if the pubkey or network address has been blocked, banned or is not on a whitelist. | 22 | The `message` SHOULD start with `blocked:` if the pubkey or network address has been blocked, banned or is not on a whitelist. |
| 23 | 23 | ||
| 24 | The `message` SHOULD start with `invalid:` if the event doesn't meet some specific criteria (created_at is too far off, etc) | ||
| 25 | |||
| 24 | The `message` SHOULD start with `rate-limited:` if the event was rejected due to rate limiting techniques. | 26 | The `message` SHOULD start with `rate-limited:` if the event was rejected due to rate limiting techniques. |
| 25 | 27 | ||
| 26 | Ephemeral events are not acknowledged with OK responses, unless there is a failure. | 28 | Ephemeral events are not acknowledged with OK responses, unless there is a failure. |
| @@ -55,6 +57,10 @@ Event rejected, rate limited | |||
| 55 | 57 | ||
| 56 | ["OK", "b1a649ebe8...", false, "rate-limited: slow down there chief"] | 58 | ["OK", "b1a649ebe8...", false, "rate-limited: slow down there chief"] |
| 57 | 59 | ||
| 60 | Event rejected, `created_at` too far off | ||
| 61 | |||
| 62 | ["OK", "b1a649ebe8...", false, "invalid: event creation date is too far off from the current time. Is your system clock in sync?"] | ||
| 63 | |||
| 58 | 64 | ||
| 59 | 65 | ||
| 60 | Future Extensions | 66 | Future Extensions |