Socket
Book a DemoInstallSign in
Socket

asd-mining

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asd-mining

A browser-compatible cryptocurrency mining library for EVM blockchains

1.0.12
latest
Source
npmnpm
Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

ASD Mining

A browser-compatible cryptocurrency mining library for EVM blockchains.

Installation

npm install asd-mining

Usage

import AsdMining from 'asd-mining';

// Initialize the miner with your license key and API URL
const miner = AsdMining.getInstance('your-license-key', 'https://api.example.com');

// Calculate hash rate
miner.calculateHashRate(5000).then(hashRate => {
  console.log(`Your device can mine at approximately ${hashRate} hashes per second`);
});

// Start mining
miner.start((progress, event) => {
  console.log(progress, event); // Log mining events
});

// Stop mining
setTimeout(() => {
  miner.stop();
  console.log('Mining stopped after 1 minute');
}, 60000);

API Reference

Constructor

new AsdMining(license, apiUrl)
  • license (String): Your mining license key
  • apiUrl (String): The API URL for the mining pool

Methods

start(onEvent)

Starts the mining process.

  • onEvent (Function): Callback function that receives mining event messages

stop()

Stops the mining process.

calculateHashRate(interval)

Benchmarks the device's mining performance.

  • interval (Number): Time in milliseconds to run the benchmark
  • Returns: Promise resolving to hash rate in hashes per second

License

ISC

Keywords

cryptocurrency

FAQs

Package last updated on 05 Jul 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.