Deviant BCH wallet — CashTokens + covenants (Katalogos v1 · chipnet)
Two joined fixes from user reports:
1. The BCH-inflation bug had ONE MORE root cause that the overlay work
couldn't touch: when no wallet was attached, the swap confirm
button fell through to the mockup's inline confirmSwap. That
handler mutates fa.bal (BCH) and ta.bal (MBA) as if a real swap
had happened — so the local balance display moved without ANY tx
ever going on chain. From the user's side it looked like BCH was
deducted, then re-added, then the ledger drifted. This was the
real reason for "BCH not deducted after swapping to ASM".
Fix: wireSwapConfirmInterceptor now ALWAYS stopImmediatePropagation
when the real handler doesn't fire, and surfaces a specific error
on the review sheet instead:
• pair touches DEA → "DEA has no mint/burn covenant …"
• no wallet attached → "Attach a wallet before swapping …"
• MBA → MBA composite → "redeem to BCH first, then claim …"
• other unsupported pair → "only BCH ↔ ASM/ASM2/Share is live"
The mockup's inline confirmSwap can no longer run — every path
through the interceptor terminates with either a real broadcast or
an inline error. No local balance can move without a real tx.
2. Wallet-menu labels trimmed per user request. The three attach-a-
wallet rows are now plain:
+ Create a wallet
↧ Import a wallet
⌘ Connect a wallet (was "⌘ Wizard Connect / pair a BCH wallet")
Sub-descriptions removed on all three so the dropdown reads as
three clean actions.
Verified live: with a signer active, tapping Confirm on a BCH → ASM
attempt kept bchRow.bal + asmRow.bal exactly the same (mockup
mutation blocked); wallet dropdown shows the three clean labels.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .claude | ||
| brand | ||
| contracts | ||
| design | ||
| docs | ||
| KnowledgeBase | ||
| Parameters | ||
| public | ||
| scripts | ||
| services | ||
| shells | ||
| site/deviant | ||
| snapshots | ||
| spike | ||
| src | ||
| telegram-orderbook | ||
| 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.