Expand description
Protocol message envelope exchanged between clients and a Mostro node.
The top-level type is Message, a tagged union that carries a
MessageKind together with a discriminator (order, dispute, DM, rate,
can’t-do, restore). MessageKind holds the shared fields present on
every request/response: protocol version, optional identifier, trade
index, Action and Payload.
In transit, messages are serialized to JSON, optionally signed with the
sender’s trade keys using Message::sign, and wrapped in a NIP-59
envelope by crate::nip59::wrap_message.
Structs§
- Message
Kind - Body shared by every
Messagevariant. - Payment
Failed Info - Retry configuration for a failed Lightning payment.
- Peer
- Identity of a counterpart in a trade.
- Restore
Session Info - Bundle of orders and disputes returned on a session restore.
- Restored
Dispute Helper - Row-mapper used by
mostrodwhen fetching disputes for session restore. - Restored
Disputes Info - Minimal per-dispute information returned to a client on session restore.
- Restored
Order Helper - Row-mapper used by
mostrodwhen fetching metadata for session restore. - Restored
Orders Info - Minimal per-order information returned to a client on session restore.
Enums§
- Action
- Discriminator describing the verb of a Mostro message.
- Dispute
Initiator - Identifies which party of an order opened a dispute.
- Message
- Top-level Mostro message exchanged between users and Mostro.
- Payload
- Typed payload attached to a
MessageKind.