From d70959aee6f8e6e2f2bff02898c0281a64c53a8d Mon Sep 17 00:00:00 2001 From: Marco Argentieri <3596602+tiero@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:22:46 +0100 Subject: [PATCH 1/4] Amend nip46 describe and delegate methods (#304) --- 46.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/46.md b/46.md index a9f37c1b..6589fc00 100644 --- a/46.md +++ b/46.md @@ -61,7 +61,7 @@ These are mandatory methods the remote signer app MUST implement: - **describe** - params [] - - result `{"get_public_key": { params: [], result: anything }}` + - result `["describe", "get_public_key", "sign_event", "connect", "disconnect", "delegate", ...]` - **get_public_key** - params [] - result `pubkey` @@ -77,8 +77,8 @@ These are mandatory methods the remote signer app MUST implement: - **disconnect** - params [] - **delegate** - - params [`pubkey`, `conditions query string`] - - result `nip26 delegation token` + - params [`delegatee`, `{ kind: number, since: number, until: number }`] + - result `{ from: string, to: string, cond: string, sig: string }` - **get_relays** - params [] - result `{ [url: string]: {read: boolean, write: boolean} }` From b549a9809f94ca703b3b63b73cdacc5407a2edd0 Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Mon, 27 Feb 2023 23:51:22 +0330 Subject: [PATCH 2/4] Update README.md fixed a tiny tipo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77f97c00..8ee8b858 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | EVENT | used to send events requested to clients | [1](01.md) | | NOTICE | used to send human-readable messages to clients | [1](01.md) | | EOSE | used to notify clients all stored events have been sent | [15](15.md) | -| OK | used to notify clients if an EVENT was successuful | [20](20.md) | +| OK | used to notify clients if an EVENT was successful | [20](20.md) | | AUTH | used to send authentication challenges | [42](42.md) | Please update these lists when proposing NIPs introducing new event kinds. From c4949ea7078ec96a373f77f725267b36316ee9e4 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 23 Feb 2023 18:25:55 -0300 Subject: [PATCH 3/4] NIP-78: app-specific data. --- 78.md | 21 +++++++++++++++++++++ README.md | 6 ++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 78.md diff --git a/78.md b/78.md new file mode 100644 index 00000000..175f66b1 --- /dev/null +++ b/78.md @@ -0,0 +1,21 @@ +NIP-78 +====== + +Arbitrary custom app data +------------------------- + +`draft` `optional` `author:sandwich` `author:fiatjaf` + +The goal of this NIP is to enable [remoteStorage](https://remotestorage.io/)-like capabilities for custom applications that do not care about interoperability. + +Even though interoperability is great, some apps do not want or do not need interoperability, and it that wouldn't make sense for them. Yet Nostr can still serve as a generalized data storage for these apps in a "bring your own database" way, for example: a user would open an app and somehow input their preferred relay for storage, which would then enable these apps to store application-specific data there. + +## Nostr event + +This NIP specifies the use of event kind `30078` (parameterized replaceable event) with a `d` tag containing some reference to the app name and context -- or any other arbitrary string. `content` and other `tags` can be anything or in any format. + +## Some use cases + + - User personal settings on Nostr clients (and other apps unrelated to Nostr) + - A way for client developers to propagate dynamic parameters to users without these having to update + - Personal private data generated by apps that have nothing to do with Nostr, but allow users to use Nostr relays as their personal database diff --git a/README.md b/README.md index 8ee8b858..91ad0e82 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh - [NIP-57: Lightning Zaps](57.md) - [NIP-58: Badges](58.md) - [NIP-65: Relay List Metadata](65.md) +- [NIP-78: Application-specific data](78.md) ## Event Kinds | kind | description | NIP | @@ -60,13 +61,14 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | 10002 | Relay List Metadata | [65](65.md) | | 22242 | Client Authentication | [42](42.md) | | 24133 | Nostr Connect | [46](46.md) | +| 30008 | Profile Badges | [58](58.md) | +| 30009 | Badge Definition | [58](58.md) | | 30023 | Long-form Content | [23](23.md) | +| 30078 | Application-specific Data | [78](78.md) | | 1000-9999 | Regular Events | [16](16.md) | | 10000-19999 | Replaceable Events | [16](16.md) | | 20000-29999 | Ephemeral Events | [16](16.md) | | 30000-39999 | Parameterized Replaceable Events | [33](33.md) | -| 30008 | Profile Badges | [58](58.md) | -| 30009 | Badge Definition | [58](58.md) | ## Message types From ab6308c29aa8cc10c06addc9fd26c90f8dac9c6a Mon Sep 17 00:00:00 2001 From: ennmichael Date: Thu, 2 Mar 2023 21:27:50 +0100 Subject: [PATCH 4/4] NIP-20: fix a typo --- 20.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/20.md b/20.md index 49e2396a..7e97dd91 100644 --- a/20.md +++ b/20.md @@ -82,7 +82,7 @@ Client Handling 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. +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.