com.r3corda.core.contracts / TransactionBuilder / checkAndAddSignature

# checkAndAddSignature

`fun checkAndAddSignature(sig: WithKey): Unit`

Checks that the given signature matches one of the commands and that it is a correct signature over the tx, then adds it.

### Exceptions

`SignatureException` - if the signature didnt match the transaction contents
`IllegalArgumentException` - if the signature key doesnt appear in any command.