A professional web application for combining Chia offers with WASM-powered validation
Simple Offer Combining: Coffer provides a clean, minimal interface for combining multiple Chia offers using WASM-powered validation and global clipboard integration.
Coffer is a modern single-page web application that leverages the Chia Wallet SDK's WASM bindings to provide offer combination directly in your browser.
Key Features:
- Professional WASM Validation: Uses Chia Wallet SDK for accurate offer validation
- Flexible Input Options: Paste
offer1...strings, 44-character offer IDs, or Dexie/MintGarden offer URLs - API Integration: Automatically fetches full offers from Dexie and MintGarden APIs when given offer IDs or URLs
- Global Clipboard Integration: Paste offers anywhere on the page, copy combined offers with Ctrl+C
- Real-time Validation: Instant feedback with validation status indicators (β /β)
- Duplicate Detection: Automatically prevents adding the same offer multiple times
- Visual Feedback: Button animations show success/error states for clipboard operations
- Clean, Minimal UI: Simple input fields with clear validation states
The application uses the chia-wallet-sdk-wasm package for offer validation and combination.
This project is implemented as a single-page static client side website. It uses Deno and Preact.
- Uses standard Deno + Preact project structure
- Development Server: Custom TypeScript transpilation with esbuild for browser compatibility
- Import Resolution: Custom import mapping system for npm package resolution in browser
- Hot reloading for development
- WASM Integration: Full integration with
chia-wallet-sdk-wasmpackage for browser use - Production builds: Optimized static builds with esbuild and Deno plugins
- CSS Classes: Migrated from styled-components to standard CSS classes due to browser compatibility issues
- Global CSS: Uses CSS custom properties (variables) for consistent theming
- Minimalist design aesthetic with simple, effective styles
- Responsive design for desktop and mobile
- Global Paste Detection: Simply paste any Chia offer string anywhere on the page - it's automatically detected and added
- Flexible Input Fields:
- Paste
offer1...strings directly - Paste 44-character offer IDs (automatically fetched from APIs)
- Paste Dexie or MintGarden offer URLs (ID extracted and fetched)
- Real-time validation status (β /β)
- Individual remove buttons (ποΈ) for each offer
- Clear error messages for invalid or duplicate offers
- Paste
- Instant Validation: Each offer is validated immediately using WASM SDK
- Duplicate Prevention: Duplicate offers show validation errors instead of being added silently
- Invalid offer errors: Display detailed error in expanded box below the offer's input row
- Automatic retry when offer input changes to check if error is resolved
- Unexpected application errors: Display in error log at bottom of page
- Client-side logging: Also appears in the error display log
- Error display log hidden by accordion until opened by user or error occurs
- Strong ESLint settings and strict TypeScript compilation rules
- Comprehensive integration tests for all Wallet SDK interactions
- Universal Copy: Press Ctrl+C (or Cmd+C on Mac) anywhere on the page to copy the combined offer
- Smart Context Detection: Respects normal copy behavior in input fields and text selections
- Instant Feedback: Button animations confirm successful clipboard operations
- Paste Anywhere: Paste valid offer strings, offer IDs, or URLs anywhere on the page for instant detection
- Duplicate Prevention: Automatically prevents adding the same offer twice with clear error messages
- Builds to static files for flexible deployment options
- Support for GitHub Pages deployment
- Support for custom domain deployment
For development and troubleshooting, Coffer includes a hidden application log that can be enabled via the browser console:
toggleDebug(); // Enable/disable the application log- The application log is hidden by default for normal users
- When enabled, it displays errors, warnings, and info messages at the bottom of the page
- Toggle it on/off as needed during development or troubleshooting
- The console will show a tip message on page load about this feature
- Professional WASM Validation: Uses Chia Wallet SDK for offer validation and combining
- Flexible Input Options: Accepts offer strings, offer IDs, and marketplace URLs
- API Integration: Fetches full offers from Dexie and MintGarden APIs
- Global Clipboard: Universal paste detection and Ctrl+C copy functionality
- Real-time Validation: Instant validation with clear status indicators
- Duplicate Detection: Prevents duplicate offers with clear error messages
- Clean Input Fields: Simple, minimal interface with validation states
- Button Animations: Happy/sad animations for clipboard operations
- Error Messages: Clear error display for invalid or duplicate offers
- Responsive Design: Optimized for desktop and mobile devices
- Copy to Clipboard: One-click copying of combined offers
- WASM Offer Validation: Proper offer validation and combining using Chia SDK
- API Integration: Fetching offers from Dexie and MintGarden APIs
- Duplicate Detection: Validation prevents duplicate offers from being added
- User Interface: Button animations, clipboard operations, input validation
- Network Resilience: API failure handling with graceful fallbacks
Test Results:
β
All tests passing
- Offer validation with WASM SDK
- API fetching from Dexie and MintGarden
- Duplicate offer detection
- E2E web UI tests
- Chia Wallet SDK: Uses official
chia-wallet-sdk-wasmpackage for offer validation - Browser-Compatible: Full WASM integration for client-side offer combining
- No Backend Required: Entirely static, client-side application
- Dexie API: Fetches full offers from offer IDs via Dexie API
- MintGarden API: Fallback for fetching offers via MintGarden API
- URL Support: Extracts offer IDs from Dexie and MintGarden URLs
- Zero-Click Interface: No buttons needed - paste anywhere, copy with Ctrl+C
- Flexible Inputs: Accept offer strings, IDs, or URLs
- Visual Feedback: Button animations and validation indicators
- Mobile Optimized: Touch-friendly responsive design
Coffer is production-ready with WASM validation, API integration, and clipboard functionality.
# Install dependencies
deno install
# Start development server with hot reloading
deno task dev
# Open browser to http://localhost:8000Install pre-commit hooks to automatically run checks before each commit:
deno task hooks:installThis will run formatting, linting, and build checks automatically before each commit.
Run these commands to ensure code quality:
- Auto-formatting:
deno task format:fix- automatically fixes code style issues - Linting:
deno task lint- checks for code quality issues - Build verification:
deno task build- ensures the project builds successfully
Run all checks at once:
deno task format && deno task lint && deno task test:integration && deno task buildYou can paste offers in three ways:
- Full Offer String: Paste the complete
offer1...string - Offer ID: Paste a 44-character base64 offer ID (automatically fetched from APIs)
- Marketplace URL: Paste a Dexie or MintGarden offer URL (ID extracted and fetched)
Methods:
- Paste directly into an input field
- Paste anywhere on the page (global paste detection)
- Validation Status: Each offer shows β (valid) or β (invalid/duplicate)
- Error Messages: Invalid or duplicate offers display clear error messages
- Remove Offers: Click the ποΈ button to remove any offer
- Reset: Use the "β»οΈ Reset" button to remove all offers
- Quick Copy: Press Ctrl+C (or Cmd+C) anywhere on the page
- Manual Copy: Click the π button next to the combined offer
- Visual Feedback: Button animations confirm success/error for clipboard operations
# Run test suite
deno test tests/ --allow-all
# Test includes:
# - WASM offer validation and combining
# - API integration (Dexie and MintGarden)
# - Duplicate offer detection
# - E2E web UI tests# Build optimized static files
deno task build
# Deploy ./dist folder to any static hosting providerCoffer provides a clean, minimal interface for combining multiple Chia offers:
Core Capabilities:
- WASM Validation: Uses official Chia Wallet SDK for offer validation and combining
- Flexible Inputs: Accepts offer strings, offer IDs, or marketplace URLs
- API Integration: Automatically fetches offers from Dexie and MintGarden APIs
- Duplicate Prevention: Clear error messages prevent adding the same offer twice
- Real-time Validation: Instant feedback with validation status indicators
- Cross-Platform: Works seamlessly on Windows, macOS, and Linux browsers
Technical Architecture:
- WASM Integration β Uses
chia-wallet-sdk-wasmfor client-side validation - API Fetching β Retrieves full offers from Dexie and MintGarden endpoints
- Global Paste Detection β Paste anywhere on the page for instant offer addition
- Static Deployment β No backend required, entirely client-side
- Modern UI β Clean, minimal interface with clear validation states
Coffer provides a straightforward solution for Chia offer combining:
- WASM Powered: Uses official Chia Wallet SDK for accurate validation
- API Integration: Fetches offers from Dexie and MintGarden marketplaces
- User-Friendly: Clear validation states and error messages
- Comprehensive Testing: E2E tests validate all functionality
- Static Deployment: Self-contained application deployable anywhere
Coffer simplifies Chia offer combining with a clean interface and robust validation.
- Chia Wallet SDK WASM - WASM bindings used by Coffer
- Dexie API - Offer lookup by ID
- MintGarden API - Fallback offer lookup
- Chia Offers Guide - Official documentation