MANDACT

Entwickler

Von null auf die erste Verifikation in unter zehn Minuten.

Drei Calls, kein Konto: Sandbox-Mandat ausstellen, Presentation erzeugen, verifizieren. Jede Antwort trägt einen signierten Beleg und genau einen Primärcode — deterministisch, maschinell auswertbar.

Playground — echte Calls

Der komplette Lebenszyklus in fünf Klicks.

Antworten erscheinen hier — echte Calls gegen /api/v1/*.

Quickstart · cURL

# 1 · Sandbox-Mandat ausstellen (keine Anmeldung)
curl -X POST https://mandact.com/api/v1/sandbox/mandates \
  -H "content-type: application/json" \
  -d '{"scope":["purchase.goods"],"amount_limit_per_action":500}'

# 2 · Presentation erzeugen (Sandbox-Komfort; produktiv macht das die Agent-Wallet)
curl -X POST https://mandact.com/api/v1/sandbox/presentations \
  -H "content-type: application/json" \
  -d '{"mandate_id":"mnd_sbx_…","agent_secret":"…"}'

# 3 · Verifizieren
curl -X POST https://mandact.com/api/v1/verify \
  -H "content-type: application/json" \
  -d '{"presentation":{…},"action":{"type":"purchase.goods","amount":{"value":120,"currency":"CHF"}}}'

Quickstart · TypeScript-SDK

import { Mandact } from "@mandact/sdk";

const mandact = new Mandact(process.env.MANDACT_KEY);

// Sandbox-Roundtrip
const sbx = await mandact.sandboxIssue({ scope: ["purchase.goods"], amountLimitPerAction: 500 });
const { presentation } = await mandact.sandboxPresent(sbx.mandate_id, sbx.agent_secret);

const result = await mandact.verify({
  presentation,
  action: { type: "purchase.goods", amount: { value: 120, currency: "CHF" } },
});

if (result.decision === "allow") {
  // Handlung ausführen, dann Verbrauch buchen:
  await mandact.consume(result.consumption_token!);
}

Ablehnungs- und Eskalationscodes

Stabil, versioniert, ein Primärcode pro Antwort.

GruppeBereichCodes
MD-1xxSignatur / Format101 invalid_signature · 102 malformed_presentation · 104 stale_pop (PoP älter als 60 s)
MD-2xxStatus201 revoked · 202 suspended · 203 expired · 204 consumed · 205 not_yet_valid
MD-3xxScope / Constraints301 action_out_of_scope · 302 amount_exceeds_limit · 303 period_limit_exhausted · 304 counterparty_denied
MD-4xxEskalation401 escalation_required — Step-up an die mandatsgebende Person, Timeout 600 s
MD-5xxVerifier-Policy502 attestation_required

Die Prüf-Reihenfolge ist fix: Signatur → Status (live, no-store) → Zeitfenster → Proof-of-Possession-Frische → Scope → Limits (atomar reserviert) → Gegenpartei → Verifier-Policy. Eskalationen werden nach allen Checks ausgelöst.