---
id: TASK-18
title: Implement CRDT token issuance system (mint + ledger shapes)
status: Done
assignee: []
created_date: '2026-02-15 22:03'
labels:
  - feature
  - tokens
  - CRDT
dependencies: []
priority: high
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Added BFT-CRDT token infrastructure as FolkShape components that live in the existing Automerge document. Admins can create token types (mint) and issue them to participants by DID or email (ledger), with real-time sync across all connected peers.

New components:
- folk-token-mint: token definition (name, symbol, supply, color, icon) with inline edit form
- folk-token-ledger: distribution tracker with issuance form, email escrow support, aggregated balance view

Canvas integration:
- Toolbar "Token" button creates mint+ledger+arrow pair
- createShapeElement switch cases for remote hydration
- SHAPE_DEFAULTS entries for both shapes
- CSS selectors for position:absolute and connect-mode

Sync:
- community-sync.ts updated with remote property handlers for both shapes

Demo data:
- GOV token: 100 supply, 4 equal holders (25 each)
- CRED token: 500 supply, 155 issued with one email escrow entry

Also includes from previous session:
- EncryptID and interoperability sections added to rSpace landing page
- rTube and rStack added to EncryptID allowed origins and landing page
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 folk-token-mint component created with toJSON/createRenderRoot pattern
- [ ] #2 folk-token-ledger component created with entries array and issuance form
- [ ] #3 Canvas toolbar Token button creates mint+ledger+arrow pair
- [ ] #4 Demo seeds include GOV and CRED tokens with ledger entries
- [ ] #5 community-sync handles remote property updates for both shapes
- [ ] #6 Vite build succeeds (86 modules)
<!-- AC:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Committed as c2255f1, pushed to both Gitea and GitHub. 8 files changed, 1,412 insertions. Tokens are just shapes in the CRDT document — any app connecting via WebSocket gets token data for free with no new infrastructure.
<!-- SECTION:FINAL_SUMMARY:END -->
