Bitcoin Forum
May 14, 2024, 03:40:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: what bitcoin client to use for website?  (Read 934 times)
ytesfay80 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2014, 08:12:42 PM
 #1

I wanted to create a website where when a user signs up they are given a bitcoin wallet where they can send bitcoins to and from. Does anyone what do sites like nitrogensports.eu and cloudbet.com use?

I read through the blockchain wallet api. Are there any alternatives to that?
This question is probably hard to understand and I may not have used the right words to describe my question. Sorry
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715658045
Hero Member
*
Offline Offline

Posts: 1715658045

View Profile Personal Message (Offline)

Ignore
1715658045
Reply with quote  #2

1715658045
Report to moderator
1715658045
Hero Member
*
Offline Offline

Posts: 1715658045

View Profile Personal Message (Offline)

Ignore
1715658045
Reply with quote  #2

1715658045
Report to moderator
1715658045
Hero Member
*
Offline Offline

Posts: 1715658045

View Profile Personal Message (Offline)

Ignore
1715658045
Reply with quote  #2

1715658045
Report to moderator
Anduck
Legendary
*
Offline Offline

Activity: 1511
Merit: 1072


quack


View Profile
May 26, 2014, 10:28:02 PM
 #2

You could use Bitcoin Core (bitcoind). Another idea is to use a deterministic wallet (bitcoinj or electrum?) where one private key can be used to generate "infinite" amount of public keys. The bitcoind-approach is probably easier to implement. If you don't want or can't run a Bitcoin node, using blockchain wallet API is a good choice too. You may be able to add extra security with multisig addresses.

Anyway, the most simple solution would be to generate a list of public keys and save them in to a database. When user signs up, assign an address from the pre-generated list to the user.

monsterbitty
Full Member
***
Offline Offline

Activity: 122
Merit: 100


View Profile
May 26, 2014, 10:38:08 PM
 #3

They used bitcoind and probably using bitcoin api, they have used for deposits and withdrawls, I am not sure big sites like nitrogen or any sports betting would use third party api, they would use a direct way to generate address.
ytesfay80 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2014, 11:46:42 PM
 #4

I've been reading a little about bitcoind with JSON-RPC. How would I be able to use that to create user wallets/accounts for each person that creates an account on my website?
ranlo
Legendary
*
Offline Offline

Activity: 1974
Merit: 1007



View Profile
May 26, 2014, 11:48:11 PM
 #5

I've been reading a little about bitcoind with JSON-RPC. How would I be able to use that to create user wallets/accounts for each person that creates an account on my website?

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

https://nanogames.io/i-bctalk-n/
Message for info on how to get kickbacks on sites like Nano (above) and CryptoPlay!
ytesfay80 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2014, 11:58:37 PM
 #6

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

You say "When you create a new account, you would just assign that to a specific user"

What are you referring to when you say "assign that to a specific user"?
ranlo
Legendary
*
Offline Offline

Activity: 1974
Merit: 1007



View Profile
May 27, 2014, 12:10:25 AM
 #7

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

You say "When you create a new account, you would just assign that to a specific user"

What are you referring to when you say "assign that to a specific user"?


1) Generatenewaddress
2) Take that new address and throw it in a database attached to a user
3) Monitor addresses for changes. If one gets a deposit, alter the user's row

You'd run something like this:

UID | UserID | Address

UID = AI, U, int
UserID = U, int
Address = varchar

https://nanogames.io/i-bctalk-n/
Message for info on how to get kickbacks on sites like Nano (above) and CryptoPlay!
ytesfay80 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 27, 2014, 12:48:26 AM
 #8

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

You say "When you create a new account, you would just assign that to a specific user"

What are you referring to when you say "assign that to a specific user"?


1) Generatenewaddress
2) Take that new address and throw it in a database attached to a user
3) Monitor addresses for changes. If one gets a deposit, alter the user's row

You'd run something like this:

UID | UserID | Address

UID = AI, U, int
UserID = U, int
Address = varchar

In "UserID = U, int" what does the "U" stand for. I assume the AI stands for auto-increment.

I understand what you are saying about generating an address and storing in a db but what about when a user wants to withdraw their bitcoins. How would the system know which address to withdraw from?
ranlo
Legendary
*
Offline Offline

Activity: 1974
Merit: 1007



View Profile
May 27, 2014, 12:54:46 AM
 #9

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

You say "When you create a new account, you would just assign that to a specific user"

What are you referring to when you say "assign that to a specific user"?


1) Generatenewaddress
2) Take that new address and throw it in a database attached to a user
3) Monitor addresses for changes. If one gets a deposit, alter the user's row

You'd run something like this:

UID | UserID | Address

UID = AI, U, int
UserID = U, int
Address = varchar

