A non-custodial cryptocurrency wallet built with vanilla JavaScript, featuring passwordless authentication via WebAuthn and integrated DeFi capabilities.
- Passwordless Authentication - Uses WebAuthn/Passkey for biometric authentication
- Non-Custodial - Private keys derived from passkey credentials, never stored directly
- Encrypted Storage - Sensitive data encrypted using SEA (Security, Encryption, Authorization)
- Zero Knowledge - Your keys never leave your device
- Ethereum - Mainnet and Sepolia testnet
- Binance Smart Chain - Mainnet and testnet
- EVM Compatible - Works with any EVM-compatible chain
- DEX Support - Uniswap V2/V3, PancakeSwap V2/V3
- Swap Tokens - Direct token swapping
- Liquidity Pools - Add/remove liquidity
- Pool Analytics - Calculate earnings and rates
- Multi-threaded - Web Workers for blockchain operations
- Offline-First - Works offline with IndexedDB + GunDB
- P2P Sync - Decentralized data synchronization
- Fast Loading - No heavy frameworks, pure vanilla JS
- Frontend: Vanilla JavaScript (ES6 modules)
- Authentication: WebAuthn API
- Blockchain: Ethers.js v6
- Database: GunDB (P2P) + IndexedDB
- Threading: Web Workers
- Styling: CSS-in-JS
- Icons: Bootstrap Icons + Cryptocurrency Icons
- Clone the repository:
git clone https://github.com/yourusername/wallet.git
cd wallet- Install dependencies:
npm install- Build static files:
npm run prebuild- Start development server:
npm run devThis will run:
- Development server on
http://localhost:8080 - Market data scanner in background
npm start- Build and start development servernpm run dev- Run market scanner and dev server concurrentlynpm run dev:ui- Run UI development onlynpm run prebuild- Generate static files and copy dependenciesnpm run scan- Run blockchain scanner for pools/currenciesnpm run market- Run market data servicenpm run format- Format code with Prettier
wallet/
├── src/
│ ├── core/ # Core business logic
│ │ ├── Access.js # Authentication management
│ │ ├── WebAuthn.js # Passkey implementation
│ │ ├── Wallet.js # Wallet operations
│ │ ├── Chain.js # Blockchain abstraction
│ │ ├── DeFi/ # DEX integrations
│ │ ├── Threads.js # Web Worker management
│ │ └── Utils/ # Helper functions
│ ├── UIs/
│ │ ├── Vanilla/ # UI components
│ │ │ ├── components/ # Reusable components
│ │ │ ├── layouts/ # Page layouts
│ │ │ └── routes/ # Page routes
│ │ └── css/ # Global styles
│ ├── configs/ # Configuration files
│ │ ├── chains/ # Blockchain configs
│ │ ├── ABIs/ # Smart contract ABIs
│ │ └── i18n.json # Translations
│ └── threads/ # Web Worker scripts
│ ├── main.js # Main thread
│ ├── onchain.js # Blockchain operations
│ └── offchain.js # Database operations
├── tests/ # Test files
├── notes/ # Documentation
└── package.json
- User creates/uses a passkey (fingerprint, Face ID, security key)
- WebAuthn generates a unique credential ID
- Credential ID is hashed to create a deterministic seed
- Seed generates the same key pair every time
- Multiple wallets can be derived from the same passkey
// Simplified flow
credential = WebAuthn.create() // or authenticate()
hash = sha256(credential.id + salt)
keyPair = generateKeyPair(hash)
walletSeed = sha256(keyPair.private + walletId)
walletKeys = deriveKeys(walletSeed)- No Framework Dependencies - Pure vanilla JavaScript for maximum control
- Component-Based - Custom component system without React/Vue overhead
- Module-Based - ES6 modules for code organization
- Event-Driven - Reactive state management with event emitters
- Thread-Safe - Blockchain operations in separate workers
- Private keys are never stored in plain text
- All keys are derived deterministically from passkey
- WebAuthn requires user verification (biometric/PIN)
- Cross-origin requests are restricted
- No external analytics or tracking
- Open source for transparency
Requires modern browsers with:
- WebAuthn API support
- ES6 modules
- Web Workers
- IndexedDB
- WebCrypto API
Tested on:
- Chrome/Edge 90+
- Firefox 90+
- Safari 14+
- Brave
- Create config in
src/configs/chains/[CHAIN_NAME]/ - Add chain config, currencies, and DeFi protocols
- Run
npm run prebuildto generate static files
- Create component folder in
src/UIs/Vanilla/components/ - Add
index.js,template.js, andstyles.css.js - Import and use in routes or layouts
# Open test runner in browser
open tests/Tests.html
# Run specific test suites
open tests/UI.test.html
open tests/Events.test.htmlContributions are welcome! Please read the contributing guidelines first.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT License - see LICENSE file for details
This is experimental software. Use at your own risk. Always verify transactions and keep backups of important data.
For issues and questions:
- Open an issue on GitHub
- Check the documentation in
/notes - Review test files for usage examples
Built with ❤️ for the decentralized web