Skip to content

Commit 9dedcfe

Browse files
committed
nip13: add prefix filters
1 parent d8e5786 commit 9dedcfe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

13.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,15 @@ Delegated Proof of Work
100100
-----------------------
101101

102102
Since the `NIP-01` note id does not commit to any signature, PoW can be outsourced to PoW providers, perhaps for a fee. This provides a way for clients to get their messages out to PoW-restricted relays without having to do any work themselves, which is useful for energy-constrained devices like mobile phones.
103+
104+
Relay Filter Support
105+
--------------------
106+
107+
The `ids` and `authors` lists **MAY** contain lowercase hexadecimal strings, which may either be an exact 64-character match or a prefix of the event value. A prefix match is when the filter string is an exact string prefix of the event value. The use of prefixes allows for filtering against event ids and pubkeys with `n` bits of difficulty.
108+
109+
```
110+
{
111+
ids: ['000'],
112+
authors: ['000000']
113+
}
114+
```

0 commit comments

Comments
 (0)