Generate Unique address for each users?

0

I have PHP Based Web Bitcoin Wallet on localhost. I use simple Login system and basic bitcoin Json-RPC. In fact, everything is runing clearly, but my Bitcoin daemon giving same Bitcoin address to all users.

I want, Unique bitcoin address for every user? How?

Cihan Sancak

Posted 2016-04-17T18:14:15.813

Reputation: 23

Answers

0

The JSON-RPC has a method called getnewaddress that will generate a new private-/public-keypair and return it to the caller. You can use this to generate a new address for each user. In order to track the balances of users I'd suggest grouping a user's addresses in an account associated with the user by calling getaccountaddress with the user ID or the username. You can then use the getbalance <user> call to check its current balance. However, there are some caveats when grouping addresses with accounts.

cdecker

Posted 2016-04-17T18:14:15.813

Reputation: 7 878

thx bro. Can u see my other problem? http://bitcoin.stackexchange.com/questions/43775/json-rpc-connection-problem

Cihan Sancak 2016-04-18T21:47:21.490