updateWitnessInput

fun updateWitnessInput(    outPoint: OutPoint,     txOut: TxOut,     redeemScript: List<ScriptElt>? = null,     witnessScript: List<ScriptElt>? = null,     sighashType: Int? = null,     derivationPaths: Map<PublicKey, KeyPathWithMaster> = mapOf()): Either<UpdateFailure, Psbt>

Implements the PSBT updater role; adds information about a given segwit utxo. When you have access to the complete input transaction, you should prefer [updateWitnessInputTx].

Return

psbt with the matching input updated.

Parameters

outPoint

utxo being spent.

txOut

transaction output for the provided outPoint.

redeemScript

redeem script if known and applicable (when using p2sh-embedded segwit).

witnessScript

witness script if known and applicable (when using p2wsh).

sighashType

sighash type if one should be specified.

derivationPaths

derivation paths for keys used by this utxo.