corda / net.corda.core.transactions

Package net.corda.core.transactions

Types

BaseTransaction abstract class BaseTransaction : NamedByHash

An abstract class defining fields shared by all transaction types in the system.

FilteredLeaves class FilteredLeaves : TraversableTransaction

Class that holds filtered leaves for a partial Merkle transaction. We assume mixed leaf types, notice that every field from WireTransaction can be used in PartialMerkleTree calculation.

FilteredTransaction class FilteredTransaction

Class representing merkleized filtered transaction.

LedgerTransaction class LedgerTransaction : BaseTransaction

A LedgerTransaction is derived from a WireTransaction. It is the result of doing the following operations:

SignedTransaction data class SignedTransaction : NamedByHash

SignedTransaction wraps a serialized WireTransaction. It contains one or more signatures, each one for a public key that is mentioned inside a transaction command. SignedTransaction is the top level transaction type and the type most frequently passed around the network and stored. The identity of a transaction is the hash of a WireTransaction, therefore if you are storing data keyed by WT hash be aware that multiple different STs may map to the same key (and they could be different in important ways, like validity!). The signatures on a SignedTransaction might be invalid or missing: the type does not imply validity. A transaction ID should be the hash of the WireTransaction Merkle tree root. Thus adding or removing a signature does not change it.

TransactionBuilder open class TransactionBuilder

A TransactionBuilder is a transaction class that's mutable (unlike the others which are all immutable). It is intended to be passed around contracts that may edit it by adding new states/commands. Then once the states and commands are right, this class can be used as a holding bucket to gather signatures from multiple parties.

TraversableTransaction interface TraversableTransaction

Implemented by WireTransaction and FilteredLeaves. A TraversableTransaction allows you to iterate over the flattened components of the underlying transaction structure, taking into account that some may be missing in the case of this representing a "torn" transaction. Please see the user guide section "Transaction tear-offs" to learn more about this feature.

WireTransaction class WireTransaction : BaseTransaction, TraversableTransaction

A transaction ready for serialisation, without any signatures attached. A WireTransaction is usually wrapped by a SignedTransaction that carries the signatures over this payload. The hash of the wire transaction is the identity of the transaction, that is, it's possible for two SignedTransactions with different sets of signatures to have the same identity hash.

Functions

serializedHash fun <T : Any> serializedHash(x: T): SecureHash