Bitcoin

Input Script -‘Script_sig’ attribute required for txin type?

I use Bitcoin Nokcrate to create my own CLI wallet.

In my function TxInmy TransactionIt is real script_sig Do you need it in the following steps? Or is it filled when signing the deal later?

let txins: Vec<TxIn> = selected_utxos
        .iter()
        .map(|utxo| TxIn 
            previous_output: bitcoin::OutPoint 
                txid: bitcoin::Txid::from_str(&utxo.txid).expect("Invalid txid format"),
                vout: utxo.vout,
            ,
            script_sig: ScriptBuf::new(),
            sequence: Sequence::MAX,
            witness: Witness::new(),
        )
        .collect();

Is it okay to put it in? ScriptBuf::new() As a seat marker?

Related Articles

Back to top button