Author

Topic: params description for createrawtransaction (Read 828 times)

legendary
Activity: 3472
Merit: 4801
January 08, 2015, 01:03:58 PM
#3
If you don't understand the concepts of txid, vout, address, amount, and "change output" then there is a lot of risk in using createrawtransaction.

You could loose a significant amount of bitcoins from your wallet by:

  • Not handling change properly
  • creating invalid transactions
  • Sending to the wrong address

I would suggest that you play around on testnet until you are absolutely certain that you understand exactly what you are doing.  Then test any programs you create on testnet to be absolutely certain that you don't have any bugs that will result in a permanent loss of bitcoins.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
January 08, 2015, 11:43:53 AM
#2
Hi all, I am newbie with bitcoin. I am trying execute  createrawtransaction function. But I can't see what each params are. In manual
--------------------
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}

Create a transaction spending given inputs (array of objects containing transaction outputs to spend), sending to given address(es). Returns the hex-encoded transaction in a string. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Also note that NO transaction validity checks are done; it is easy to create invalid transactions or transactions that will not be relayed/mined by the network because they contain insufficient fees.
-------------------

but I can't understand what is txid,

txid = transaction ID, e.g. 2c43f351a43be08df9efe38ac040d73e757593b2c43aba48cf016dd7dc433b1b
link: https://www.blocktrail.com/BTC/tx/2c43f351a43be08df9efe38ac040d73e757593b2c43aba48cf016dd7dc433b1b

vout.

Is the ID of of the output of the transaction. A transaction can have more than one output, thus you need to point at which output exactly you want to spend.

What mean address:amount,

address refers to the address of the receiving party
amount refers to the amount of bitcoins you want to transfer. Keep in mind that the sum of all inputs will be spend even if your output is smaller. Whatever is left will go to the miners as fee. Thus 1x 2 BTC input, 1x 1 BTC output = 1 BTC fee.

what meaning ",...".

etc.

It means there is no limit of the number of outputs you can create or the number of inputs you can use.

I would appreciate for help.
newbie
Activity: 5
Merit: 0
January 08, 2015, 11:35:24 AM
#1
Hi all, I am newbie with bitcoin. I am trying execute  createrawtransaction function. But I can't see what each params are. In manual
--------------------
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}

Create a transaction spending given inputs (array of objects containing transaction outputs to spend), sending to given address(es). Returns the hex-encoded transaction in a string. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Also note that NO transaction validity checks are done; it is easy to create invalid transactions or transactions that will not be relayed/mined by the network because they contain insufficient fees.
-------------------

but I can't understand what is txid, vout. What mean address:amount, what meaning ",...".

I would appreciate for help.
Jump to: