public class WireTransaction extends BaseTransaction implements TraversableTransaction
A transaction ready for serialisation, without any signatures attached. A WireTransaction is usually wrapped
by a class SignedTransaction
that carries the signatures over this payload. The hash of the wire transaction is
the identity of the transaction, that is, it's possible for two class SignedTransaction
s with different sets of
signatures to have the same identity hash.
class SignedTransaction
,
class SignedTransaction
Modifier and Type | Class and Description |
---|---|
static class |
WireTransaction.Companion |
TraversableTransaction.DefaultImpls
Modifier and Type | Field and Description |
---|---|
static WireTransaction.Companion |
Companion |
Constructor and Description |
---|
WireTransaction(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> signers,
TransactionType type,
Timestamp timestamp)
A transaction ready for serialisation, without any signatures attached. A WireTransaction is usually wrapped
by a
class SignedTransaction that carries the signatures over this payload. The hash of the wire transaction is
the identity of the transaction, that is, it's possible for two class SignedTransaction s with different sets of
signatures to have the same identity hash. |
Modifier and Type | Method and Description |
---|---|
FilteredTransaction |
buildFilteredTransaction(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> filtering)
Build filtered transaction using provided filtering functions.
|
boolean |
equals(java.lang.Object other) |
FilteredLeaves |
filterWithFun(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> filtering)
Construction of partial transaction from WireTransaction based on filtering.
|
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<net.corda.core.crypto.SecureHash> |
getAvailableComponentHashes()
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.
|
java.util.List<java.lang.Object> |
getAvailableComponents()
Returns a flattened list of all the components that are present in the transaction, in the following order:
|
java.util.List<net.corda.core.contracts.Command> |
getCommands()
Ordered list of
|
SecureHash |
getId() |
java.util.List<net.corda.core.contracts.StateRef> |
getInputs()
Pointers to the input states on the ledger,
|
MerkleTree |
getMerkleTree()
Builds whole Merkle tree for a transaction.
|
SerializedBytes<net.corda.core.transactions.WireTransaction> |
getSerialized() |
int |
hashCode() |
<T extends ContractState> |
outRef(int index)
Returns a
class StateAndRef for the given output index. |
<T extends ContractState> |
outRef(ContractState state)
Returns a
class StateAndRef for the requested output state, or throws IllegalArgumentException if not found. |
LedgerTransaction |
toLedgerTransaction(ServicesForResolution services)
Looks up identities and attachments from storage to generate a
class LedgerTransaction . A transaction is expected to
have been fully resolved using the resolution flow by this point. |
java.lang.String |
toString() |
checkInvariants, equals, getInputs, getMustSign, getNotary, getOutputs, getTimestamp, getType, hashCode, toString
getAttachments, getAvailableComponentHashes, getAvailableComponents, getCommands, getInputs, getMustSign, getNotary, getOutputs, getTimestamp, getType
getId
public static WireTransaction.Companion Companion
public WireTransaction(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> signers, TransactionType type, Timestamp timestamp)
A transaction ready for serialisation, without any signatures attached. A WireTransaction is usually wrapped
by a class SignedTransaction
that carries the signatures over this payload. The hash of the wire transaction is
the identity of the transaction, that is, it's possible for two class SignedTransaction
s with different sets of
signatures to have the same identity hash.
inputs
- Pointers to the input states on the ledger,identified by(tx identity hash,output index).attachments
- Hashes of the ZIP/JAR files that are needed to interpret the contents of this wire transaction.commands
- Ordered list of(interface CommandData
,PublicKey)pairs that instruct the contracts what to do.class SignedTransaction
,
class SignedTransaction
public SerializedBytes<net.corda.core.transactions.WireTransaction> getSerialized()
public SecureHash getId()
public <T extends ContractState> StateAndRef<T> outRef(int index)
Returns a class StateAndRef
for the given output index.
class StateAndRef
public <T extends ContractState> StateAndRef<T> outRef(ContractState state)
Returns a class StateAndRef
for the requested output state, or throws IllegalArgumentException if not found.
class StateAndRef
,
IllegalArgumentExceptionpublic LedgerTransaction toLedgerTransaction(ServicesForResolution services)
Looks up identities and attachments from storage to generate a class LedgerTransaction
. A transaction is expected to
have been fully resolved using the resolution flow by this point.
class LedgerTransaction
public FilteredTransaction buildFilteredTransaction(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> filtering)
Build filtered transaction using provided filtering functions.
public MerkleTree getMerkleTree()
Builds whole Merkle tree for a transaction.
public FilteredLeaves filterWithFun(kotlin.jvm.functions.Function1<java.lang.Object,java.lang.Boolean> filtering)
Construction of partial transaction from WireTransaction based on filtering.
filtering
- filtering over the whole WireTransactionpublic java.lang.String toString()
public boolean equals(java.lang.Object other)
public int hashCode()
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.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.Command> getCommands()
Ordered list of
(interface CommandData
,PublicKey)pairs that instruct the contracts what to do.
interface CommandData
,
PublicKeypublic java.util.List<java.lang.Object> getAvailableComponents()
Returns a flattened list of all the components that are present in the transaction, in the following order:
Each input that is present
Each attachment that is present
Each output that is present
Each command that is present
The notary class Party
, if present
Each required signer (mustSign) that is present
The type of the transaction, if present
The timestamp of the transaction, if present
class Party
public java.util.List<net.corda.core.crypto.SecureHash> getAvailableComponentHashes()
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.