bitcore – How to generate utxo information for a bitcoin transaction?


I’m using bitcore atm and am trying to set up transactions. but I can’t find much information on the txId & the script. I know it says the txId is generated from the transaction, but how can you generate a txId for a transaction which has yet to take place?

Maybe I’m not fully understanding this process fully, is there somebody who understands who could explain it a bit better?

var utxo = {
  "txId" : "115e8f72f39fad874cfab0deed11a80f24f967a84079fb56ddf53ea02e308986",
  "outputIndex" : 0,
  "address" : "17XBj6iFEsf8kzDMGQk5ghZipxX49VXuaV",
  "script" : "76a91447862fe165e6121af80d5dde1ecb478ed170565b88ac",
  "satoshis" : 50000

var transaction = new bitcore.Transaction()
  .to('1Gokm82v6DmtwKEB8AiVhm82hyFSsEvBDK', 15000)

Source link

Leave a reply