OpenChainGraph Suite · ART-595 · AP2 / Agent Commerce Provenance

AP2 CartMandate Hash-Chain Builder

Builds an illustrative AP2 CartMandate skeleton whose credentialSubject carries a deterministic hash-chain over an ordered cart_items list: link_0 = keccak256(canon({index:0,item})), link_i = keccak256(canon({index:i,item,prev:link_(i-1)})), cart_root is the final link. Stands beside the existing Google AP2 Mandate Builder (ART-16) as a new node: that node's flat Checkout/Payment shape has no line-item array to chain over. Given a prior chain's links (claimed_links) and a possibly tampered cart_items, it re-verifies and reports the earliest divergent index instead of throwing.

AP2 / CartMandatekeccak256 + RFC 8785 canon (vendored, no hand-rolled crypto)Chain build or re-verify, no settlement
๐Ÿ”’ All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data โ€” use synthetic or anonymised inputs only.
What This Does and Does Not Prove

An intact hash-chain proves the ordered cart_items list was not altered after the chain was built, nothing more. It does NOT prove the mandate was authorised by a human, that goods were delivered, that the merchant accepted the cart, that any payment occurred, or that item prices are correct or current (unit_price is caller-supplied, unchecked against any catalog). This node never fetches merchant state, never calls a facilitator, and is never a party to a payment.

Mandate Fields
Cart Items (ordered JSON array)
Non-empty ordered array. Each item needs sku, description, quantity (positive number), unit_price (non-negative number), currency.
Paste a prior run's chain_links here (with possibly-tampered cart_items above) to test broken-link detection. Leave as [] to just build a fresh chain.
Cart Root
Chain Links
Execution Hash (SHA-256)