Skip to content

docs: Document the event schema for all contract events with field descriptions #655

Description

@FaveTeamz

Summary

The contract emits structured events for all state transitions (apply, withdraw, assign, complete, revoke, initialize). The event schema is not documented anywhere outside the source code, making it hard for integrators to build event-driven applications on top of the contract.

Problem

An integrator building a notification service on top of Soroban event streams must reverse-engineer the schema from src/lib.rs. There is no canonical reference for field names, types, and which events carry which fields.

Acceptance Criteria

  • Create docs/event-schema.md with a table per event type:
    • Event name, emitted by function, fields (name + type + description), example XDR value
  • Cover all 7 event types: Initialize, Apply, Withdraw, Assign, Complete, Revoke, Upgrade
  • Include a code sample showing how to subscribe to events via Horizon SDK
  • Add a JSON Schema file at docs/schemas/contract-events.json for automated validation
  • Link from docs/api-reference.md and the README

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions