Documentation
repositories
Repositories
Darwin is split by concern: the vault's scripts, the relay, the app, and the tooling that deploys them.
| Component | What it holds |
|---|---|
| darwin-protocol | Vault deployment (deploy_invested_faucet), operator tooling, the relay's settlement binaries and ledger, tests (MockChain harnesses, adversarial suites), staging scripts |
| darwin-relay | The note script sources (asm/) and their libraries, and the relay service (server/: Node HTTP server, watchdog, rate limits, view proofs, Fly config) |
| darwin-app-mainnet | The web app at app.darwin.market: Next.js, the Miden Web SDK, the Bread integration, client-side note building and checks |
| darwin-oracle-adapter | The Pragma adapter |
| darwin-docs | This site |
What is published
The note scripts are what verification needs: they are what the vault allowlists. Their roots are reproducible from source (see Note Scripts) and can be checked against the deployed vault without access to any repository.
Anything not public is available to reviewers on request.
Where the interesting code lives
| Question | File |
|---|---|
| What does a deposit into the vault do? | darwin-relay/asm/nav_deposit_inkind_bluechip.masm |
| What does a redemption do? | darwin-relay/asm/nav_redeem_pswap_bluechip.masm |
| What does the relay do with a trade? | darwin-protocol/crates/darwin-protocol-account/src/bin/relay_both.rs and src/relay_ledger.rs |
| What is the relay's HTTP contract? | darwin-relay/server/API.md |
| How is the private note built? | darwin-app-mainnet/src/lib/clientNote.ts (buildClientPrivateP2id) |
| How is a returned note checked? | darwin-app-mainnet/src/lib/relayNoteGuard.ts |
| Which vault, which coins, which weights? | darwin-app-mainnet/src/lib/basketFaucets.ts |
| Which network, oracle and quote asset? | darwin-app-mainnet/src/config/network.ts |