mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
NIP-20: add a note about client handling
This commit is contained in:
parent
e7f74d21c4
commit
7569773ad6
13
20.md
13
20.md
|
@ -68,6 +68,19 @@ Event rejected, insufficient proof-of-work difficulty
|
||||||
["OK", "b1a649ebe8...", false, "pow: difficulty 26 is less than 30"]
|
["OK", "b1a649ebe8...", false, "pow: difficulty 26 is less than 30"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Client Handling
|
||||||
|
---------------
|
||||||
|
|
||||||
|
`messages` are meant for humans, with `reason:` prefixes so that clients can be slightly more intelligent with what to do with them. For example, with a `rate-limited:` reason the client may not show anything and simply try again with a longer timeout.
|
||||||
|
|
||||||
|
For the `pow:` prefix it may query relay metadata to get the updated difficulty requirement and try again in the background.
|
||||||
|
|
||||||
|
For the `invalid:` and `blocked`: prefix the client may wish to show these as styled error popups.
|
||||||
|
|
||||||
|
The prefixes include a colon so that the message can be cleanly separated from the prefix by taking everything after `:` and trimming it.
|
||||||
|
|
||||||
|
|
||||||
Future Extensions
|
Future Extensions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user