Post
Topic
Board Development & Technical Discussion
Merits 7 from 3 users
Topic OP
I'm trying to understand the exact mechanism of a UTXO spend
by
warpanomaly
on 07/01/2024, 00:12:06 UTC
⭐ Merited by o_e_l_e_o (4) ,pooya87 (2) ,hosseinimr93 (1)
My understanding of a bitcoin transaction is as follows. Each UTXO (that's not a null value UTXO like an OP_RETURN), has a value, scriptPubKey (hereafter referred to as a "locking script"), and index (hereafter referred to as "n").
In order to spend a UTXO, you have have to supply an unlocking script which contains a signature from the address possessing the UTXO (this proves that the spender actually has the private key for the address), and the UTXO owner's public key so the signature can be verified.
I made this diagram to show what I believe a bitcoin transaction spend to look like: 

https://imgur.com/a/titAohe

Clearly I don't grasp the entire structure of a BTC transaction as indicated by the fact that I put several "IDK"s in the diagram. Can someone fill in the gaps in my knowledge?