corda / net.corda.core.transactions / FilteredLeaves

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.

Constructors

<init> FilteredLeaves(inputs: List<StateRef>, attachments: List<SecureHash>, outputs: List<TransactionState<ContractState>>, commands: List<Command>, notary: Party?, mustSign: List<CompositeKey>, type: TransactionType?, timestamp: Timestamp?)

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.

Properties

attachments val attachments: List<SecureHash>
commands val commands: List<Command>
inputs val inputs: List<StateRef>
mustSign val mustSign: List<CompositeKey>
notary val notary: Party?
outputs val outputs: List<TransactionState<ContractState>>
timestamp val timestamp: Timestamp?
type val type: TransactionType?

Inherited Properties

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:

Functions

checkWithFun fun checkWithFun(checkingFun: (Any) -> Boolean): Boolean

Function that checks the whole filtered structure. Force type checking on a structure that we obtained, so we don't sign more than expected. Example: Oracle is implemented to check only for commands, if it gets an attachment and doesn't expect it - it can sign over a transaction with the attachment that wasn't verified. Of course it depends on how you implement it, but else -> false should solve a problem with possible later extensions to WireTransaction.