73 lines
2.6 KiB
Plaintext
73 lines
2.6 KiB
Plaintext
---
|
|||
|
|
description: Bitcoin-only payment and monetary policy - on-chain, Lightning, ecash
|
||
|
|
globs: "**/*"
|
||
|
|
alwaysApply: true
|
||
|
|
---
|
||
|
|
|
||
|
|
# Bitcoin Only
|
||
|
|
|
||
|
|
## Core Rule
|
||
|
|
Bitcoin is the only monetary unit in AIUI. This applies everywhere — UI labels, data models, API responses, documentation, and conversation context.
|
||
|
|
|
||
|
|
## Supported Payment Protocols
|
||
|
|
- **On-chain Bitcoin**: BIP21 URI scheme (`bitcoin:bc1q...?amount=0.001`)
|
||
|
|
- **Lightning Network**: BOLT11 invoices, LNURL-pay, LNURL-withdraw, keysend
|
||
|
|
- **Cashu ecash**: Cashu tokens, mint interactions (`cashu:` URI, `web+cashu:`)
|
||
|
|
- **Fedimint/Fedi**: Federation ecash (`fedi:` URI)
|
||
|
|
- **Nostr Zaps**: NIP-57 Lightning zaps (social tipping)
|
||
|
|
|
||
|
|
## AIUI is NEVER a Wallet
|
||
|
|
|
||
|
|
### Never Do
|
||
|
|
- Store private keys or seed phrases
|
||
|
|
- Sign Bitcoin transactions
|
||
|
|
- Build or broadcast transactions
|
||
|
|
- Track wallet balances
|
||
|
|
- Display transaction history
|
||
|
|
- Create send/receive screens
|
||
|
|
- Implement payment processing logic
|
||
|
|
- Hold funds in custody
|
||
|
|
|
||
|
|
### Always Do
|
||
|
|
- Construct deep-link URIs and hand off to external wallet apps
|
||
|
|
- Detect installed wallet apps (via URI scheme probing or Tauri app detection)
|
||
|
|
- Let users configure preferred wallets in settings
|
||
|
|
- Display payment requests as QR codes with "Open in Wallet" buttons
|
||
|
|
- Show invoice/address details (amount, memo, expiry) as read-only information
|
||
|
|
|
||
|
|
## Wallet Deep-Linking
|
||
|
|
```typescript
|
||
|
|
// Construct URI, open external wallet — that's it
|
||
|
|
const uri = `lightning:${bolt11Invoice}`
|
||
|
|
window.open(uri) // or Tauri shell.open(uri)
|
||
|
|
```
|
||
|
|
|
||
|
|
Supported wallet URI schemes:
|
||
|
|
- `bitcoin:` — BIP21 (any on-chain wallet)
|
||
|
|
- `lightning:` — BOLT11 (any Lightning wallet)
|
||
|
|
- `cashu:` — Cashu tokens
|
||
|
|
- `fedi:` — Fedimint
|
||
|
|
- Wallet-specific: `phoenix://`, `zeus://`, `mutiny://`, `alby://`
|
||
|
|
|
||
|
|
## Denomination
|
||
|
|
- Primary unit: **sats** (1 BTC = 100,000,000 sats)
|
||
|
|
- Display: `1,234 sats` or `₿0.00001234`
|
||
|
|
- User preference: sats or BTC (configurable in settings)
|
||
|
|
- AI cost tracking: show token costs in sats
|
||
|
|
|
||
|
|
## Prohibited
|
||
|
|
- No fiat currencies (USD, EUR, etc.) — not in UI, not in code, not in variable names
|
||
|
|
- No altcoins or tokens
|
||
|
|
- No stablecoins (USDT, USDC, etc.)
|
||
|
|
- No fiat-denominated pricing
|
||
|
|
- No payment processor integrations (Stripe, PayPal, etc.)
|
||
|
|
- No KYC/AML flows
|
||
|
|
|
||
|
|
## Renderer Components
|
||
|
|
- `LightningInvoiceRenderer` — BOLT11 QR + amount + memo + "Open in Wallet"
|
||
|
|
- `BitcoinAddressRenderer` — BIP21 QR + "Open in Wallet"
|
||
|
|
- `CashuTokenRenderer` — ecash token + mint info + "Redeem in Wallet"
|
||
|
|
- `FedimintRenderer` — federation ecash + "Open in Fedi"
|
||
|
|
- `PaymentRequestRenderer` — unified card with payment method options
|
||
|
|
- `ZapRenderer` — Nostr zap display (NIP-57)
|