Skip to main content

haima_core/
lib.rs

1//! Core types, traits, and errors for the Haima agentic finance engine.
2//!
3//! Haima (αἷμα, Greek for "blood") is the circulatory system of the Agent OS —
4//! distributing economic resources (payments, revenue, credits) throughout the
5//! organism. It implements the x402 protocol for machine-to-machine payments
6//! at the HTTP layer, enabling agents to pay for resources and charge for services
7//! without human intervention.
8
9pub mod bureau;
10pub mod credit;
11pub mod error;
12pub mod event;
13pub mod lending;
14pub mod payment;
15pub mod policy;
16pub mod receipt;
17pub mod scheme;
18pub mod wallet;
19
20pub use bureau::{
21    AgentCreditReport, CreditLineSummary, PaymentHistory, PaymentSummary, RiskFlag, RiskFlagType,
22    RiskRating, TrustContext, TrustTrajectory, assess_risk_rating, detect_risk_flags,
23    generate_credit_report,
24};
25pub use credit::{
26    CreditCheckResult, CreditFactors, CreditScore, CreditTier, check_credit, compute_credit_score,
27};
28pub use error::{HaimaError, HaimaResult};
29pub use event::FinanceEventKind;
30pub use lending::{
31    CreditLine, CreditLineStatus, DrawRequest, DrawResult, RepaymentRecord, accrue_interest,
32    close_credit_line, default_credit_line, draw, freeze_credit_line, open_credit_line, repay,
33    unfreeze_credit_line,
34};
35pub use payment::{PaymentDecision, PaymentRequest};
36pub use policy::PaymentPolicy;
37pub use receipt::PaymentReceipt;
38pub use scheme::PaymentScheme;
39pub use wallet::{ChainId, OnChainBalance, WalletAddress};