Bitcoin Forum
May 28, 2024, 01:52:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: params description for createrawtransaction  (Read 800 times)
alexhava (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
January 08, 2015, 04:35:24 PM
 #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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
January 08, 2015, 04:43:53 PM
 #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.

Im not really here, its just your imagination.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
January 08, 2015, 06: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.
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!