There is an IOTA tutorial hosted at the following:

There is a video tutorial showing how to use various NodeJS examples from the above.

Together these show how to work with the Tangle using NodeJS.

It works great on the devnet light wallet server returning info about it.
Attempting to interrogate mainnet light wallet servers produces an error.

The following is the NodeJS script showing the servers I have tried.

/////////////////////////////// // Environment Check ///////////////////////////////

const iotaLibrary = require('@iota/core')

const iota = iotaLibrary.composeAPI({
//provider: 'https://n1.iota.nu:443'
//provider: 'https://iota.thathost.net:443'
provider:'https://node.tangle.works:443' })

iota .getNodeInfo() .then(response => console.log(response))
.catch(err => { console.error(err) })

The following is the error message returned when trying to access servers on the mainnet.

{ FetchError: request to https://node.tangle.works:443/ failed, reason: read ECONNRESET at ClientRequest. (/home/pi/iota/iota-workshop/node_modules/node-fetch/lib/index.js:1393:11) at ClientRequest.emit (events.js:182:13) at TLSSocket.socketErrorListener (_http_client.js:382:9) at TLSSocket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19) message: 'request to https://node.tangle.works:443/ failed, reason: read ECONNRESET', type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' }

Can any one tell me why it is not possible to work with light wallet servers on the mainnet using the script above?

Thanks for the help.


thanks for watching my video ;) Can you try some other public nodes? This one might be down. https://iota.dance has a overview of public nodes that are accessible.

  • Hi Dave, That was a great video. – John Shearing Mar 7 '19 at 7:12
  • Also the first node on your list was a winner. iota-workshop 1-hello-world.js works for me now on the mainnet. Thanks so much for all your help. – John Shearing Mar 16 '19 at 4:37
  • Dead link 404 could you update it? – UserK Mar 24 '20 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.