Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: thefaucetlist on July 12, 2014, 02:11:06 AM



Title: Lions and Tigers and API oh my !!!HELP!!!
Post by: thefaucetlist on July 12, 2014, 02:11:06 AM
Bit of a newbie here needing some help on how to integrate api into my project.

I am in the process of creating a new bitcoin game that is more skill based and less gambling.
I would like for two users to be able to wager bitcoins in a winner takes all game. Minus a small fee.

So in detail what im looking for is a way to set up each player with a address then allow them to make deposits then make wagers before the game begins and then get paid their winnings when the game is over. I know this is probably an old subject but ive been looking for hours and am starting to go cross-eyed here.

What would be the best source for this API
Also in as much detail what is the best method to set it up?

Any help is greatly appreciated hopefully I will be able to bring a beautiful new bitcoin app to the maket in the near future


Title: Re: Lions and Tigers and API oh my !!!HELP!!!
Post by: Abdussamad on July 12, 2014, 02:32:22 PM
You want to do all of this on-chain? It'll take a long time to do this on-chain. You will have to create a custom off-chain implementation so that only deposits and withdrawals are on-chain. Transfer of winnings from one user's account to another user's account should be off-chain or it'll be really, really slow.


Title: Re: Lions and Tigers and API oh my !!!HELP!!!
Post by: ranochigo on July 13, 2014, 01:12:33 AM
Bit of a newbie here needing some help on how to integrate api into my project.

I am in the process of creating a new bitcoin game that is more skill based and less gambling.
I would like for two users to be able to wager bitcoins in a winner takes all game. Minus a small fee.

So in detail what im looking for is a way to set up each player with a address then allow them to make deposits then make wagers before the game begins and then get paid their winnings when the game is over. I know this is probably an old subject but ive been looking for hours and am starting to go cross-eyed here.

What would be the best source for this API
Also in as much detail what is the best method to set it up?

Any help is greatly appreciated hopefully I will be able to bring a beautiful new bitcoin app to the maket in the near future
As the person above me said, onchain would typically take a confirmation, taking 10minutes of their time. If you make it offchain, you could probably allow the guy to deposit earlier. If you want to do it onchain, try https://blockchain.info/api. You can relay the deposits to your hot wallet address and when the guy finishes his game you can simply withdraw from your hot wallet.


Title: Re: Lions and Tigers and API oh my !!!HELP!!!
Post by: allsopfree on July 13, 2014, 04:30:35 PM
Why don't you do the game off-chain, you are just clogging blockchain for no special effort.