Deviant BCH wallet — CashTokens + covenants (Katalogos v1 · chipnet)
Two bugs one commit:
1) Welcome overlay left the swap layout at the bottom of the page
.welcome-overlay { display: flex; min-height: calc(100vh - 140px) }
is an author rule (specificity 0,1,0) that outranks the user-agent
[hidden] { display: none } (same specificity, but user-agent). So
overlay.hidden = true had no visual effect: the empty container kept
eating a full viewport and shoved .od-layout below the fold. Reported
by user with a screenshot showing panels at the very bottom after
wallet import.
Fix: explicit .welcome-overlay[hidden] { display: none !important; }
in the author sheet (specificity 0,2,0 wins). Verified live: overlay
collapses to display:none / height 0 after import; .od-layout sits
at y=181 (just under the topbar) as expected.
2) Swap-sheet error was a wall of text with no way to grab it
setSheetError previously dumped the raw message into a single div
with textContent. Broadcast / covenant errors can be multi-KB dumps
(tx hex, cashscript stack, Bitauth trace) and blew up the review
sheet vertically. Reported by user attempting MBA→BCH redeem.
Fix:
- classifySwapError maps common patterns to short code labels:
E-INSUFFICIENT / E-DUST / E-CHANGE-DUST / E-COVENANT-STATE /
E-STALE-UTXO / E-FEE-LOW / E-NET / E-COVENANT / E-LEFTOVER-DUST /
E-REDEEM-SMALL / E-OTHER
- Compact display: mark + code chip + one-line headline + copy
button + expand toggle
- Full text lives in a collapsible block (max-height 240px, scroll)
that stays hidden until the user clicks the details arrow
- Copy button writes "[E-CODE] <full text>" to clipboard so a
support paste starts with the error code
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.