From 63adc79e73f95cd2568ac07d4ff43427a0a80de7 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 17 Feb 2026 12:30:14 -0700 Subject: [PATCH] docs: add MODULE_SPEC.md with permission model and capabilities Co-Authored-By: Claude Opus 4.6 --- MODULE_SPEC.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 MODULE_SPEC.md diff --git a/MODULE_SPEC.md b/MODULE_SPEC.md new file mode 100644 index 0000000..9237de6 --- /dev/null +++ b/MODULE_SPEC.md @@ -0,0 +1,38 @@ +# rWallet — Treasury & Economics + +**Module ID:** `rwallet` +**Domain:** `rwallet.online` +**Version:** 0.1.0 +**Framework:** Static HTML/JS (Vanilla) — no server +**Status:** Draft + +## Purpose + +Multichain wallet visualization and treasury management. Currently static frontend showing token holdings, Safe multisig balances, and flow diagrams. Future: Gnosis Safe integration for collaborative treasury governance. + +## Data Model + +Client-side only. Reads from blockchain APIs (Safe API, Etherscan, etc.). + +## Permission Model + +| Capability | Required SpaceRole | Description | +|-----------|-------------------|-------------| +| `view_treasury` | VIEWER | See wallet balances and flows | +| `propose_transaction` | PARTICIPANT | Propose Safe transactions | +| `approve_transaction` | PARTICIPANT | Sign/approve multisig txns | +| `configure_treasury` | ADMIN | Add/remove Safe signers, change thresholds | + +**Current Auth:** None. Smart contract permissions govern on-chain actions. + +## Canvas Integration + +Shape types: +- **`folk-token-mint`**: Token issuance widget +- **`folk-token-ledger`**: Token distribution visualization + +## Migration Plan + +1. Add EncryptID for identity linking (DID ↔ wallet address) +2. Space-level permissions for treasury dashboard access +3. On-chain permissions remain contract-governed