diff --git a/README.md b/README.md index d1670ac..6bdba8f 100644 --- a/README.md +++ b/README.md @@ -76,20 +76,24 @@ The TFW message format: ```text { - "key: "some identifier used for addressing", + "key: ...some identifier used for addressing..., "data": { ... JSON object carrying anything, preferably cats ... }, - "trigger": "FSM action" + "trigger": ...FSM action..., + "signature": ...HMAC signature for authenticated messages..., + "seq": ...sequence number... } ``` - The `key` field is used by TFW for addressing and every message must have one (it can be an empty string though) - The `data` object can contain anything you might want to send - The `trigger` key is an optional field that triggers an FSM action with that name from the current state (whatever that might be) +- The `signature` field is present on authenticated messages (such as `fsm_update`s) +- The `seq` key is a counter incremented with each proxied message in the TFW server To mirror messages back to their sources you can use a special messaging format, in which the message to be mirrored is enveloped inside the `data` field of the outer message: