Skip to content

About

Zero-trust multi-chain crypto wallet built with React, TypeScript, Node.js & PostgreSQL using BIP39, AES-256-GCM, and modern Web3 architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ SafeX โ€” Zero-Trust, Non-Custodial Multi-Chain Web3 Wallet

TypeScript Next.js Viem Argon2id AES-256-GCM EIP-1559 License: MIT

SafeX is an enterprise-grade, 100% non-custodial Web3 crypto wallet built from fundamental cryptographic primitives. It provides client-side zero-trust security, multi-chain HD address derivation (EVM + Bitcoin Native SegWit), offline EIP-1559 transaction construction, and direct decentralized blockchain node interactionโ€”with zero central database storing your keys or balances.


๐Ÿ”’ The Zero-Trust Guarantee (Why No Central Database?)

Important

True self-custody means zero server trust. In authentic Web3 architecture, storing private keys, seed phrases, or user wallet balances in a centralized database (such as PostgreSQL or MongoDB) is a major anti-pattern and a critical security vulnerability.

  • No Database for Wallets: SafeX never records private keys, mnemonics, or balances to a server database.
  • Pure Client-Side Cryptography: 100% of entropy generation, key derivation, and transaction signing occurs exclusively in the user's browser sandbox.
  • Direct Node Communication: Signed raw bytecode is broadcast directly to decentralized Ethereum and Bitcoin JSON-RPC nodes.

๐Ÿ“š Deep-Dive Technical Handbooks & Architecture Infographics

Tip

For comprehensive architectural teardowns, mathematical proofs, and high-resolution diagrams, explore the /notes directory.

Phase / Topic Technical Focus & Engineering Scope Handbook Link
Phase 1 CSPRNG Entropy, BIP-39 Mnemonics, PBKDF2, Argon2id KDF, AES-256-GCM Vault, RAM Zeroization ๐Ÿ“˜ Phase 1 Handbook
Phase 2 EIP-1559 Transaction Anatomy, Gas Base Fee Burn, Priority Tips, ECDSA Secp256k1 Offline Signing ๐Ÿ“˜ Phase 2 Handbook
Phase 3 Nonce Management, Mempool Race Conditions, Replacement & Cancellation, Block Confirmations ๐Ÿ“˜ Phase 3 Handbook
Phase 4 Smart Contracts, 4-Byte EVM Calldata Selectors, ERC-20 Standard, Fixed-Point Arithmetic ๐Ÿ“˜ Phase 4 Handbook
Phase 5 On-Chain Swapping (DEX / AMM), Uniswap V2 Router & Factory, Multi-Hop Routing, Slippage Bounds ๐Ÿ“˜ Phase 5 Handbook
Math & Curves Secp256k1 Elliptic Curve Algebra, Discrete Logarithm Problem, Point Multiplication ($P = k \times G$) ๐Ÿ“˜ Elliptic Curve Math
Fundamentals Consensus Algorithms, Cryptographic Hashes, Peer-to-Peer Networks, Block Structures ๐Ÿ“˜ Blockchain Core

๐Ÿ–ผ๏ธ Featured Architecture Infographics

High-resolution technical diagrams located in /notes/infographics:


๐Ÿ›๏ธ System Architecture: Pure Non-Custodial Flow

All cryptographic operations occur on-device. The only external traffic is raw blockchain JSON-RPC calls.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                               CLIENT BROWSER SANDBOX                                   โ”‚
โ”‚                                                                                        โ”‚
โ”‚   [ Entropy (CSPRNG) ] โ”€โ”€โ–บ [ BIP-39 Mnemonic ] โ”€โ”€โ–บ [ PBKDF2 ] โ”€โ”€โ–บ [ 512-bit Root Seed ]โ”‚
โ”‚                                                                          โ”‚             โ”‚
โ”‚                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚                 โ–ผ (BIP-44: m/44'/60'/0'/0/0)        โ–ผ (BIP-84: m/84'/0'/0'/0/0) โ”‚      โ”‚
โ”‚         [ EVM Private Key ]                 [ BTC Private Key ]                 โ”‚      โ”‚
โ”‚                 โ”‚                                   โ”‚                           โ”‚      โ”‚
โ”‚         [ Secp256k1 Point Mult ]            [ Secp256k1 Point Mult ]            โ”‚      โ”‚
โ”‚                 โ”‚                                   โ”‚                           โ”‚      โ”‚
โ”‚         [ Keccak-256 + EIP-55 ]             [ HASH160 + Bech32 Encoding ]       โ”‚      โ”‚
โ”‚                 โ–ผ                                   โ–ผ                           โ”‚      โ”‚
โ”‚        Ethereum (0x5de9...Ac)              Bitcoin Native SegWit (bc1q...3x)    โ”‚      โ”‚
โ”‚                                                                                        โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚ Client-Side Vault Security (Zero Server Knowledge):                            โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Master Password โ”€โ”€โ–บ Argon2id KDF (64MB RAM, 3 iterations) โ”€โ”€โ–บ 256-bit Key     โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Plaintext Mnemonic โ”€โ”€โ–บ AES-256-GCM Authenticated Encryption โ”€โ”€โ–บ IndexedDB    โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Tab Session Cache: Ephemeral sessionStorage with 10-min rolling timer         โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Memory Protection: buffer.fill(0) active RAM zeroization on lock/timeout     โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                                                                                        โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚ Offline Transaction Signing (secp256k1):                                       โ”‚   โ”‚
โ”‚   โ”‚ [ Unsigned EIP-1559 Tx ] โ”€โ”€โ–บ [ Sign with PrivKey in RAM ] โ”€โ”€โ–บ [ Signed Hex ]    โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚ Direct JSON-RPC (eth_sendRawTransaction)
                                           โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        DECENTRALIZED BLOCKCHAIN NODES                                  โ”‚
โ”‚                                                                                        โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚ Ethereum Mainnet / Sepolia  โ”‚               โ”‚ Bitcoin SegWit Network           โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Viem JSON-RPC Multi-Pool  โ”‚               โ”‚ โ€ข Blockstream / Mempool.space    โ”‚   โ”‚
โ”‚   โ”‚ โ€ข Gas Oracle & Nonce Sync   โ”‚               โ”‚ โ€ข UTXO Tracking & Fee Estimator  โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก Core Engineering & Cryptographic Concepts

1. Zero-Trust Cryptographic Vault & Key Derivation

  • Argon2id Memory-Hard KDF: Replaces legacy PBKDF2/SHA-256 password hashing with Argon2id ($m=65,536\text{ KB}$, $t=3$, $p=1$) using @noble/hashes. By demanding 64 MB of dedicated RAM per hash attempt, brute-forcing master passwords on GPUs or ASICs is computationally infeasible.
  • Authenticated Symmetric Encryption (AES-256-GCM): Plaintext recovery phrases are encrypted with a 12-byte random CSPRNG initialization vector (iv) and sealed with a 16-byte Galois Field authentication tag (authTag). Any bit corruption or tampering immediately invalidates decryption.
  • Ephemeral Session Persistence: Uses an in-memory / sessionStorage hybrid cache. Survives page reloads (F5) in the active tab, but automatically self-destructs the moment the browser tab is closed.
  • Active RAM Zeroization: Decrypted private keys exist only in volatile JavaScript memory while unlocked. When locked or after a 10-minute inactivity timeout, buffers are actively scrubbed using .fill(0).

2. Multi-Chain Address Derivation (EVM + Bitcoin)

  • BIP-39 Mnemonic Standards: Cryptographically secure entropy collection supporting 128-bit (12 words) and 256-bit (24 words) recovery phrases with SHA-256 checksum bits.
  • BIP-32 / BIP-44 Hierarchical Deterministic (HD) Paths:
    • Ethereum / EVM: Path m/44'/60'/0'/0/0 $\rightarrow$ Uncompressed public key $\rightarrow$ Keccak-256 hashing of $(X, Y)$ coordinates $\rightarrow$ Drop first 12 bytes $\rightarrow$ EIP-55 mixed-case checksum.
    • Bitcoin Native SegWit (BIP-84): Path m/84'/0'/0'/0/0 $\rightarrow$ Compressed public key (33 bytes) $\rightarrow$ HASH160 (SHA-256 + RIPEMD-160) $\rightarrow$ Witness program version 0 with 5-bit Bech32 encoding (bc1q...).

3. EIP-1559 Modern Transaction Architecture

  • Type-2 Envelope Serialization: Constructs and encodes native EIP-1559 transactions: $$\text{Payload} = \text{0x02} \mathbin{\Vert} \text{RLP}\left([ \text{chainId}, \text{nonce}, \text{maxPriorityFeePerGas}, \text{maxFeePerGas}, \text{gasLimit}, \text{to}, \text{value}, \text{data}, \text{accessList} ]\right)$$
  • Base Fee Burn & Priority Tip: $$\text{Total Fee} = \text{Gas Units} \times (\text{Base Fee} + \text{Priority Fee})$$
  • Client-Side ECDSA Offline Signing: Uses curve secp256k1 to compute the signature tuple $(r, s, v)$ completely in the browser before broadcasting the signed hex bytecode to the blockchain mempool.
  • Sender Address Extraction: Demonstrates mathematically how EVM miners recover the originating from address from $(r, s, v)$ without transmitting the sender's public key across the wire.

4. Smart Contracts & ERC-20 Token Integration

  • EVM Calldata Construction: Manual calculation of 4-byte function selectors (0xa9059cbb for transfer(address,uint256)) and 32-byte left-padded hex encoding.
  • Fixed-Point Arithmetic (BigInt): Eliminates JavaScript IEEE-754 floating-point inaccuracies when handling token transfers with different decimal precisions (e.g. 6 decimals for USDC/USDT vs. 18 decimals for ETH/DAI).
  • Multi-Chain Verified Registry: Seamlessly handles testnet assets (Sepolia USDC, LINK, WETH) and Ethereum Mainnet assets (native ETH, USDC, USDT, WBTC, DAI).
  • Custom Token Dynamic Import: Paste any verified ERC-20 contract address to query name(), symbol(), decimals(), and balanceOf(address) directly from the blockchain state.

5. On-Chain DEX Swapping & AMM Execution (Uniswap V2)

  • Constant-Product Market Maker ($x \cdot y = k$): Executes on-chain token swaps with exact fee-adjusted output formulas: $$\Delta y = \frac{y \cdot 997 \cdot \Delta x}{1000 \cdot x + 997 \cdot \Delta x}$$
  • Canonical Multi-Hop Routing: Automatically constructs multi-hop routes across Wrapped Ether ([tokenIn, WETH, tokenOut]) when direct liquidity pairs do not exist on the Uniswap V2 Factory.
  • Two-Step Non-Custodial Authorization:
    1. Allowance Check: Queries on-chain ERC-20 allowance(owner, router). If insufficient, prompts an atomic one-click approve() transaction.
    2. Router Execution: Encodes 4-byte calldata for swapExactETHForTokens, swapExactTokensForETH, or swapExactTokensForTokens.
  • Slippage Bounds & Liquidity Protection: $$\text{minAmountOut} = \text{expectedAmountOut} \times (1 - \text{slippageTolerance})$$ Enforces strictly on-chain slippage boundaries with zero fabricated math, alerting users to high price impact in low-depth pools.
  • Network Support: Configured for Ethereum Mainnet (Chain ID 1 via official Uniswap Router 0x7a25...488D with ETH, WETH, USDC, USDT, WBTC, DAI) and Sepolia Testnet (Chain ID 11155111).

6. Resilient Multi-Provider RPC Failover Tier

  • Zero-Downtime Fallback Transports: Configures multi-node resilient fallback pools:
    • Sepolia Testnet: PublicNode, dRPC, and Ethereum Foundation (rpc.sepolia.org).
    • Ethereum Mainnet: LlamaRPC, Ankr, Cloudflare, with plug-and-play support for dedicated Alchemy or Infura nodes.
  • Automatic Node Failover: Network rate limits (HTTP 429) or node timeouts trigger instantaneous switching to healthy secondary RPC endpoints.

๐Ÿ’ป Tech Stack & Codebase Structure

