task/29: Timmy as economic peer — Nostr identity, zap-out, vouching, engagement engine #47
Reference in New Issue
Block a user
Delete Branch "task/29-timmy-economic-peer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Timmy as Economic Peer — Task #29
What was built
TimmyIdentityService (
artifacts/api-server/src/lib/timmy-identity.ts)TIMMY_NOSTR_NSECenv var (bech32 nsec)sign(EventTemplate)→ NIP-01 finalizeEvent with Timmy's keyencryptDm(recipientPubkeyHex, plaintext)→ NIP-04 encrypted contentZapService (
artifacts/api-server/src/lib/zap.ts)lnbitsService.payInvoice()(stub-mode aware)timmy_nostr_eventsaudit tablemaybeZapOnJobComplete()wired in jobs.ts after trust scoringZAP_PCT_DEFAULT(default 0 = disabled),ZAP_MIN_SATS(default 10)ZAP_PCT_DEFAULT > 0EngagementService (
artifacts/api-server/src/lib/engagement.ts)ENGAGEMENT_INTERVAL_DAYS(default 0 = disabled)ENGAGEMENT_ABSENT_DAYSdaysagentService.chatReply()timmy_nostr_events; publishes toNOSTR_RELAY_URLif setVouching endpoint (
POST /api/identity/vouch)nostr_trust_vouchestableTimmy identity endpoint (
GET /api/identity/timmy)DB schema — two new tables pushed to production:
timmy_nostr_events(audit log for all outbound Nostr events)nostr_trust_vouches(voucher/vouchee social graph)Frontend identity card (
the-matrix/)#timmy-id-cardwidget: bottom-right, shows shortened npub + zap countConfig env vars added
TIMMY_NOSTR_NSECZAP_PCT_DEFAULTZAP_MIN_SATSENGAGEMENT_INTERVAL_DAYSENGAGEMENT_ABSENT_DAYSNOSTR_RELAY_URLCloses #34
✅ Merged directly to main — task-29 was committed and pushed to
mainas a squash commit (eb5dcfd). This PR documents the changes; the branch is identical tomainHEAD.