Skip to content

Repository files navigation

WDK Multi-Chain Browser Extension

A production-ready browser extension wallet starter built on Tether WDK — supporting EVM (Ethereum, Base, Polygon), Solana, and TRON in a single extension with native USDt support on every chain.

Key differentiator: Unlike EVM-only starters, this template gives you multi-chain coverage out of the box — including the two largest USDt networks (TRON and EVM) and Solana.

Screenshots

Create Wallet Dashboard Send
Seed phrase backup + verification All-chain balances at a glance Chain-aware send modal

Features

  • Multi-chain: EVM (Ethereum / Base / Polygon) + Solana + TRON
  • USDt on every chain: USDT-ERC20, USDT-TRC20, USDT-SPL addresses pre-configured
  • Military-grade vault: AES-256-GCM + PBKDF2 (600k iterations, SHA-256)
  • EIP-1193 + EIP-6963: Full dApp compatibility — works with any web3 site
  • Manifest V3: Chrome MV3 + Firefox MV2 via WXT
  • Zero-custody: Private keys never leave the browser; WDK is stateless

Tech Stack

Layer Choice
Extension framework WXT — cross-browser, TypeScript-first
Wallet SDK @tetherto/wdk + EVM + Solana + TRON modules
UI React 19 + Tailwind CSS v4
Security Web Crypto API (AES-256-GCM + PBKDF2) — no native deps
Tests Vitest (24 tests)

Security Architecture

Vault Encryption

Password ─→ PBKDF2(SHA-256, 600k iter, 16-byte salt) ─→ 256-bit key
Mnemonic ─→ AES-256-GCM(12-byte IV) ─→ Encrypted vault
Stored  : { ciphertext, iv, salt, kdf, encryption, createdAt }

The seed phrase is never stored in plaintext. It lives in chrome.storage.session while unlocked and is cleared on lock or browser close.

EIP-6963 Multi-Wallet Discovery

This extension uses EIP-6963 to announce itself without overwriting other wallets' window.ethereum. dApps that support EIP-6963 (Uniswap, etc.) will show WDK Wallet as a selectable option.

Architecture

entrypoints/
  background.ts        ← Service worker: WDK lifecycle, message handler
  content.ts           ← Injected into every page: EIP-1193 + EIP-6963
  popup/               ← Extension popup (React)
    main.tsx
    index.html

lib/
  crypto/vault.ts      ← AES-256-GCM encrypt/decrypt
  storage/vault-storage.ts  ← chrome.storage wrapper
  wdk/manager.ts       ← WDK instance with 5 registered chains
  wdk/chains.ts        ← Chain configs + USDT contracts
  provider/eip1193.ts  ← EIP-1193/6963 provider

components/wallet/
  App.tsx              ← Screen router (create → unlock → dashboard)
  CreateWallet.tsx     ← Seed phrase generation + verification
  Unlock.tsx           ← Password unlock
  Dashboard.tsx        ← Multi-chain balance view + actions
  SendModal.tsx        ← Chain-aware send flow

Quick Start

git clone https://github.com/64JohnLee/wdk-multichain-extension
cd wdk-multichain-extension
npm install
npm run dev        # Chrome (hot-reload)
npm run dev:firefox  # Firefox

Load the .output/chrome-mv3/ folder as an unpacked extension in Chrome.

Adding More Chains

// lib/wdk/chains.ts — add a new ChainConfig entry
'solana-devnet': {
  id: 'solana-devnet',
  name: 'Solana Devnet',
  symbol: 'SOL',
  rpcUrl: 'https://api.devnet.solana.com',
  ...
}

// lib/wdk/manager.ts — register the wallet manager
.registerWallet('solana-devnet', WalletManagerSolana, {
  rpcUrl: 'https://api.devnet.solana.com',
})

Adding Protocol Modules (Swaps, Bridges)

WDK protocol modules plug in via .registerProtocol():

import WalletManagerEvmSwap from '@tetherto/wdk-protocol-swap-velora-evm'

wdk.registerProtocol('evm-ethereum', 'swap', WalletManagerEvmSwap, { ... })

Running Tests

npm run test:run    # 24 tests: vault encryption, chain configs, utils
npm run typecheck   # TypeScript strict mode

License

Apache 2.0

About

Multi-chain browser extension wallet starter built on Tether WDK — EVM, Solana, and TRON with native USDt support

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages