Replace the design-note docs (p1–p7) with the implemented "make it real" phase docs (p8–p10) and wire production-grade, env-gated real integrations: - p8 Casper Testnet: byte-exact deploys + WASM install via casper-js-sdk; live node reads (node.testnet.casper.network); CRED402_CHAIN=sim|testnet transport. - p9 x402 + data + MCP: real EIP-712 typed-data digests (@casper-ecosystem/ casper-eip-712); casper-x402 facilitator client (x402 V2); live Open-Meteo GHI; official @modelcontextprotocol/sdk server; casper-sidecar SSE event feed. - p10 RealFi + cross-chain: real Stripe test-mode webhooks (HMAC-verified) and Plaid sandbox → privacy-preserving on-chain envelopes; Base Sepolia EVM deploy (Foundry); reachable via /api/realfi/* and /api/x402/facilitator routes. - Sign-in with Casper Wallet: real extension provider + challenge/ed25519/session flow (/v1/auth/wallet/*), console connect + sign-in button. - Branding: Cred402 logo mark, favicon, OG image; Vercel config for the console. All env-gated with sim/free-API fallbacks; full suite green, all toolchains (TS/Rust/Go/Solidity) build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
1.0 KiB
Python
25 lines
1.0 KiB
Python
"""Cred402 advisory risk + fraud engine.
|
|
|
|
A standard-library-only Python package that computes advisory risk scores and
|
|
fraud signals the protocol's ``RiskPolicyManager`` (p2 §6.8) can consume.
|
|
|
|
Pipeline
|
|
--------
|
|
1. :mod:`cred402_risk.client` fetch live agents + receipts from the Cred402 API.
|
|
2. :mod:`cred402_risk.features` pure feature engineering over agent + receipt dicts.
|
|
3. :mod:`cred402_risk.credit_score` logistic probability-of-default + credit score + rate.
|
|
4. :mod:`cred402_risk.fraud_graph` receipt-graph fraud detection (Tarjan SCC, wash trading).
|
|
5. :mod:`cred402_risk.server` http.server JSON API exposing the above.
|
|
|
|
Nothing here moves money. Scores are *advisory*; the on-chain
|
|
``RiskPolicyManager`` remains the deterministic authority (p2 §7.6:
|
|
"the LLM explains, but does not directly control money").
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from . import client, credit_score, features, fraud_graph
|
|
|
|
__all__ = ["client", "credit_score", "features", "fraud_graph"]
|
|
__version__ = "0.1.0"
|