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

@prettysafe/core

v0.1.1

Published

Core library for [PrettySafe](https://prettysafe.xyz) — the browser-native WebGPU vanity address miner for [Safe](https://safe.global) (formerly Gnosis Safe) wallets.

Readme

@prettysafe/core

Core library for PrettySafe — the browser-native WebGPU vanity address miner for Safe (formerly Gnosis Safe) wallets.

Features

  • WebGPU CREATE2 Mining — GPU-accelerated vanity address mining at 100–500 MH/s
  • Safe Address Derivation — encode Safe setup parameters, compute CREATE2 salts, and derive deterministic addresses
  • Multi-Chain Support — Ethereum, Base, Arbitrum, Optimism, Polygon, Gnosis, and testnets
  • WGSL Shaders — Keccak-256 and secp256k1 implementations that run entirely on the GPU

Install

npm install @prettysafe/core
# or
bun add @prettysafe/core

Usage

Derive a Safe address

import {
  encodeSafeSetup,
  computeGnosisSalt,
  computeCreate2Address,
  PROXY_FACTORY,
  PROXY_CREATION_CODE_HASH,
} from '@prettysafe/core';

const setupData = encodeSafeSetup({
  owners: ['0xYourAddress...'],
  threshold: 1,
});

const salt = computeGnosisSalt(setupData, 42n);

const address = computeCreate2Address(
  PROXY_FACTORY,
  salt,
  PROXY_CREATION_CODE_HASH
);

Use the WebGPU miner engine

import { Create2MinerEngine } from '@prettysafe/core';

const engine = new Create2MinerEngine({
  // miner configuration
});

Access WGSL shaders

import '@prettysafe/core/shaders';

Raw .wgsl shader files are also included in the package under src/shaders/.

API

Safe Encoding

| Export | Description | |--------|-------------| | encodeSafeSetup(config) | Encode Safe initializer calldata from owners + threshold | | computeGnosisSalt(setupData, nonce) | Compute the Gnosis-style salt from setup data and a nonce | | computeCreate2Address(deployer, salt, initCodeHash) | Derive a CREATE2 address | | deriveSafeAddress(config, nonce) | All-in-one: config + nonce to final address | | prepareShaderData(config) | Prepare data buffers for the GPU shader |

Address Utilities

| Export | Description | |--------|-------------| | countLeadingZeros(address) | Count leading zero nibbles in an address | | isAddressSmaller(a, b) | Compare two addresses numerically | | addressToBigInt(address) | Convert an address to a BigInt |

Network Configuration

| Export | Description | |--------|-------------| | SUPPORTED_NETWORKS | Array of enabled network configs | | COMING_SOON_NETWORKS | Networks not yet enabled | | getNetworkConfig(chainId) | Look up config by chain ID | | isSupportedNetwork(chainId) | Check if a chain ID is supported |

Constants

| Export | Description | |--------|-------------| | PROXY_FACTORY | Safe Proxy Factory address (0xa6B71E26...) | | SAFE_SINGLETON | Safe singleton address | | PROXY_CREATION_CODE_HASH | Proxy creation code hash for CREATE2 | | DEFAULT_FALLBACK_HANDLER | Default fallback handler address | | PROXY_FACTORY_ABI | ABI for the Proxy Factory contract | | SAFE_ABI / SAFE_READONLY_ABI | ABIs for Safe contract interactions |

Mining Engine

| Export | Description | |--------|-------------| | Create2MinerEngine | WebGPU-powered CREATE2 salt miner | | MinerConfig | Configuration type for the engine | | MinerCallbacks | Callback hooks (on match, on progress, etc.) | | MinerState | Current state of the miner |

Types

| Export | Description | |--------|-------------| | SafeConfig | { owners: string[], threshold: number } | | NetworkConfig | Chain configuration (name, RPC, explorer, etc.) |

How It Works

PrettySafe mines CREATE2 salt values to find vanity addresses for Safe wallets:

address = keccak256(0xff ++ deployer ++ salt ++ initCodeHash)[12:]

The salt incorporates the Safe setup parameters (owners, threshold) via a two-step Gnosis derivation, then the GPU brute-forces nonce values at massive parallelism (65,535 x 16 workgroups x 64 threads = ~67M parallel hashes per dispatch).

Requirements

  • WebGPU-capable environment (modern browsers, or Node/Bun with bun-webgpu)
  • viem ^2.21.0 (peer-ish dependency, included)

License

MIT