Expand description
§Partially-Signed Bitcoin Transactions
This module implements the Finalizer and Extractor roles defined in
BIP 174, PSBT, described at
https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki
Structs§
- Psbt
Input Satisfier - Psbt satisfier for at inputs at a particular index Takes in &psbt because multiple inputs will share the same psbt structure All operations on this structure will panic if index is more than number of inputs in pbst
Enums§
- Error
- Error type for entire Psbt
- Input
Error - Error type for Pbst Input
- Output
Update Error - Return error type for
PsbtExt::update_output_with_descriptor
- Psbt
Sighash Msg - Sighash message(signing data) for a given psbt transaction input.
- Sighash
Error - Return error type for
PsbtExt::sighash_msg
- Utxo
Update Error - Return error type for
PsbtExt::update_input_with_descriptor
Traits§
- PsbtExt
- Additional operations for miniscript descriptors for various psbt roles. Note that these APIs would generally error when used on scripts that are not miniscripts.
- Psbt
Input Ext - Extension trait for PSBT inputs
- Psbt
Output Ext - Extension trait for PSBT outputs
Functions§
- finalize
Deprecated - Finalize the psbt. This function takes in a mutable reference to psbt and populates the final_witness and final_scriptsig of the psbt assuming all of the inputs are miniscript as per BIP174. If any of the inputs is not miniscript, this returns a parsing error For satisfaction of individual inputs, use the satisfy API. This function also performs a sanity interpreter check on the finalized psbt which involves checking the signatures/ preimages/timelocks. The functions fails it is not possible to satisfy any of the inputs non-malleably See finalize_mall if you want to allow malleable satisfactions
- finalize_
mall - Same as finalize, but allows for malleable satisfactions
- interpreter_
check - Interprets all psbt inputs and checks whether the script is correctly interpreted according to the context The psbt must have included final script sig and final witness. In other words, this checks whether the finalized psbt interprets correctly