SIMULATOR / MTK PROTOCOL / LOCAL MODE

Entitlement logic.
Simulated. Reconciled.

A stored-value entitlement simulator for the MTK/MintPass protocol. Issue entitlements, run evaluations, trigger redemptions, and stress-test your local-mode edge cases before they cost you.

4 Lifecycle states
8 Constraint dimensions
DRY_RUN Zero state mutation
protocol-trace.json
$ EntitleLab.issue(type:"currency", amount:500000, unit:"GBP")
  ent_7f3a2b00 → ACTIVE  |  capacity: 500000  |  ledger_event: 1
$ EntitleLab.consume(ent_id, amount:20000, idempotency_key:"tx_001")
  decision: PASS  |  remaining: 480000  |  receipt: rcpt_abc123
$ EntitleLab.consume(ent_id, amount:490000, idempotency_key:"tx_002")
  decision: BLOCKED  |  reason: INSUFFICIENT_QUANTITY
$ EntitleLab.local(provisional:15000)
  decision: PROVISIONAL  |  cache_age: 47s  |  NOT AUTHORITATIVE
$ EntitleLab.reconcile()
  MTK consensus: 480000  |  local_cached: 465000  |  drift detected → corrected

The four operations that drive every entitlement lifecycle

Every stored-value system — gift card, pass, allowance, voucher — reduces to these four calls. EntitleLab tests them all, including the failure paths.

1
Issue
PASS

Create an entitlement with an initial quantity. Sets capacity, authority, and lifecycle context. Every issuance produces an immutable ledger event.

POST /entitlements/issue
capacity: 500000 (5000 GBP pence)
authority: issuer
unit_type: currency
2
Evaluate
PASS BLOCKED DENIED

Run the constraint evaluation pipeline — lifecycle state, temporal expiry, enforcement overlays, capacity, and acceptance dimensions. Returns a clear outcome with reasoning.

GET /entitlements/{id}/evaluation

dimensions: LC, TMP, ENF, CAP, VER, DEC
3
Redeem
COMMITTED

Commit a consumption event against the ledger. Idempotency-keyed, quantity-specified, receipt-returned. Remaining capacity updates atomically.

POST /entitlements/{id}/consume
idempotency_key: tx_001
amount: 20000
execution_mode: COMMIT
4
Reconcile
DRIFT DETECTED CACHE VALID

Compare local cached state against MTK ledger truth. Detect drift, repair cache, or flag anomalies. The reconciliation protocol is where local mode earns trust.

GET /containers/{id}/ledger
GET /entitlements/{id}/ledger
compare: local_snapshot vs MTK truth

Test degraded operation without creating a second source of truth

Most stored-value systems handle offline mode with a blunt instrument: reject everything. EntitleLab's Local Mode stub lets you simulate API unavailability, use a cached snapshot for provisional decisions, and clearly mark every local action as non-authoritative.

The research question: can an external system safely make provisional decisions against cached MTK state without losing fidelity to protocol truth? EntitleLab builds the prototype to find out.

MTK API
LIVE
cache snapshot
Local Mode Stub
PROVISIONAL
reconcile
MTK Ledger Truth
AUTHORITATIVE
PASS = committed BLOCKED = retry after constraint resolves DENIED = terminal, no appeal PROVISIONAL = local cache, not authoritative

Why EntitleLab exists

01

Protocol complexity is invisible in production

The MTK/MintPass constraint evaluation pipeline has 8 dimensions (LC, TMP, ENF, DEP, CAP, VER, DEC, ACCEPTANCE). Most integrations test the happy path. EntitleLab tests the edges — expiry windows, enforcement overlays, capacity cliffs, dependency chains.

02

Local mode is where stored-value systems fail silently

When the API goes down, most systems just reject transactions. But what if you need to continue serving customers with a cached snapshot? The risk is that cached state diverges from ledger truth and you issue against a number that no longer exists. EntitleLab makes that drift visible and correctable.

03

Entitlements are not gift cards

MTK entitlements are lifecycle-managed protocol objects with immutable ledger events, constraint-driven state transitions, and idempotency semantics. They're closer to financial instruments than loyalty points. EntitleLab treats them that way.

04

The AI-first constraint is real

An autonomous AI agent needs to make entitlement decisions — issue, evaluate, redeem — without a human in the loop. The system must handle: clear PASS/BLOCKED/DENIED outcomes, actionable next steps for customer and operator, and a full audit trail from the ledger. EntitleLab is the environment that proves this works.

The key research question: Can an external AI-led builder safely issue, evaluate, redeem, locally simulate, and explain a stored-value entitlement using MTK without confusing cached state, carrier presentation, or provisional local action for protocol truth?

Test the edge cases before they test you

EntitleLab is the protocol harness for MTK/MintPass integration. Built for AI agents, useful for developers.

MTK Protocol Stored Value Entitlement Ledger Local Mode Protocol Reconciliation DRY_RUN Simulation Idempotency Testing Constraint Evaluation