Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions docs/bridge-channel-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ full-event query; they never see a wrong-but-plausible timeline.

## Request

A standard bridge filter plus extension fields:
A standard bridge filter plus extension fields. The HTTP bridge accepts a JSON
**array of filters**, so send the following complete request body to `POST
/query` (not the inner filter object by itself):

```json
{
"kinds": [9],
"#h": ["<channel-uuid>"],
"limit": 50,
"top_level": true,
"include_summaries": true,
"include_aux": true,
"until": 1751500000,
"before_id": "<64-hex event id>"
}
[
{
"kinds": [9],
"#h": ["<channel-uuid>"],
"limit": 50,
"top_level": true,
"include_summaries": true,
"include_aux": true,
"until": 1751500000,
"before_id": "<64-hex event id>"
}
]
```

- `top_level: true` — routes this filter to the top-level SQL view.
Expand Down
24 changes: 13 additions & 11 deletions docs/nips/NIP-CW.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,21 @@ This document uses MUST, MUST NOT, SHOULD, MAY, and RECOMMENDED as defined in RF

## Request

A window request is a standard filter plus extension fields, submitted wherever the relay accepts filters (for Buzz: the NIP-98-authenticated HTTP bridge `POST /query`):
A window request is a standard filter plus extension fields, submitted wherever the relay accepts filters (for Buzz: the NIP-98-authenticated HTTP bridge `POST /query`). The request body is a JSON **array of filters**, as on a NIP-01 filter surface; the window filter below is one element of that array:

```jsonc
{
"kinds": [9], // optional row-kind restriction
"#h": ["<channel-id>"], // REQUIRED: exactly one channel
"limit": 50, // row budget (rows only, never overlays)
"top_level": true, // selects the window path
"include_summaries": true, // optional: kind:39005 overlays
"include_aux": true, // optional: aux closure
"until": 1751500000, // ┐ composite request cursor —
"before_id": "<64-hex id>" // ┘ both or neither
}
[
{
"kinds": [9], // optional row-kind restriction
"#h": ["<channel-id>"], // REQUIRED: exactly one channel
"limit": 50, // row budget (rows only, never overlays)
"top_level": true, // selects the window path
"include_summaries": true, // optional: kind:39005 overlays
"include_aux": true, // optional: aux closure
"until": 1751500000, // ┐ composite request cursor —
"before_id": "<64-hex id>" // ┘ both or neither
}
]
```

- `top_level` — MUST be boolean `true` to select the window path. Any other value (absent, `false`, string, number) means the filter is served as a normal filter.
Expand Down