node-stratum
node-stratum copied to clipboard
Monero daemon
Can i use my monerod with you module to use miner of this guy: https://github.com/howardchung/jsminer ?
usually you'd want to communicate directly to JSON RPC interfaces. AJAX is an on-top-of-HTTP method, and relies on HTTP headers for either urlencoded or form data POSTS and GET. stratum is its own protocol using JSON RPC as a transport, so you would not be able to use it as-is
now, if you're talking strictly about monero daemon RPC, then you might use a proxy and it would work
client.connect({ host: 'xmr.pool.minergate.com', port: 45560, id:'[email protected]', password:require('crypto').createHash('sha256').update('x').digest('hex') }).then(function(socket) { console.log('Connected! subscribing'); socket.stratumSubscribe(); });
And i get:
[Error: Stratum request without method or result field]
now I get this from the pool(onmine):
{"id":1,"jsonrpc":"2.0","error":null,"result":{"status":"OK"}}
And i don't know what to do next, can you show me how to chat with pool, some example?
will update the examples when I finish the rewrite