TrustlessTask now supports real Cardano blockchain transactions in both development and production environments!
- Lucid-cardano had bundling issues with Vite production builds
- WASM modules and Node.js dependencies caused build failures
- Production deployments on Vercel couldn't execute blockchain transactions
- Migrated to @emurgo/cardano-serialization-lib-browser
- Direct use of Cardano's official serialization library
- Proper WASM bundling with vite-plugin-wasm
- Browser-compatible implementation (no Node.js Buffer)
// Uses Cardano Serialization Library directly
- Fetches protocol parameters from Blockfrost
- Builds transactions with proper UTXO selection
- Handles change addresses automatically
- Attaches metadata for tracking
- Signs via wallet CIP-30 API
- Submits to Cardano blockchain via Blockfrost✅ Wallet Connection: Nami, Lace, Eternl, Flint ✅ Project Creation: Creates projects with milestones ✅ Milestone Completion: Freelancer sends proof transaction (1 ADA) ✅ Fund Release: Client approves and releases milestone payment ✅ Real Blockchain: All transactions on Cardano Preprod testnet ✅ Mobile Responsive: Works on all devices ✅ Production Ready: Deploys successfully on Vercel
@emurgo/cardano-serialization-lib-browser- Official Cardano libraryvite-plugin-wasm- WASM module supportvite-plugin-top-level-await- Async WASM loading
lucid-cardano- Had production build issues
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';
export default defineConfig({
plugins: [react(), wasm(), topLevelAwait()],
// ... other config
});// frontend/src/global.d.ts
// Global type declarations for Cardano wallet integration
interface CardanoWalletApi { ... }
interface Window {
cardano?: CardanoProviders;
}const cardanoService = new CardanoService(blockfrostApiKey, 'preprod');
await cardanoService.connectWallet('nami'); // or lace, eternl, flintconst signedTx = await cardanoService.buildTransaction({
recipient: 'addr_test1...',
amount: 1000000, // 1 ADA in lovelace
metadata: { type: 'payment', ... }
});const txHash = await cardanoService.submitTransaction(signedTx);
// Returns: transaction hash
// View on: https://preprod.cardanoscan.io/transaction/{txHash}# frontend/.env
VITE_BLOCKFROST_PROJECT_ID=preprod_your_api_key_here- Visit https://blockfrost.io
- Create free account
- Create new project (Preprod Testnet)
- Copy project ID
- Add to
.envfile
npm install
npm run dev
# Access at http://localhost:5173npm run build
# Builds successfully with WASM support
# dist/ folder ready for deployment- Automatically deploys from main branch
- WASM files properly bundled
- All blockchain features work
- Mobile responsive
- Freelancer clicks "Mark Complete"
- Builds transaction: 1 ADA to client (proof of completion)
- Attaches metadata: project ID, milestone ID, description
- Wallet signs transaction
- Submits to Cardano blockchain
- Transaction hash stored in database
- Client can view on block explorer
- Client clicks "Approve & Release Funds"
- Builds transaction: milestone amount to freelancer
- Attaches metadata: project ID, milestone ID, payment details
- Wallet signs transaction
- Submits to Cardano blockchain
- Transaction hash stored in database
- Funds transferred on-chain
✅ Chrome/Edge (desktop & mobile) ✅ Firefox (desktop & mobile) ✅ Safari (macOS & iOS) ✅ Samsung Internet ✅ All modern browsers with WASM support
- Main bundle: ~566 KB (gzipped: 115 KB)
- WASM module: ~2.7 MB (loaded on demand)
- CSS: ~19 KB (gzipped: 4 KB)
- Initial load: Fast (main bundle only)
- WASM loads when transaction needed
- Cached after first use
✅ Private keys never leave wallet ✅ Transactions signed in wallet extension ✅ Metadata validated before submission ✅ Blockfrost API key in environment variables ✅ No sensitive data in frontend code
- Remove lucid-cardano dependency
- Install Cardano Serialization Library
- Configure WASM plugins
- Fix TypeScript errors
- Remove Node.js Buffer usage
- Test transaction building
- Test transaction submission
- Verify mobile responsiveness
- Build production bundle
- Deploy to Vercel
- Test on production
- Verify blockchain transactions
All features work in production:
- ✅ Wallet connection
- ✅ Transaction building
- ✅ Transaction signing
- ✅ Blockchain submission
- ✅ Mobile responsive
- ✅ Production deployment
- Transaction Caching: Cache protocol parameters
- Batch Transactions: Multiple milestones in one tx
- Smart Contracts: Deploy Plutus validators
- Mainnet Support: Switch to mainnet when ready
- Multi-sig: Support multi-signature transactions
- Cardano Serialization Lib: https://github.com/Emurgo/cardano-serialization-lib
- Blockfrost API: https://docs.blockfrost.io/
- CIP-30 Wallet API: https://cips.cardano.org/cips/cip30/
- Check Blockfrost API key is valid
- Ensure wallet has testnet ADA
- Verify wallet is connected
- Check browser console for errors
- View transactions on Cardano explorer
TrustlessTask is now production-ready with full blockchain functionality:
- ✅ Real Cardano transactions
- ✅ Works in production builds
- ✅ Deploys on Vercel
- ✅ Mobile responsive
- ✅ Secure and reliable
No demo mode. No simulations. 100% real blockchain transactions.
Repository: https://github.com/Campverse/TrustlessTask Live Demo: https://trustless-task-i3xv.vercel.app Backend API: https://trustlesstask-1.onrender.com
Last Updated: December 16, 2024