Overview
In order to have a shared order's book, Mostro daemon send Addressable Events with 38383
as event kind
, you can find more details about that specific event here
Communication between users and Mostro
All messages from/to Mostro should be Gift wrap Nostr events, the content
of the rumor
event should be a nip44 encrypted JSON-serialized string (with no white space or line breaks) of the following structure:
- Wrapper: Wrapper of the message
version
: Version of the protocol, currently1
id
: (optional) Wrapper Idrequest_id
: (optional) Mostro daemon should send back this same id in the responsetrade_index
: (optional) This field is used by users who wants to maintain reputation, it should be the index of the trade in the user's trade history- action: Action to be performed by Mostro daemon
- payload (optional): Payload of the message, this field is optional and depends on the action
These fields are relative to the wrapper, here an example of a take-buy
order message:
{
"order": {
"version": 1,
"id": "<Order Id>",
"request_id": "123456",
"trade_index": 1,
"action": "take-buy",
"payload": null
}
}