Skip to content

Instantly share code, notes, and snippets.

@elmariachi111
Created January 28, 2018 21:44
Show Gist options
  • Save elmariachi111/2ea2da8537052952beccd49c6c82f58e to your computer and use it in GitHub Desktop.
Save elmariachi111/2ea2da8537052952beccd49c6c82f58e to your computer and use it in GitHub Desktop.
create a iota seed in plain js
function createSeed(){
const seedsize = 81;
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ9";
let seed = "";
for (var i = 0, n = chars.length; i < seedsize; ++i) {
seed += chars.charAt(Math.floor(Math.random() * n));
}
return seed;
}
console.log(createSeed());
@elmariachi111
Copy link
Author

node seed.js
profit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment