The UTXO is really what you will get whenever someone pays you some Bitcoin. The output of these deal could be the money they paid for your requirements. And it is, obviously, unspent whilst it sits in your wallet. Thus transaction output that isunspent.
In order to think about the present state associated with Bitcoin system to be a big pool of UTXOs: most of the payments that have already been received by Bitcoin users which they never have yet invested:
Every re re payment that includes maybe maybe not it self been invested is modeled when you look at the Bitcoin system as a transaction output that isunspent. As a whole, each UTXO can only just be invested by the owner for the address to which it absolutely was delivered (not necessarily, and also this is the true point; see later). And every UTXO has an identifier (the deal it starred in as well as its place within the directory of outputs of the deal) and a value: just exactly exactly how bitcoins that are many represented by that UTXO.
But just what individuals usually skip is the fact that these UTXOs are now small small computer programs that survive the ledger, control use of bitcoins and operate in response to specific incoming events. Smart Contracts, in the event that you shall. Therefore the only method you can invest the funds managed by that agreement is when you can offer some input information enabling every node from the system to perform this program and check so it returns TRUE
You get to say what happens to the funds if you can make the program return TRUE. Then you dont if you cant.
So, when you need to blow your cash, right right right heres everything you do:
Your wallet computer computer computer software writes only a little computer system for your needs after which sends it in to the bitcoin community. It efficiently states towards the system: Please run this little system Ive just provided you. Then please look for a program (smart contract?) on the working platform using this ID for me personally. You just located when youve done that, feed the output from my program into program. Which means this is a two action process: you offer your own personal little system as well as the production of this is given towards the UTXO program that you would like to invest.
The manner in which you spend cash in Bitcoin is always to ask the working platform to operate a little computer system which you provide and feed the output of the system into the smart contract that is keeping the funds you need to spend. You get to spend the money if you can make this second program run successfully. The program you provide is scriptSig and the UTXO program is scriptPubKey in Bitcoin terminology. Your aim would be to offer a scriptSig whose production may be given into scriptPubKey to produce it get back TRUE
What exactly are these programs that are little? Theyre really simple in the common case. The UTXO program merely claims: provide me personally with a signature that is digital demonstrates you own the key linked to the following Bitcoin target (and please additionally illustrate that you understand the general general general public key that corresponds to your bitcoin target). Thats why it is called the scriptPubKey.
Together with system you offer is merely a method to guarantee https://datingmentor.org/spiritual-dating-sites/ the bitcoin system delivers this evidence to the scriptPubKey system when you look at the right method. Its a means of supplying a electronic signature. Ergo it is called the scriptSig
Then you cant generate the right signature and so you cant create the input necessary to get the smart contract (scriptPubKey) to run successfully and you dont get to spend the funds if you dont know the private key. And this, apparently complex model, is simply ways to make sure the sole one who can spend cash at address 1abcde could be the one who understands the personal key exactly as we might desire.
Just why is it this complex?