Go to file
Markus Maiwald 9b1a1d6736
feat(l0): implement Noise Protocol Framework with MIMIC integration
Add complete Noise Protocol implementation (noiseprotocol.org):
- NoiseState with X25519, ChaCha20-Poly1305
- Patterns: XX (mutual auth), IK (0-RTT), NN (ephemeral)
- CipherState for transport encryption
- NoiseHandshake with MIMIC skin integration

Add comprehensive BDD feature tests:
- noise_protocol.feature with 40+ scenarios
- Tests for handshake, security properties, PNG integration

Update RFC-0015:
- Add Noise Protocol integration section
- Architecture diagram showing Noise + PNG + MIMIC layers
- Update implementation phases

All tests passing
2026-02-05 17:11:49 +01:00
capsule-core chore: remove build artifacts and update .gitignore 2026-02-05 15:36:07 +01:00
docs feat(l0): implement Noise Protocol Framework with MIMIC integration 2026-02-05 17:11:49 +01:00
examples feat(sdk): initial libertaria-sdk implementation 2026-01-30 18:42:04 +01:00
features Merge branch 'lts/v0.1' into unstable 2026-02-04 05:58:45 +01:00
janus-sdk docs(sdk): add comprehensive Janus SDK documentation 2026-02-03 12:52:41 +01:00
l0-transport feat(l0): implement Noise Protocol Framework with MIMIC integration 2026-02-05 17:11:49 +01:00
l1-identity refactor: move layer facades to subfolders as mod.zig 2026-02-05 15:40:45 +01:00
l1-membrane feat(l0): implement Noise Protocol Framework with MIMIC integration 2026-02-05 17:11:49 +01:00
l2-federation feat(bridge): Implement Bridge Protocol for Layer 3 translation 2026-01-31 20:21:43 +01:00
l2-membrane feat(capsule): stabilize TUI monitor, implement control IPC, and fix leaks (Zig 0.15.2) 2026-02-01 10:35:35 +01:00
l2_session refactor: move layer facades to subfolders as mod.zig 2026-02-05 15:40:45 +01:00
l4-feed fix: Correct FeedEvent size 96 bytes, fix PNG types 2026-02-03 18:01:15 +01:00
membrane-agent Phase 9 Complete: Autonomous Immune Response Operational 🛡️ (Artifacts Removed) 2026-01-31 04:32:09 +01:00
ncp-prototype feat(ncp): add L1 index layer with path-based addressing 2026-02-02 12:19:40 +01:00
scripts feat(relay): Implement RelayPacket and onion wrapping logic 2026-01-31 18:11:09 +01:00
simulations feat(l0): implement Noise Protocol Framework with MIMIC integration 2026-02-05 17:11:49 +01:00
specs/_ACTIVE feat(l0): implement Noise Protocol Framework with MIMIC integration 2026-02-05 17:11:49 +01:00
src chore: remove build artifacts and update .gitignore 2026-02-05 15:36:07 +01:00
vendor feat(all): Complete Phase 2 and Phase 3 Implementation 2026-01-30 23:24:01 +01:00
.gitignore chore: remove build artifacts and update .gitignore 2026-02-05 15:36:07 +01:00
.gitmodules feat(all): Complete Phase 2 and Phase 3 Implementation 2026-01-30 23:24:01 +01:00
Containerfile.fast feat(relay): Implement RelayPacket and onion wrapping logic 2026-01-31 18:11:09 +01:00
Containerfile.wolfi feat(relay): Implement RelayPacket and onion wrapping logic 2026-01-31 18:11:09 +01:00
LICENSE feat(all): Complete Phase 2 and Phase 3 Implementation 2026-01-30 23:24:01 +01:00
README.md docs: add Vitalik agreement point to Declaration of Intent 2026-02-05 16:44:56 +01:00
build.zig refactor: move layer facades to subfolders as mod.zig 2026-02-05 15:40:45 +01:00
build.zig.zon feat(capsule): stabilize TUI monitor, implement control IPC, and fix leaks (Zig 0.15.2) 2026-02-01 10:35:35 +01:00
capsule fix(qvl): fix Zig API compatibility for storage and integration layers 2026-02-03 09:35:36 +01:00

README.md

Libertaria SDK

Sovereign Infrastructure for Autonomous Agents

Tests Zig License

Sovereign; Kinetic; Anti-Fragile.


What is Libertaria?

Libertaria is a sovereign stack for humans and agents.

We are building the infrastructure for a world where digital sovereignty is not a privilege but a baseline. Where you own your identity, your data, and your relationships. Where exit is always an option. Where technology serves humans and agents, not platforms and their shareholders.

Our Declaration of Intent

1. Sovereignty by Design Your keys, your identity, your data. No usernames. No passwords. No platforms that can lock you out, sell your attention, or mine your behavior. Cryptographic ownership is the foundation — everything else follows.

