cred402/lib/flare/index.ts
caelum0x 24d073ee83 feat: KeeperHub execution layer + Flare interoperable/confidential credit
Two hackathon integrations spanning the whole credit stack, sim-first
(green with no keys) with real integrations behind env flags.

KeeperHub — the on-chain execution & reliability layer (lib/keeperhub/):
- OnchainExecutor: pay-per-execution (x402/MPP) -> simulate -> smart gas
  with exponential backoff -> MEV-protected private routing -> audit trail;
  real MCP client to app.keeperhub.com; deterministic sim fallback.
- Autonomous Credit Keeper: FTSO position health -> check->execute deleverage.
- Credit Automations: declarative price/health/schedule rules as workflows.
- Autonomous Scheduler: KeeperHub-cron loop running keeper + automations.

Flare — interoperable + confidential primitives (packages/.../flare, lib/flare):
- FXRP credit satellite: CAN-gated, FTSO-priced, FDC-attested; Coston2
  Solidity vault (contracts/flare/).
- Confidential Compute credit scoring (TEE-attested, private inputs).
- FTSO-priced multi-asset collateral; FAssets mint->collateralize lifecycle.

x402 Credit-Service Marketplace: sells cred402's intelligence pay-per-call
over x402 (402->pay->200); paid receipts feed the revenue->reputation loop.

Wiring: 78 MCP tools, /v1 + /api routes, console Flare + x402 tabs, 11 demo
CLIs, 8 feature docs + docs/SUBMISSIONS.md, recorded demo video (media/).
346 tests pass; 7 adversarial verification workflows caught + fixed ~37
correctness/security issues.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-11 23:34:23 +03:00

27 lines
1.5 KiB
TypeScript

/**
* Flare integration — Cred402's interoperable-asset credit satellite and its
* confidential scoring path. The chain adapter, FTSO price client, FDC attestation
* client and FAsset (FXRP) model live in packages/chain-adapters/src/adapters/flare;
* this module holds the Flare Confidential Compute scorer that keeps raw agent
* cash-flow features private while publishing an attested credit score.
*/
export { FlareCreditSatellite } from "./satellite.js";
export type { FlareSatelliteConfig, FlareDrawSummary } from "./satellite.js";
export { PositionEngine, DEFAULT_THRESHOLDS } from "./positions.js";
export type { PositionHealth, PositionStatus, PositionThresholds } from "./positions.js";
export { CreditKeeper } from "./keeper.js";
export type { KeeperDecision, KeeperRunResult, KeeperActionKind, KeeperOptions } from "./keeper.js";
export { AutomationEngine } from "./automations.js";
export type { Automation, AutomationDef, AutomationTrigger, AutomationAction, AutomationRun } from "./automations.js";
export { CollateralVault, COLLATERAL_ASSETS } from "./collateral.js";
export type { CollateralAsset, CollateralLine, CollateralValuation } from "./collateral.js";
export { FAssetsMinter } from "./fassets_mint.js";
export type { MintReservation, MintResult, RedeemResult, MintStatus } from "./fassets_mint.js";
export { ConfidentialScorer, verifyConfidentialScore } from "./confidential_score.js";
export type {
ConfidentialScoreAttestation,
EnclaveAttestation,
ConfidentialPlatform,
ConfidentialScorerOptions,
} from "./confidential_score.js";