1

I am using the iota.lib.js in nodejs for generating the address for bitcoin. Here is my code :

const IOTA = require('iota.lib.js')
var iota = new IOTA({
  'provider': 'https://sandbox.iota.org/api/v1/',
  'sandbox': true,
});



iota.api.getNodeInfo((error, nodeInfo) => {
    if (error) {
        console.error('getNodeInfo error', error)
    } else {
        console.log('getNodeInfo result', nodeInfo)
    }
});

var seed = "here is the seed";

iota.api.getNewAddress(seed, (error, address) => {
   if (error) {
       console.error('getNewAddress error', error)
   } else {
       console.log('new address generated: ' + address)
   }
})

but every time getnode information are generated but transaction address are not generated. I get this error message:

getNewAddress error Error: Invalid Response: 502 Server Error
Error: Server Error
The server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.

at Object.invalidResponse (/home/graycell/Music/try2/node_modules/iota.lib.js/lib/errors/requestErrors.js:5:12)

What can I do ?

  • 1
    I think the sandbox isn’t working anymore. Try another node instead. – Akkumulator Jan 25 '18 at 6:58

Your Answer

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

Browse other questions tagged or ask your own question.