updateWitnessOutput

fun updateWitnessOutput(    outputIndex: Int,     witnessScript: List<ScriptElt>? = null,     redeemScript: List<ScriptElt>? = null,     derivationPaths: Map<PublicKey, KeyPathWithMaster> = mapOf()): Either<UpdateFailure, Psbt>

Add details for a segwit output.

Return

psbt with the matching output updated.

Parameters

outputIndex

index of the output in the psbt.

witnessScript

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

redeemScript

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

derivationPaths

derivation paths for keys used by this output.