Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nomos

Offline-first, cryptographically verifiable value distribution with delayed Bitcoin settlement.

See NOMOS_BLUEPRINT.md for the full architecture, threat model, build guide, and rationale.

Status

Phase 0/1/4/5/6 of the build guide (NOMOS_BLUEPRINT.md §7) are done and tested:

  • infra/ — regtest bitcoind + Postgres via Docker Compose
  • core/nomos-crypto — one-time redemption key derivation (private AND public-only), hash commitments, sign/verify (implemented + unit tested)
  • core/nomos-merkle — commitment tree + inclusion proofs (implemented + unit tested)
  • core/nomos-payload — offline payload format + structural validation (implemented + unit tested)
  • core/nomos-script — recoverable-timelock Taproot policy template, recipient pinned as key-path signer (implemented + unit tested)
  • core/nomos-psbt — real settlement PSBT construction + BIP-341 Taproot key-path signing + finalization, self-verified (implemented + unit tested against synthetic prevouts)
  • core/nomos-ffi — signature verification fully wired (public-key-only derivation, no private key on device) (implemented + unit tested)
  • core/nomos-demo — end-to-end CLI: issue → offline-verify → Merkle commit → build/sign/finalize settlement tx, all working with zero network dependency (PHASE A). PHASE B (real regtest broadcast) has a stubbed connection point — see below.
  • settlement-service/, mobile/, web/, simulation/ — not started

Run cargo test --workspace in core/ — 18 tests, all green, including a full offline BIP-341 signing round trip.

Getting started

cd core
cargo test                # 18 unit tests across all core crates
cargo run --bin nomos-demo  # full offline protocol cycle: issue, verify, commit, settle

To exercise PHASE B (a real broadcast against a live regtest node):

cd infra
docker compose up -d
./regtest-init.sh        # creates + funds a regtest issuer wallet

Then wire nomos-demo::try_phase_b() to bitcoincore-rpc::Client::new("http://127.0.0.1:18443", Auth::UserPass("nomos".into(), "nomos_dev_only_change_me".into())), fund each voucher's real Taproot address instead of the synthetic prevout, and broadcast the already-working sign_and_finalize output via send_raw_transaction. All the cryptography is done — this step is pure RPC plumbing.

Next steps (in order)

  1. Wire nomos-demo::try_phase_b to bitcoincore-rpc against the funded regtest wallet from regtest-init.sh — fund real addresses, broadcast the real settlement tx, mine a confirming block.
  2. Add the N-of-M multisig and hash-lock policy templates to nomos-script.
  3. Scaffold settlement-service/ (Rust + tokio) to expose the batch/settle flow as an HTTP service instead of a one-shot CLI.
  4. Swap nomos-payload's JSON wire format for a compact binary one (bincode/postcard) before targeting real QR codes.

Full detail on all of the above is in NOMOS_BLUEPRINT.md, sections 6–7.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages