Bitcoin Forum
June 14, 2024, 02:20:07 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: How exchanges make wallet adresses?  (Read 721 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
April 30, 2018, 02:22:17 PM
 #41

  then you will need to build a small bot to periodically check the balances of the receiving addresses, and then make a payment to the wallet address
How to make this automatic monitoring and doing some commands part?
Using linux shell programming and event? Then how to get object of bitcoin daemon?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 02, 2018, 05:44:26 PM
 #42

How to make this automatic monitoring and doing some commands part?

You can do this with the language you are most used to.
There are libaries available for the most commonly used languages.
You simply code the logic in your desired language and then use RPC calls via a libary.

network.decentralizer
Jr. Member
*
Offline Offline

Activity: 30
Merit: 1


View Profile
May 02, 2018, 07:12:56 PM
 #43

There are 2 options:
1) RPC call to the daemon to generate new address (the wallet addresses are pre-generated in key pool) and each user_id own some addresses (see open source crypto-trading platforms source code in PHP).
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address
okorocrypto
Newbie
*
Offline Offline

Activity: 140
Merit: 0


View Profile
May 04, 2018, 11:18:44 PM
 #44

So then, how to pregenerate addresses like 100,000 numbers at once without click [Request payment] button in wallet program 100,000 times?

The easiest probably would be to use a small script to generate private-/public- keypairs.
It is important to pick a script (or better: write one yourself) with good entropy. Any bug/vulnerability/mistake in implementation could make your private keys 'guessable' and therefore unsafe.



And so this means, exchange generate whole address for users with exchange his own private key, exchange can access whole user's addresses?

Of course.

An (deposit-)address from an exchange is always in full control of the exchange itself.
You (as a customer) are depositing to the exchange. From this moment on the exchange is in control of your funds.
In return they give you 'credits' which match your deposited amount/crypto. Those are just assigned numbers in their database.

Only after withdrawing (after transaction got confirmed) you are in control of your cryptos again.

You are right on this. I made a transaction today to my exchange wallet and I noticed that the TXHash shows my transfer to the exchange wallet but under it I saw that the funds was actually moved from my exchange wallet to another wallet though, the funds actually showed in my wallet as balance. As I saw your post it now became clear to me. Thanks for that clarification.
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
May 09, 2018, 06:29:20 AM
 #45

There are 2 options:
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address

What are these seed? m/44'/0'/111'/0/1,  m/44'/145'/48271'/0/3 ,  m/49'/0'/54'/0/0

I just thought made bunch of address from one bitcoin daemon.

Where is seed and how to know what seed used from above?
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
May 09, 2018, 08:45:27 AM
 #46

There are 2 options:
2) (Not recommended) Each user has an unique ID and new addresses are generated via seed, so they are actually pre-generated and easy to recover if you now the seed. Then it goes like that:
[seed]-> [Purpose][Coin][Account][External / Internal][address id]

m/44'/0'/111'/0/1  -> Bitcoin address, user_id 112, second address
m/44'/145'/48271'/0/3  -> Bitcoin Cash address, user_id 48271, fourth address
m/49'/0'/54'/0/0  -> Bitcoin SegWit address, user_id 55, first address

What are these seed? m/44'/0'/111'/0/1,  m/44'/145'/48271'/0/3 ,  m/49'/0'/54'/0/0

I just thought made bunch of address from one bitcoin daemon.

Where is seed and how to know what seed used from above?


First: I don't like this approach. It is kinda 'dirty'.

The seed is your mnemonic seed. Your 12/18/24 word seed.
m/0'/0'/0 is a derivation path (specified in BIP 32).





If you want to use a seed you have to actively generate one. Then derive private-/public- keypairs from your seed.


A better approach would be to use the xpub key or to generate a bunch of addresses and store them in your database. Then just link user ID's to the addresses in your database.

etherixdevs
Jr. Member
*
Offline Offline

Activity: 203
Merit: 3


View Profile
May 09, 2018, 09:28:35 AM
 #47

I would suggest you to look at
https://github.com/cryptocoinjs/awesome-cryptocoinjs
to get some more info and the technical details that are most important to your project
Pages: « 1 2 [3]  All
  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!