From a0b0a021a86b3433f8ce331e85091b6d8c90b4ef Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 10 Nov 2022 11:57:13 -0800 Subject: [PATCH] NIP-20: add "invalid" message suggestion --- 20.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/20.md b/20.md index 1f06fa9..447b10a 100644 --- a/20.md +++ b/20.md @@ -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 `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. 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"] +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