Bitcoin Forum
September 27, 2018, 11:02:16 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: what JavaScript library to generate priv keys & addresses? (like bitaddress.org)  (Read 1525 times)
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



View Profile
January 21, 2014, 01:45:18 PM
 #1

For some websites I'd like to include the functionality to generate Bitcoin private keys & addresses client-side, just like bitaddress.org.

In fact, I don't even need to generate them randomly, just converting 256 bit hex keys (e.g. from brainwallets or deterministic key generators or other pseudo-random sources) to private keys and addresses.

For testing purposes, I actually saved bitaddress.org, stripped all HTML, and just called the relevant functions myself. Works great, but I guess that isn't the most 'clean' way to do this. And it's not trivial to keep up to date either. I know bitaddress.org is in github (https://github.com/pointbiz/bitaddress.org) but is the library that bitaddress.org uses, and especially the hex key to private key / address conversion, also available separately? Or is just a matter of cherry-picking the right files from github?


In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
Make a difference with your Ether.
Donate Ether for the greater good.
SPRING.WETRUST.IO
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
jp
Member
**
Offline Offline

Activity: 69
Merit: 10



View Profile WWW
February 20, 2014, 09:48:42 AM
 #2

I'm developing a library for this: https://github.com/cryptocoinjs Also, I wrote an article on all the gory details of Address generation with JavaScript using BitcoinJS (which is what my library is forked from): http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript
crazydownloaded
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile WWW
February 21, 2014, 06:21:10 AM
 #3

Brainwallet is actually opensourced too: https://github.com/brainwallet/brainwallet.github.com and includes a generation of addresses.
I did it myself, that's not very difficult to understand. Starts with bitcoin-js library.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!