The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

Build a crypto wallet checker

To build a crypto wallet checker, you can create a simple web application that allows users to enter a wallet address and check its balance and recent transactions. Below is a functional prototype using Node.js with Express.js, and a front-end using HTML + JavaScript. This example uses Etherscan API for Ethereum wallet checking. You can adapt it for Bitcoin or other blockchains by changing the API.


Features

  • Input Ethereum wallet address

  • Validate address format

  • Fetch balance and recent transactions from Etherscan

  • Display results in the browser


Prerequisites


Folder Structure

pgsql
crypto-wallet-checker/ ├── public/ │ └── index.html ├── server.js ├── package.json └── .env

1. package.json

json
{ "name": "crypto-wallet-checker", "version": "1.0.0", "description": "Simple Ethereum wallet checker", "main": "server.js", "scripts": { "start": "node server.js" }, "dependencies": { "axios": "^1.6.0", "dotenv": "^16.0.3", "express": "^4.18.2" } }

2. .env

ini
ETHERSCAN_API_KEY=your_etherscan_api_key

3. server.js

js
require('dotenv').config(); const express = require('express'); const axios = require('axios'); const path = require('path'); const app = express(); const PORT = process.env.PORT || 3000; app.use(express.static('public')); app.get('/check-wallet', async (req, res) => { const { address } = req.query; const apiKey = process.env.ETHERSCAN_API_KEY; if (!address) { return res.status(400).json({ error: 'Address is required' }); } try { const balanceURL = `https://api.etherscan.io/api?module=account&action=balance&address=${address}&tag=latest&apikey=${apiKey}`; const txURL = `https://api.etherscan.io/api?module=account&action=txlist&address=${address}&startblock=0&endblock=99999999&sort=desc&apikey=${apiKey}`; const [balanceRes, txRes] = await Promise.all([ axios.get(balanceURL), axios.get(txURL), ]); const balance = balanceRes.data.result; const transactions = txRes.data.result.slice(0, 5); res.json({ balance: (parseInt(balance) / 1e18).toFixed(5), transactions, }); } catch (err) { res.status(500).json({ error: 'Failed to fetch wallet data' }); } }); app.listen(PORT, () => { console.log(`Server running at http://localhost:${PORT}`); });

4. public/index.html

html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Crypto Wallet Checker</title> <style> body { font-family: Arial; margin: 40px; } input, button { padding: 10px; font-size: 16px; } #result { margin-top: 20px; } </style> </head> <body> <h1>Ethereum Wallet Checker</h1> <input type="text" id="walletAddress" placeholder="Enter Ethereum Address"/> <button onclick="checkWallet()">Check</button> <div id="result"></div> <script> async function checkWallet() { const address = document.getElementById('walletAddress').value; const resultDiv = document.getElementById('result'); resultDiv.innerHTML = 'Loading...'; try { const res = await fetch(`/check-wallet?address=${address}`); const data = await res.json(); if (data.error) { resultDiv.innerHTML = `<p>Error: ${data.error}</p>`; return; } resultDiv.innerHTML = ` <h3>Balance: ${data.balance} ETH</h3> <h4>Recent Transactions:</h4> <ul> ${data.transactions.map(tx => ` <li> <strong>Hash:</strong> ${tx.hash.slice(0, 10)}... | <strong>Value:</strong> ${parseFloat(tx.value / 1e18).toFixed(5)} ETH | <strong>To:</strong> ${tx.to} </li> `).join('')} </ul> `; } catch (e) { resultDiv.innerHTML = `<p>Error fetching data</p>`; } } </script> </body> </html>

Run the App

bash
npm install node server.js

Visit: http://localhost:3000


Optional Enhancements

  • Add QR code scanning for mobile wallets

  • Support multiple blockchains (e.g., BSC, Polygon, Bitcoin)

  • Add ENS name resolution (via web3.js or ethers.js)

  • Add wallet reputation (e.g., via Blockscan or Chainalysis APIs)

  • Deploy on Vercel, Netlify, or Heroku for public access

Let me know if you want a version using React, Python (Flask), or CLI-based version.

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About