Bitcoin Forum
June 27, 2024, 04:45:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can unique addresses be allocated to different users?  (Read 924 times)
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 04, 2017, 05:13:08 AM
 #1

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.
devans
Sr. Member
****
Offline Offline

Activity: 528
Merit: 368


View Profile
January 04, 2017, 11:52:31 AM
 #2

I recommend generating them on demand, i.e. whenever a client requests a deposit address, but deterministically. The reasoning for this is that there is no point in storing or monitoring addresses that cannot possibly have received a deposit yet.

For example you could use the derivation path m/u/i, where u is the user's ID and i is a counter that gets incremented whenever the previous address is used. This gives you an infinite supply (practically speaking) of unique deposit addresses for every user.
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 05, 2017, 12:47:03 PM
 #3

How would i generate address dynamically at user side? Because I don't want to share my public key with User.
devans
Sr. Member
****
Offline Offline

Activity: 528
Merit: 368


View Profile
January 05, 2017, 03:09:46 PM
 #4

How would i generate address dynamically at user side? Because I don't want to share my public key with User.

The client would only receive the generated address, not the extended key from which it was derived. Neither should the client be concerned with how the address was generated.

So whenever a client requests its deposit address from your service, e.g. by visiting a web page or calling an API endpoint, your service looks up or generates the address and returns it to the client.
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 06, 2017, 05:11:25 AM
 #5

thanks for your help, i get back if any other query come. Smiley
Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
January 06, 2017, 02:29:04 PM
 #6

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.

There are many websites that can do that for you. Some risk is involved here.
Best would be to write a script that will do that for you.  If you lack technical knowledge, try to find site you can trust that works offline.
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 09, 2017, 02:30:31 PM
 #7

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.

There are many websites that can do that for you. Some risk is involved here.
Best would be to write a script that will do that for you.  If you lack technical knowledge, try to find site you can trust that works offline.

trust is a major factor for me, so i prefer scripting rather than third party websites
mocacinno
Legendary
*
Offline Offline

Activity: 3430
Merit: 5036


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
January 09, 2017, 02:35:27 PM
 #8

I've written a small python script to derive addresses for a user on this forum in the past:
https://bitcointalk.org/index.php?topic=1682523.msg17028536#msg17028536

Since he payed me a bounty when i PM'ed him the final version, i cannot give you the final result (we didn't discuss if the script was free for the public, or private), but the theory on how to do this easily is all on this page Wink

If you use this script, and run into any troubles, let me know, i'll keep an eye on this thread Smiley

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 10, 2017, 05:11:49 AM
 #9

I've written a small python script to derive addresses for a user on this forum in the past:
https://bitcointalk.org/index.php?topic=1682523.msg17028536#msg17028536

Since he payed me a bounty when i PM'ed him the final version, i cannot give you the final result (we didn't discuss if the script was free for the public, or private), but the theory on how to do this easily is all on this page Wink

If you use this script, and run into any troubles, let me know, i'll keep an eye on this thread Smiley

Thanks a lot.I saw that code,fairly get the logic.Since i am using different language for development,i tried first by myself and if any query come i let u know. Smiley 
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 10, 2017, 02:32:53 PM
 #10

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.


can i bind or implement this process with Trezor?
mocacinno
Legendary
*
Offline Offline

Activity: 3430
Merit: 5036


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
January 10, 2017, 02:45:41 PM
 #11

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.


can i bind or implement this process with Trezor?

you should be able to export the xpub from your trezor, the xpub can be used to generate derived keys/address either in realtime or beforehand.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 11, 2017, 05:23:53 AM
 #12

Is it better to pre-generate these addresses or dynamically generate them for each user?
I know basics of how the wallets generate multiple addresses through X-public key. I need to generate around 5000 keys.


can i bind or implement this process with Trezor?

you should be able to export the xpub from your trezor, the xpub can be used to generate derived keys/address either in realtime or beforehand.

how many derived keys can form through a single xpub key?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
January 11, 2017, 05:28:51 AM
 #13

how many derived keys can form through a single xpub key?
As many as you want, basically infinitely many keys can be derived.

Digitalbitcoin
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 502



View Profile WWW
January 11, 2017, 03:06:33 PM
 #14

Actually unique address with its control can be handle by any service provider can offer same Bitcoin address to their user to receive BTC. But its something fishy. As most of wallet service provider generate new bitcoin wallet address for user for more security and safety.

And if you are a service provider then it may create certain trouble for offer unique address to many user, because of accounting.
vicktor (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
January 11, 2017, 03:30:59 PM
 #15

how many derived keys can form through a single xpub key?
As many as you want, basically infinitely many keys can be derived.

we are using mycelium gear wallet where we r allowed to generate only 1000 address through a single xpub key.
Is there any hdwallet which generate infinite keys?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
January 11, 2017, 03:42:40 PM
 #16

we are using mycelium gear wallet where we r allowed to generate only 1000 address through a single xpub key.
Is there any hdwallet which generate infinite keys?
Any desktop wallet software supporting BIP 32 will allow you to generate keys until you run out of disk space.

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!