MAP Docs
MANTLE

Internals

Crate path, key types, adjacent protocols for MANTLE.

MANTLE (Meta-perceptual & Associative Network for Transcendental Lived Experience) lives in protocols/mantle-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "consolidate",
            "anchor",
            "replay",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "consolidate" => self.consolidate(payload, ctx).await,
            "anchor" => self.anchor(payload, ctx).await,
            "replay" => self.replay(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

Implemented · production-grade.

Tests

cargo test -p mantle-lib --all-features

See also

On this page