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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Decode an object with a well-defined format

Returns the “default value” for a type. Read more

Encode an object with a well-defined format. Returns the number of bytes written on success. Read more

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

Returns TxOut reference returned by resolver, if any, or reports specific matching error prevented from getting the output Read more

Attempt to insert a key-value pair.

Attempt to get all key-value pairs.

Attempt to merge with another key-value map of the same type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.