Reputation: 701
I've been testing/learning the rpc interface for Bitcoind daemon, and using the php library successfully up until now. I am trying to create a new raw transaction, i got a lot of example over internet but i don't know function's params where should be comes from.
example :
$bitcoin = new Bitcoin('myuser','mypwd','127.0.0.1','8332');
$bitcoin->createrawtransaction(
array(
array(
"txid"=>"aed23bb3ec7e93d69450d7e5ea49d52fcfbef9d380108f2be8fe14ef705fcea5", /where this string comes from or how i have to generate it??
"vout"=>2 //what is this vout, in this case what means the number 2??
),
),
array(
"1GTDT3hYk4x4wzaa9k38pRsHy9SPJ7qPzT"=>0.006,//destination wallet address and required amount
));
Upvotes: 4
Views: 1573
Reputation: 1865
Look at this description. It's excellent.
(Very) Short version:
txid
Is the Transaction ID of a transaction you received (containing at least the value, you want to spend). vout
is the index of your address in the original txid
.You can look at some actual transactions here: https://blockchain.info/
Upvotes: 2