jlp (OP)
|
|
January 09, 2014, 11:16:19 PM |
|
We are building an online game and planning to enable our players to play for bitcoins. Therefore, we need to enable players to deposit and withdraw bitcoins. Which way is the easiest to start accepting bitcoins from users? Use the bitcoin API call list ( https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) or use Blockchain.info's "receive payment API" ( http://blockchain.info/api/api_receive)? On Blockchain.info's page for "receive payment API", it gives a PHP example: https://github.com/blockchain/receive_payment_php_demo. The example enables your website to prompt the user to send bitcoins to us, via Blockchain.info. I like to test this out. Which way is the best way to test it out? Send real bitcoins or send testnet bitcoins? If the best way to test is to use real bitcoins, I'm assuming that we should send one Satoshi (0.00000001 BTC) each time? But how much transaction or network fee will I have to pay (since it is likely that I'll need to send BTC many times)? If the best way to test is to use Testnet coins, then how does one use them? I cannot find good information on how to use them to answer questions such as: Can we use testnet coins to test out the bitcoin API call list or Blockchain.info's "receive payment API" and their PHP example?
|
|
|
|
|
|
jlp (OP)
|
|
January 11, 2014, 05:25:32 AM |
|
Thanks for your reply. Let me reiterate what you wrote, so I understand you fully. You gave a sending example, but you are recommending that I do not use it. Instead, I should "manually fill and send" to my users. Is that correct? What is a "hot wallet"?
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
January 11, 2014, 06:07:02 AM |
|
Thanks for your reply. Let me reiterate what you wrote, so I understand you fully. You gave a sending example, but you are recommending that I do not use it. Instead, I should "manually fill and send" to my users. Is that correct? What is a "hot wallet"? The example also shows the database going through pending sends. You would modify it to do a dry run to tell you how much to deposit then send for real. A hot wallet is a wallet your server can send from, eg. The example BUT has funds. Keep it empty until sending. Also watch out for a hack where they change your deposit address.
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3682
Merit: 1580
|
|
January 11, 2014, 09:15:31 AM |
|
Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception? I suggest using an electrum MPK. See my post here: https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
January 11, 2014, 09:26:30 AM |
|
|
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
January 11, 2014, 11:11:08 AM |
|
I only know php too
|
|
|
|
jlp (OP)
|
|
January 11, 2014, 02:12:55 PM |
|
Thanks for your reply. Let me reiterate what you wrote, so I understand you fully. You gave a sending example, but you are recommending that I do not use it. Instead, I should "manually fill and send" to my users. Is that correct? What is a "hot wallet"? The example also shows the database going through pending sends. You would modify it to do a dry run to tell you how much to deposit then send for real. A hot wallet is a wallet your server can send from, eg. The example BUT has funds. Keep it empty until sending. Also watch out for a hack where they change your deposit address. Nevertheless, to start, we may not have that many customers. Therefore, shouldn't we avoid the send programs? Shouldn't we send manually whenever a user requests withdrawal? Do you have any suggestions on how to prevent hacks to change the deposit address?
|
|
|
|
jlp (OP)
|
|
January 11, 2014, 05:02:00 PM |
|
Thanks for your input. Unfortunately, we do not know Python.
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3682
Merit: 1580
|
|
January 11, 2014, 05:12:59 PM |
|
Thanks for your input. Unfortunately, we do not know Python.
It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.
|
|
|
|
jlp (OP)
|
|
January 11, 2014, 06:00:08 PM |
|
It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.
Thanks for your input Abdussamad. Which open source php code did you link to? Are you referring to the following link that you provided? https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742The above link shows PHP code for using Blockchain.info, which I already have and want to test.
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
January 12, 2014, 01:20:22 AM |
|
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3682
Merit: 1580
|
|
January 12, 2014, 04:42:03 AM |
|
It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.
Thanks for your input Abdussamad. Which open source php code did you link to? Are you referring to the following link that you provided? https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742The above link shows PHP code for using Blockchain.info, which I already have and want to test.
|
|
|
|
jlp (OP)
|
|
January 12, 2014, 04:59:35 AM |
|
The maximum amount that we will accept as deposit from an user is likely going to be 1 BTC and the minimum amount will be 0.001 BTC. Is this still too small for Blockchain.info?
|
|
|
|
jlp (OP)
|
|
January 12, 2014, 05:11:39 AM |
|
bitpop: Thanks for your input. Your link explains how to use JSON-RPC PHP to call bitcoind. I assume that bitcoind uses the "bitcoin API call list" ( https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). Does this mean that you think this method is an easier way to accept bitcoin from users than to use Blockchain.info's "receive payment API"? The benefits of Blockchain.info's "receive payment API" are that we only need to generate one address and can keep our private key offline. Doesn't this "JSON-RPC PHP calling bitcoind" method imply that my bitcoin wallet will be running on my server? If so, how do we keep our private keys off of our server? I run MAMP (Mac Apache MySQL PHP) on my localhost to do development and testing. I assume that I can run bitcoin in the background on my Mac and have it communicate with JSON-RPC PHP as per https://bitcointalk.org/index.php?topic=21956.0 ?
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3682
Merit: 1580
|
|
January 12, 2014, 05:44:20 AM |
|
The maximum amount that we will accept as deposit from an user is likely going to be 1 BTC and the minimum amount will be 0.001 BTC. Is this still too small for Blockchain.info? You know you really should do your own searching and reading. The minimum supported transaction size is 0.001 BTC. Forwarding transactions will include a network fee paid by blockchain.info.
https://blockchain.info/api/api_receiveMake of the above what you will.
|
|
|
|
bitpop
Legendary
Offline
Activity: 2912
Merit: 1060
|
|
January 12, 2014, 07:09:38 AM |
|
bitpop: Thanks for your input. Your link explains how to use JSON-RPC PHP to call bitcoind. I assume that bitcoind uses the "bitcoin API call list" ( https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). Does this mean that you think this method is an easier way to accept bitcoin from users than to use Blockchain.info's "receive payment API"? The benefits of Blockchain.info's "receive payment API" are that we only need to generate one address and can keep our private key offline. Doesn't this "JSON-RPC PHP calling bitcoind" method imply that my bitcoin wallet will be running on my server? If so, how do we keep our private keys off of our server? I run MAMP (Mac Apache MySQL PHP) on my localhost to do development and testing. I assume that I can run bitcoin in the background on my Mac and have it communicate with JSON-RPC PHP as per https://bitcointalk.org/index.php?topic=21956.0 ? Yes that will be a hot wallet. But I'd cron it to transfer a certain amount out every hour. There's nothing stopping you from using coinbase either
|
|
|
|
jlp (OP)
|
|
January 12, 2014, 01:17:15 PM |
|
The minimum supported transaction size is 0.001 BTC. Forwarding transactions will include a network fee paid by blockchain.info.
I already had searched and looked into this. I should've posted what I had found, which was the above and the following: The minimum size has now been lowered to 0.0005 BTC. http://www.reddit.com/r/Bitcoin/comments/1r329e/The comment on reddit casted confusion onto what the real minimum was for Blockchain, hence I asked my question. Then I thought about it and decided that our minimum should be 0.001 BTC anyways. Thanks for your help!
|
|
|
|
|