Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generating IOTA addresses from a seed (#2)
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_javascript.ipynb.html#2508A6FF9241
// Requirement: IOTA Javascript Library (!npm install iota.lib.js)
var IOTA = require('../../node_modules/iota.lib.js/lib/iota');
var NodeURL = "https://field.deviota.com:443";
var MySeed = "WKQDUZTGFKSSLACUCHHLZRKZBHSDSCEBHKUPDLKFBQALEBKDMFRPUQGZRXAADPG9TSRTZGGBZOFRJCFMM";
var iota = new IOTA({
'provider': NodeURL
});
//Please note, it is sync function
for (var i = 0; i < 3; i++ ) {
var address = iota.api._newAddress(MySeed, i, 2, false);
console.log(address);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment