mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
Update 107.md
This commit is contained in:
parent
a53e419f86
commit
570387ea2a
8
107.md
8
107.md
|
@ -48,7 +48,6 @@ This message is sent by an admin `user` to a `device`. The `device` saves the co
|
|||
**Event Content**:
|
||||
```json
|
||||
{
|
||||
"type": 0,
|
||||
"name": <String (optional), set a name for the device>,
|
||||
"description": <String (optional), device description>,
|
||||
"categories":[ <String (optional), device category, such as 'boiler'>],
|
||||
|
@ -63,7 +62,7 @@ This message is sent by an admin `user` to a `device`. The `device` saves the co
|
|||
|
||||
| Field | Description |
|
||||
|---|---|
|
||||
| `admin_pubkeys` | List of public keys that are allowed to configure this device.<br>A fresh/blank device will not have this value, so the first received `"type: 0"` should set it.<br/> The `admin_pubkeys` implicitly have the `actions_from_pubkeys` permissions. |
|
||||
| `admin_pubkeys` | List of public keys that are allowed to configure this device.<br>A fresh/blank device will not have this value.<br/> The `admin_pubkeys` implicitly have the `actions_from_pubkeys` permissions. |
|
||||
| `publish_to_pubkeys` | List of public keys to which events are published. |
|
||||
| `actions_from_pubkeys` | List of public keys that are allowed to trigger an action on this device.<br/> The `admin_pubkeys` implicitly have the `actions_from_pubkeys` permissions. |
|
||||
|
||||
|
@ -107,4 +106,7 @@ Data Events represent data publised by `device`(s). The `kind` of the event and
|
|||
```json
|
||||
"tags": [["p", <String, pubkey of the listening device(s)]]
|
||||
```
|
||||
- the `p` tag is required, its value MUST be the same as the `publish_to_pubkeys` value from the [Configure Device Event](https://github.com/arcbtc/nips/edit/nip_107/107.md#configure-device-event-kind-30107)
|
||||
- the `p` tag is optional. If set then its value MUST be the same as the `publish_to_pubkeys` value from the [Configure Device Event](https://github.com/arcbtc/nips/edit/nip_107/107.md#configure-device-event-kind-30107)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If the transmission mode is encrypted ([NIP-59 Gift Wrap](https://github.com/staab/nips/blob/NIP-59/59.md)) then an individual message must be published for each public key in `publish_to_pubkeys`.
|
||||
|
|
Loading…
Reference in New Issue
Block a user