Skip to content

feat(PR8D): Offline Payment Authorization#18

Merged
naory merged 2 commits intomainfrom
feat/pr8d-offline-payments
Mar 10, 2026
Merged

feat(PR8D): Offline Payment Authorization#18
naory merged 2 commits intomainfrom
feat/pr8d-offline-payments

Conversation

@naory
Copy link
Copy Markdown
Collaborator

@naory naory commented Mar 10, 2026

Summary

Implements PR8D from the MPCP Implementation Roadmap: Offline Payment Authorization.

What's included

  • doc/architecture/OFFLINE_PAYMENTS.md — Documentation describing offline MPCP payment flows

    • Pre-authorized policy chain (PolicyGrant + SBA)
    • Offline flow: local eval, local SPA signing, local verification
    • Reconciliation when connectivity returns
  • demo-offline.mjs — Extension of parking demo simulating offline mode

    • Vehicle loads policy chain before trip
    • Enters garage (no network)
    • Parking meter requests payment
    • Vehicle evaluates locally, signs SPA locally
    • Parking verifies chain locally → gate opens
    • Produces offline-demo-bundle.json
  • example:offline npm script

  • README section for PR8D

Run

npm run build
npm run example:offline

Key behaviors

  • Local authorization using BudgetAuthorization
  • Deterministic verification of MPCP artifacts
  • Successful payment during network outage
  • Reconciliation when connectivity returns

Made with Cursor

NAOR YUVAL added 2 commits March 10, 2026 22:03
- Add doc/architecture/OFFLINE_PAYMENTS.md: offline flow documentation
- Add demo-offline.mjs: simulates payment when network unavailable
  - Pre-trip: vehicle loads PolicyGrant + SBA
  - Garage: no network, local eval, local SPA signing
  - Parking verifies chain locally, gate opens
  - Note on reconciliation when connectivity returns
- Add example:offline npm script
- Update parking-session README with PR8D section
- Ignore offline-demo-bundle.json

Made-with: Cursor
- Doc: PolicyGrant → SignedBudgetAuthorization → SignedPaymentAuthorization → SettlementIntent
- Demo: policyHash as 64-hex (SHA256-style) instead of short string

Made-with: Cursor
@naory naory merged commit 2763a3e into main Mar 10, 2026
@naory naory deleted the feat/pr8d-offline-payments branch March 10, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant