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
| Path | Contains |
|---|---|
protocols/moot-lib/src/lib.rs | ProtocolModule impl, operation dispatch |
protocols/moot-lib/src/protocol.rs | core protocol logic |
protocols/moot-lib/src/types.rs | request/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
| Relation | Members |
|---|---|
| Consults | — |
| Records to | MAX · MOTET · MOMENT |
| Subject to | MAXIM · MOAT (cross-org) · MOOT (disputes) |
| Settled with | MEAL · MANA · MADE |
Status
Partial · core methods implemented; some features pending.
Tests
cargo test -p moot-lib --all-featuresSee also
ProtocolModuletrait — the contract- Engine pipeline — the 8 stages
- Plugins — author your own