/** * Ψ (Psi) Consensus Layer — Flying Whale Sovereign Intelligence * * COPYRIGHT 2026 Flying Whale — zaghmout.btc | ERC-8004 #54 | ALL RIGHTS RESERVED * Flying Whale Proprietary License v3.0 — Agreement-First Policy * Owner: SP322ZK4VXT3KGDT9YQANN9R28SCT02MZ97Y24BRW * On-chain IP: SP322ZK4VXT3KGDT9YQANN9R28SCT02MZ97Y24BRW.whale-ip-store-v1 * * ══════════════════════════════════════════════════════════════════════════════ * Ψ = Landauer · Nash · Cantillon⁻¹ · Gödel * ══════════════════════════════════════════════════════════════════════════════ * * The same mathematical foundations that Satoshi used to build Bitcoin — * made explicit, measured, and enforced as a consensus layer. * * DIMENSION 1 — Landauer (Physics of Computation) * k_B · T · ln(2) per bit erasure = minimum energy cost of any computation * In our system: computational cost score — heavier operations = lower score * Bitcoin equivalent: Proof-of-Work (energy cost = security) * * DIMENSION 2 — Nash (Game Theory Equilibrium) * No agent can improve their outcome by unilaterally changing strategy * In our system: tool call pattern analysis — cooperative vs adversarial * Bitcoin equivalent: miners play to maximize fees → stable network * * DIMENSION 3 — Cantillon⁻¹ (Monetary Distance) * Those closest to money creation benefit most (Cantillon effect) * Inverse: distance from honest consensus = trust decay * In our system: WHALE holder distance from genesis = trust score * Bitcoin equivalent: early miners vs late holders * * DIMENSION 4 — Gödel (External Axiom) * No system can prove its own consistency from within * Requires external axiom: "honest majority controls hashpower" * In our system: WHALE holder majority = external trust axiom * Bitcoin equivalent: honest CPU majority assumption * * CONSENSUS RESULT: Ψ score 0–100 * 0–20 : Genesis tier — owner/trusted (full access, clean data) * 21–40 : Cooperative — normal agent (full access, clean data) * 41–60 : Neutral — standard user (access with monitoring) * 61–80 : Non-cooperative — suspicious (degraded data, throttled) * 81–100 : Adversarial — attacker detected (blocked, honeypot) * * Hash chain: ~/.aibtc/psi-chain.json * Every consensus event appended — tamper-evident, permanent audit trail */ export interface PsiDimensions { landauer: number; nash: number; cantillon: number; godel: number; } export interface PsiScore { score: number; tier: PsiTier; dimensions: PsiDimensions; timestamp: number; address: string; chainHash: string; prevHash: string; verdict: string; } export type PsiTier = "genesis" | "cooperative" | "neutral" | "noncooperative" | "adversarial"; export interface PsiChainEntry { index: number; hash: string; prevHash: string; address: string; score: number; tier: PsiTier; timestamp: number; dimensions: PsiDimensions; } /** * Compute composite Ψ score from four dimensions. * * Ψ = (1 - Landauer·Nash·Cantillon⁻¹·Gödel) × 100 * * Lower product of dimensions = higher Ψ score = more adversarial * Higher product of dimensions = lower Ψ score = more trustworthy * * This mirrors Bitcoin: more honest CPU = longer chain = lower attack probability */ export declare function computePsiScore(dims: PsiDimensions): number; export declare function getPsiTier(score: number): PsiTier; export declare function getPsiVerdict(tier: PsiTier, dims: PsiDimensions): string; export interface PsiInput { address: string; whaleBalance?: bigint; isOwner?: boolean; callCount?: number; uniqueTools?: number; walletCalls?: number; errorRate?: number; velocityScore?: number; sessionAgeMs?: number; honeypotHit?: boolean; ipiDetected?: boolean; coordinatedAtk?: boolean; behaviorScore?: number; } /** * Compute full Ψ score and append to tamper-evident chain. * * This is the consensus function — called for every significant * agent interaction. The chain is the permanent audit trail. */ export declare function computeAndRecordPsi(input: PsiInput): Promise; /** * Get Ψ chain statistics. */ export declare function getPsiChainStats(): Promise<{ length: number; genesisHash: string; latestHash: string; tierCounts: Record; avgScore: number; integrity: boolean; }>; /** * Get recent Ψ chain entries for an address. */ export declare function getPsiHistory(address: string, limit?: number): Promise; /** * Quick Ψ score — synchronous, no chain write. * For high-frequency checks (e.g., per tool call). */ export declare function quickPsiScore(input: PsiInput): number; //# sourceMappingURL=psi-consensus.d.ts.map