Skip to content

Parking Example

A full MPCP settlement flow for a parking payment scenario.

Scenario

Vehicle parks at a meter or garage gate. The parking system requests payment. The vehicle evaluates fleet policy and session budget, issues an SBA, and presents it to the Trust Gateway. The Trust Gateway verifies the MPCP chain and executes the XRPL payment. The parking system verifies the chain locally and opens the gate.

Artifacts

Artifact Description
policy-grant.json Grant derived from policy constraints
budget-auth.json Unsigned budget authorization
signed-budget-auth.json Signed budget auth (SBA)
settlement.json Settlement result (XRPL via Trust Gateway)
settlement-bundle.json Combined bundle for verification

Run

npm run build
npm run example:parking

Or:

node examples/parking/generate.mjs

The script creates ephemeral signing keys, generates all artifacts, writes them to JSON files, runs mpcp verify settlement-bundle.json --explain, and exits 0 if verification passes.

Verify Only

If you have already generated artifacts:

npx mpcp verify examples/parking/settlement-bundle.json --explain

The bundle is self-contained (includes public keys) and uses fixed timestamps so it remains verifiable indefinitely.

Demos

Machine Wallet Guardrails

Demonstrates autonomous spend guardrails: policy limits, cryptographic signatures, local verification, tamper detection.

npm run example:guardrails

Offline Payment

Demonstrates offline machine payments: vehicle holds pre-authorized policy chain, authorizes payment when network is unavailable, Trust Gateway settles on XRPL when connectivity returns.

npm run example:offline

See Offline Payments.

See Also