Create BitCoin address for each registered user

1

1

I am working on a PokerGame where I need to implement BitCoins. For each registered user, I need a unique bitcoin address generated, toward which they can make payments and I make them show it when they access their game account. How can implement this? I am using Java.

Thanks

RahuJoshi

Posted 2013-11-12T06:58:30.457

Reputation: 29

Does not help you a lot as it is not Java specific, but here you can look my (Python based) django_bitcoin tutorial for inspiration: http://opensourcehacker.com/2013/10/16/accepting-and-spending-bitcoins-in-a-django-application/

Mikko Ohtamaa 2013-11-12T11:06:01.243

Nobody reads the frigging manual anymore… Java <-> bitcoind via RPC would just be one of many options.e-sushi 2015-03-27T23:09:40.747

Answers

3

You will want to look into this implementation of bitcoin.

https://bitcoinj.github.io/

The documentation will provide all required information for generating bitcoin addresses.

It is generally unwise to reuse addresses, also very expensive to be constantly moving small amounts on the main chain. You may want to consider other implementation options rather than one address per user.

MaxSan

Posted 2013-11-12T06:58:30.457

Reputation: 3 680

I see there are options to generate addresses using CoinBase API: https://coinbase.com/api/doc/1.0/accounts/generate_receive_address.html If It is not a good implementation to create addresses per user, can you suggest what other implementations are possible here? I am a bit new to this...

RahuJoshi 2013-11-13T07:31:28.517

2For better security, make a new address for each transaction, keep all addresses in a separate table and linked by an ID. When sending out, group transactions together in custom sends to reduce fees. When a player wins or looses a hand use an internal record, don't move coins unless they are leaving your system. keep 90% of funds offline. That should get you started.MaxSan 2013-11-13T09:46:19.737