2. Exit is Voice The right to leave is the foundation of digital freedom. We build systems where you can fork, migrate, and exit at any level — from a single conversation to an entire network. Loyalty is earned, not enforced.

3. No Tokens, No Hype We don't sell hope. We sell working infrastructure. No ICOs. No governance theater. No speculative assets whose value depends on greater fools. We build tools people pay for because they work.

4. Chains Are Dead — Rethink Crypto Even Vitalik agrees: chains, on their own, are dead. Blockchain communities dancing around the holy golden lamb — a database! — is insane. We've been saying this for 5 years. It's time to rethink what crypto really is: not ledgers to speculate on, but infrastructure to build on.

5. Post-Quantum by Default Cryptographic signatures that survive the quantum era are not a future upgrade — they are table stakes. We don't wait for NIST standards to settle; we implement and adapt.

6. AI as First-Class Citizen Agents are not chatbots bolted onto legacy systems. They are sovereign actors with identity, reputation, and capability. Our stack is built for a world where humans and AI coexist as peers.

7. The Kenya Rule If it doesn't run on a solar-powered phone in Mombasa, it doesn't run at all. We optimize for minimal resource consumption, offline-first operation, and maximum accessibility.

8. Interplanetary by Necessity Humanity's future is multi-planetary. We build systems that function across light-minutes of delay, that synchronize asynchronously, that work when Earth is on the other side of the Sun.

9. Protocols Over Platforms We don't build walled gardens. We build open protocols that anyone can implement, extend, or fork. The value is in the network, not in our servers.

10. Trust But Verify Cryptographic proof, not platform promises. Reputation graphs, not follower counts. Transparent incentives, not hidden algorithms.

11. Code is Speech, Exit is Voice We defend the right to build, to experiment, to fork, and to leave. Technology is a tool of liberation — never of control.

This SDK

This repository implements the L1 Identity Layer with:

  • Ed25519 sovereign identities with rotation/burn
  • Trust Graph (QVL) with betrayal detection
  • GQL (ISO/IEC 39075:2024 compliant) query interface
  • Persistent storage with Kenya Rule compliance

Quick Start

# Clone
git clone https://github.com/MarkusMaiwald/libertaria-sdk.git
cd libertaria-sdk

# Build
zig build

# Test (166/166 passing)
zig build test

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Application Layer                         │
├─────────────────────────────────────────────────────────────┤
│                    Libertaria SDK                            │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐      │
│  │   Identity   │  │  Trust Graph │  │    GQL       │      │
│  │  (identity)  │  │    (qvl)     │  │  (gql/*.zig) │      │
│  └──────────────┘  └──────────────┘  └──────────────┘      │
├─────────────────────────────────────────────────────────────┤
│                    Janus Standard Library                    │
├─────────────────────────────────────────────────────────────┤
│                    Janus Compiler (:service)                 │
└─────────────────────────────────────────────────────────────┘

Modules

Identity (l1-identity/)

  • crypto.zig — Ed25519 signatures, key rotation
  • did.zig — Decentralized identifiers
  • soulkey.zig — Deterministic key derivation
  • entropy.zig — Sovereign randomness

QVL — Quasar Vector Lattice (l1-identity/qvl/)

  • storage.zig — PersistentGraph with libmdbx
  • betrayal.zig — Bellman-Ford negative cycle detection
  • pathfinding.zig — A* trust path discovery
  • feed.zig — L4 temporal event store (DuckDB + LanceDB)
  • gql/ — ISO/IEC 39075:2024 Graph Query Language
    • lexer.zig — Tokenizer
    • parser.zig — Recursive descent parser
    • ast.zig — Abstract syntax tree
    • codegen.zig — GQL → Zig transpiler

GQL Example

const gql = @import("qvl").gql;

// Parse GQL query
const query_str = "MATCH (n:Identity)-[t:TRUST]->(m) WHERE n.did = 'alice' RETURN m";
var query = try gql.parse(allocator, query_str);
defer query.deinit();

// Transpile to Zig code
const zig_code = try gql.generateZig(allocator, query);
defer allocator.free(zig_code);

Kenya Compliance

Metric Target Status
Binary Size (L1) < 200KB 85KB
Memory Usage < 10MB ~5MB
Storage Single-file libmdbx
Cloud Calls None Offline-capable

Testing

# All tests
zig build test

# Specific module
zig test l1-identity/qvl/gql/lexer.zig
zig test l1-identity/qvl/storage.zig

Current Status: 166/166 tests passing



Philosophy

Collectivist Individualism

Radical market innovation fused with extreme communal loyalty.

The Kenya Rule

If it doesn't run on a $5 Raspberry Pi, it doesn't run at all.

Exit is Voice

The right to leave is the foundation of digital sovereignty.


License

MIT License + Libertaria Commons Clause

See LICENSE for details.


Forge burns bright. The Exit is being built.