mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-08-11 08:27:33 +00:00
@@ -125,14 +125,14 @@ When the host calls `run()`, it passes a single pointer to a buffer containing a
|
||||
|
||||
The host must prefix every parameter with a single presence byte: `1` indicates the parameter is provided, and `0` indicates it is omitted. If a required parameter is prefixed with `0`, the program must panic.
|
||||
|
||||
| Type | Encoding | Size (if provided) |
|
||||
| ------------ | --------------------------------------------------------------------- | ------------------ |
|
||||
| `public_key` | 32 bytes | 32 bytes |
|
||||
| `event` | i32 handle | 4 bytes |
|
||||
| `string` | u32_be length followed by UTF-8 bytes | 4 + len bytes |
|
||||
| `number` | i32 | 4 bytes |
|
||||
| `timestamp` | Unix timestamp as u32_be | 4 bytes |
|
||||
| `relay` | Relay URL, same encoding as string | 4 + len bytes |
|
||||
| Type | Encoding | Size (if provided) |
|
||||
| ------------ | -----------------------------------| ------------------ |
|
||||
| `public_key` | 32 bytes | 32 bytes |
|
||||
| `event` | i32 handle | 4 bytes |
|
||||
| `string` | u32 length followed by UTF-8 bytes | 4 + len bytes |
|
||||
| `number` | i32 | 4 bytes |
|
||||
| `timestamp` | Unix timestamp as u32 | 4 bytes |
|
||||
| `relay` | Relay URL, same encoding as string | 4 + len bytes |
|
||||
|
||||
|
||||
For example, in a scroll with these parameters:
|
||||
|
||||
Reference in New Issue
Block a user