feat(NIP-20): send command results to clients

When submitting events to relays, clients currently have no way to know
if an event was successfully committed to the database. This NIP
introduces the concept of command results which are like NOTICE's except
provide more information about if an event was accepted or rejected.

A command result is a JSON object with the following structure that is
returned when an event is successfully saved to the database or
rejected:

	["OK", <event_id>, <true|false>, <message>]

nip20: https://github.com/nostr-protocol/nips/pull/62
This commit is contained in:
William Casarin
2022-11-12 09:12:35 -06:00
committed by Greg Heartsfield
parent 7adc5c9af7
commit 5a91419d34
4 changed files with 125 additions and 26 deletions
+1
View File
@@ -8,6 +8,7 @@ pub mod event;
pub mod hexrange;
pub mod info;
pub mod nip05;
pub mod notice;
pub mod schema;
pub mod subscription;
pub mod utils;