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
Constructor and Description |
---|
TraversableTransaction(java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups,
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. |
TraversableTransaction(java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups)
Old version of
class TraversableTransaction constructor for ABI compatibility. |
Modifier and Type | Method and Description |
---|---|
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.
|
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 : |
java.util.List<net.corda.core.contracts.Command> |
getCommands()
Ordered list of (
interface CommandData , PublicKey) pairs that instruct the contracts what to do. |
java.util.List<net.corda.core.transactions.ComponentGroup> |
getComponentGroups() |
DigestService |
getDigestService() |
java.util.List<net.corda.core.contracts.StateRef> |
getInputs()
Pointers to the input states on the ledger, identified by (tx identity hash, output index).
|
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.
|
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.
|
java.util.List<net.corda.core.contracts.TransactionState> |
getOutputs()
Ordered list of states defined by this transaction, along with the associated notaries.
|
java.util.List<net.corda.core.contracts.StateRef> |
getReferences()
Pointers to reference states, identified by (tx identity hash, output index).
|
TimeWindow |
getTimeWindow() |
getInputs, getNetworkParametersHash, getReferences
checkBaseInvariants, filterOutRefs, filterOutputs, findOutRef, findOutput, getInputs, getNotary, getOutput, getOutputStates, getOutputs, getReferences, outRef, outRef, outRefsOfType, outputsOfType, toString
getId
public TraversableTransaction(java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups, 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(java.util.List<? extends net.corda.core.transactions.ComponentGroup> componentGroups)
Old version of class TraversableTransaction
constructor for ABI compatibility.
class TraversableTransaction
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.
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).
public java.util.List<net.corda.core.contracts.StateRef> getReferences()
Pointers to reference states, identified by (tx identity hash, output index).
public java.util.List<net.corda.core.contracts.TransactionState> getOutputs()
Ordered list of states defined by this transaction, along with the associated notaries.
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
,
PublicKeypublic 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.
public TimeWindow getTimeWindow()
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.
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
public java.util.List<net.corda.core.transactions.ComponentGroup> getComponentGroups()
public DigestService getDigestService()