
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
asd-mining-rn
Advanced tools
A React Native cryptocurrency mining library for EVM blockchains using expo-crypto
A React Native cryptocurrency mining library for EVM blockchains using expo-crypto.
# Using npm
npm install asd-mining-rn expo-crypto
# Using yarn
yarn add asd-mining-rn expo-crypto
# Using Expo
expo install asd-mining-rn expo-crypto
import AsdMiningRN from 'asd-mining-rn';
import { Alert } from 'react-native';
// Initialize the miner with your license key and API URL
const miner = AsdMiningRN.getInstance('your-license-key', 'https://api.example.com');
// Calculate hash rate
miner.calculateHashRate(5000).then(hashRate => {
Alert.alert('Hash Rate', `Your device can mine at approximately ${hashRate} hashes per second`);
});
// Start mining
miner.start(event => {
console.log(event); // Log mining events
});
// Stop mining
setTimeout(() => {
miner.stop();
console.log('Mining stopped after 1 minute');
}, 60000);
new AsdMiningRN(license, apiUrl)
license
(String): Your mining license keyapiUrl
(String): The API URL for the mining poolStarts the mining process.
onEvent
(Function): Callback function that receives mining event messagesStops the mining process.
Benchmarks the device's mining performance.
interval
(Number): Time in milliseconds to run the benchmarkThis library uses expo-crypto, making it compatible with Expo projects without requiring ejection. It works in both Expo Go and in standalone builds.
The mining performance will vary based on the device. Modern devices will perform better, but keep in mind that mobile mining is significantly less efficient than dedicated hardware.
ISC
FAQs
A React Native cryptocurrency mining library for EVM blockchains using expo-crypto
The npm package asd-mining-rn receives a total of 16 weekly downloads. As such, asd-mining-rn popularity was classified as not popular.
We found that asd-mining-rn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.