Bitcoin Forum
December 14, 2024, 08:08:20 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Deterministic Bitcoin Address Generator (for PHP, Python and Ruby)  (Read 4416 times)
stick (OP)
Sr. Member
****
Offline Offline

Activity: 441
Merit: 268



View Profile
June 21, 2013, 05:41:25 PM
Last edit: July 10, 2013, 09:51:19 PM by stick
 #1

I created a minimalistic and deterministic version of Bitcoin address generator (from Electrum Master Public Key).

It's based on php-ecc by Matyas Danter and mpkgen by Chris Savery.

The main difference from these two is that it's cleaned up significantly and therefore you need to require just one 7 kB PHP file.
It also requires GMP extension (no BCMath this time), so it's a little bit faster than php-ecc which uses an abstraction layer on top of GMP and BCMath.

I also ported the code to:
* Python - you'll need to have gmpy package installed.
* Ruby - you'll need to have ffi rubygem installed.

The code is MIT licensed and lives here: https://github.com/prusnak/addrgen

I hope this will enable all of you to create your own tipping platforms, eshops and crowdfunding pages. (Most of the software dealing with deterministic wallets was written in Python up to now).

Donations are welcome at 1PuRV7zVXrajGxHJ6LJLccgDYz4hNcVPfS

Thanks!

scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
June 21, 2013, 10:16:04 PM
 #2

Very nice!  I think dumping bcmath was a good idea as it's quite slow and bloats/dirties the code up.  I thought using gmp_strval and strtr was a clever way to keep the code compact by not doing the base conversion yourself.  May be a little faster, too.

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
stick (OP)
Sr. Member
****
Offline Offline

Activity: 441
Merit: 268



View Profile
June 24, 2013, 01:06:40 PM
 #3

Now available as rubygem: https://rubygems.org/gems/bitcoin-addrgen

thx to Michael Pearce

stick (OP)
Sr. Member
****
Offline Offline

Activity: 441
Merit: 268



View Profile
July 09, 2013, 01:46:37 PM
 #4

I rewrote ruby part to use more standard ffi rubygem instead of niche gmp rubygem. That way it's much more easier to use in cloud environments (like heroku or openshift).

stick (OP)
Sr. Member
****
Offline Offline

Activity: 441
Merit: 268



View Profile
July 10, 2013, 09:51:39 PM
 #5

I added Python port as well.

templar77
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
July 04, 2014, 05:44:41 PM
 #6

Thanks man, I was looking for something like this. I'll give it a try.
dzarmush
Legendary
*
Offline Offline

Activity: 1806
Merit: 1001


View Profile
July 05, 2014, 11:16:50 PM
 #7

Thanks man, I was looking for something like this. I'll give it a try.

Don't have any deal with templar77, he's a scammer. He announced an IPO, gathered money and didn't launch the coin.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!