corda / net.corda.core.transactions / TraversableTransaction

# 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.

The availableComponents property is used for calculation of the transaction's MerkleTree, which is in turn used to derive the ID hash.

### Properties

attachments | `abstract val attachments: List<SecureHash>`
availableComponentHashes | `open val availableComponentHashes: List<SecureHash>` Calculate the hashes of the sub-components of the transaction, that are used to build its Merkle tree. The root of the tree is the transaction identifier. The tree structure is helpful for privacy, please see the user-guide section "Transaction tear-offs" to learn more about this topic.
availableComponents | `open val availableComponents: List<Any>` Returns a flattened list of all the components that are present in the transaction, in the following order:
commands | `abstract val commands: List<Command>`
inputs | `abstract val inputs: List<StateRef>`
mustSign | `abstract val mustSign: List<CompositeKey>`
notary | `abstract val notary: Party?`
outputs | `abstract val outputs: List<TransactionState<ContractState>>`
timestamp | `abstract val timestamp: Timestamp?`
type | `abstract val type: TransactionType?`

### Inheritors

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