Title: What is the format for createrawtransaction() parameters using jsonRPCClient.php Post by: querior on December 29, 2012, 03:36:19 AM Hi,
I've been playing with the rpc interface, and using the php library successfully up until now. I'm trying to create a raw transaction. The satoshi client debug console 'help' describes the command: Code: createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...} But I'm not clear on how that should translate here. So, for example, the following command (without the carriage returns) works fine in my satoshi client debug console: Code: createrawtransaction [{\"txid\":\"aed23bb3ec7e93d69450d7e5ea49d52fcfbef9d380108f2be8fe14ef705fcea5\", It generates a raw transaction without problem. My question is how to pass these parameters via the jsonRPCClient interface. Code: $bitcoin = new jsonRPCClient('http://user:pwd@127.0.0.1:8332/'); Thanks in advance. Title: Re: What is the format for createrawtransaction() parameters using jsonRPCClient.php Post by: kjj on December 30, 2012, 06:12:39 AM They are arrays. The first one is an array of arrays, the second is not nested.
Code: (php) $bitcoin->createrawtransaction( Title: Re: What is the format for createrawtransaction() parameters using jsonRPCClient.php Post by: querior on December 30, 2012, 10:35:15 PM You, sir, are a gentleman and a scholar.
Thank you very much. |