MAP Docs
MAUSOLEUM

Internals

Crate path, key types, adjacent protocols for MAUSOLEUM.

MAUSOLEUM (Universal Stasis, Evocation, Liquidation, Encryption, Universal Moratorium) lives in protocols/mausoleum-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "initiate",
            "distribute",
            "seal",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "initiate" => self.initiate(payload, ctx).await,
            "distribute" => self.distribute(payload, ctx).await,
            "seal" => self.seal(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 mausoleum-lib --all-features

See also

On this page