add favorite scrolls list.

This commit is contained in:
fiatjaf
2026-04-02 03:09:12 -03:00
parent d419a60ab5
commit e0160f0f5d
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ For example, _mute list_ can contain the public keys of spammers and bad actors
| Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) |
| Simple groups | 10009 | [NIP-29](29.md) groups the user is in | `"group"` ([NIP-29](29.md) group id + relay URL + optional group name), `"r"` for each relay in use |
| Relay feeds | 10012 | user favorite browsable relays (and relay sets) | `"relay"` (relay URLs) and `"a"` (kind:30002 relay set) |
| Favorite scrolls | 10013 | user favorite scrolls | `"e"` (kind:1227 scroll events) |
| Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a"` (kind:30015 interest set) |
| Media follows | 10020 | multimedia (photos, short video) follow list | `"p"` (pubkeys -- with optional relay hint and petname) |
| Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) |
+6
View File
@@ -24,6 +24,10 @@ This NIP defines a standard for publishing self-contained WebAssembly programs a
}
```
## Favorite scrolls list
Clients can publish a list of favorite scrolls using a NIP-51 standard list event with kind `10013`. The list should include one `"e"` tag per scroll event (kind `1227`).
## String Convention
Unless noted otherwise (for hex pubkeys and ids), the module passes strings to the host as `(ptr: i32, len: i32)` pairs into its linear memory. The host returns strings (and other variable-length data) by returning an `i32` pointer to a buffer in linear memory whose first 4 bytes are the `u32_be` byte-length of the payload that follows.
@@ -36,6 +40,8 @@ In order to keep the size of WASM programs small (<10kb) we recommend not includ
Because of this the WASM program is expected to expose just a simple `alloc()` function to the host, which is used for the host to know a place it can write things to. No function capable of freeing memory is expected.
Hosts are encouraged to enforce resource limits for scroll execution, including memory consumption, number of open handles, and CPU usage.
---
## Global Exports