upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Wynne <zack.wynne33@gmail.com>2023-01-27 03:11:27 -0800
committerGitHub <noreply@github.com>2023-01-27 08:11:27 -0300
commit95fa5a4a5f15b54a0e98edccf480ca5b03896f99 (patch)
treeafcd69374b8ca63a25d41097ff7064b50f5232ac
parent5901fe0b87f8d7ec56bf91a065111f0c3d3b0405 (diff)
NIP-26: adding section documenting valid fields and operators for conditions string (#194)
-rw-r--r--26.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/26.md b/26.md
index fc4d6f8..3eb1856 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
31nostr:delegation:<pubkey of publisher (delegatee)>:<conditions query string> 31nostr:delegation:<pubkey of publisher (delegatee)>:<conditions query string>
32``` 32```
33 33
34##### Conditions Query String
35
36The following fields and operators are supported in the above query string:
37
38*Fields*:
391. `kind`
40 - *Operators*:
41 - `=${KIND_NUMBER}` - delegator may only sign events of this kind
422. `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
47In 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
49For 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