public class TraversableTransaction extends CoreTransaction
Implemented by class WireTransaction
and class FilteredTransaction
. 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.
class WireTransaction
,
class FilteredTransaction
public TraversableTransaction(@NotNull java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups, @NotNull DigestService digestService)
Implemented by class WireTransaction
and class FilteredTransaction
. 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.
class WireTransaction
,
class FilteredTransaction
public TraversableTransaction(@NotNull java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups)
Old version of class TraversableTransaction
constructor for ABI compatibility.
class TraversableTransaction
@NotNull public java.util.List<net.corda.core.crypto.SecureHash> getAttachments()
Hashes of the ZIP/JAR files that are needed to interpret the contents of this wire transaction.
@NotNull public java.util.List<net.corda.core.contracts.StateRef> getInputs()
Pointers to the input states on the ledger, identified by (tx identity hash, output index).
@NotNull public java.util.List<net.corda.core.contracts.StateRef> getReferences()
Pointers to reference states, identified by (tx identity hash, output index).
@NotNull public java.util.List<net.corda.core.contracts.TransactionState> getOutputs()
Ordered list of states defined by this transaction, along with the associated notaries.
@NotNull public java.util.List<net.corda.core.contracts.Command> getCommands()
Ordered list of (interface CommandData
, PublicKey) pairs that instruct the contracts what to do.
interface CommandData
,
PublicKey@Nullable public Party getNotary()
If present, the notary for this transaction. If absent then the transaction is not notarised at all. This is intended for issuance/genesis transactions that don't consume any other states and thus can't double spend anything.
@Nullable public TimeWindow getTimeWindow()
@Nullable public SecureHash getNetworkParametersHash()
Hash of the network parameters that were in force when the transaction was notarised. Null means, that the transaction was created on older version of Corda (before 4), resolution will default to initial parameters.
@NotNull public java.util.List<java.util.List> getAvailableComponentGroups()
Returns a list of all the component groups that are present in the transaction, excluding the privacySalt,
in the following order (which is the same with the order in enum ComponentGroupEnum
:
list of each input that is present
list of each output that is present
list of each command that is present
list of each attachment that is present
The notary class Party
, if present (list with one element)
The time-window of the transaction, if present (list with one element)
list of each reference input that is present
network parameters hash if present
enum ComponentGroupEnum
,
class Party
@NotNull public java.util.List<net.corda.core.transactions.ComponentGroup> getComponentGroups()
@NotNull public DigestService getDigestService()