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

ton-wallet-finder

v4.0.0

Published

Vanity address generator for TON blockchain — find a WalletV4 address ending with any custom string.

Readme

TON Wallet Finder

npm version npm downloads license CI TypeScript issues

Vanity address generator for TON blockchain. Find a wallet whose address ends with any string you choose.

English · Русский


Table of Contents


📦 Installation

npm install ton-wallet-finder

Requires Node.js 18 or higher.


Quick Start

const { TonWalletFinder } = require('ton-wallet-finder');

// Note: the address alphabet is base64url — matching is case-sensitive.
// 'abc' and 'ABC' are different patterns.
const finder = new TonWalletFinder('abc');

finder.findWalletWithEnding()
  .then(({ publicKey, privateKey, words, walletAddress }) => {
    console.log('Found:', walletAddress);
    // Store publicKey, privateKey and words securely — do NOT log them
    // in shared or CI environments.
  })
  .catch(console.error);

Run:

node findWallet.js

Options

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | targetEnding | string | required | Desired address ending. Latin letters, digits, -, _. Case-sensitive. | | showProcess | boolean | false | Log each attempted address to console | | showResult | boolean | false | Log found wallet details to console. Keep false in shared/logged environments to avoid exposing private keys. | | saveResult | boolean | false | Save result to ton_wallet_results.txt |


API

findWalletWithEnding([options]) → Promise<Result>

Generates wallets until one matches the target ending. Returns:

| Field | Type | Description | |-------|------|-------------| | publicKey | string | Public key (hex) | | privateKey | string | Private key (hex) | | words | string[] | 24-word mnemonic seed phrase | | walletAddress | string | TON address (e.g. EQa...abc) |

Cancellation — pass an AbortSignal to stop the search at any time:

const controller = new AbortController();
setTimeout(() => controller.abort('timeout'), 30_000); // cancel after 30 s

try {
  const result = await finder.findWalletWithEnding({ signal: controller.signal });
} catch (err) {
  console.log('Search cancelled:', err.message);
}

TypeScript declarations are included (index.d.ts).


Performance

Search time grows exponentially with ending length. Rough estimates on a modern CPU:

| Ending length | ~Attempts | ~Time | |--------------|-----------|-------| | 1 char | ~64 | instant | | 2 chars | ~4 000 | seconds | | 3 chars | ~260 000 | minutes | | 4 chars | ~16 000 000 | hours |

The TON address alphabet is base64url (A–Z, a–z, 0–9, -, _), so each character position has 64 possible values.


🚀 What's new in v4

Version 4.0.0 completely eliminates all production dependencies.

Previous versions relied on @ton/ton and @ton/crypto, which pulled in a chain of 31 transitive packages (including tweetnacl, @ton/core, axios, jssha, and others).

Starting with v4, everything is implemented using Node.js built-in modules only:

| What | How | |------|-----| | Mnemonic generation | crypto.randomBytes + bundled BIP-39 word list | | HMAC-SHA-512 / PBKDF2-SHA-512 | crypto.createHmac / crypto.pbkdf2 | | Ed25519 key derivation | crypto.createPrivateKey with PKCS#8 seed wrapping | | WalletV4R2 address | TVM cell hash (SHA-256) + CRC-16/CCITT via Buffer |

Result: npm install ton-wallet-finder now installs 0 additional packages. The public API is identical — no code changes required when upgrading from v3.


🔀 Migration from v2/v3

v2/v3 → v4 breaking changes

| What changed | v2 behaviour | v3 behaviour | |---|---|---| | showResult default | true — printed private key to stdout by default | false — silent by default | | createWallet() | returned Promise<Address> | returns Address synchronously | | saveResultsToFile() | returned void (fire-and-forget) | returns Promise<void> (awaited) |

Migration checklist

  1. showResult — if you relied on the default console output, pass showResult: true explicitly:

    // v2 (implicit)
    new TonWalletFinder('abc');
    // v3 equivalent
    new TonWalletFinder('abc', false, true);
  2. createWallet() — if you called it with await, remove the await:

    // v2
    const address = await finder.createWallet(keyPair);
    // v3
    const address = finder.createWallet(keyPair);
  3. saveResultsToFile() — if you called it standalone, add await:

    // v2
    saveResultsToFile(pub, priv, words, addr);
    // v3
    await saveResultsToFile(pub, priv, words, addr);

