Bitcoin Forum
May 29, 2024, 06:29:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Possible error in the API docs?  (Read 997 times)
isis (OP)
Full Member
***
Offline Offline

Activity: 154
Merit: 102


View Profile
August 29, 2012, 06:35:26 AM
 #1

Hi Everyone,

I'm attempting to use the new raw transactions API.
The parameters appear to be incorrectly specified and I think it's probably a typo but I wanted to check to be sure.

According to the docs...
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list
https://en.bitcoin.it/wiki/Raw_Transactions
Code:
createrawtransaction
[{"txid":txid,"vout":n],...] {address:amount,...}
The problem is that first parameter appears to terminate the array ] instead of the element } resulting in a JSON object that is not well formed.  Is this intentional, is it a typo or am I just being clueless and missing something here?

Thanks in advance for any information!


Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8435



View Profile WWW
August 29, 2012, 07:14:19 AM
 #2

It's just a typo in the page, the output of the client is correct:
Code:
$ ~/bitcoin/src/bitcoind --datadir=/tmp/bitcoin02/ help createrawtransaction
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.
isis (OP)
Full Member
***
Offline Offline

Activity: 154
Merit: 102


View Profile
August 29, 2012, 07:44:00 AM
 #3

It's just a typo in the page, the output of the client is correct:
Code:
$ ~/bitcoin/src/bitcoind --datadir=/tmp/bitcoin02/ help createrawtransaction
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.

Great that's what I figured.
I don't have permissions to edit the referenced pages, hopefully someone can when they have a moment.

Interested in OpenPay?
https://github.com/openpay
Donate to show your appreciation and support the effort!

1LMDCSAwjhT2Vp1sSf62dybEYW3MYpsoZj

Pyramining Links - Help OpenPay and get a 10% bonus on your funds.
http://pyramining.com/referral/zre9ysgqt
http://pyramining.com/referral/ans9km72g
http://pyramining.com/referral/f3k4xebzp
http://pyramining.com/referral/nc3ag2sdb
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
August 29, 2012, 04:21:30 PM
 #4

I don't have permissions to edit the referenced pages, hopefully someone can when they have a moment.

I just checked, looks like Gavin fixed it in both articles.

[Update: By the way, it is a  wiki -- anyone can register and instantly has permission to make edits.]

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!