docs: add MODULE_SPEC.md with permission model and capabilities

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-17 12:30:14 -07:00
parent 4c25ccd2ee
commit 63adc79e73
1 changed files with 38 additions and 0 deletions

38
MODULE_SPEC.md Normal file
View File

@ -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