npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@akshatmittal/saltshaker

v1.0.0

Published

WebGPU vanity miner for deterministic Ethereum deployments

Downloads

233

Readme

Saltshaker

Saltshaker is a WebGPU powered in-browser vanity salt miner for deterministic Ethereum deployments.

  • Performance: push the search loop onto the GPU, stream live hashrate, and benchmark hardware with a standardized preset.
  • Capability: Mine addresses for CREATE2, CreateX (CREATE2 and CREATE3), and Safe deployments with multiple matcher strategies.
  • Ease of use: Start from a tiny TypeScript API or the included browser workbench.

Why Saltshaker

  • GPU-first search. The miner dispatches work through WebGPU and, by default, searches 65,535 x 16 x 64 = 67,107,840 candidates per dispatch.
  • Browser-native workflow. No backend, no RPC requirement, and no wallet connection just to search deterministic addresses.
  • Correctness guardrails. GPU hits are re-scored on the CPU before they are accepted into the result set.
  • Live telemetry. Sessions report status, elapsed time, hashrate, and ranked results as they run.
  • Built-in benchmark mode. The starter app includes a repeatable benchmark route so you can compare GPUs with the same preset.

Benchmark

| Device | Hashrate | | --------------- | --------- | | Nvidia RTX 3070 | 1140 MH/s |

(Consider adding your device to this list!)

What It Supports

Protocols

| Protocol | Notes | | --------- | ------------------------------------------------------------------------------------------- | | create2 | Deterministic contract address mining from deployer + salt + init code hash | | createx | Supports CREATE2 and CREATE3, including caller-protected and crosschain-protected salts | | safe | Mines proxy addresses derived from Safe initializer data and nonce |

Matchers

| Matcher | Notes | | -------------- | ------------------------------------------------------------------ | | leadingZeros | Search for addresses with a minimum number of leading zero nibbles | | prefix | Nibble-precision prefix matching | | suffix | Nibble-precision suffix matching | | contains | Nibble-precision substring matching |

If you do not provide a matcher, Saltshaker defaults to leadingZeros: 8.

You can also create custom matcher configurations to target very specific address patterns, such as the Uniswap V4 address mining competition!

Technical Overview

Saltshaker runs the mining loop as a WebGPU compute workload.

WebGPU Mining Flow

  1. The CPU prepares protocol-specific constants such as deployers, factories, salt prefixes, code hashes, Safe initializer hashes, and matcher data.
  2. Saltshaker packs those constants into a GPU storage buffer, writes the current nonce base into a small uniform buffer, and allocates a compact result buffer for the best hit in the current dispatch.
  3. The shader is assembled from shared Keccak primitives, a matcher module, a protocol module, and one shared compute kernel.
  4. The GPU dispatches workgroups across the nonce space and each invocation derives one candidate address for one nonce.
  5. Each invocation scores its candidate on the GPU and only higher-scoring hits try to update the shared best-result buffer through atomics.
  6. After the dispatch completes, Saltshaker copies the result buffer back to the CPU, derives the final salt and address, re-scores the hit on the CPU, and merges valid results into the ranked result list.

By default, each dispatch covers 65,535 x 16 workgroups at a workgroup size of 64, which means 67,107,840 nonce candidates per dispatch.

Keccak Kernel

The compute path is centered on a shared WGSL Keccak implementation.

  • The shared core shader implements the Keccak-f permutation directly in WGSL, including the theta, rho/pi, chi, and iota rounds.
  • Protocol shaders only define how to build the correct preimage for a nonce. CREATE2 hashes 0xff ++ deployer ++ salt ++ initCodeHash, Safe derives its salt from keccak256(initializerHash ++ nonce), and CreateX applies its guarded-salt rules before address derivation.
  • The kernel exposes fixed-size helpers such as keccak256_32, keccak256_64, keccak256_96, keccak256_85_address, and keccak256_23_address so each protocol can hash the exact layout it needs.
  • All protocol and matcher combinations reuse the same @compute @workgroup_size(64) entrypoint, so Saltshaker swaps protocol and matcher logic without changing the overall execution model.
  • The GPU only returns the best hit from a dispatch, which keeps readback small and lets the CPU stay focused on verification, ranking, and session telemetry.

Quick Start

Run the starter app

pnpm install
pnpm dev

Then open the local URL printed by Vite.

The starter app includes:

  • a mining workbench for CREATE2, CreateX, and Safe
  • live telemetry and ranked results
  • a /benchmark route for repeatable WebGPU throughput tests

Use the library

The core package lives in packages/saltshaker-core and exports a very small API:

  • checkWebGpuSupport()
  • createMiningSession()

Example:

import { checkWebGpuSupport, createMiningSession } from "@akshatmittal/saltshaker";

const support = await checkWebGpuSupport();
if (!support.supported) {
  throw new Error(support.message);
}

const session = createMiningSession({
  job: {
    protocol: "create2",
    deployer: "0x4e59b44847b379578588920cA78FbF26c0B4956C",
    fixedSaltPrefix: "0x000000000000000000000000000000000000000000000000",
    initCodeHash: "0x6e1cce4955d4b57d9569397925551f2fb36c34f1cfe0f2e8c0c727c44bd08b90",
  },
  matcher: { type: "prefix", value: "0xdead" },
  maxResults: 10,
});

const unsubscribe = session.subscribe((state) => {
  console.log(state.status, state.hashrate, state.results);

  if (state.results.length > 0) {
    session.stop();
  }
});

await session.start();
unsubscribe();

API Shape

createMiningSession() accepts:

  • a job for create2, createx, or safe
  • an optional matcher
  • optional dispatch sizing
  • optional maxResults
  • optional WebGPU powerPreference

Each session exposes:

  • start() to begin mining
  • stop() to stop the active run
  • subscribe(listener) to receive state updates

Session state includes:

  • status and statusDetail
  • hashrate
  • elapsedMs
  • results
  • error

Development

Repo layout

  • packages/saltshaker-core: Typed WebGPU mining library
  • apps/web-start: Browser workbench and benchmark UI (Tanstack Start)
  • tooling/typescript-config: Shared TypeScript config

Commands

pnpm dev
pnpm build
pnpm typecheck
pnpm lint

Requirements

  • Node.js >=24
  • pnpm@10
  • A browser with WebGPU support for actual mining
  • viem as a peer dependency of the @akshatmittal/saltshaker package