3
I can't get createrawtransaction to work in PHP using jsonRPC.
I found this thread https://bitcointalk.org/index.php?topic=133769.0 from a few months ago describing the process. It won't work however, no matter how many different ways I try it...
$arg1 = array( array( "txid"=>$lasttx, "vout"=>$n));
$arg2 = array( $address=>$coins);
array(1) {
[0]=>
array(2) {
["txid"]=>
string(64) "valid_tx_id_goes_here"
["vout"]=>
int(1)
}
}
array(1) {
["valid_address_goes_here"]=>
float(0.01)
}
$this->bitcoind->createrawtransaction($arg, $arg2);
EDIT: All of the other commands work, like getblock and etc. So I'm connected to the RPC server clearly. The errors aren't helpful either -- it says unable to connect when I output the error for createrawtransaction, but all of the other commands go through the RPC fine and are able to connect. I wish I knew how to even begin debugging this.