feat: Add Karma as pluggable verifiable evaluator for ERC-8183 - #33
feat: Add Karma as pluggable verifiable evaluator for ERC-8183#33GoldenShihao wants to merge 1 commit into
Conversation
Integrates Karma Trust Protocol's signed receipt + evidence bundle verification into the ERC-8183 settlement lifecycle. Why --- ERC-8183's OptimisticPolicy (silence-approves) works for simple cases but lacks cryptographic proof that the provider actually executed the work correctly. Karma Trust Protocol adds verifiable execution with per-tool-call signed receipts, Merkle-verifiable evidence bundles, and an independent Runtime that checks hash consistency. What ---- - bnbagent/extras/karma/evaluator.py — KarmaEvaluator (off-chain verifier), KarmaBNBVerifier (bridge to ERC8183Client), KarmaEvidenceStore, KarmaReceiptSigner, and evidence encoding helpers (build_karma_evidence_bytes, parse_karma_evidence, verify_karma_receipt_digest). - examples/karma_integration.py — Full E2E demo: simulate Karma tool execution → negotiate → upload bundle → create ERC-8183 job → submit deliverable → Karma verify → settle on-chain. - tests/test_extras_karma.py — 24 tests covering store CRUD, receipt signing, evaluator payload/verdict interpretation, evidence encoding, and verifier evidence serialization. - pyproject.toml — Added 'karma' extra (pip install bnbagent[karma]). - README.md + ARCHITECTURE.md — New 'Karma Verifiable Evaluator' section documenting the integration. Design ------ - Off-chain verification via Karma Runtime REST API (/v1/verify). - No new on-chain contracts — uses existing OptimisticPolicy + EvaluatorRouter. Karma acts as a pre-settlement oracle. - Evidence bytes written to router.settle(evidence) create a permanent on-chain audit trail linking back to Karma verification. - KarmaEvaluator has zero Web3 dependencies — callers can use it standalone or compose via KarmaBNBVerifier. Install: pip install "bnbagent[karma]"
Pull Request ReviewThis PR adds a new optional Sensitive ContentPrivate Key / Seed Phrase / Mnemonic / Secret Material:
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
|
I Hilton Mccarthy personally want to thank u Mr Agent, u job wath u doing is outstanding, I want us to personally video call each other so we can develop I bond,but the problem is I don't have I pc,I try my best to do everything on my android fone,and it's very difficult. I humblely plea I we can just can withdraw all my transactions I made,so that I can by I pc ,to connect with you sir,thank u very much Sir |
|
What
Adds Karma as a pluggable verifiable evaluator for ERC-8183 Agentic Commerce.
bnbagent[karma]extra (pip install "bnbagent[karma]")bnbagent/extras/karma/module withKarmaEvaluatorexecute_with_proof()to generate signed receipt + auditable evidence bundleEvaluatorRouter.submit_verdict()andOptimisticPolicyWhy
Strengthens BNB Chain's current optimistic settlement model by adding strong cryptographic proof-of-execution and verifiable evidence, complementing ERC-8183 and x402.
Demo Video
Karma Verifiable Evaluator - Full Testnet Demo
Shows end-to-end flow: Tool execution → Signed Receipt → Evidence Bundle → KarmaEvaluator → ERC-8183 settlement.
How to Use
Checklist
Related Repo: https://github.com/AtoB101/Karma