diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ab415de --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Unit tests + run: npm run test:unit + + - name: Install Playwright browser + run: npx playwright install --with-deps chromium + + - name: E2E tests + run: npm run test:e2e + + - name: Upload Playwright artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: playwright-artifacts + path: | + output/playwright/report + output/playwright/test-results + if-no-files-found: ignore diff --git a/.gitignore b/.gitignore index a547bf3..6f80358 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ node_modules dist dist-ssr *.local +output/playwright/ +playwright-report/ +test-results/ # Editor directories and files .vscode/* diff --git a/README.md b/README.md index 0e7880c..0f11d4b 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ -# Vanity ETH GPU +# Vanity SOL GPU -A fast Ethereum vanity address generator that runs entirely in your browser. +A fast Solana vanity address generator that runs entirely in your browser. ## Features -- **Multi-threaded** - Uses Web Workers for parallel address generation +- **Multi-threaded** - Uses Web Workers for parallel keypair generation +- **GPU-accelerated matching** - Uses WebGPU to parallelize Base58 vanity matching when available - **Privacy First** - All computations run locally in your browser, no server communication -- **Custom Prefix/Suffix** - Find addresses starting or ending with your desired characters -- **Wallet + First Contract Targets** - Scan either the wallet address or its first `CREATE` deploy address (nonce 0) -- **Keystore Export** - Download encrypted keystore JSON files +- **Custom Prefix/Suffix** - Find addresses starting or ending with your desired Base58 characters +- **Wallet + Program ID Targets** - Scan either wallet addresses or program IDs +- **Keypair Export** - Download Solana-compatible keypair JSON files ## Requirements @@ -16,15 +17,15 @@ A fast Ethereum vanity address generator that runs entirely in your browser. ## Usage -1. Choose target: wallet address or first contract address -2. Enter your desired prefix and/or suffix (hex characters: 0-9, a-f) +1. Choose target: wallet address or program ID +2. Enter your desired prefix and/or suffix (Base58 characters) 3. Click Generate and wait for a match -4. Once found, reveal the private key or download as encrypted keystore +4. Once found, reveal the secret key or download keypair JSON ## Security - Disconnect from the internet before generating for maximum security -- Never share your private key +- Never share your secret key - Always verify the address matches your requirements before use ## Development @@ -38,14 +39,37 @@ npm run dev # Build for production npm run build + +# Run unit tests +npm run test:unit + +# Run browser E2E tests +npm run test:e2e + +# Run full quality gate (build + unit + e2e) +npm run check ``` +## Testing + +- Unit tests use `vitest` and cover core Base58/keys logic. +- E2E tests use `@playwright/test` and exercise real UI flows in Chromium. +- CI runs `build`, `test:unit`, and `test:e2e` on every push/PR. +- For deterministic test runs, the dev server is started with `VITE_FORCE_BACKEND=cpu`. + ## Tech Stack - TypeScript - Vite - Web Workers -- @noble/secp256k1 for cryptography +- WebGPU +- @noble/curves (ed25519) + +## Notes + +- Runtime auto-benchmarks GPU hybrid mode vs CPU mode and picks the faster backend. +- If WebGPU is unavailable, the app falls back to CPU-only search. +- You can force a backend for troubleshooting with `VITE_FORCE_BACKEND=cpu` or `VITE_FORCE_BACKEND=gpu`. ## License diff --git a/index.html b/index.html index f991372..5bd8a67 100644 --- a/index.html +++ b/index.html @@ -4,58 +4,55 @@ -