prepareForSigning

fun prepareForSigning(    tx: Transaction,     inputIndex: Int,     previousOutputScript: ByteArray,     sighashType: Int): Transaction

prepare a transaction for signing a specific input

Return

a new transaction with proper inputs and outputs according to SIGHASH_TYPE rules

Parameters

tx

input transaction

inputIndex

index of the tx input that is being processed

previousOutputScript

public key script of the output claimed by this tx input

sighashType

signature hash type