πͺͺ VerifyMyWallet
A Zero-Knowledge Proof (ZKP) dApp for Secure Multi-Chain Wallet Verification (Hedera + EVM)
VerifyMyWallet is a privacy-first dApp that lets users prove wallet ownership across Hedera Hashgraph and EVM-compatible chains (Ethereum, Polygon, BSC, etc.) using cryptographic proofs and SDK integrations. The app is split into a Vite + React frontend (deployed to Vercel) and an Express backend (deployed to Render). The backend exposes SDK features for chain interactions and proof verification.
π Features
- Privacy-preserving wallet verification using ZKP principles
- Multi-chain support: Hedera + EVM-compatible networks (via
ethers.js) - Backend SDK feature set to interact with Hedera SDK and EVM RPCs
- Frontend built with Vite + React, styling via Tailwind (optional)
pnpmpackage manager support- Frontend β Vercel, Backend β Render deployment setup
- Mobile-friendly responsive UI with viewport-safe fullscreen handling
π Project Structure
VerifyMyWallet/
βββ client/ # Frontend (React + Vite)
β βββ public/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ main.jsx
β βββ .env.example
β βββ package.json
β
βββ server/ # Backend (Express.js + Hedera/EVM SDKs)
β βββ controllers/
β βββ routes/
β βββ sdk/ # SDK wrapper for Hedera & EVM interactions
β βββ index.js
β βββ package.json
β
βββ README.md
π§ Requirements
- Node.js (>= 18 recommended)
- pnpm
- Git
- A Hedera test/mainnet account + private key (for Hedera verification)
- RPC provider (Alchemy/Infura/QuickNode) for EVM chains (if verifying EVM wallets)
π§© Environment Variables
Frontend (client/.env or Vercel env vars)
VITE_API_BASE_URL=https://verify-my-wallet.onrender.com
VITE_CHAIN=hedera # default chain for UI hints (optional)
Backend (server/.env or Render env vars)
# Hedera
HEDERA_ACCOUNT_ID=0.0.xxxxx
HEDERA_PRIVATE_KEY=<your_hedra_private_key>
# Optional public key to verify against (demo)
USER_PUBLIC_KEY=<hex-or-der-encoded-public-key>
# EVM RPC
RPC_URL=https://eth-mainnet.g.alchemy.com/v2/<YOUR_KEY>
# App
PORT=5000
β οΈ Do NOT commit private keys or .env files to source control. Add them in Render / Vercel dashboards for production.
π§± Installation & Local Dev
Clone and run locally with pnpm.
# clone
git clone https://github.com/yourusername/VerifyMyWallet.git
cd VerifyMyWallet
# frontend
cd client
pnpm install
pnpm run dev
# open http://localhost:5173
# backend (new terminal)
cd ../server
pnpm install
# set local .env with the variables above
pnpm run start
# server runs at http://localhost:5000
π Deployment
Frontend β Vercel
- Import repo on Vercel.
- Set Root Directory to
client/. - Set:
- Install Command:
pnpm install - Build Command:
pnpm run build - Output Directory:
dist- Add Environment Variable on Vercel:
VITE_API_BASE_URL=https://verify-my-wallet.onrender.com
- Deploy.
Backend β Render
- Create a new Web Service on Render.
- Connect repo and choose root directory
server. - Set Install Command:
pnpm install - Set Start Command:
node index.js(orpnpm start) - Add the backend environment variables (HEDERA_* , RPC_URL, PORT, etc.)
- Deploy. The deployed URL will be your
VITE_API_BASE_URL.
π§ How It Works (High-Level Flow)
- User clicks βVerifyβ in the frontend and chooses a wallet (MetaMask / HashPack / other).
- Frontend requests a nonce from backend (
GET /generate-nonce). - Wallet signs the nonce:
- EVM: sign message with
ethers.js(MetaMask) Hedera: sign bytes via HashPack / Hedera SDK
- Frontend sends signed proof to backend (
POST /verify-proof) includingnonce,proof,accountId,chain,publicKey(hedera). - Backend SDK verifies:
- Frontend sends signed proof to backend (
For EVM: uses
ethers.verifyMessageor RPC to confirm signer = accountFor Hedera: uses
@hashgraph/sdkto validate signature against provided publicKey- Backend returns
success: trueorfalse. Optionally produce a ZKP-based proof record (future). - Frontend shows a verification badge and optional downloadable proof JSON.
- Backend returns
π§© Backend SDK Features
The server/sdk/ folder contains helper modules that abstract chain interactions:
sdk/hedera.jsinitClient(accountId, privateKey)β initialize Hedera clientverifySignature(publicKey, message, signature)β verify Hedera signatures- (Optional)
submitTransaction(...)β in case of on-chain receipts
sdk/evm.jsverifyEvmSignature(message, signature)β recover address and matchgetAccountFromRpc(address)β fetch on-chain data via RPC if needed
These wrappers centralize cryptographic verification logic and let the rest of the code call sdk.verify() without chain-specific details.
π Security Notes
- Private keys must remain server-side and never transmitted to the frontend.
- Frontend only receives non-sensitive nonces and sends back signed proofs.
- Use HTTPS and secure environment variables on hosting providers.
- Consider rotating Hedera private keys and RPC keys regularly.
- ZKP circuit code should be audited before production use (if added).
β API Endpoints (Example)
GET /generate-nonce
Response:
{ "nonce": "uuid-or-random-string" }
POST /verify-proof Request body:
{
"nonce": "string",
"proof": "signature or base64",
"accountId": "0x... or 0.0.xxxx",
"chain": "evm" | "hedera",
"publicKey": "optional for hedera"
}
Response:
{ "success": true, "message": "Wallet verified!" }
π¦ Example Frontend Usage (axios)
const API = import.meta.env.VITE_API_BASE_URL;
// generate nonce
const { data } = await axios.get(`${API}/generate-nonce`);
// sign nonce in wallet, then verify:
const res = await axios.post(`${API}/verify-proof`, {
nonce,
proof,
accountId: walletAddress,
chain: walletType, // "evm" or "hedera"
publicKey: walletType === 'hedera' ? publicKey : null,
});
πΊοΈ Future Roadmap
- Add zk-SNARK / zk-STARK circuits for stronger ZKP guarantees
- Store verification receipts on-chain (optional)
- Add audit logs and analytics dashboard
- Onboard more wallets (WalletConnect, Coinbase Wallet, etc.)
- Add multi-chain discovery & automatic RPC selection
π§Ύ Contributing
Contributions are welcome. Please:
- Fork repository
- Create a feature branch:
git checkout -b feat/my-feature - Commit changes:
git commit -m "feat: description" - Push:
git push origin feat/my-feature - Open a Pull Request with a clear description
π§βπ» Author
Emeka Donatus (Victor4life)
- GitHub: https://github.com/victor4life
- Email: emekav233@gmail.com
π License
MIT Β© 2025 β Emeka Donatus
Appendix β Copy-Paste Ready .env.example Files
client/.env.example
VITE_API_BASE_URL=https://verify-my-wallet.onrender.com
VITE_CHAIN=hedera
server/.env.example
HEDERA_ACCOUNT_ID=0.0.6945707
HEDERA_PRIVATE_KEY=<your_hedera_private_key_here>
USER_PUBLIC_KEY=<your_demo_public_key_here>
RPC_URL=https://eth-mainnet.g.alchemy.com/v2/<YOUR_KEY>
PORT=5000
Log in or sign up for Devpost to join the conversation.