Update 107.md

This commit is contained in:
Vlad Stan 2023-10-24 15:54:21 +03:00 committed by GitHub
parent 153857fb7a
commit dcfb78932f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
107.md
View File

@ -39,14 +39,14 @@ A `user` can publish these event kinds:
The content of events can be transmitted in clear text (for public data) or as [NIP-59 Gift Wrap](https://github.com/staab/nips/blob/NIP-59/59.md). The content of events can be transmitted in clear text (for public data) or as [NIP-59 Gift Wrap](https://github.com/staab/nips/blob/NIP-59/59.md).
### Intent Events ## Intent Events
Intent Events represent different actions that can be performed on a device. These actions can be triggered by a `user` or by another `device`. The content of the event is a `JSON` which `MUST` have a `type` field indicating the what the JSON represents. Possible types: Intent Events represent different actions that can be performed on a device. These actions can be triggered by a `user` or by another `device`. The content of the event is a `JSON` which `MUST` have a `type` field indicating the what the JSON represents. Possible types:
| Message Type | Sent By | Description | | Message Type | Sent By | Description |
|--------------|----------------|------------------| |--------------|----------------|------------------|
| 0 | User | Configure Device | | 0 | User | Configure Device |
### Event: Configure `device` ### Configure Device
This message is sent by a `user` to a `device`. The `device` saves the config locally and then uses it. This message is sent by a `user` to a `device`. The `device` saves the config locally and then uses it.
**Event Content**: **Event Content**:
@ -62,11 +62,11 @@ This message is sent by a `user` to a `device`. The `device` saves the config lo
} }
``` ```
Note: | Field | Description |
- `admin_pubkeys`: |---|---|
- list of public keys that are allowed to configure this device. A fresh/blank device will not have this value, so the first received `"type: 0"` should set it. | `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. |
- `users`: | `send_to_pubkeys` | |
- a list that can restrict access to public-keys, `device`(s) also has keys and can be a `user`. | `commands_from_pubkeys` | |
### Event: Update a `device` ### Event: Update a `device`