diff options
| -rw-r--r-- | 26.md | 20 |
1 files changed, 20 insertions, 0 deletions
| @@ -31,6 +31,26 @@ The **delegation token** should be a 64-byte Schnorr signature of the sha256 has | |||
| 31 | nostr:delegation:<pubkey of publisher (delegatee)>:<conditions query string> | 31 | nostr:delegation:<pubkey of publisher (delegatee)>:<conditions query string> |
| 32 | ``` | 32 | ``` |
| 33 | 33 | ||
| 34 | ##### Conditions Query String | ||
| 35 | |||
| 36 | The following fields and operators are supported in the above query string: | ||
| 37 | |||
| 38 | *Fields*: | ||
| 39 | 1. `kind` | ||
| 40 | - *Operators*: | ||
| 41 | - `=${KIND_NUMBER}` - delegator may only sign events of this kind | ||
| 42 | 2. `created_at` | ||
| 43 | - *Operators*: | ||
| 44 | - `<${TIMESTAMP}` - delegator may only sign events created ***before*** the specified timestamp | ||
| 45 | - `>${TIMESTAMP}` - delegator may only sign events created ***after*** the specified timestamp | ||
| 46 | |||
| 47 | 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 `&`. | ||
| 48 | |||
| 49 | For example, the following condition strings are valid: | ||
| 50 | |||
| 51 | - `kind=1&created_at<1675721813` | ||
| 52 | - `kind=0&kind=1&created_at>1675721813` | ||
| 53 | - `kind=1&created_at>1674777689&created_at<1675721813` | ||
| 34 | 54 | ||
| 35 | #### Example | 55 | #### Example |
| 36 | 56 | ||