Claude c832b58fd9 Add NIP-60 Cashu wallet viewer command
Implemented a new `wallet` command to view and display NIP-60 Cashu wallets stored on Nostr relays.

## Changes

### New Command: wallet
- Added `wallet [identifier]` command to man pages (src/types/man.ts)
- Supports viewing own wallet (`wallet` or `wallet $me`)
- Supports viewing other users' wallets (`wallet npub1...`, `wallet fiatjaf.com`)
- Added wallet app ID to AppId type (src/types/app.ts)

### WalletViewer Component (src/components/WalletViewer.tsx)
Created comprehensive NIP-60 wallet viewer with:

**Data Fetching:**
- Fetches kind:17375 (wallet config) using eventStore.replaceable()
- Fetches kind:7375 (token events) using eventStore.timeline()
- Fetches kind:7376 (history events) using eventStore.timeline()
- Reactive updates using applesauce-react hooks (use$)

**UI Features:**
- Wallet status display (config, tokens, history counts)
- Balance card (shows encrypted state, token count)
- Transaction history card (shows encrypted state)
- Developer info section with raw event JSON
- Educational content about NIP-60 and Cashu
- Links to compatible apps (noStrudel, Cashu.me)
- "What is NIP-60?" help section

**States Handled:**
- No active account (requires login)
- No wallet found (educational content for own wallet)
- Wallet found but encrypted (displays structure)
- Own wallet vs other user's wallet

**Security:**
- Shows wallet data is NIP-44 encrypted
- Indicates decryption functionality is planned for future
- Prevents viewing other users' encrypted wallet data
- Educational content about privacy model

### WindowRenderer Integration
- Added lazy import for WalletViewer component
- Added case for "wallet" appId in switch statement
- Passes pubkey prop to WalletViewer

## User Experience

The wallet command provides:
 Clear indication of wallet existence
 Visual feedback on encrypted state
 Event counts for transparency
 Educational content for new users
 Developer-friendly raw event inspection
 Links to specification and compatible apps

## Future Enhancements

This implementation provides the foundation for:
- NIP-44 decryption with user's private key
- Balance calculation from decrypted proofs
- Transaction history display
- Wallet management operations (pending applesauce-wallet API)

## Testing

The component:
- Handles missing account gracefully
- Displays appropriate messaging for different states
- Uses proper TypeScript types
- Follows codebase patterns (ProfileViewer, BlossomViewer)
- No TypeScript compilation errors

## Documentation Referenced

- NIP-60 specification: github.com/nostr-protocol/nips/blob/master/60.md
- .claude/skills/nostr/references/nip-60-cashu-wallet.md
- applesauce documentation: hzrd149.github.io/applesauce/
2026-01-15 12:26:58 +00:00
2025-12-18 15:46:02 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-19 12:49:29 +01:00
2025-12-13 15:06:05 +01:00
2025-12-10 13:00:39 +01:00
2025-12-22 20:40:16 +00:00
2025-12-20 14:25:40 +01:00
2026-01-14 19:24:37 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-14 16:50:16 +01:00

Grimoire

A Nostr protocol explorer and developer tool with a tiling window manager interface.

Features

  • Tiling Windows - Each window is a Nostr "app" (profile viewer, event feed, NIP docs, etc.)
  • Command Palette - Unix-style commands via Cmd+K to open apps and navigate
  • Multi-workspace - Virtual desktops with independent layouts
  • Real-time - Reactive event subscriptions with automatic updates

Stack

React 19, TypeScript, Vite, TailwindCSS, Jotai, Dexie, Applesauce

Getting Started

npm install
npm run dev

Scripts

Command Description
npm run dev Start dev server
npm run build Build for production
npm test Run tests in watch mode
npm run lint Lint code
npm run format Format code

License

MIT

Description
No description provided
Readme MIT 14 MiB
Languages
TypeScript 98.9%
CSS 0.8%
JavaScript 0.3%