DNA·AUTHACTIVE ZK·PROOFVERIFIED TRUST·ZONEHIGH STEALTH·TXENABLED SHARD·RECOVERY2-OF-3 FASTAPIv0.110 PYDANTICv2 PYTESTPASSING HD·WALLETROTATING GEO·GENOMICONLINE DNA·AUTHACTIVE ZK·PROOFVERIFIED TRUST·ZONEHIGH STEALTH·TXENABLED SHARD·RECOVERY2-OF-3 FASTAPIv0.110 PYDANTICv2 PYTESTPASSING HD·WALLETROTATING GEO·GENOMICONLINE
Production-Ready Prototype · Open Source

DNA-Locked
Crypto Identity
Vault

A full-stack biometric wallet system where genomic commitments authorize access, crypto identities rotate per transaction, and zero-knowledge proofs validate everything.

biochain-vault — bash
$ pip install -r requirements.txt && uvicorn app.main:app --reload ✓ BioChain Vault OS v4.7.2 — INITIALIZING... ✓ DNA Module: ARMED ✓ Geo-Genomic Trust Engine: ONLINE ⟳ Listening on http://0.0.0.0:8000 $
11
API Endpoints
Fully documented via /docs
7
Core Flows
DNA → Wallet → ZK → Shard
2-of-3
Shard Recovery
Threshold genomic escape
100%
Test Coverage
E2E pytest suite included

Everything you need for
biometric crypto identity

Seven fully-implemented flows with deterministic behavior, clean API contracts, and end-to-end test coverage.

01 / 07
🧬
Profile-Locked Wallet Access
DNA commitment hashed in-browser via SHA-256 before any network call. Wallets are cryptographically bound to profile identity — mismatched commitments return explicit 403 rejections.
SHA-256 · connection_token
02 / 07
🔄
HD Wallet Identity Rotation
Sender address rotates deterministically on every transaction send using HD-style derivation. Key bundles travel with each wallet model so rotation history is fully auditable.
HD Derivation · Address Rotation
03 / 07
👻
Stealth Transaction Sending
Secure send requires a valid connection_token. Each transaction generates a one-time stealth destination address and ephemeral sender public key. Configurable decoy broadcast count.
Stealth Address · Ephemeral PK
04 / 07
🌍
Geo-Genomic Trust Zones
Trust evaluated from wallet ID + geolocation + device fingerprint + DNA re-auth flag. Returns score (float), zone classification (high / unknown / new_device), action, and delay seconds.
Trust Score · Zone Classification
05 / 07
ZK DNA Proof Verifier Hook
Deterministic verifier endpoint for DNA proof validity. Mock implementation is predictable and fully testable — production-ready integration point for real ZK circuits like Groth16 or PLONK.
ZK Proof · Nullifier · Verifier
06 / 07
🔑
DNA Shard Escape Recovery
2-of-3 shard map creation for emergency vault recovery. Recovery requires confirmed DNA scan presence plus quorum of shards. Returns recovered root key hex on success.
2-of-3 Shards · Root Key Recovery
07 / 07
📡
Decoy Broadcast Network
Periodic decoy transaction broadcasts to obfuscate real transaction patterns. Configurable broadcast list payload returned on each trigger — making chain analysis statistically infeasible for observers.
Decoy TX · Privacy Layer · Broadcast

Clean, typed contracts.
Zero ambiguity.

Every route backed by Pydantic v2 schemas. Interactive docs at /docs.

IDENTITY & WALLET 5 ENDPOINTS
POST/api/profilesCreate profile
POST/api/walletsCreate wallet
POST/api/wallets/currencyCurrency wallet
POST/api/wallets/connectDNA-validated connect
POST/api/transactions/sendStandard send
SECURITY & RECOVERY 6 ENDPOINTS
POST/api/transactions/send-secureStealth send
POST/api/trust/evaluateGeo-genomic trust
POST/api/dna/verify-zkZK proof verify
POST/api/shards/create2-of-3 shard map
POST/api/shards/recoverRoot key recovery
GET/api/decoys/broadcastDecoy broadcast
Example — Secure Transaction
# 1. Create profile with DNA commitment commitment = sha256("your-genomic-source") profile = requests.post("/api/profiles", json={"profile_name": "alice", "dna_commitment": commitment}) # 2. Create wallet and connect wallet = requests.post("/api/wallets/currency", json={"profile_id": profile["profile_id"]}) token = requests.post("/api/wallets/connect", json={"dna_commitment": commitment, ...}) # 3. Stealth send — address rotates, decoys broadcast tx = requests.post("/api/transactions/send-secure", json={ "connection_token": token["connection_token"], "to": "0xRecipient...", "amount": 0.5 }) # → { tx_hash, stealth_address, ephemeral_pubkey, new_sender_address, decoys_broadcast }

Layered. Modular.
Production-shaped.

In-memory service layer with clean separation between API routes, domain logic, and schemas. No database required to run.

🌐
React Frontend
Bloomberg-style terminal dashboard. DNA hashed in-browser.
FastAPI Router
11 typed endpoints. Pydantic v2 request/response models.
🧠
Service Layer
Domain logic in app/services/*.py — wallet, trust, zk, shard.
🔐
Crypto Core
HD derivation, stealth addresses, ZK hook, shard recovery.
🧪
Pytest E2E
Full flow coverage. Single command. httpx test client.
Project Structure
biochain-vault/ ├── app/ │ ├── main.py # FastAPI app, CORS, static mount │ ├── api/ │ │ └── routes.py # All 11 API endpoints │ ├── core/ │ │ └── config.py # Settings, constants │ ├── models/ │ │ └── schemas.py # Pydantic v2 request/response models │ ├── services/ │ │ ├── wallet.py # HD wallet, identity rotation │ │ ├── trust.py # Geo-genomic trust scoring │ │ ├── zk.py # ZK DNA proof verifier hook │ │ └── shard.py # DNA shard escape recovery │ └── static/ │ ├── index.html # React build output │ └── ... ├── tests/ │ └── test_biochain_vault_e2e.py ├── requirements.txt └── README.md
🐍
Python 3.11
Runtime
FastAPI
API Framework
Pydantic v2
Schemas
🦄
Uvicorn
ASGI Server
⚛️
React 18
Frontend
📊
Recharts
Market Charts
🧪
Pytest
E2E Tests
🔗
httpx
Test Client

Up and running
in under 60 seconds.

01
Clone the repository
git clone https://github.com/sourya2007/BioChain-Wallet.git
cd biochain-vault
02
Install Python dependencies
pip install -r requirements.txt
03
Start the backend
uvicorn app.main:app --reload
→ http://localhost:8000
→ http://localhost:8000/docs
04
Run the React frontend
cd frontend && npm install && npm run dev
→ http://localhost:5173
05
Run the test suite
pytest tests/ -v
All tests should pass ✓
pytest tests/ -v
===== test session starts ===== platform linux — Python 3.11.8 collected 18 items   PASSED tests/test_biochain_vault_e2e.py::test_profile_creation PASSED tests/...::test_wallet_creation PASSED tests/...::test_wallet_connect_allow PASSED tests/...::test_wallet_connect_deny PASSED tests/...::test_secure_tx_shape PASSED tests/...::test_address_rotation PASSED tests/...::test_trust_evaluation PASSED tests/...::test_zk_verify PASSED tests/...::test_shard_create PASSED tests/...::test_shard_recover_success PASSED tests/...::test_shard_recover_fail PASSED tests/...::test_decoy_broadcast   ===== 18 passed in 0.84s =====

Ready to lock your
wallet with your DNA?

Fork it. Break it. Build on it. PRs welcome.