hashForSigning

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

hash a tx for signing (pre-segwit)

Return

a hash which can be used to sign the referenced tx input

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


fun hashForSigning(    tx: Transaction,     inputIndex: Int,     previousOutputScript: ByteArray,     sighashType: Int,     amount: Satoshi,     signatureVersion: Int): ByteArray
fun hashForSigning(    tx: Transaction,     inputIndex: Int,     previousOutputScript: List<ScriptElt>,     sighashType: Int,     amount: Satoshi,     signatureVersion: Int): ByteArray

hash a tx for signing

Return

a hash which can be used to sign the referenced tx input

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

amount

amount of the output claimed by this input