Documentation

Updates

Websocket payloads for Mosaic API data.

Mortar broadcasts Mosaic update payloads over WS /ws/events.

Payload Types

Websocket TypePayload Key
bounty.createdbounty
submission.createdsubmission
dispute.createddispute
dispute.resolveddispute
dispute.cancelleddispute
bounty.finalizedbounty
bounty.refundedbounty
submission.refundedsubmission

Websocket Sequence

On connection, mortar sends existing records as event payloads:

  1. Every active-deployment bounty as bounty.created.
  2. Every active-deployment submission as submission.created.
  3. Every active-deployment dispute as dispute.created.

After the initial records, mortar sends live update payloads.

Records are identified by chain_id, contract_address, and numeric id. Consumers must retain all three because different deployment counters can produce the same numeric ID.

Payload Examples

{ "type": "bounty.created", "bounty": { "chain_id": 91342, "contract_address": "0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84", "id": 1, "status": "open" } }
{ "type": "submission.created", "submission": { "chain_id": 91342, "contract_address": "0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84", "id": 3, "bounty_id": 1 } }
{ "type": "dispute.resolved", "dispute": { "chain_id": 91342, "contract_address": "0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84", "id": 2, "status": "upheld" } }

Authority

Websocket payloads are API updates. Contract state is settlement authority.

On this page