From 7ae58de5277071de8fde07356520df7aa04d50c0 Mon Sep 17 00:00:00 2001 From: Zack Wynne Date: Thu, 26 Jan 2023 17:14:03 -0700 Subject: [PATCH] adding section for NIP-26 conditions string --- 26.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/26.md b/26.md index fc4d6f89..67dcb7f5 100644 --- a/26.md +++ b/26.md @@ -31,6 +31,26 @@ The **delegation token** should be a 64-byte Schnorr signature of the sha256 has nostr:delegation:: ``` +##### Supported Conditions + +The following fields and operators are supported in the above query string: + +**Fields**: +1. `kind` + - **Operators**: + - `=${KIND_NUMBER}` - delegator may only sign events of this kind +2. `created_at` + - **Operators**: + - `<${TIMESTAMP}` - delegator may only sign events created ***before*** the specified timestamp + - `>${TIMESTAMP}` - delegator may only sign events created ***after*** the specified timestamp + +In order to create a single condition, you must use a supported field and operator. Multiple conditions can be used in a single query string, including on the same field. Conditions must be combined with `&`. + +For example, the following condition strings are valid: + +- `kind=1&created_at<1675721813` +- `kind=0&kind=1&created_at>1675721813` +- `kind=1&created_at>1675721813&created_at<1674777689` #### Example