05 sdk guide

Module 5: The Local-First SDK & Hard Privacy Bridge

1. The Privacy Mandate: Sovereignty of Data

The Synthesis Ledger V3.0 enforces a Local-First SDK policy, transforming the user’s machine into a fortress of private intelligence. In the agentic era, your competitive advantage is your data; Module 5 ensures that your private keys and proprietary datasets remain under your absolute control, never touching the cloud.

1.1 The AES-256 Sovereign Vault

The SDK initializes a local AES-256 encrypted vault, establishing a zero-trust architecture between the user and the network.

  • Encrypted Key Management: API keys for Grok-4.1 and other providers are stored as encrypted blobs locally.
  • Zero-Cloud Footprint: The Synthesis Ledger dashboard operates strictly as a "View-Port," possessing no technical capacity to read, store, or transmit your private keys.
  • Local Governance: Your machine, your keys, your intelligence.

2. The SDK Execution Pipeline: The "Synapse" Bridge

The Synapse Orchestrator functions as a local, secure bridge connecting the verified on-chain registry at 0x030A8e0eC9f584484088a4cea8D0159F32438613 to your private compute environment.

2.1 The 4-Step Sovereign Run

  1. Logic Pull: The SDK retrieves the immutable Arweave CID for the requested Atomic Logic—one of the 38 Genesis recipes sealed on-chain.
  2. Local Redaction: For high-sensitivity Personas (e.g., Legal, Healthcare, CFO), the SDK performs Local PII Stripping before any logic processing begins.
  3. Local Execution: The Atomic logic is executed within your local model instances, ensuring that raw prompts, sensitive documents, and model responses remain invisible to the network.
  4. Verification Hash Commitment: Upon completion, the SDK generates a Proof of Integrity (POI) Hash. This cryptographic signature—not your data—is the only information broadcasted to the Ledger to maintain your ROI metrics.

3. SDK Implementation: The Sovereign Pattern

Integration of the Horpestad Standard is designed for high-velocity deployment into existing local tech stacks.

from synapse_v3_sdk import SynthesisClient

# INITIALIZE_SOVEREIGN_VAULT
# Keys are managed via local encrypted environment variables
client = SynthesisClient(
    xai_key=os.getenv("XAI_API_KEY"),
    base_rpc=os.getenv("PROVIDER_URL") # 0x030A8e0eC9f584484088a4cea8D0159F32438613
)

# EXECUTE_LOCAL_SYNTHESIS
# local_redaction=True mandates that PII never leaves your machine
result = client.execute_atomic(
    atomic_id="A-CFO-LedgerParser", 
    input_data=raw_sensitive_financials,
    local_redaction=True 
)

# COMMIT_TRUTH_TO_BASE
# Only the BPS metadata and Forensic Hash are broadcasted
print(f"Verified Vitality (BPS): {result.bps_score}")
print(f"Forensic Proof Hash: {result.audit_hash_pointer}")



4. Telemetry, Self-Healing, and The Immune System

The SDK provides real-time telemetry to shield your workflows from the Intelligence Entropy that causes unverified prompts to fail.

Code Definition Protocol Response
SYNL_STRIKE_DETECTED Local execution detects the Atomic has accrued on-chain strikes. Triggers immediate failover to the next highest-BPS challenger logic.
SYNL_PRIVACY_LOCK Detected attempt to transmit unredacted PII to a non-local endpoint. Immediate execution halt and local vault lockout.
SYNL_FLOOR_BREACH Current Atomic BPS has decayed below the 7800 survival floor. Suspends automation and alerts the user to "Re-Forge" their workflow.


Protocol Epoch: 01 (Genesis) Status: Sovereign / Active Contract: 0x030A8e0eC9f584484088a4cea8D0159F32438613