user2308: Due to complete lack of documentation on the subject, how would the pseucode for creating a transaction look using the following functions: createrawtransaction signrawtransaction and sendrawtransaction.
I receive the user transaction for incoming coins on IncomingTxID, when I create a raw transction I want to include at least some of those coins so if they won't confirm, neither will his payout.

user153: A good way to see this (and also a non-automated method to do this) is available through BrainWallet:

http://brainwallet.org/#tx


user323: I am assuming you want to accomplish something akin to what SatoshiDice does. Here is how it can be done, using API calls with the Bitcoin-Qt/bitcoind client:

listunspent - you get the list of all unspent transactions
You determine which ones you want to spend
You use createrawtransaction to create your inputs / outputs, taking txid and vout from the list of transactions that you have that are playing, as well as a list of transactions that constitute a "money supply" for you.
Use signrawtransaction to sign the created transaction
Use sendrawtransaction to send the signed transaction

That should be pretty much it. I have implemented some of that code myself and it is pretty easy once you get a hang of it all.

2308: <p>Due to complete lack of documentation on the subject, how would the pseucode for creating a transaction look using the following functions: <code>createrawtransaction</code> <code>signrawtransaction</code> and <code>sendrawtransaction</code>.</p>

<p>I receive the user transaction for incoming coins on IncomingTxID, when I create a raw transction I want to include at least some of those coins so if they won't confirm, neither will his payout.</p>
 153: <p>A good way to see this (and also a non-automated method to do this) is available through BrainWallet:</p>

<ul>
<li><a href="http://brainwallet.org/#tx" rel="nofollow">http://brainwallet.org/#tx</a></li>
</ul>
 323: <p>I am assuming you want to accomplish something akin to what SatoshiDice does. Here is how it can be done, using API calls with the Bitcoin-Qt/bitcoind client:</p>

<ol>
<li><p><code>listunspent</code> - you get the list of all unspent transactions</p></li>
<li><p>You determine which ones you want to spend</p></li>
<li><p>You use <code>createrawtransaction</code> to create your inputs / outputs, taking <code>txid</code> and <code>vout</code> from the list of transactions that you have that are playing, as well as a list of transactions that constitute a "money supply" for you.</p></li>
<li><p>Use <code>signrawtransaction</code> to sign the created transaction</p></li>
<li><p>Use <code>sendrawtransaction</code> to send the signed transaction</p></li>
</ol>

<p>That should be pretty much it. I have implemented some of that code myself and it is pretty easy once you get a hang of it all.</p>
