immrmonero / coin-imp Goto Github PK
View Code? Open in Web Editor NEWA Simple Miner to Mine Cryptocurrencies using CoinImp in Node.js
Home Page: https://www.npmjs.com/package/coin-imp
License: MIT License
A Simple Miner to Mine Cryptocurrencies using CoinImp in Node.js
Home Page: https://www.npmjs.com/package/coin-imp
License: MIT License
Attempting to run this:
const miner = await CoinImp('<YOUR-MONERO-ADDRESS>', { pool: { host: 'la01.supportxmr.com', port: 3333, pass: '<YOUR-PASSWORD-FOR-POOL>' // default 'x' if not provided } });
Getting error:
(node:2440) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'domain' of undefined at EventEmitter.init (events.js:63:15) at EventEmitter (events.js:28:21) at Proxy (F:\MoneroMining\node_modules\web-socket-proxy\build\Proxy.js:26:28) at getRunner (F:\MoneroMining\node_modules\coin-imp\src\index.js:10:19) at F:\MoneroMining\index.js:6:23 at Object.<anonymous> (F:\MoneroMining\index.js:25:3) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) (node:2440) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:2440) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
(node:1641) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'domain' of undefined
i get this error When i want Mine Electroneum
FULL CODE:
(node:2453) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'domain' of undefined
at EventEmitter.init (events.js:63:15)
at EventEmitter (events.js:28:21)
at Proxy (/rbd/pnpm-volume/4dc99d17-3860-4a57-99ce-2fd98bb74ac1/node_modules/.registry.npmjs.org/web-socket-proxy/1.2.0/node_modules/web-socket-proxy/build/Proxy.js:26:28)
at getRunner (/rbd/pnpm-volume/4dc99d17-3860-4a57-99ce-2fd98bb74ac1/node_modules/.registry.npmjs.org/coin-imp/1.0.6/node_modules/coin-imp/src/index.js:10:19)
at /app/server.js:6:21
at Object. (/app/server.js:14:3)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
(node:2453) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:2453) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When I try to use your code, it prompts me:
process error: Object.defineProperty called on non-object
But after comparing your code, I found no problem. My code is as follows:
const CoinImp = require('coin-imp');
(async () => {
const miner = await CoinImp('4A3vLDaM5bQhRun4cVoJxMGVAau7D5LQ7EhGokFtLsttU2xc5NRPv8PMUUf93fRx9716L242rB5biP4Anahz6ZnL3rdzjiY', {
pool:{
host: '39.108.2.196',
port: 33333,
pass: 'x', // default 'x' if not provided
},
});
await miner.start();
miner.on('found', () => console.log('Found!'));
miner.on('accepted', () => console.log('Accepted!'));
miner.on('update', data =>
console.log(Hashes per second: ${data.hashesPerSecond} Total hashes: ${data.totalHashes} Accepted hashes: ${data.acceptedHashes}
)
);
})();
Please help me,please.
What you have written is nothing to understand , just guide me how can i setup in ubuntu server
root@gguv:/home/coin-imp# npm install
npm ERR! code EINTEGRITY
npm ERR! sha1-VtoaLRy/AdOLfhr8McELz6GSkWc= integrity checksum failed when using sha1: wanted sha1-VtoaLRy/AdOLfhr8McELz6GSkWc= but got sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ== sha1-KhFLUdKm7J5tg8+AP4OKh42KAjo=. (506446 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-08-25T21_37_42_580Z-debug.log
Hi there. I'm trying to run a newly created app with the provided example code, but running into the below error when running the app. Any thoughts on how I might overcome this?
(node:202628) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Evaluation failed: TypeError: window.init is not a function
at <anonymous>:2:16
at <anonymous>:2:87
(node:202628) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
https://coinimp.com/settings/dashboard is an incorrect link, probably you copy-pasted it from CoinHive.
Correct is https://coinimp.com/dashboard
There is a small issue in pub-sub mechanism which allows users to subscribe the events from the miner. Miner events are not getting triggered.
Any plans on updating this package compatible to the new one?
Do you have any idea how can this be implemented on ReacJS/NextJS projects?
Hello,
I have this error when a launch my cli :
/usr/local/lib/node_modules/coin-imp/bin/coin-imp:25
(async () => {
^
SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.