public class FilteredLeaves implements 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.
TraversableTransaction.DefaultImpls
Constructor and Description |
---|
FilteredLeaves(java.util.List<net.corda.core.contracts.StateRef> inputs,
java.util.List<? extends net.corda.core.crypto.SecureHash> attachments,
java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs,
java.util.List<net.corda.core.contracts.Command> commands,
Party notary,
java.util.List<? extends net.corda.core.crypto.CompositeKey> mustSign,
TransactionType type,
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.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<net.corda.core.crypto.SecureHash> |
calculateLeavesHashes() |
boolean |
checkWithFun(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> checkingFun)
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.
|
java.util.List<net.corda.core.crypto.SecureHash> |
getAttachments() |
java.util.List<net.corda.core.contracts.Command> |
getCommands() |
java.util.List<net.corda.core.contracts.StateRef> |
getInputs() |
java.util.List<net.corda.core.crypto.CompositeKey> |
getMustSign() |
Party |
getNotary() |
java.util.List<net.corda.core.contracts.TransactionState> |
getOutputs() |
Timestamp |
getTimestamp() |
java.util.List<java.lang.Object> |
getTraversableList()
Traversing transaction fields with a list function over transaction contents. Used for leaves hashes calculation
and user provided filtering and checking of filtered transaction.
|
TransactionType |
getType() |
calculateLeavesHashes, getAttachments, getCommands, getInputs, getMustSign, getNotary, getOutputs, getTimestamp, getTraversableList, getType
public FilteredLeaves(java.util.List<net.corda.core.contracts.StateRef> inputs, java.util.List<? extends net.corda.core.crypto.SecureHash> attachments, java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs, java.util.List<net.corda.core.contracts.Command> commands, Party notary, java.util.List<? extends net.corda.core.crypto.CompositeKey> mustSign, TransactionType type, 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.
public boolean checkWithFun(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> checkingFun)
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.
checkingFun
- function that performs type checking on the structure fields and provides verification logic accordingly.public java.util.List<net.corda.core.contracts.StateRef> getInputs()
public java.util.List<net.corda.core.crypto.SecureHash> getAttachments()
public java.util.List<net.corda.core.contracts.TransactionState> getOutputs()
public java.util.List<net.corda.core.contracts.Command> getCommands()
public Party getNotary()
public java.util.List<net.corda.core.crypto.CompositeKey> getMustSign()
public TransactionType getType()
public Timestamp getTimestamp()
public java.util.List<java.lang.Object> getTraversableList()
Traversing transaction fields with a list function over transaction contents. Used for leaves hashes calculation and user provided filtering and checking of filtered transaction.
public java.util.List<net.corda.core.crypto.SecureHash> calculateLeavesHashes()