💖 Support the Author

If this library saved you time — a small thank-you goes a long way!

💎 TON

UQA7h7IS4PvdaWi_0-77XfNRpZSLcDev4erumQpl5fbUJSau

Donate via Tonkeeper Donate via Tonhub


💳 Other ways

PayPal Buy Me a Coffee Ko-fi

Thank you for your support! 💙


Русский

Установка

npm install ton-wallet-finder

Требуется Node.js 18 или выше.

Быстрый старт

const { TonWalletFinder } = require('ton-wallet-finder');

// Алфавит адреса — base64url, поиск регистрозависим.
// 'abc' и 'ABC' — разные паттерны.
const finder = new TonWalletFinder('abc');

finder.findWalletWithEnding()
  .then(({ publicKey, privateKey, words, walletAddress }) => {
    console.log('Найдено:', walletAddress);
    // publicKey, privateKey и words храните безопасно —
    // не выводите в логи в shared/CI-окружениях.
  })
  .catch(console.error);

Опции

| Параметр | Тип | По умолчанию | Описание | |----------|-----|--------------|----------| | targetEnding | string | обязательный | Желаемое окончание адреса. Латиница, цифры, -, _. Регистрозависимо. | | showProcess | boolean | false | Выводить каждый проверяемый адрес в консоль | | showResult | boolean | false | Вывести найденный кошелёк в консоль. Оставьте false в окружениях с логированием, чтобы не раскрывать приватный ключ. | | saveResult | boolean | false | Сохранить результат в ton_wallet_results.txt |

API

findWalletWithEnding([options]) → Promise<Result>

Генерирует кошельки, пока не найдёт совпадение. Поддерживает отмену через AbortSignal. Возвращает:

| Поле | Тип | Описание | |------|-----|----------| | publicKey | string | Публичный ключ (hex) | | privateKey | string | Приватный ключ (hex) | | words | string[] | 24-словная мнемоническая фраза | | walletAddress | string | Адрес TON (например, EQa...abc) |

Отмена поиска — передайте AbortSignal для остановки в любой момент:

const controller = new AbortController();
setTimeout(() => controller.abort('таймаут'), 30_000); // отмена через 30 с

try {
  const result = await finder.findWalletWithEnding({ signal: controller.signal });
} catch (err) {
  console.log('Поиск отменён:', err.message);
}

Поставляется с декларациями TypeScript (index.d.ts).

Производительность

Время поиска растёт экспоненциально с длиной окончания:

| Длина окончания | ~Попыток | ~Время | |----------------|----------|--------| | 1 символ | ~64 | мгновенно | | 2 символа | ~4 000 | секунды | | 3 символа | ~260 000 | минуты | | 4 символа | ~16 000 000 | часы |

Что нового в v4

В версии 4.0.0 полностью отказались от избыточных внешних зависимостей.

Предыдущие версии использовали @ton/ton и @ton/crypto, которые тянули за собой цепочку из 31 транзитивного пакета (в том числе tweetnacl, @ton/core, axios, jssha и другие).

Начиная с v4 всё реализовано исключительно на встроенных модулях Node.js:

| Что | Как | |-----|-----| | Генерация мнемоники | crypto.randomBytes + встроенный список BIP-39 | | HMAC-SHA-512 / PBKDF2-SHA-512 | crypto.createHmac / crypto.pbkdf2 | | Деривация ключа Ed25519 | crypto.createPrivateKey с обёрткой PKCS#8 | | Адрес WalletV4R2 | Хэш TVM-ячейки (SHA-256) + CRC-16/CCITT через Buffer |

Результат: npm install ton-wallet-finder устанавливает 0 дополнительных пакетов. Публичный API не изменился — при обновлении с v3 никаких правок в коде не требуется.

Миграция с v2/v3

| Что изменилось | v2 | v3/v4 | |---|---|---| | Дефолт showResult | true | false | | createWallet() | Promise<Address> | Address (синхронно) | | saveResultsToFile() | void | Promise<void> |


License

MIT © Lendel