Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nadcablabs-bulk-evm-wallet-genrator

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nadcablabs-bulk-evm-wallet-genrator

**EVM Address Generator** is a Node.js library that generates Ethereum-compatible (EVM) addresses in bulk, with each address associated with a random value between 0.001 and 0.1. This tool is perfect for developers who need to create large sets of address

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Bulk Evm Wallet Address Generator

EVM Address Generator is a Node.js library that generates Ethereum-compatible (EVM) addresses in bulk, with each address associated with a random value between 0.001 and 0.1. This tool is perfect for developers who need to create large sets of addresses for testing or other purposes.

Features

  • Bulk Address Generation: Generate up to 100,000 Ethereum-compatible addresses.
  • Random Value Assignment: Each address is paired with a random value between 0.001 and 0.1.
  • CSV & Text File Output: Easily export addresses and values to a CSV or text file.
  • Efficient and Fast: Optimized for performance to handle large-scale generation.

Installation

Before using the EVM Address Generator, ensure you have Node.js installed. Then, you can install the required dependencies:

npm install ethereumjs-wallet csv-writer

Usage

Basic Example

Here's a simple example to generate 100,000 addresses with random values and save them to a text file:

 const Wallet = require('ethereumjs-wallet').default;
const fs = require('fs');

const numAddresses = 100000;
let data = '';

// Generate addresses and random values
for (let i = 0; i < numAddresses; i++) {
    const wallet = Wallet.generate();
    const address = wallet.getAddressString();
    const randomValue = (Math.random() * (0.1 - 0.001) + 0.001).toFixed(4);

    data += `${address} ${randomValue}\n`;
}

// Write the data to a text file
fs.writeFile('evm_addresses_with_values.txt', data, 'utf8', (err) => {
    if (err) {
        console.error('Error writing to text file', err);
    } else {
        console.log('Text file was written successfully');
    }
});

CSV Output Example

If you prefer to export the generated addresses and values to a CSV file, you can use the following script:

const Wallet = require('ethereumjs-wallet').default;
const createCsvWriter = require('csv-writer').createObjectCsvWriter;

const numAddresses = 100000;
const csvWriter = createCsvWriter({
    path: 'evm_addresses_and_private_keys.csv',
    header: [
        { id: 'address', title: 'EVM Address' },
        { id: 'randomValue', title: 'Random Value' }
    ]
});

const records = [];

// Generate addresses and random values
for (let i = 0; i < numAddresses; i++) {
    const wallet = Wallet.generate();
    const address = wallet.getAddressString();
    const randomValue = (Math.random() * (0.1 - 0.001) + 0.001).toFixed(4);

    records.push({ address, randomValue });
}

// Write records to a CSV file
csvWriter.writeRecords(records)
    .then(() => console.log('CSV file written successfully'))
    .catch(err => console.error('Error writing CSV file', err));

Customization

Number of Addresses: You can adjust the number of addresses by modifying the numAddresses variable.
Random Value Range: The range of random values (0.001 to 0.1) can be customized by changing the parameters in the Math.random() function.

Security Considerations

Private Key Handling: This tool does not expose or save private keys when exporting data, ensuring the privacy and security of your generated addresses.
Performance: The script is optimized for generating large datasets quickly, but depending on your system's resources, generating 100,000 addresses may take some time.

Known Issues

Vulnerabilities: If you encounter vulnerabilities in the packages used, consider running npm audit fix or npm audit fix --force. See the npm documentation for more details.

Contributing

Contributions are welcome! If you have ideas to improve this library, feel free to submit a pull request or open an issue. Running Tests

To run tests for the library, use the following command:

node generate_addresses.js

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

@nadcablabs

Keywords

FAQs

Package last updated on 05 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc