⚙️ CAIRO RUNE DIFFICULTY: Adept Behavioral

The Mediator

Centralized coordination between PROVE and VERIFY enchantments.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Mediator
ARCANUM SCHOOL: Enchantment // Orchestration
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CAIRO PATTERN //
trait IMediator<T> { fn notify(self: @T, event: felt252); }

#[derive(Copy, Drop)]
struct ProverMediator {}
impl MediatorImpl of IMediator<ProverMediator> {
    fn notify(self: @ProverMediator, event: felt252) {
        if event == 'proof_done' {
            // trigger verification
        }
    }
}

A master of ceremonies orchestrating the complex dance between constraint generation and verification without letting them tightly entwine.

Runic Tags: #cairo #design-pattern #mediator