com.r3corda.core.contracts / SignedTransaction

# SignedTransaction

`data class SignedTransaction : NamedByHash`

Container for a WireTransaction and attached signatures.

### Constructors

<init> | `SignedTransaction(txBits: SerializedBytes<WireTransaction>, sigs: List<WithKey>)` Container for a WireTransaction and attached signatures.

### Properties

id | `val id: SecureHash` A transaction ID is the hash of the WireTransaction. Thus adding or removing a signature does not change it.
sigs | `val sigs: List<WithKey>`
tx | `val tx: WireTransaction` Lazily calculated access to the deserialised/hashed transaction data.
txBits | `val txBits: SerializedBytes<WireTransaction>`

### Functions

getMissingSignatures | `fun getMissingSignatures(): Set<PublicKey>` Returns the set of missing signatures - a signature must be present for each signer public key
plus | `operator fun plus(sig: WithKey): SignedTransaction` Alias for withAdditionalSignature to let you use Kotlin operator overloading. `operator fun plus(sigList: Collection<WithKey>): SignedTransaction`
verify | `fun verify(throwIfSignaturesAreMissing: Boolean = true): Set<PublicKey>` Verify the signatures, deserialise the wire transaction and then check that the set of signatures found contains the set of pubkeys in the signers list. If any signatures are missing, either throws an exception (by default) or returns the list of keys that have missing signatures, depending on the parameter.
verifySignatures | `fun verifySignatures(): Unit` Verifies the given signatures against the serialized transaction data. Does NOT deserialise or check the contents to ensure there are no missing signatures: use verify() to do that. This weaker version can be useful for checking a partially signed transaction being prepared by multiple co-operating parties.
withAdditionalSignature | `fun withAdditionalSignature(sig: WithKey): SignedTransaction` Returns the same transaction but with an additional (unchecked) signature
withAdditionalSignatures | `fun withAdditionalSignatures(sigList: Iterable<WithKey>): SignedTransaction`

### Extension Functions

verifyToLedgerTransaction | `fun SignedTransaction.verifyToLedgerTransaction(identityService: IdentityService, attachmentStorage: AttachmentStorage): LedgerTransaction` Calls verify to check all required signatures are present, and then uses the passed IdentityService to call WireTransaction.toLedgerTransaction to look up well known identities from pubkeys.