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

traversableList open val traversableList: List<Any>

Traversing transaction fields with a list function over transaction contents. Used for leaves hashes calculation and user provided filtering and checking of filtered transaction.

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.

Inherited Functions

calculateLeavesHashes open fun calculateLeavesHashes(): List<SecureHash>