You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0174.mediawiki
+24-35Lines changed: 24 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -341,52 +341,41 @@ will still need to handle events where keys are duplicated, either duplicated in
341
341
itself or when combining transactions with duplicated fields. If duplicated keys are
342
342
encountered, the software may choose to use any of the values corresponding to that key.
343
343
344
-
==Usage==
344
+
==Responsibilities==
345
345
346
-
Using the transaction format involves many different roles. The roles may be combined
347
-
into one entity, but each role has a specific set of things that it must be able to do.
346
+
Using the transaction format involves many different responsibilities. These responsibilities can be handled by a single entity, but each responsibility is specialized in what it should be capable of doing.
348
347
349
-
===Transaction Creator===
348
+
===Creator===
350
349
351
-
The transaction creator must be able to accept either a network serialized transaction or a PSBT
352
-
and either produce a PSBT or update the provided PSBT. For all scriptSigs which are not finalized, it must make the
353
-
scriptSig empty and fill in the input fields with information from the scriptSig, if any.
354
-
If it is able to, it should also look for any required redeemScripts and witnesScripts
355
-
and add those to the global data section of the PSBT. The transaction creator
356
-
should also fill in UTXOs that it knows about.
350
+
The Creator must be capable of accepting either a network serialized transaction, or a PSBT.
351
+
The Creator can either produce a new PSBT, or update the provided PSBT.
352
+
For any scriptSigs which are non-final, the Creator will provide an empty scriptSig and input fields with information from the scriptSig, if any.
353
+
If possible, the Creator should also look for any required redeemScripts and witnesScripts and add those to the global data section of the PSBT.
354
+
The Creator should also provide any related UTXOs that it knows about.
357
355
358
-
===Transaction Signer===
356
+
===Signer===
359
357
360
-
The transaction signer must accept a PSBT. It should use the UTXOs provided in the PSBT
361
-
to produce signatures for the inputs that it can sign for. The signer should not need
362
-
access to the UTXO set as all necessary information is provided in the PSBT itself.
363
-
Any and all signatures created should be added as a Partial Signature key-value pair
364
-
to the input for which it corresponds to.
358
+
The Signer must only accept a PSBT.
359
+
The Signer must only use the UTXOs provided in the PSBT to produce signatures for inputs.
360
+
The Signer should not need require any additional data sources, as all necessary information is provided in the PSBT format.
361
+
Any signatures created by the Signer must be added as a "Partial Signature" key-value pair for the respective input it relates to.
365
362
366
-
The signer should also be able to compute the amount being spent, the amount being
367
-
transacted, the inputs being spent, the transaction fee, and the addresses being
368
-
paid. It can be interactive and ask the user for confirmation of all of the above things.
363
+
The Signer can additionally compute the addresses and values being sent, and the transaction fee, optionally showing this data to the user as a confirmation of intent and the consequences of signing the PSBT.
369
364
370
-
===Transaction Combiner===
365
+
===Combiner===
371
366
372
-
The transaction combiner must be able to accept multiple PSBTs. It should parse each
373
-
PSBT and merge them into one transaction if possible. If the PSBTs correspond to the
374
-
same transaction, then the combiner should create one PSBT which contains all of the
375
-
key-value pairs from the PSBTs. It should also handle duplicated keys and remove the
376
-
duplication according to the specification.
367
+
The Combiner can accept 1 or many PSBTs.
368
+
The Combiner must merge them into one PSBT (if possible), or fail.
369
+
The resulting PSBT must contains all of the key-value pairs from each of the PSBTs.
370
+
The Combined must remove any duplicate key-value pairs, in accordance with the specification.
377
371
378
-
===Transaction Finalizer===
372
+
===Finalizer===
379
373
380
-
The transaction finalizer must take a PSBT and build the finalized scriptSigs for each
381
-
input. If an input contains enough signatures for that input to have a complete set of
382
-
signatures, the finalizer should take those signatures, any necessary redeemScripts
383
-
and witnessScripts, and build the complete scriptSig. The scriptSig should then be
384
-
included in the transaction and the input should have all key-value pairs removed.
385
-
The finalizer may remove any global data which is not needed for any other inputs.
374
+
The Finalizer must only accept a PSBT.
375
+
The Finalizer transforms a PSBT into a network serialized transaction.
386
376
387
-
===Transaction Broadcaster===
388
-
The transaction broadcaster takes a finalized PSBT. It takes the transaction out of the
389
-
PSBT, ensures that the transaction is valid, and broadcasts it to the Bitcoin network.
377
+
For any inputs which are not complete, the Finalizer will emplace an empty scriptSig in the network serialized transaction.
378
+
For any input which has a complete set of signatures, the Finalizer must attempt to build the complete scriptSig and encode it into the network serialized transaction.
0 commit comments