Struct psbt::Input [−][src]
pub struct Input {Show 15 fields
pub non_witness_utxo: Option<Transaction>,
pub witness_utxo: Option<TxOut>,
pub partial_sigs: BTreeMap<PublicKey, Vec<u8, Global>>,
pub sighash_type: Option<SigHashType>,
pub redeem_script: Option<Script>,
pub witness_script: Option<Script>,
pub bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>,
pub final_script_sig: Option<Script>,
pub final_script_witness: Option<Vec<Vec<u8, Global>, Global>>,
pub ripemd160_preimages: BTreeMap<Hash, Vec<u8, Global>>,
pub sha256_preimages: BTreeMap<Hash, Vec<u8, Global>>,
pub hash160_preimages: BTreeMap<Hash, Vec<u8, Global>>,
pub hash256_preimages: BTreeMap<Hash, Vec<u8, Global>>,
pub proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>>,
pub unknown: BTreeMap<Key, Vec<u8, Global>>,
}
Expand description
A key-value map for an input of the corresponding index in the unsigned transaction.
Fields
non_witness_utxo: Option<Transaction>
The non-witness transaction this input spends from. Should only be std::option::Option::Some for inputs which spend non-segwit outputs or if it is unknown whether an input spends a segwit output.
witness_utxo: Option<TxOut>
The transaction output this input spends from. Should only be std::option::Option::Some for inputs which spend segwit outputs, including P2SH embedded ones.
partial_sigs: BTreeMap<PublicKey, Vec<u8, Global>>
A map from public keys to their corresponding signature as would be pushed to the stack from a scriptSig or witness.
sighash_type: Option<SigHashType>
The sighash type to be used for this input. Signatures for this input must use the sighash type.
redeem_script: Option<Script>
The redeem script for this input.
witness_script: Option<Script>
The witness script for this input.
bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>
A map from public keys needed to sign this input to their corresponding master key fingerprints and derivation paths.
final_script_sig: Option<Script>
The finalized, fully-constructed scriptSig with signatures and any other scripts necessary for this input to pass validation.
final_script_witness: Option<Vec<Vec<u8, Global>, Global>>
The finalized, fully-constructed scriptWitness with signatures and any other scripts necessary for this input to pass validation.
ripemd160_preimages: BTreeMap<Hash, Vec<u8, Global>>
TODO: Proof of reserves commitment RIPEMD160 hash to preimage map
sha256_preimages: BTreeMap<Hash, Vec<u8, Global>>
SHA256 hash to preimage map
hash160_preimages: BTreeMap<Hash, Vec<u8, Global>>
HSAH160 hash to preimage map
hash256_preimages: BTreeMap<Hash, Vec<u8, Global>>
HAS256 hash to preimage map
proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>>
Proprietary key-value pairs for this input.
unknown: BTreeMap<Key, Vec<u8, Global>>
Unknown key-value pairs for this input.
Trait Implementations
Deduction of a descriptor type from a scriptPubkey
data and data
inside redeem script and witness scripts. Read more
Adds information about DBC P2C public key to PSBT input
Finds a tweak for the provided bitcoin public key, if is known
Attempt to insert a key-value pair.
fn sign_input_pretr<C, R>(
&mut self,
txin: &TxIn,
index: usize,
provider: &impl SecretProvider<C>,
sig_hasher: &mut SigHashCache<R>
) -> Result<usize, SignInputError> where
C: Signing,
R: Deref<Target = Transaction>,
fn sign_input_pretr<C, R>(
&mut self,
txin: &TxIn,
index: usize,
provider: &impl SecretProvider<C>,
sig_hasher: &mut SigHashCache<R>
) -> Result<usize, SignInputError> where
C: Signing,
R: Deref<Target = Transaction>,
Signs a single PSBT input using all known keys provided by
SecretProvider
. This includes signing legacy and segwit inputs
only; including inputs coming from P2PK, P2PKH, P2WPKH,
P2WPKH-in-P2SH, bare scripts, P2SH, P2WSH, P2WSH-in-P2SH. Read more
Auto Trait Implementations
impl RefUnwindSafe for Input
impl UnwindSafe for Input
Blanket Implementations
Mutably borrows from an owned value. Read more