Post
Topic
Board Development & Technical Discussion
Re: bitcoin transactions size and multiple output...
by
hamdi369
on 17/12/2015, 19:20:12 UTC
Thank you DannyHamilton for your clear explanation Smiley , with your help, now I understand good that SendMany is not what I need because it works with accounts ans not with address Smiley
 
I would like to test CreateRawTransaction
https://bitcoin.org/en/developer-reference#createrawtransaction,

for exemple, if I want to spend the 0.04999 of this address : (that I have the private keys of course...) https://blockchain.info/fr/address/1g89wGhWxuQGGqGxVG6dZMzTTSVMWqWj6 to an empty new address

php code
Code:
$bitcoin->createrawtransaction(
    array(
        array(
            "txid"=>"8dc0aa6a5022868490245fd4b10c47bccdaa0358cb24ed5ad3d09c99fac39f0e",
            "vout"=>? //how can I get it?        ),
           ),
    array(
        "1GTDT3hYk4x4wzaa9k38pRsHy9SPJ7qPzT"=>0.04999,
            )
);

I can't find where I can get the output index vout ?

bitcoin devlopper reference quote :  https://bitcoin.org/en/developer-reference#createrawtransaction
Quote
The createrawtransaction RPC creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address. The transaction is not stored in the wallet or transmitted to the network.

after done with CreateRawTransaction, is the next steps :
> SignRawTransaction > SendRawTransaction
or just
>  SendRawTransaction ?

I thank you for your help and hope I will too help another newbie in future, like you help me