mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
Merge branch 'read-permission' of https://github.com/vitorpamplona/nips into read-permission
This commit is contained in:
commit
3c7429b665
6
76.md
6
76.md
|
@ -8,7 +8,7 @@ Relay Read Permissions
|
|||
|
||||
Tag names `rp` (read permission) and `prp` (probabilistic read permission) define which keys are authorized to download an event from the relay.
|
||||
|
||||
Events that include an `rp` or `prp` require AUTH to be downloaded.
|
||||
Events with an `rp` or `prp` require AUTH to be downloaded.
|
||||
|
||||
## Read Permission
|
||||
|
||||
|
@ -31,7 +31,7 @@ Probabilistic permissions use bloom filters that include a set of pubkeys. They
|
|||
["prp", "<BitArray Size>:<Rounds>:<base64>"]
|
||||
```
|
||||
|
||||
Bloom filters MUST use `SHA-256` functions of the key + iterating index as the psedocode below:
|
||||
Bloom filters MUST use `SHA-256` functions of the key + iterating index as the pseudocode below:
|
||||
|
||||
```js
|
||||
class BloomFilter(size: Int, rounds: Int, buffer: ByteArray) {
|
||||
|
@ -74,7 +74,7 @@ Relays MUST check if the authed user is in the filter before returning the event
|
|||
|
||||
### Test cases
|
||||
|
||||
The filter below has 100 bits, with 10 rounds or hashes that should be able to match 10,000,000 keys without a single false positive.
|
||||
The filter below has 100 bits, with 10 rounds of hashes that should be able to match 10,000,000 keys without a single false positive.
|
||||
|
||||
```json
|
||||
["prp", "100:10:QGKCgBEBAAhIAApO"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user