Does the consumer not have to specify the quantity within the transaction creation course of as the quantity is implicitly decided by the UTXOs they choose?

Studying this once more after @amaclin’s reply, I notice that you just may need certainly been asking in regards to the enter quantities reasonably than the output quantities. In that case, you’re right. The enter quantities should not explicitly specified within the transaction as they’re specified by the prior transaction that created the UTXOs. A spending transaction solely must specify which UTXOs it precisely spends, however the details about the output script and quantity are already current in every node’s UTXO set.


For those who have been asking about output quantities, see my unique reply beneath:

It relies on the kind of transaction you’re constructing.

If you’re sweeping a pockets, consolidating right into a single output or depositing a number of entire UTXOs to a service, you in all probability don’t care about specifying the quantity of the output. Quite, it’s implicitly outlined by the inputs and charges.

Nevertheless, in my expertise, most transactions are created to make one or a number of funds. If you make a cost transaction, you do need to ship a certain amount to every receiver of the cost. Solely the potential change output quantity would then be decided by what stays from the inputs after deducting the cost quantity and the charges.

Leave a Reply

Your email address will not be published. Required fields are marked *