corda / net.corda.core.transactions / SignedTransaction / toLedgerTransaction

toLedgerTransaction

@JvmOverloads fun toLedgerTransaction(services: ServiceHub, checkSufficientSignatures: Boolean = true): LedgerTransaction

Checks the transaction's signatures are valid, optionally calls verifyRequiredSignatures to check all required signatures are present, and then calls WireTransaction.toLedgerTransaction with the passed in ServiceHub to resolve the dependencies, returning an unverified LedgerTransaction.

This allows us to perform validation over the entirety of the transaction's contents. WireTransaction only contains StateRef for the inputs and hashes for the attachments, rather than ContractState instances for the inputs and Attachment instances for the attachments.

Exceptions

AttachmentResolutionException - if a required attachment was not found in storage.

TransactionResolutionException - if an input points to a transaction not found in storage.

SignatureException - if any signatures were invalid or unrecognised

SignaturesMissingException - if any signatures that should have been present are missing.