arnabk / stratum-client

A NodeJS based stratum client for communication with stratum pool
MIT License
18 stars 15 forks source link

Client response get wrong #4

Closed FavyTeam closed 7 months ago

FavyTeam commented 6 years ago

I try to use stratum-client in React Native Project but When i send request to xmr.pool.minergate.com, i got error {"jsonrpc":"2.0","error":{"code":-32601,"message":"Procedure not found."},"result":null}

Is something wrong ?

arnabk commented 6 years ago

it depends on what type of request you are sending. Without looking into your code, it is hard to say what you might be doing wrong

FavyTeam commented 6 years ago

I connect mining pool in minergate account. I use this string to mine from console "minerd -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u -p "

and the code is below

client({ server: "xmr.pool.minergate.com", port: 45700, worker: "worker.email", password: "worker.password", autoReconnectOnError: true, onConnect: () => console.log('Connected to server'), onClose: () => console.log('Connection closed'), onError: (error) => console.log('Error', error.message), onAuthorizeSuccess: () => console.log('Worker authorized'), onAuthorizeFail: () => console.log('WORKER FAILED TO AUTHORIZE OH NOOOOOO'), onNewDifficulty: (newDiff) => console.log('New difficulty', newDiff), onSubscribe: (subscribeData) => console.log('[Subscribe]', subscribeData), onNewMiningWork: (newWork) => console.log('[New Work]', newWork), });

So I found this error in onData.js

module.exports = (client, updatedOptions, data, workObject) => { ..... }

I print the console of data value and the error is {"jsonrpc":"2.0","error":{"code":-32601,"message":"Procedure not found."},"result":null}

how can i fix these errors ?