Deviant BCH wallet — CashTokens + covenants (Katalogos v1 · chipnet)
"Bitcoin Cash as a better Lightning" (T6) and the BTC-IOU trust floor, validated end-to-end on BCH chipnet + BTC signet with real coins. - LN→T6 routing: a routed payment received into a T6 channel; one preimage settles both chains (BCH board reveal -> BTC HTLC claim). Scripts: chipnet-ln-to-t6-routing, btc-signet-ln-leg, btc-claim-htlc. - T6c unilateral exit complete: honest CSV-delayed self-close (ELSE branch) added alongside the penalty branch (btc-signet-honest-close). - T4 real BTC↔BCH atomic swap: one hashlock over a signet P2WSH HTLC + chipnet AtomicSwapHTLC; claim + refund (btc-bch-htlc-swap). Fixes btc-htlc.mjs bigint bug. - Model-3 bonded M-of-N redemption: BondedSignerSlash.cash (equivocation -> slash) + 2-of-3 signet release; BTC enforces the threshold, BCH enforces the punishment (chipnet-bonded-signer-test, btc-signet-mofn-release). - T6-aware wallet UX: one-tap send/receive over the validated stack, every tap a real on-chain BchChannelBoard update (t6-wallet-server + design/t6-wallet); fresh-provider + retry hardening for flaky-chipnet broadcasts. - Docs: ADR-0046, spec §16, Observability-and-privacy companion (the auditability property + the three-baseline privacy framing), complete-record/model-explainer/ tracker updates, snapshots 0177–0179. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| contracts | ||
| design | ||
| KnowledgeBase | ||
| Parameters | ||
| public | ||
| scripts | ||
| shells | ||
| snapshots | ||
| spike | ||
| src | ||
| test | ||
| wiki | ||
| .calibration-sweep.json | ||
| .catalytic-sweep.json | ||
| .env.example | ||
| .gitignore | ||
| .kac-extract.txt | ||
| .sim-athenae.json | ||
| adaptive-data.json | ||
| bch-history.json | ||
| bch-market.json | ||
| BCH_Token_Economy_Concept_Paper.md | ||
| bch_wallet_architecture.svg | ||
| CLAUDE.md | ||
| deviant_technical_spec_v2.7.md | ||
| package-lock.json | ||
| package.json | ||
| project-context.md | ||
| README.md | ||
| tsconfig.json | ||
| usdm-historical.json | ||
Deviant
BCH two-tier token economy platform. Pre-implementation. See BCH_Token_Economy_Concept_Paper.md for the full design.
Status
Bootstrap snapshot — protocol swap mechanism is the validation target.
Project map
| Path | Purpose |
|---|---|
BCH_Token_Economy_Concept_Paper.md |
Architecture spec, all [PROPOSED] claims |
CLAUDE.md |
Working agreement for Claude sessions |
src/ |
TypeScript wallet + token logic |
contracts/ |
CashScript source for Architecture A contracts |
test/ |
Unit tests (regtest) + integration plan (chipnet, mainnet) |
scripts/ |
Code-scan, snapshot, compile helpers |
wiki/ |
Living docs: architecture, decisions, testing strategy, code map |
snapshots/ |
Numbered progress snapshots |
Quickstart
npm install
npm run compile:contracts # produces artifacts from contracts/*.cash
npm run test:regtest # runs regtest suite
npm run scan # regenerates wiki/code-map.md
npm run snapshot # appends a new snapshot
Build priorities (active)
- Protocol swap mechanism — most novel claim, needs validation first.
- CashScript enforcement on mainnet — not just theoretical verification.
- tokenId correlation across A/B tiers — edge cases expected.
See wiki/testing-strategy.md for the staged regtest → chipnet → mainnet plan.