Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Checkmate-Escrow is a trustless chess wagering platform built on Stellar Soroban
┌─────────────┐ create/deposit/cancel ┌──────────────────┐
│ Players │ ─────────────────────────────▶│ Escrow Contract │
└─────────────┘ └────────┬─────────┘
│ submit_result / execute_payout
│ submit_result
┌─────────────┐ verify game result │
│ Oracle │ ─────────────────────────────▶─────────┘
└─────────────┘
Expand Down Expand Up @@ -99,7 +99,7 @@ Returned by `get_match(match_id)`. All fields below are stable and safe to read.

| Function | Signature | Description |
|----------|-----------|-------------|
| `create_match` | `(stake_amount: i128, token: Address, game_id: String, platform: Platform) -> u64` | Creates a new match and returns its ID. |
| `create_match` | `(player1: Address, player2: Address, stake_amount: i128, token: Address, game_id: String, platform: Platform) -> u64` | Creates a new match and returns its ID. |
| `get_match` | `(match_id: u64) -> Match` | Returns the current state of a match. |
| `cancel_match` | `(match_id: u64)` | Cancels a match and refunds any deposits. |

Expand All @@ -115,6 +115,4 @@ Returned by `get_match(match_id)`. All fields below are stable and safe to read.

| Function | Signature | Description |
|----------|-----------|-------------|
| `submit_result` | `(match_id: u64, winner: Winner)` | Oracle submits the verified match result. |
| `verify_result` | `(match_id: u64) -> bool` | Returns `true` if a result has been submitted. |
| `execute_payout` | `(match_id: u64)` | Transfers escrowed funds to the winner (or refunds on draw). |
| `submit_result` | `(match_id: u64, winner: Winner)` | Oracle submits the verified match result and executes payout atomically. |
Loading