A web application for fetching and exploring text embedded in Cardano blockchain transactions. This project surfaces human-readable text from on-chain metadata using the Blockfrost API.
This is a mobile-first, responsive web app that:
- Fetches the latest Cardano transactions from the blockchain
- Extracts and displays metadata text embedded on-chain
- Supports live updates to monitor new transactions
- Provides card and unique metadata views for analysis
- Works across multiple Cardano networks (Mainnet, Preview, Preprod)
- Frontend: Vanilla HTML5, CSS3, JavaScript (ES6+)
- API: Blockfrost Cardano API
- Deployment: Netlify (serverless functions)
- Proxy: Netlify Functions for API requests
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Code editor (VS Code, etc.)
- Node.js (for local development/testing)
- Netlify CLI (optional, for local testing)
This project requires Blockfrost API keys for different networks. Set them as environment variables:
BLOCKFROST_MAIN_KEY=your_mainnet_api_key_here
BLOCKFROST_PREVIEW_KEY=your_preview_api_key_hereFor Netlify deployment, configure the environment variables in the Netlify dashboard:
- Site settings → Build & deploy → Environment → Environment variables
- Add:
BLOCKFROST_MAIN_KEYwith your Mainnet API key value - Add:
BLOCKFROST_PREVIEW_KEYwith your Preview API key value
cardano-meta/
├── index.html # Main HTML file with UI
├── script.js # Core JavaScript functionality
├── styles.css # Styling (not shown in current files)
├── netlify.toml # Netlify configuration (create if needed)
├── functions/
│ └── blockfrost-proxy.js # Netlify function for API proxy
└── readme.md # This file
- Mainnet: Production Cardano blockchain
- Preview: Test network for development
- Preprod: Pre-production environment
- Latest transactions (configurable count, 1-20)
- Metadata label filtering (search by specific label)
- Live updates (auto-refresh every 20 seconds)
- Auto-scroll to newest results
- Card View: Individual transaction cards with metadata details
- Unique Metadata: Consolidated list of all unique metadata text
- Recursive JSON traversal to extract all string values
- Support for nested metadata structures
- Label-based filtering and organization
- Latest Blocks:
GET /blocks/latest - Block Transactions:
GET /blocks/{hash}/txs - Transaction Metadata:
GET /txs/{hash}/metadata - Label Search:
GET /metadata/txs/labels/{label}
The app uses a Netlify function (blockfrost-proxy.js) to proxy requests to Blockfrost. This allows:
- Hiding the API key from client-side code
- Avoiding CORS issues
- Rate limiting control
- Commit changes to the
mainbranch and push to the GitHub repo.
-
Install Dependencies
npm install --dev
-
Set Environment Variable Edit the file
.envto add your BlockFrost API keys.BLOCKFROST_MAIN_KEY=your_api_key_here BLOCKFROST_PREVIEW_KEY=your_api_key_here -
Link Netlify Project
npm run init
-
Start Development Server
npm run dev
-
Test the App
- Open
http://localhost:3999
- Open
- Test different network selections
- Verify metadata extraction works
- Test live update functionality
- Test label filtering
- Test responsive design on mobile
- Rate Limits: Blockfrost has rate limits based on your subscription tier
- Costs: API calls may incur costs depending on your plan
- Caching: Consider implementing caching for better performance
- Error Handling: The app includes basic error handling for failed requests
- API key is stored server-side (Netlify environment variable)
- No sensitive data is exposed in client-side code
- HTTPS is enforced by Netlify
- Input validation for user parameters
- Debounced live updates (20-second intervals)
- Lazy loading of transaction metadata
- Efficient DOM updates with innerHTML
- Minimal external dependencies
-
API Key Not Set
- Ensure
BLOCKFROST_MAIN_KEYandBLOCKFROST_PREVIEW_KEYare configured in Netlify - Check environment variables locally
- Ensure
-
CORS Errors
- Verify the proxy function is working
- Check Netlify function logs
-
No Metadata Found
- Some transactions may not have metadata
- Check if the label filter is too restrictive
- Verify network connectivity
- Live Updates Not Working
- Check browser console for errors
- Verify JavaScript is running
- Check network requests
MIT
Kory Becker https://www.primaryobjects.com
