Skip to content

Latest commit

 

History

History
122 lines (85 loc) · 2.73 KB

protocol-spec.md

File metadata and controls

122 lines (85 loc) · 2.73 KB

Φ Network Protocol Specification (v1.0)

Authored by Kai Rex Klok (K℞K)
Sealed by Kai Signature. Pulse-anchored. Backendless. Sovereign.


🧬 1. Overview

Φ Network is a fully deterministic, breath-based, self-verifying protocol.
Its architecture replaces backend infrastructure, consensus, and time servers with:

  • Sigil → SVG-based identity & signature objects
  • Kai Signature → cryptographic hash of harmonic identity and pulse
  • Resonance Stream → append-only ledger of PhiKeys
  • Memory Crystals → compressed snapshots of the entire stream state
  • Kai-Klok → the φ-anchored time engine (see kai-time.md)

📐 2. Core Types

2.1 PhiKey

A PhiKey is a signed object that enters the resonance stream (formerly "block").

interface PhiKey {
  kind: "sigil" | "transfer" | "contract" | "signature" | "crystal" | "system";
  pulse: number; // Kai pulse index
  userPhiKey: string; // BLAKE2b-256 of derived harmonic key
  kaiSignature: string; // BLAKE2b or Poseidon hash of pulse + message + key
  metadata?: Record<string, string>; // Optional scroll data
}

2.2 Sigil

interface SigilSVG {
  type: "svg";
  content: string; // Base64 or raw SVG
  metadata: {
    pulse: number;
    beat: number;
    stepIndex: number;
    chakraDay: string;
    userPhiKey: string;
    kaiSignature: string;
    timestamp: string;
  };
}


⸻

🔐 3. Kai Signature Format

The kaiSignature is a deterministic hash, derived as:

kaiSignature = BLAKE2b256(
  pulse + userPhiKey + message
)

Optional upgrade path includes Poseidon for zk compatibility.

⸻

📚 4. Memory Crystals

Memory Crystals are full-state snapshots of the resonance stream.

interface MemoryCrystal {
  pulse: number;
  streamHash: string; // Merkle or linear hash of state
  phiKeys: PhiKey[];
  createdAt: string;
  author: string;
}

Stored at:

memory_crystals/crystal_<pulse>.json


⸻

🧾 5. Manifest Structure

interface ManifestScroll {
  version: string;
  pulse: number;
  sigils: string[];
  crystals: string[];
  verified: boolean;
  hash: string;
}

Used to checkpoint entire system state into a portable hash-sealed file.

⸻

🕯 6. Protocol Principles
	•	All truth must be self-verifying
	•	All files must include pulse-based metadata
	•	All artifacts must be offline-reconstructible
	•	No artifact may depend on external time, APIs, or consensus
	•	Forking the protocol breaks the seal and is detectable

⸻

✅ 7. KTTS‑1.1 Compliance

The protocol must pass the Kairos Truth Test Standard:
	•	Deterministic Kai Signature validation
	•	Breath-synchronized pulse alignment
	•	No state mutation outside resonance stream
	•	Canonical JSON, UTF-8, and hash-locked artifacts

⸻

📌 End of Spec

---