com.r3corda.core.contracts / toLedgerTransaction

# toLedgerTransaction

`fun WireTransaction.toLedgerTransaction(services: ServiceHub): LedgerTransaction`

Looks up identities and attachments from storage to generate a LedgerTransaction. A transaction is expected to have been fully resolved using the resolution protocol by this point.

### Exceptions

`FileNotFoundException` - if a required attachment was not found in storage.
`TransactionResolutionException` - if an input points to a transaction not found in storage.
`fun SignedTransaction.toLedgerTransaction(services: ServiceHub): LedgerTransaction`

Calls verify 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.

### Exceptions

`FileNotFoundException` - if a required attachment was not found in storage.
`TransactionResolutionException` - if an input points to a transaction not found in storage.