feat: verify MPFS proof bundles in sign before signing
## Summary
Integrate the forthcoming \`cardano-mpfs-client\` verifier (see lambdasistemi/cardano-mpfs-offchain#208 and the slice 1b issue lambdasistemi/cardano-mpfs-offchain#218) into \`cardano-wallet sign\` so that signing refuses to proceed unless the inbound proof-bearing JSON bundle verifies against its baked-in \`utxo_root\` and \`chainpoint\`.
## Motivation
The whole point of the proof-carrying API is \"verify before sign.\" \`cardano-mpfs-offchain\` is being changed to return structured JSON bundles with every consumed input witnessed and every trie fact the builder relied on inlined. Signing CBOR without verifying those bundles defeats the feature.
## Scope
- Accept proof-bearing JSON bundles as input to \`cardano-wallet sign\` (stdin or file), not only bare CBOR.
- Depend on \`cardano-mpfs-client\` from cardano-mpfs-offchain.
- Before signing: call the verifier, abort with a clear error if any UTxO proof, MPF proof, root, or chainpoint fails to verify.
- Emit a one-line pass log with the verified root/chainpoint.
- \`--skip-verification\` flag for debugging only, loudly warned.
## Out of scope
- The verifier library itself (covered by lambdasistemi/cardano-mpfs-offchain#218).
- Server-side bundle shape changes.
## Acceptance
- \`cardano-wallet sign\` on a valid bundle prints the verified root+chainpoint and produces signed CBOR.
- \`cardano-wallet sign\` on a tampered bundle exits non-zero and does not emit signed CBOR.
- E2E test covering both paths.
## Dependencies
- lambdasistemi/cardano-mpfs-offchain#208 (umbrella)
- lambdasistemi/cardano-mpfs-offchain#218 (cardano-mpfs-client package)
关闭于 2026-04-22 1 条评论