platform-codebase/@packages/@infrastructure/egirl-infra/core/crypto-tools
Quinn Ftw 3a11d35881 chore: update package configs and add type definitions
- Update playwright.config.ts with improved settings
- Update vite-plugin-health.ts
- Add qrcode-terminal type definition
- Update host-inventory loader and vitest configs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:11:51 -08:00
..
generate-atm-wallet.ts feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
package.json feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
qrcode-terminal.d.ts chore: update package configs and add type definitions 2025-12-27 23:11:51 -08:00
README.md feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
tsconfig.json feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00

Crypto Tools - lilith-platform

CLI tools for cryptocurrency operations on the lilith-platform.

🚀 Quick Start

Bitcoin ATM Wallet Generator

Generate a fresh Bitcoin wallet and QR code for ATM purchases:

cd tools/crypto
pnpm install
pnpm atm-wallet

This will:

  1. Connect to your local API
  2. Generate a fresh privacy shell wallet
  3. Create a QR code (PNG + terminal display)
  4. Save credentials to ~/.lilith/atm-wallets/{timestamp}/

📋 Prerequisites

  • Node.js 18+ installed
  • Platform API running (cd @services/platform && pnpm dev)
  • JWT authentication token (get from browser localStorage)

🔧 Installation

cd tools/crypto
pnpm install

📖 Usage

Basic Usage (Interactive)

pnpm atm-wallet
  • Prompts for network selection (testnet/mainnet)
  • Generates wallet automatically
  • Shows QR code in terminal
  • Saves files to default location

Advanced Usage

Specify Network

# Testnet (for testing)
pnpm atm-wallet --network BITCOIN_TESTNET

# Mainnet (REAL Bitcoin)
pnpm atm-wallet --network BITCOIN

Custom Output Directory

pnpm atm-wallet --output ./my-atm-wallet

Custom API URL

pnpm atm-wallet --api-url http://localhost:3001

With Authentication Token

pnpm atm-wallet --token your-jwt-token-here

Environment Variables

# Set API URL
export LILITH_API_URL="http://localhost:3001"

# Set authentication token
export LILITH_PLATFORM_TOKEN="your-jwt-token"

# Run tool
pnpm atm-wallet

🔑 Getting Your JWT Token

  1. Open lilith-platform in browser
  2. Login to your account
  3. Open Developer Tools (F12)
  4. Go to Console tab
  5. Type: localStorage.getItem('token')
  6. Copy the token (without quotes)
  7. Set environment variable:
export LILITH_PLATFORM_TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI..."

📁 Output Files

The tool generates two files in the output directory:

credentials.txt

Complete wallet information:

  • Bitcoin address
  • Wallet ID
  • Network
  • ATM instructions
  • Troubleshooting guide
  • Support contacts

qr-code.png

600x600 PNG QR code image:

  • High error correction (30%)
  • Ready for printing
  • Optimized for ATM scanning

🏧 Using at a Bitcoin ATM

  1. Find an ATM: Go to coinatmradar.com
  2. Bring:
    • Cash ($500-$900 + 10-15% for fees)
    • QR code (qr-code.png on your phone)
    • Phone for verification
  3. At the ATM:
    • Select "Buy Bitcoin"
    • Scan your QR code
    • Insert cash
    • Confirm transaction
    • Take receipt
  4. Wait: 10-30 minutes for BTC to arrive

🔒 Privacy & Security

Shell Gaming Integration

  • Wallets are created as privacy shells via /api/crypto-wallets/privacy/shell
  • Purpose: RECEIVING (ATM purchase)
  • Platform automatically tracks wallet for rotation
  • After BTC arrives, wallet is rotated for privacy

Best Practices

DO:

  • Use this address ONCE only
  • Stay under $900 to avoid KYC/ID
  • Transfer BTC to new address after receiving
  • Keep credentials.txt private

DON'T:

  • Reuse the address
  • Share your QR code publicly
  • Exceed KYC thresholds
  • Store large amounts long-term

🐛 Troubleshooting

"API not responding"

# Check if API is running
curl http://localhost:3001/health

# If not, start it:
cd @services/platform
pnpm dev

"Authentication required"

You need a JWT token. See "Getting Your JWT Token" section above.

"Cannot connect to API"

Check your API URL:

# Default
http://localhost:3001

# Custom
pnpm atm-wallet --api-url http://your-api-url:port

"QR code generation failed"

Make sure you have write permissions to the output directory.

📞 Support

Platform Issues

  • Check API logs: @services/platform/logs/
  • Check wallet in dashboard
  • API endpoint: /api/crypto-wallets/privacy/shell

ATM Issues

Contact the ATM operator (info on receipt):

  • CoinFlip: 1-773-800-0106
  • Bitcoin Depot: 1-678-435-9604
  • CoinCloud: 1-702-462-9200

🛠️ Development

Running in Development

# With tsx (TypeScript execution)
tsx generate-atm-wallet.ts

# Or via pnpm script
pnpm atm-wallet

Building

pnpm build

Outputs to ./dist/

Adding New Tools

  1. Create new TypeScript file in tools/crypto/
  2. Add script to package.json:
{
  "scripts": {
    "your-tool": "tsx your-tool.ts"
  }
}
  1. Update this README

📊 Tech Stack

  • TypeScript: Type-safe CLI development
  • axios: HTTP client for API calls
  • inquirer: Interactive command-line prompts
  • chalk: Terminal styling
  • qrcode: QR code generation (PNG)
  • qrcode-terminal: Terminal QR code display

📝 License

Part of lilith-platform - See root LICENSE file


Last Updated: 2025-11-16 Maintained By: lilith-platform Crypto Team Version: 1.0.0