User flows
onboard · auth · link-bank · accounts · balance · payee · quote · send · pay · claims
Developer playground
Agent-friendly CLI, 31 public primitives, Swagger at runtime, and a library layer designed so new rails and providers don't rewrite the world. Early access for people who will actually call the API.
Quickstart
Starts with zero credentials (memory ledger, deterministic settlement). Add
.env keys to unlock Plaid, Coinbase CDP, Base mainnet, and Sheets.
# clone & install git clone https://github.com/enkayxyz/k-0.git && cd k-0 python3 -m pip install -r modules/protocol/requirements.txt # API python3 -m uvicorn src.main:app --app-dir modules/protocol \ --host 127.0.0.1 --port 8000 # Swagger · readiness open http://127.0.0.1:8000/docs open http://127.0.0.1:8000/uat/readiness
# k0 CLI — every primitive is a subcommand python3 modules/protocol/cli/k0.py onboard \ --email [email protected] python3 modules/protocol/cli/k0.py link-bank python3 modules/protocol/cli/k0.py pay \ --to [email protected] --amount 10 python3 modules/protocol/cli/k0.py corridor-pay \ --to [email protected] --amount 10 --corridor us-us # agent-friendly JSON on every command python3 modules/protocol/cli/k0.py status --json
S-primitives
Each S-primitive is a thin orchestration layer: validate → authorize → compose
W-libraries → return. One file per endpoint under modules/protocol/src/api/.
Centralized processor endpoints that imply K0 holds funds or issues stablecoins (e.g. mint treasury APIs) are not part of the protocol surface — they conflict with the no-intermediary principle. Compare against Circle/M0-style models only as conceptual contrast.
CLI & agents
Every primitive as a subcommand with --json, plus a REPL. Built for
humans and coding agents in the same loop.
onboard · auth · link-bank · accounts · balance · payee · quote · send · pay · claims
onramp · offramp · corridor-pay · ledger · logs · status · chains
verify-payee · reverse · sweep-expired — KYC gate and escrow ops for pilots
Repository map
| Path | What it is |
|---|---|
modules/protocol/src/api/ |
S-primitives — one file per public endpoint |
modules/protocol/src/library/ |
W-libraries — W1 through W25 |
modules/protocol/src/service.py |
Fee engine, idempotency, escrow state machine |
modules/protocol/cli/k0.py |
CLI + REPL |
modules/protocol/tests/ |
Unit + contract + library tests |
docs/ARCHITECTURE.md |
Protocol design, payment flows, seams |
docs/requirements/01-Current/ |
Product & engineering requirements SSOT |
modules/marketing/ |
Launch sites (this folder is launch v002) |
Build on K0
Start with onboard → fee estimate → initiate-payment. For corridor experiments,
use S31 with us-us or us-in. Readiness endpoint shows which
integrations are live in your environment.
/docs and /uat/readiness