diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2026-03-24 22:36:56 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2026-04-02 03:09:12 -0300 |
| commit | e0160f0f5d06b637acb0a083e76ff5ceeb78f884 (patch) | |
| tree | 5965038f8e8bd412b05eaed0b8b8ad87bd1950bd /A5.md | |
| parent | d419a60ab5d0e24b7b78311385af3b5aa34eca38 (diff) | |
add favorite scrolls list.
Diffstat (limited to 'A5.md')
| -rw-r--r-- | A5.md | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -24,6 +24,10 @@ This NIP defines a standard for publishing self-contained WebAssembly programs a | |||
| 24 | } | 24 | } |
| 25 | ``` | 25 | ``` |
| 26 | 26 | ||
| 27 | ## Favorite scrolls list | ||
| 28 | |||
| 29 | 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`). | ||
| 30 | |||
| 27 | ## String Convention | 31 | ## String Convention |
| 28 | 32 | ||
| 29 | 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. | 33 | 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 | |||
| 36 | 40 | ||
| 37 | 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. | 41 | 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. |
| 38 | 42 | ||
| 43 | Hosts are encouraged to enforce resource limits for scroll execution, including memory consumption, number of open handles, and CPU usage. | ||
| 44 | |||
| 39 | --- | 45 | --- |
| 40 | 46 | ||
| 41 | ## Global Exports | 47 | ## Global Exports |