pub fn unsigned_script_sig(&self) -> Script {
        match *self {
            // non-segwit
            Descriptor::Bare(..)
            | Descriptor::Pk(..)
            | Descriptor::Pkh(..)
            | Descriptor::Sh(..) => Script::new(),
            // pure segwit, empty scriptSig
            Descriptor::Wsh(..) | Descriptor::Wpkh(..) => Script::new(),
            // segwit+p2sh
            Descriptor::ShWpkh(ref pk) => {
                let addr =
                    elements::Address::p2wpkh(&pk.to_public_key(), None, &AddressParams::ELEMENTS);
                let redeem_script = addr.script_pubkey();
                script::Builder::new()
                    .push_slice(&redeem_script[..])
                    .into_script()
            }
            Descriptor::ShWsh(ref d) => {
                let witness_script = d.encode();
                script::Builder::new()
                    .push_slice(&witness_script.to_v0_p2wsh()[..])
                    .into_script()
            }
            Descriptor::Cov(ref _c) => Script::new(),
        }
    }
/// Computes the scriptSig that will be in place for an unsigned
/// input spending an output with this descriptor. For pre-segwit
/// descriptors, which use the scriptSig for signatures, this
/// returns the empty script.
///
/// This is used in Segwit transactions to produce an unsigned
/// transaction whose txid will not change during signing (since
/// only the witness data will change).
Computes the scriptSig that will be in place for an unsigned
input spending an output with this descriptor. For pre-segwit
descriptors, which use the scriptSig for signatures, this
returns the empty script.

This is used in Segwit transactions to produce an unsigned
transaction whose txid will not change during signing (since
only the witness data will change).
Computes the scriptSig that will be in place for an unsigned input spending an output with this descriptor . For pre - segwit descriptors which use the scriptSig for signatures this returns the empty script . This is used in Segwit transactions to produce an unsigned transaction whose txid will not change during signing ( since only the witness data will change ) .
pub fn unsigned_script_sig(&self) -> Script {
        match *self {
            // non-segwit
            Descriptor::Bare(..)
            | Descriptor::Pk(..)
            | Descriptor::Pkh(..)
            | Descriptor::Sh(..) => Script::new(),
            // pure segwit, empty scriptSig
            Descriptor::Wsh(..) | Descriptor::Wpkh(..) => Script::new(),
            // segwit+p2sh
            Descriptor::ShWpkh(ref pk) => {
                let addr =
                    elements::Address::p2wpkh(&pk.to_public_key(), None, &AddressParams::ELEMENTS);
                let redeem_script = addr.script_pubkey();
                script::Builder::new()
                    .push_slice(&redeem_script[..])
                    .into_script()
            }
            Descriptor::ShWsh(ref d) => {
                let witness_script = d.encode();
                script::Builder::new()
                    .push_slice(&witness_script.to_v0_p2wsh()[..])
                    .into_script()
            }
            Descriptor::Cov(ref _c) => Script::new(),
        }
    }
pub fn unsigned_script_sig ( & self ) -> Script { match * self { // non-segwit Descriptor :: Bare ( .. ) | Descriptor :: Pk ( .. ) | Descriptor :: Pkh ( .. ) | Descriptor :: Sh ( .. ) => Script :: new ( ) , // pure segwit, empty scriptSig Descriptor :: Wsh ( .. ) | Descriptor :: Wpkh ( .. ) => Script :: new ( ) , // segwit+p2sh Descriptor :: ShWpkh ( ref pk ) => { let addr = elements :: Address :: p2wpkh ( & pk . to_public_key ( ) , None , & AddressParams :: ELEMENTS ) ; let redeem_script = addr . script_pubkey ( ) ; script :: Builder :: new ( ) . push_slice ( & redeem_script [ .. ] ) . into_script ( ) } Descriptor :: ShWsh ( ref d ) => { let witness_script = d . encode ( ) ; script :: Builder :: new ( ) . push_slice ( & witness_script . to_v0_p2wsh ( ) [ .. ] ) . into_script ( ) } Descriptor :: Cov ( ref _c ) => Script :: new ( ) , } }
Computes the scriptSig that will be in place for an unsigned
input spending an output with this descriptor.
Computes the scriptSig that will be in place for an unsigned input spending an output with this descriptor .
&self
&self