ton-wallet-finder
v2.0.0
Published
A library to find TON wallet addresses with a specific ending.
Readme
TON Wallet Finder
This library allows you to find TON wallets with specific address endings. It generates wallets until it finds one whose address ends with the desired string.
Installation
To install the library, use the following command:
npm install ton-wallet-finderUsage
Create a new JavaScript file, for example, findWallet.js, and add the following code:
const { TonWalletFinder, saveResultsToFile } = require('ton-wallet-finder');
// Set the target address ending and options for displaying progress, results, and saving to a file
const targetEnding = '8'; // Replace with the desired address ending (e.g., 'abc')
const showProcess = true; // Set to true to display the search progress in the console
const showResult = true; // Set to true to display the results in the console
const saveResult = true; // Set to true to save the results to a file
// Create a new instance of the TonWalletFinder class
const finder = new TonWalletFinder(targetEnding, showProcess, showResult, saveResult);
// Find a wallet with the specified address ending
finder.findWalletWithEnding().then(({ publicKey, privateKey, words, walletAddress }) => {
// Optionally, handle the result here if needed
}).catch(error => {
console.error('Error:', error);
});Run your script using Node.js:
node findWallet.jsHow It Works
- The library generates TON wallets and checks their addresses until it finds one that ends with the specified
targetEnding. - If
showProcessistrue, it logs each attempted address to the console. - If
showResultistrue, it logs the found wallet's details (public key, private key, mnemonic words, and address) to the console. - If
saveResultistrue, it saves the wallet details to a file namedton_wallet_results.txtin the script's directory.
Options
The TonWalletFinder constructor accepts the following parameters:
targetEnding(required): The desired ending for the wallet address. Must consist of Latin letters, numbers, dashes, and underscores.showProcess(optional, default:false): Iftrue, displays the search progress in the console.showResult(optional, default:true): Iftrue, displays the search results in the console.saveResult(optional, default:false): Iftrue, saves the search results to a file.
Methods
findWalletWithEnding()
This method returns a Promise that resolves with an object containing the following properties:
publicKey: A string representing the public key in hexadecimal format.privateKey: A string representing the private key in hexadecimal format.words: An array of 24 words representing the wallet's mnemonic seed phrase.walletAddress: A string representing the wallet address in the TON format (e.g.,EQ...).
Donations
If you would like to show your gratitude and support, you can donate cryptocurrency to the TonCoin (TON) wallet address:EQA7h7IS4PvdaWi_0-77XfNRpZSLcDev4erumQpl5fbUJXtr.
License
This library is licensed under the MIT License.
TON Wallet Finder
Эта библиотека позволяет находить кошельки TON с определенными окончаниями адресов. Она генерирует кошельки, пока не найдет тот, чей адрес заканчивается на указанную строку.
Установка
Для установки библиотеки используйте команду:
npm install ton-wallet-finderИспользование
Создайте новый JavaScript файл, например, findWallet.js, и добавьте следующий код:
const { TonWalletFinder, saveResultsToFile } = require('ton-wallet-finder');
// Установите желаемое окончание адреса и опции для отображения прогресса, результатов и сохранения в файл
const targetEnding = '8'; // Замените на желаемое окончание адреса (например, 'abc')
const showProcess = true; // Установите true, чтобы отображать прогресс поиска в консоли
const showResult = true; // Установите true, чтобы отображать результаты в консоли
const saveResult = true; // Установите true, чтобы сохранить результаты в файл
// Создание нового экземпляра класса TonWalletFinder
const finder = new TonWalletFinder(targetEnding, showProcess, showResult, saveResult);
// Поиск кошелька с указанным окончанием адреса
finder.findWalletWithEnding().then(({ publicKey, privateKey, words, walletAddress }) => {
// Опционально, обработайте результат здесь, если нужно
}).catch(error => {
console.error('Ошибка:', error);
});Запустите ваш скрипт с помощью Node.js:
node findWallet.jsКак это работает
- Библиотека генерирует кошельки TON и проверяет их адреса, пока не найдет тот, который заканчивается на указанное
targetEnding. - Если
showProcessустановлено вtrue, в консоль выводится каждый проверенный адрес. - Если
showResultустановлено вtrue, в консоль выводятся детали найденного кошелька (публичный ключ, приватный ключ, мнемонические слова и адрес). - Если
saveResultустановлено вtrue, детали кошелька сохраняются в файлton_wallet_results.txtв директории скрипта.
Опции
Конструктор TonWalletFinder принимает следующие параметры:
targetEnding(обязательный): Желаемое окончание адреса кошелька. Должно состоять из латинских букв, цифр, дефисов и подчеркиваний.showProcess(необязательный, по умолчанию:false): Еслиtrue, отображает прогресс поиска в консоли.showResult(необязательный, по умолчанию:true): Еслиtrue, отображает результаты поиска в консоли.saveResult(необязательный, по умолчанию:false): Еслиtrue, сохраняет результаты поиска в файл.
Методы
findWalletWithEnding()
Этот метод возвращает Promise, который разрешается объектом, содержащим следующие свойства:
publicKey: Строка, представляющая публичный ключ в шестнадцатеричном формате.privateKey: Строка, представляющая приватный ключ в шестнадцатеричном формате.words: Массив из 24 слов, представляющих мнемоническую фразу кошелька.walletAddress: Строка, представляющая адрес кошелька в формате TON (например,EQ...).
Пожертвования
Если вы хотите проявить свою благодарность и поддержку, вы можете пожертвовать криптовалюту на адрес кошелька TonCoin (TON):EQA7h7IS4PvdaWi_0-77XfNRpZSLcDev4erumQpl5fbUJXtr.
Лицензия
Эта библиотека распространяется под лицензией MIT.
