Bitcoin Forum
June 23, 2024, 06:11:35 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I get previous hash to tx.addInput (BitcoinJS)?  (Read 4546 times)
DKH (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
March 02, 2015, 07:50:57 PM
 #1

Hello everyone,

may I ask, how can I get this variable? Should I get it from spent tx or receive tx or unspent tx? Which hash of listed transaction should I use? I am new in this and I would like to know, how to create raw transaction.

Thanks a lot for all replies.
ca333
Hero Member
*****
Offline Offline

Activity: 520
Merit: 522


Developer - EthicHacker - BTC enthusiast


View Profile
March 05, 2015, 02:04:04 PM
Last edit: March 05, 2015, 04:04:38 PM by ca333
 #2

Hello everyone,

may I ask, how can I get this variable? Should I get it from spent tx or receive tx or unspent tx? Which hash of listed transaction should I use? I am new in this and I would like to know, how to create raw transaction.

Thanks a lot for all replies.

Hello,

you must create transaction which spends your declared inputs (this is object contains transaction outputs (unspent) so you can spend in this rawtx.  like: tx.addInput(unspent.txHash, unspent.index) and this you can get with for example from local
btc-node or also can get unspent outputs and transaction history from blockchain.info like i do always.

also here are some urls with usefull information on how to make raw tx in bitcoinjs:

https://gist.github.com/orweinberger/3bd7dfdc574be58539c5
https://medium.com/@orweinberger/how-to-create-a-raw-transaction-using-bitcoinjs-lib-1347a502a3a



hope this help.
thank you

this space is available (free) for humanitarian nonprofit organizations - please contact 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!