In "UserID = U, int" what does the "U" stand for. I assume the AI stands for auto-increment.

I understand what you are saying about generating an address and storing in a db but what about when a user wants to withdraw their bitcoins. How would the system know which address to withdraw from?

U is unique (part of being AI).

As for withdrawing, that wouldn't really be relevant in most systems I don't think (this would effectively give a coin mixer by default). If you needed that, though, I think you would just need to create a raw transaction and utilize the inputs from the user's specific address. I don't deal with raw transactions though so I'm not 100% sure on exactly how that's done.

https://nanogames.io/i-bctalk-n/
Message for info on how to get kickbacks on sites like Nano (above) and CryptoPlay!
Bitcoin Cat
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile WWW
May 29, 2014, 04:36:41 AM
 #10

I wanted to create a website where when a user signs up they are given a bitcoin wallet where they can send bitcoins to and from. Does anyone what do sites like nitrogensports.eu and cloudbet.com use?

I read through the blockchain wallet api. Are there any alternatives to that?
This question is probably hard to understand and I may not have used the right words to describe my question. Sorry


The easiest way to do this is bitcoind. You don't even need a database. Just getnewaddress(account) and it will give the address with the account name you put. You can even have an account name that ends with a password hash if you want to have a login system on the site. Then move() to the new address from the main wallet account that is an address with an empty account name string. Now the user has a balance and he can fill it by sending coins to his address. Then if the user withdraws, use sendtoaddress()+move again (and incluode failsafe so he's not allowed to withdraw himself into a negative account balance.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 29, 2014, 04:42:14 AM
 #11

I wanted to create a website where when a user signs up they are given a bitcoin wallet where they can send bitcoins to and from. Does anyone what do sites like nitrogensports.eu and cloudbet.com use?

I read through the blockchain wallet api. Are there any alternatives to that?
This question is probably hard to understand and I may not have used the right words to describe my question. Sorry


The easiest way to do this is bitcoind. You don't even need a database. Just getnewaddress(account) and it will give the address with the account name you put. You can even have an account name that ends with a password hash if you want to have a login system on the site. Then move() to the new address from the main wallet account that is an address with an empty account name string. Now the user has a balance and he can fill it by sending coins to his address. Then if the user withdraws, use sendtoaddress()+move again (and incluode failsafe so he's not allowed to withdraw himself into a negative account balance.

Don't use bitcoind accounts.  They don't scale and once you build a system around it you will be trapped in a technological dead end.  Use bitcoind as a processing engine and handle your user data in the database.
ranlo
Legendary
*
Offline Offline

Activity: 1974
Merit: 1007



View Profile
May 29, 2014, 05:25:21 AM
 #12

I wanted to create a website where when a user signs up they are given a bitcoin wallet where they can send bitcoins to and from. Does anyone what do sites like nitrogensports.eu and cloudbet.com use?

I read through the blockchain wallet api. Are there any alternatives to that?
This question is probably hard to understand and I may not have used the right words to describe my question. Sorry


The easiest way to do this is bitcoind. You don't even need a database. Just getnewaddress(account) and it will give the address with the account name you put. You can even have an account name that ends with a password hash if you want to have a login system on the site. Then move() to the new address from the main wallet account that is an address with an empty account name string. Now the user has a balance and he can fill it by sending coins to his address. Then if the user withdraws, use sendtoaddress()+move again (and incluode failsafe so he's not allowed to withdraw himself into a negative account balance.

Don't use bitcoind accounts.  They don't scale and once you build a system around it you will be trapped in a technological dead end.  Use bitcoind as a processing engine and handle your user data in the database.

Would my example be more accurate then? My thought is you use bitcoind to make a new address, then use a database to attach that address to a user. When the address has a balance update, you'd just update your user's balance in the database.

https://nanogames.io/i-bctalk-n/
Message for info on how to get kickbacks on sites like Nano (above) and CryptoPlay!
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 29, 2014, 05:40:17 AM
 #13

Yes.  The exact details will vary by application but at a high level the data layer contains the application details (user "balances", deposit addresses, tx history) and bitcoind is merely used as a conduit to connect the application to the bitcoin network.
Coinsera
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 31, 2014, 04:38:51 PM
 #14

When you create a new account, you would just assign that to a specific user. You'd then check for updates and update each user's account accordingly. This could be done with a simple array like:

"User" => "Address"

You say "When you create a new account, you would just assign that to a specific user"

What are you referring to when you say "assign that to a specific user"?


1) Generatenewaddress
2) Take that new address and throw it in a database attached to a user
3) Monitor addresses for changes. If one gets a deposit, alter the user's row

You'd run something like this:

UID | UserID | Address

UID = AI, U, int
UserID = U, int
Address = varchar

How user account will be updated and sync.

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!