pub struct InputMap {Show 22 fields
pub non_witness_utxo: Option<Vec<u8>>,
pub witness_utxo: Option<TxOut>,
pub partial_sigs: BTreeMap<Vec<u8>, Vec<u8>>,
pub sighash_type: Option<PsbtSighashType>,
pub redeem_script: Option<Vec<u8>>,
pub witness_script: Option<Vec<u8>>,
pub bip32_derivation: BTreeMap<Vec<u8>, KeySource>,
pub final_script_sig: Option<Vec<u8>>,
pub final_script_witness: Option<Witness>,
pub tap_key_sig: Option<Vec<u8>>,
pub tap_script_sigs: BTreeMap<Vec<u8>, Vec<u8>>,
pub tap_leaf_scripts: BTreeMap<Vec<u8>, Vec<u8>>,
pub tap_bip32_derivation: BTreeMap<Vec<u8>, Vec<u8>>,
pub tap_internal_key: Option<Vec<u8>>,
pub tap_merkle_root: Option<Vec<u8>>,
pub previous_txid: Option<[u8; 32]>,
pub output_index: Option<u32>,
pub sequence: Option<u32>,
pub required_time_locktime: Option<u32>,
pub required_height_locktime: Option<u32>,
pub proprietary: ProprietaryFields,
pub unknown: UnknownFields,
}Expand description
PSBT input map
Fields§
§non_witness_utxo: Option<Vec<u8>>Non-witness UTXO (full previous transaction)
witness_utxo: Option<TxOut>Witness UTXO (just the output being spent)
partial_sigs: BTreeMap<Vec<u8>, Vec<u8>>Partial signatures (pubkey -> signature)
sighash_type: Option<PsbtSighashType>Sighash type
redeem_script: Option<Vec<u8>>Redeem script (for P2SH)
witness_script: Option<Vec<u8>>Witness script (for P2WSH)
bip32_derivation: BTreeMap<Vec<u8>, KeySource>BIP32 derivation paths (pubkey -> key source)
final_script_sig: Option<Vec<u8>>Final scriptSig
final_script_witness: Option<Witness>Final witness
tap_key_sig: Option<Vec<u8>>Taproot key spend signature
tap_script_sigs: BTreeMap<Vec<u8>, Vec<u8>>Taproot script spend signatures
tap_leaf_scripts: BTreeMap<Vec<u8>, Vec<u8>>Taproot leaf scripts
tap_bip32_derivation: BTreeMap<Vec<u8>, Vec<u8>>Taproot BIP32 derivation
tap_internal_key: Option<Vec<u8>>Taproot internal key
tap_merkle_root: Option<Vec<u8>>Taproot merkle root
previous_txid: Option<[u8; 32]>PSBT v2: Previous txid
output_index: Option<u32>PSBT v2: Output index
sequence: Option<u32>PSBT v2: Sequence
required_time_locktime: Option<u32>PSBT v2: Required time locktime
required_height_locktime: Option<u32>PSBT v2: Required height locktime
proprietary: ProprietaryFieldsProprietary fields
unknown: UnknownFieldsUnknown fields
Implementations§
Source§impl InputMap
impl InputMap
Sourcepub fn is_finalized(&self) -> bool
pub fn is_finalized(&self) -> bool
Check if this input is finalized
Sourcepub fn utxo_value(&self) -> Option<u64>
pub fn utxo_value(&self) -> Option<u64>
Get the value of the UTXO being spent
Sourcepub fn utxo_script(&self) -> Option<&[u8]>
pub fn utxo_script(&self) -> Option<&[u8]>
Get the script pubkey of the UTXO being spent
Sourcepub fn clear_for_finalization(&mut self)
pub fn clear_for_finalization(&mut self)
Clear non-final fields (called after finalization)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputMap
impl RefUnwindSafe for InputMap
impl Send for InputMap
impl Sync for InputMap
impl Unpin for InputMap
impl UnwindSafe for InputMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more