SafeX---Crypto-Wallet/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/                        # Next.js 14 Client-Side Wallet Application
โ”‚   โ”‚   โ”œโ”€โ”€ app/                    # Next.js App Router (Dashboard, Send, Receive, Swap, History, Status)
โ”‚   โ”‚   โ”œโ”€โ”€ components/             # Shared UI (ChainSelector, BackToDashboard, VaultGate, QR)
โ”‚   โ”‚   โ”œโ”€โ”€ core/                   # Core cryptography (BIP-39, HD Keys, Vault, EIP-1559, oRPC client, utils)
โ”‚   โ”‚   โ””โ”€โ”€ features/               # Feature-driven modules (swap, send, receive, tokens, history, dashboard)
โ”‚   โ””โ”€โ”€ server/                     # Lightweight Blockchain Helper & Broadcast Node
โ”‚       โ””โ”€โ”€ src/
โ”‚           โ”œโ”€โ”€ core/               # Blockchain RPC fallback clients, gas estimation, base oRPC server
โ”‚           โ””โ”€โ”€ features/           # Modular backend feature routers (swap, tokens, prices, history, health, wallet)
โ”œโ”€โ”€ notes/                          # Deep Technical Handbooks (Phases 1โ€“5), Math Proofs, Infographics
โ””โ”€โ”€ Plan/                           # Project Roadmap & Implementation Tracker
Component Technology Role in Architecture
Frontend UI Next.js 14 + React 18 + Tailwind CSS Client application, responsive dark-mode dashboard
RAM State Zustand + sessionStorage Ephemeral in-memory vault state, 10-minute auto-lock
Local Vault Storage IndexedDB (safex_db) Encrypted ciphertext storage (salt, iv, authTag, ciphertext)
Blockchain Engine Viem 2.x + @scure/bip32 + @scure/base RLP encoding, multi-provider JSON-RPC, Bech32 & EIP-55 formatting
Cryptography @noble/hashes (Argon2id, Keccak-256, SHA-256) Zero-trust client-side key derivation and authenticated encryption

๐Ÿš€ Getting Started Locally

Prerequisites


Step 1: Clone & Install Dependencies

git clone https://github.com/Sandipxg/SafeX---Crypto-Wallet.git
cd SafeX---Crypto-Wallet
npm install

Step 2: Configure Environment Variables

  1. Frontend Web (apps/web/.env.local):

    cp apps/web/.env.example apps/web/.env.local

    Pre-configured defaults:

    NEXT_PUBLIC_API_URL=http://localhost:4000
    NEXT_PUBLIC_SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
    NEXT_PUBLIC_MAINNET_RPC_URL=https://eth.llamarpc.com
  2. Backend Server (apps/server/.env):

    cp apps/server/.env.example apps/server/.env

Step 3: Run Development Server

Launch the web wallet application:

npm run dev

Open your browser to:


๐Ÿงช Testing & Verification

Run the full monorepo test suite or individual workspace tests:

# Execute all unit tests across the entire monorepo (15 test suites)
npm test

# Frontend unit tests (BIP-39, HD keys, AES-GCM vault, token encoder, format & explorer)
npm --prefix apps/web test

# Backend unit tests (swap services, wallet services, tokens, prices, history, health)
npm --prefix apps/server test

๐Ÿ”ฎ Phase 6+ Roadmap: Centralized Exchange (CEX) Infrastructure

Note: SafeX is a progressive learning platform. While Phases 1โ€“5 implement a pure zero-trust self-custodial wallet, upcoming phases demonstrate centralized exchange mechanics:

  • Phase 6: Exchange Custody & Deposit Sweeper: Hot/cold wallet segregation, auto-forwarding user deposits.
  • Phase 7: Double-Entry Ledger (PostgreSQL): Immutable debits/credits accounting ledger preventing balance drift.
  • Phase 8: High-Throughput Matching Engine: In-memory limit order book (LOB) matching FIFO bids/asks.
  • Phase 9: Proof of Reserves (PoR): Cryptographic Merkle tree reserve audits allowing users to verify solvency.

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for full details.

About

Zero-trust multi-chain crypto wallet built with React, TypeScript, Node.js & PostgreSQL using BIP39, AES-256-GCM, and modern Web3 architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages