Skip to main content
Share Your Experience: Take the 2024 Developer Survey
2 votes
Accepted

Security of spending

For standard pre-Segwit transaction patterns (e.g. P2PK,P2PKH,P2MS), the typical procedure is that Alice would sign a transaction template that includes the new transaction's exact output(s). For the ...
Lee's user avatar
  • 843
2 votes
Accepted

Must input UTXO references be unique in a transaction, and/or unique in a block?

Must input UTXO references (txid + vout) be unique in a transaction, and/or be unique in a block? UTXO should be unique, period. Having said that, there was at least one case where two different ...
bordalix's user avatar
  • 612
1 vote
Accepted

How to create and sign a segwit transaction using any npm pacakge

From error message, I guess you sign your transaction in a same way when spend legacy address, because it literally means your script sig is not empty(it must be empty for segwit spend as script sig ...
Hyunhum's user avatar
  • 46
1 vote

Security of spending

A cryptographic signature is only verifiable and valid in the context of the message that is being signed. In Bitcoin, the signed message is the transaction commitment (aka sighash). You can think of ...
Murch's user avatar
  • 75.7k
1 vote
Accepted

hashTypeCode/sighash flag example byte arrays for each type

To create the signature pre-image for spending txprev.output0 in txnew.input1, we need to construct the byte array that includes the necessary data fields and hashTypeCode for each sighashflag. Here's ...
Shaikh Muhammed's user avatar
1 vote

How are transaction hashes calculated?

I've come across this several times when trying to come up with an easy way to calculate a txid, and I finally decided to try and write a little script to do the same. I used built-in libraries and ...
rpseu's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible