To use the interface it will be necessary to install stratum-mining-proxy on a server
const slushpoolProxy = require('slushpool-stratum-proxy-interface');
var client = slushpoolProxy({
server: "yourproxyip",
port: 3333,
portGetWork: 8332,
user: "andrehrf.1",
pass: "x",
debug: true,
onConnect: () => console.log('Connected to server'),
onClose: () => console.log('Connection closed'),
onError: (error) => console.log('Error', error.message),
onNewMiningWork: (newWork) => console.log('[New Work]', newWork),
onAuthorize: () => {
},
onSubmitResponse: (err, res) => {
console.log(res)
}
});