Everyone knows what SatoshiDice is. Their core mechanic is gambling through the use of Bitcoin transactions with the payout being directly linked to the transaction that fuelled the bed to avoid double-spend attacks. My question is, how to implement such a mechanism? Can it be done in the Standard Client, or does it need some extra software to pick the exact inputs of a transaction?
Tell me more
×
Bitcoin Stack Exchange is a question and answer site for
Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.
|
You could easily write a piece of software that runs on the same machine as a bitcoin daemon and let it use the JSON-RPC API from the local bitcoin daemon. There are JSON-RPC implementation examples for all popular programming languages like Python and Java. This piece of software will poll for new transactions, validate them and applying your game rules, and again making new transactions. Note that a server with such a piece of software needs only to have it's bitcoin port open to the internet, while the RPC port can be limited to local connections for safety. |
|||||||
|