checkSignature

fun checkSignature(    pubKey: ByteArray,     sigBytes: ByteArray,     scriptCode: ByteArray,     signatureVersion: Int): Boolean

Return

true if the signature is valid

Parameters

pubKey

public key

sigBytes

signature, in Bitcoin format (DER encoded + 1 trailing sighash bytes)

scriptCode

current script code

signatureVersion

version (legacy or segwit)


fun checkSignature(    pubKey: ByteVector,     sigBytes: ByteVector,     scriptCode: ByteVector,     signatureVersion: Int): Boolean