scriptPubKey

+3 votes

The scriptPubKey represents the conditions under which this output can be spent in the input of a new transaction. In most cases, it just contains a representation of the address owning that output, meaning that it can only be spent by a transaction signed by the private key corresponding to that address.

On your above statement , lets say address "A " has 5 coins or asset and "A" sends 2 coin to address "B" then now  owner of 2 coins out of 5 coins is "B" so scriptPubKey contain address of B who is new owner of asset?

and in this case 3 coins which is unspent that will revert back to sender that would be unspent transaction output is it?

asked Jan 9, 2019 by kheteshrotangan

1 Answer

+1 vote
Yes, the transaction would have two outputs – one with 2 coins containing B's address, and one with 3 coins containing A's address. This second output is often called the "change" output.
answered Jan 10, 2019 by MultiChain
...