fn create_psbt(
        deposit_txin: DepositTxIn,
        unvault_txout: UnvaultTxOut,
        cpfp_txout: CpfpTxOut,
        lock_time: u32,
    ) -> Psbt {
        Psbt {
            // 1 Unvault, 1 CPFP
            outputs: vec![
                PsbtOut {
                    bip32_derivation: unvault_txout.bip32_derivation().clone(),
                    ..PsbtOut::default()
                },
                PsbtOut {
                    bip32_derivation: cpfp_txout.bip32_derivation().clone(),
                    ..PsbtOut::default()
                },
            ],
            global: PsbtGlobal {
                unsigned_tx: Transaction {
                    version: TX_VERSION,
                    lock_time,
                    input: vec![deposit_txin.unsigned_txin()],
                    output: vec![unvault_txout.into_txout(), cpfp_txout.into_txout()],
                },
                version: 0,
                xpub: BTreeMap::new(),
                proprietary: BTreeMap::new(),
                unknown: BTreeMap::new(),
            },
            inputs: vec![PsbtIn {
                witness_script: Some(deposit_txin.txout().witness_script().clone()),
                bip32_derivation: deposit_txin.txout().bip32_derivation().clone(),
                sighash_type: Some(SigHashType::All),
                witness_utxo: Some(deposit_txin.into_txout().into_txout()),
                ..PsbtIn::default()
            }],
        }
    }
// Internal DRY routine for creating the inner PSBT
Internal DRY routine for creating the inner PSBT
Internal DRY routine for creating the inner PSBT
fn create_psbt(
        deposit_txin: DepositTxIn,
        unvault_txout: UnvaultTxOut,
        cpfp_txout: CpfpTxOut,
        lock_time: u32,
    ) -> Psbt {
        Psbt {
            // 1 Unvault, 1 CPFP
            outputs: vec![
                PsbtOut {
                    bip32_derivation: unvault_txout.bip32_derivation().clone(),
                    ..PsbtOut::default()
                },
                PsbtOut {
                    bip32_derivation: cpfp_txout.bip32_derivation().clone(),
                    ..PsbtOut::default()
                },
            ],
            global: PsbtGlobal {
                unsigned_tx: Transaction {
                    version: TX_VERSION,
                    lock_time,
                    input: vec![deposit_txin.unsigned_txin()],
                    output: vec![unvault_txout.into_txout(), cpfp_txout.into_txout()],
                },
                version: 0,
                xpub: BTreeMap::new(),
                proprietary: BTreeMap::new(),
                unknown: BTreeMap::new(),
            },
            inputs: vec![PsbtIn {
                witness_script: Some(deposit_txin.txout().witness_script().clone()),
                bip32_derivation: deposit_txin.txout().bip32_derivation().clone(),
                sighash_type: Some(SigHashType::All),
                witness_utxo: Some(deposit_txin.into_txout().into_txout()),
                ..PsbtIn::default()
            }],
        }
    }
fn create_psbt ( deposit_txin : DepositTxIn , unvault_txout : UnvaultTxOut , cpfp_txout : CpfpTxOut , lock_time : u32 , ) -> Psbt { Psbt { // 1 Unvault, 1 CPFP outputs : vec ! [ PsbtOut { bip32_derivation unvault_txout bip32_derivation ( ) clone ( ) PsbtOut default ( ) } PsbtOut { bip32_derivation cpfp_txout bip32_derivation ( ) clone ( ) PsbtOut default ( ) } ] , global : PsbtGlobal { unsigned_tx : Transaction { version : TX_VERSION , lock_time , input : vec ! [ deposit_txin unsigned_txin ( ) ] , output : vec ! [ unvault_txout into_txout ( ) cpfp_txout into_txout ( ) ] , } , version : 0 , xpub : BTreeMap :: new ( ) , proprietary : BTreeMap :: new ( ) , unknown : BTreeMap :: new ( ) , } , inputs : vec ! [ PsbtIn { witness_script Some ( deposit_txin txout ( ) witness_script ( ) clone ( ) ) bip32_derivation deposit_txin txout ( ) bip32_derivation ( ) clone ( ) sighash_type Some ( SigHashType All ) witness_utxo Some ( deposit_txin into_txout ( ) into_txout ( ) ) PsbtIn default ( ) } ] , } }
Internal DRY routine for creating the inner PSBT
Internal DRY routine for creating the inner PSBT
deposit_txin
DepositTxIn
unvault_txout
UnvaultTxOut
cpfp_txout
CpfpTxOut
lock_time
u32