Co-authored-by: Awiteb <a@4rs.nl>
This commit is contained in:
fiatjaf_
2026-04-05 12:08:51 -03:00
committed by GitHub
co-authored by Awiteb
parent 93dcd8033f
commit 48443c5b3a
+8 -8
View File
@@ -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: