Bitcoin Forum
December 03, 2022, 05:58:18 AM *
News: Bitcointalk Community Awards
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / createrawtransaction help php on: August 08, 2014, 03:25:17 AM
Code:
What am i doing wrong
i have
[code]
$json = json_encode($unspent);
    $funds = $calc - '0.0001';
    $sfunds = ('{\"TTBVKPAqc6wvE3UHHYDDnshxyPEu33Zxjf\":'.$funds.'}');
    $crt = $btc->createrawtransaction("$json,$sfunds");
    
    print_r ($crt);

$json,$sfunds output is

Code:
["{\"txid\":\"9bfc817178ec318f772f678173ae715a2ef661f08c838b5cf00b62d78ede4820\",\"vout\":0}","{\"txid\":\"c3608c3fc55f6560aa411c9adb3703463e25a0cb2025700aa59c4ab13e245cd9\",\"vout\":1}"],{\"TTBVKPAqc6wvE3UHHYDDnshxyPEu33Zxjf\":1099.9599}

If i type it directly in console it creates the rawtransaction

But when i try from php i get

Code:
Array ( [.code] => -1 [message] => createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...} Create a transaction spending given inputs (array of objects containing transaction id and output number), sending to given address(es). Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network. )
[/code]
2  Alternate cryptocurrencies / Marketplace (Altcoins) / Please delete this thread on: July 14, 2014, 04:46:57 AM
delete
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!