4

I'm looking to make a JavaScript brain wallet generator for Monero. Is there a JavaScript library to create Monero addresses?

YakovL
  • 105
  • 6
Patoshi パトシ
  • 4,540
  • 3
  • 26
  • 66

1 Answers1

7

There is Javascript code to generate Monero addresses from an arbitrary string, yes. See https://github.com/moneromooo-monero/monero-wallet-generator/tree/master. This page contains code originally from MyMonero (https://mymonero.com/).

The general idea is to hash the string (preferably using a KDF), and use the resulting hash as the spend key. The view key is obtained from the spend key.

user36303
  • 34,858
  • 2
  • 57
  • 123
  • Is there a sample code somewhere? – Patoshi パトシ Jul 12 '17 at 13:56
  • Yes, I included a link in the post you're replying to. The repo contains a single HTML page, which has the code you're looking for.the genwallet function, from which you can look at what it calls (which is also in that same file). – user36303 Jul 12 '17 at 17:47
  • I found the line: https://github.com/moneromooo-monero/monero-wallet-generator/blob/master/monero-wallet-generator.html#L10950 --- but is there an example code of how to use it? – Patoshi パトシ Aug 16 '17 at 14:34