This guide explains how to enable live Cardano blockchain transactions in TrustlessTask.
- Cardano wallet connection interface
- Blockfrost API integration
- Transaction building framework
- Script interaction methods
- Transaction status tracking
- Blockfrost API key (free tier available)
- Cardano wallet browser extension
- Test ADA from faucet
- Deployed Plutus scripts
- Go to https://blockfrost.io/
- Sign up for free account
- Create new project (select Preprod testnet)
- Copy your project ID
Frontend (frontend/.env):
VITE_BLOCKFROST_PROJECT_ID=your_project_id_here
VITE_BLOCKFROST_URL=https://cardano-preprod.blockfrost.io/api/v0
VITE_NETWORK=PreprodBackend (backend-api/.env):
BLOCKFROST_PROJECT_ID=your_project_id_here
CARDANO_NETWORK=preprodChoose one:
- Nami: https://namiwallet.io/
- Eternl: https://eternl.io/
- Flint: https://flint-wallet.com/
Install browser extension and create wallet.
- Go to https://docs.cardano.org/cardano-testnet/tools/faucet/
- Enter your testnet address
- Receive 10,000 test ADA
In frontend/src/hooks/useWallet.ts:
const USE_REAL_BLOCKCHAIN = true; // Change from false to true# Stop current processes (Ctrl+C)
# Restart backend
cd backend-api
npm run dev
# Restart frontend (new terminal)
cd frontend
npm run devUser clicks "Connect Wallet"
β
Frontend detects wallet extension
β
Request wallet access
β
User approves in wallet popup
β
Get wallet address & balance
β
Store connection state
User creates project
β
Frontend builds transaction
β
Attach project datum
β
User signs in wallet
β
Submit to Cardano network
β
Wait for confirmation
β
Update UI with tx hash
import { getCardanoService } from './services/cardano';
const cardano = getCardanoService();
// Connect wallet
const { address, balance } = await cardano.connectWallet('nami');
console.log('Connected:', address);
console.log('Balance:', balance / 1_000_000, 'ADA');const txHash = await cardano.lockFundsInEscrow({
amount: 1000_000_000, // 1000 ADA
scriptAddress: 'addr_test1w...',
datum: {
projectId: 'proj_123',
client: 'addr_test1...',
freelancer: 'addr_test1...',
milestones: [...]
}
});
console.log('Funds locked! Tx:', txHash);const txHash = await cardano.releaseFundsFromEscrow({
scriptUtxo: 'utxo_ref',
redeemer: {
action: 'ReleaseFunds',
milestoneId: 1
},
recipient: 'addr_test1...'
});
console.log('Funds released! Tx:', txHash);const status = await cardano.getTransactionStatus(txHash);
if (status.confirmed) {
console.log('Confirmed at block:', status.blockHeight);
} else {
console.log('Pending...');
}- β Never stored in application
- β Managed by wallet extension
- β User signs each transaction
- β Amount limits enforced
- β Recipient addresses verified
- β User confirms in wallet popup
- β Plutus validators enforce rules
- β Funds locked until conditions met
- β No centralized control
- Connect wallet (Nami/Eternl/Flint)
- Create new project with milestones
- Sign transaction in wallet
- Wait for confirmation (~20 seconds)
- View transaction on CardanoScan
- As freelancer, mark milestone complete
- As client, approve milestone
- Sign release transaction
- Funds transferred to freelancer
- Verify on blockchain explorer
- Raise dispute
- Arbiter reviews
- Arbiter resolves
- Funds distributed per outcome
Preprod Testnet:
Mainnet:
https://preprod.cardanoscan.io/transaction/{txHash}
Error: nami wallet not found
Solution: Install wallet extension and refresh page
Error: Not enough ADA
Solution: Get test ADA from faucet
Error: Transaction submission failed
Solution:
- Check network (preprod vs mainnet)
- Verify script address
- Ensure enough ADA for fees
Error: 429 Too Many Requests
Solution:
- Wait a moment
- Upgrade Blockfrost plan
- Implement request caching
-
Audit Smart Contracts
- Professional security audit
- Formal verification
- Bug bounty program
-
Test Thoroughly
- All user workflows
- Edge cases
- Concurrent transactions
- Large amounts
-
Set Up Monitoring
- Transaction tracking
- Error logging
- Performance metrics
- Alert system
-
Prepare Support
- User documentation
- FAQ
- Support channels
- Emergency procedures
# Frontend
VITE_BLOCKFROST_PROJECT_ID=mainnet_project_id
VITE_BLOCKFROST_URL=https://cardano-mainnet.blockfrost.io/api/v0
VITE_NETWORK=Mainnet
# Backend
BLOCKFROST_PROJECT_ID=mainnet_project_id
CARDANO_NETWORK=mainnet- Phase 1: Limited beta (10 users)
- Phase 2: Public beta (100 users)
- Phase 3: Transaction limits ($1000)
- Phase 4: Full launch
- CIP-30 - Wallet API Standard
- Nami Docs
- Eternl Docs
- Blockfrost API key obtained
- Wallet extension installed
- Test ADA received
- Environment configured
- Blockchain mode enabled
- Wallet connection tested
- Transaction tested
- Smart contracts audited
- Mainnet API key obtained
- Monitoring setup
- Support documentation
- Emergency procedures
- Insurance considered
- Legal compliance checked
You now have everything needed to enable live Cardano blockchain transactions:
- Cardano Service - Wallet connection & transaction building
- Blockfrost Integration - Blockchain API access
- Transaction Builder - Smart contract interactions
- Status Tracking - Monitor confirmations
Next Step: Get your Blockfrost API key and enable blockchain mode!
The application will then execute real transactions on Cardano testnet, with funds locked in Plutus smart contracts and released based on milestone completion.