MAP Docs
MOOT

Internals

Crate path, key types, adjacent protocols for MOOT.

MOOT (Dispute Resolution & Arbitration) lives in protocols/moot-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

PathContains
protocols/moot-lib/src/lib.rsProtocolModule impl, operation dispatch
protocols/moot-lib/src/protocol.rscore protocol logic
protocols/moot-lib/src/types.rsrequest/response types (derive schemars::JsonSchema)
protocols/moot-lib/tests/unit + integration tests
schemas/moot/v1/published JSON Schemas

ProtocolModule contract

impl ProtocolModule for MootProtocol {
    fn protocol_name(&self) -> &'static str { "MOOT" }
    fn version(&self) -> &'static str { "v1.0.0" }

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "file",
            "plead",
            "rule",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "file" => self.file(payload, ctx).await,
            "plead" => self.plead(payload, ctx).await,
            "rule" => self.rule(payload, ctx).await,
            _ => Err(ProtocolError::UnknownOperation(op.into())),
        }
    }
}

Adjacent

RelationMembers
Consults
Records toMAX · MOTET · MOMENT
Subject toMAXIM · MOAT (cross-org) · MOOT (disputes)
Settled withMEAL · MANA · MADE

Status

Partial · core methods implemented; some features pending.

Tests

cargo test -p moot-lib --all-features

See also

On this page