You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ROADMAP.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# mpcp-reference — Implementation Roadmap
2
2
3
-
TypeScript reference implementation and canonical protocol SDK for the [Machine Payment Control Protocol (MPCP)](https://mpcp-protocol.github.io/spec/).
3
+
TypeScript reference implementation and canonical protocol SDK for the [Machine Payment Control Protocol (MPCP)](https://github.com/mpcp-protocol/mpcp-spec).
4
4
5
5
Implements: protocol verification engine, artifact schemas, cryptographic signing, on-chain anchoring adapters, golden test vectors, and the full SDK consumed by `mpcp-policy-authority`, `mpcp-wallet-sdk`, and `mpcp-merchant-sdk`.
Implement the [Trust Bundle](https://mpcp-protocol.github.io/spec/protocol/trust-bundles/) specification as defined in the MPCP spec.
99
+
Implement the Trust Bundle specification as defined in the MPCP spec (see `mpcp-spec/docs/protocol/trust-bundles.md`).
100
100
101
101
Trust Bundles are pre-distributed signed documents that package trusted issuer public keys for MPCP verifiers operating without network access at verification time.
Copy file name to clipboardExpand all lines: docs/animation/MPCP_ANIMATION_PACK.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,16 +33,14 @@ PolicyGrant
33
33
↓
34
34
SignedBudgetAuthorization (SBA)
35
35
↓
36
-
SignedPaymentAuthorization (SPA)
36
+
Trust Gateway
37
37
↓
38
-
SettlementIntent
39
-
↓
40
-
Settlement
38
+
XRPL Settlement
41
39
42
40
Narration:
43
41
"MPCP introduces a simple chain of authorization for machine payments."
44
42
45
-
"Policies define payment rules. Budgets define session limits. Each payment is explicitly authorized and verifiable."
43
+
"Policies define payment rules. Budgets define per-payment limits. The Trust Gateway verifies the chain and executes on XRPL, attaching a grant ID to every transaction for a permanent audit trail."
46
44
47
45
---
48
46
@@ -51,26 +49,26 @@ Visual sequence:
51
49
1. Autonomous vehicle enters parking garage
52
50
2. PolicyGrant appears
53
51
3. SignedBudgetAuthorization (SBA) appears
54
-
4.SignedPaymentAuthorization (SPA) triggers
55
-
5.Settlement confirmation
52
+
4.Trust Gateway verifies chain
53
+
5.XRPL settlement confirmation with mpcp/grant-id memo
56
54
57
55
Narration:
58
56
"A vehicle receives a policy defining where and how it can pay."
59
57
60
-
"A session budget allows spending within defined limits."
58
+
"A budget authorization allows spending within defined limits for this payment."
61
59
62
-
"Each payment request is cryptographically authorized."
60
+
"The Trust Gateway verifies the authorization chain and submits the XRPL transaction."
63
61
64
-
"The final settlement records the completed transaction."
62
+
"The final settlement records the completed transaction on-chain."
65
63
66
64
---
67
65
68
-
## Scene 5 — Ledger Anchor
66
+
## Scene 5 — Policy Anchoring
69
67
Visual:
70
-
Intent hash flowing into a public ledger.
68
+
Policy document hash flowing into a public ledger (Hedera HCS or XRPL NFT).
71
69
72
70
Narration:
73
-
"An optional intent hash can be anchored to a public ledger for audit and dispute resolution."
71
+
"An optional anchorRef on the PolicyGrant links it to a public ledger record — providing tamper-evident policy history for audit and dispute resolution."
74
72
75
73
---
76
74
@@ -79,7 +77,7 @@ Visual:
79
77
Verification chain replay.
80
78
81
79
Narration:
82
-
"Any dispute can be independently verified using the MPCP authorization chain."
80
+
"Any dispute can be independently verified using the MPCP authorization chain and the on-chain XRPL audit trail."
Copy file name to clipboardExpand all lines: docs/examples/charging.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ MPCP for EV charging: variable session length, multiple kWh, charging operator d
4
4
5
5
## Scenario
6
6
7
-
EV connects to a charging station. The station requests payment authorization. The vehicle (or charging session manager) evaluates policy and budget, signs an SPA for the charging session, and the station verifies the MPCP chain before supplying power.
7
+
EV connects to a charging station. The station requests payment authorization. The vehicle (or charging session manager) evaluates policy and budget, issues an SBA for the charging session, and the station verifies the MPCP chain before supplying power. The Trust Gateway executes the XRPL payment when the session ends.
8
8
9
9
## Profile
10
10
@@ -35,9 +35,9 @@ Similar to parking, but with higher `maxSessionSpend` and charging-specific dest
This example shows the integration pattern: check all three layers before signing.
12
+
Once the SBA is issued, the **Trust Gateway** verifies the chain and executes the XRPL payment.
13
+
14
+
This example shows the integration pattern: check both layers before issuing an SBA.
14
15
15
16
This example focuses on wallet-side guardrail logic and uses a preloaded SBA-shaped authorization object rather than demonstrating full SBA issuance and signature verification.
Copy file name to clipboardExpand all lines: docs/examples/parking.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A full MPCP settlement flow for a parking payment scenario.
4
4
5
5
## Scenario
6
6
7
-
Vehicle parks at a meter or garage gate. The parking system requests payment. The vehicle evaluates fleet policy and session budget, signs an SPA, and returns the authorization. The parking system verifies the MPCP chain locally and opens the gate.
7
+
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.
8
8
9
9
## Artifacts
10
10
@@ -13,9 +13,7 @@ Vehicle parks at a meter or garage gate. The parking system requests payment. Th
13
13
| policy-grant.json | Grant derived from policy constraints |
2.**Policy anchor** (optional) — When provided, verifies the `anchorRef` on the PolicyGrant is consistent with an on-chain record of the policy document
-**ledgerAnchor** — Optional `AnchorResult` from intent anchoring
37
+
-**context** — Full `SettlementVerificationContext` (settlement, policyGrant, signedBudgetAuthorization, decision)
38
+
-**ledgerAnchor** — Optional `PolicyAnchorResult` from policy document anchoring
34
39
35
40
## Output
36
41
@@ -40,10 +45,23 @@ if (result.verified) {
40
45
## Failure Reasons
41
46
42
47
-`settlement_verification_failed` — Standard MPCP chain verification failed
43
-
-`anchor_provided_but_settlement_intent_missing` — Anchor provided but context has no settlement intent
44
-
-`anchor_mismatch: ...` — Mock anchor txHash does not match intent hash
45
-
-`anchor_rail_not_supported: ...` — Real ledger anchor verification not yet implemented
48
+
-`anchor_provided_but_anchor_ref_missing` — Anchor provided but PolicyGrant has no `anchorRef`
49
+
-`anchor_mismatch` — PolicyGrant `anchorRef`does not match the provided ledger anchor
50
+
-`anchor_rail_not_supported` — Anchor rail not available for verification
46
51
47
-
## Mock Anchor
52
+
## Async Verification (Hedera HCS Mirror)
48
53
49
-
Only mock anchors are supported. Real ledger verification (Hedera HCS, XRPL, EVM) is future work.
54
+
Use `verifyDisputedSettlementAsync` to verify a Hedera HCS anchor by querying the mirror node:
55
+
56
+
```typescript
57
+
const result =awaitverifyDisputedSettlementAsync({
58
+
context: settlementVerificationContext,
59
+
ledgerAnchor: hcsAnchorResult,
60
+
});
61
+
```
62
+
63
+
This fetches the anchored policy document from the Hedera mirror node and confirms it matches the PolicyGrant's `policyHash`.
64
+
65
+
## XRPL Audit Trail
66
+
67
+
Even without a policy document anchor, every XRPL payment submitted via the Trust Gateway includes an `mpcp/grant-id` memo. Disputes can reference this memo to confirm the on-chain payment was associated with the correct PolicyGrant.
0 commit comments