Update 107.md

This commit is contained in:
Vlad Stan 2023-10-25 12:29:17 +03:00 committed by GitHub
parent a53e419f86
commit 570387ea2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
107.md
View File

@ -48,7 +48,6 @@ This message is sent by an admin `user` to a `device`. The `device` saves the co
**Event Content**: **Event Content**:
```json ```json
{ {
"type": 0,
"name": <String (optional), set a name for the device>, "name": <String (optional), set a name for the device>,
"description": <String (optional), device description>, "description": <String (optional), device description>,
"categories":[ <String (optional), device category, such as 'boiler'>], "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 | | 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. | | `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. | | `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 ```json
"tags": [["p", <String, pubkey of the listening device(s)]] "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`.