public class BaseTransaction implements NamedByHash
An abstract class defining fields shared by all transaction types in the system.
Constructor and Description |
---|
BaseTransaction(java.util.List<?> inputs,
java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs,
Party notary,
java.util.List<? extends net.corda.core.crypto.CompositeKey> mustSign,
TransactionType type,
Timestamp timestamp)
An abstract class defining fields shared by all transaction types in the system.
|
Modifier and Type | Method and Description |
---|---|
void |
checkInvariants() |
boolean |
equals(java.lang.Object other) |
java.util.List<?> |
getInputs()
The inputs of this transaction.
|
java.util.List<net.corda.core.crypto.CompositeKey> |
getMustSign()
Composite keys that need to be fulfilled by signatures in order for the transaction to be valid.
In a
class SignedTransaction this list is used to check whether there are any missing signatures. Note that
there is nothing that forces the list to be the correct list of signers for this transaction until
the transaction is verified by using LedgerTransaction.verify . |
Party |
getNotary()
If present,
|
java.util.List<net.corda.core.contracts.TransactionState> |
getOutputs()
Ordered list of states defined by this transaction,
|
Timestamp |
getTimestamp()
If specified,
|
TransactionType |
getType()
Pointer to a class that defines the behaviour of this transaction
|
int |
hashCode() |
getId
public BaseTransaction(java.util.List<?> inputs, java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs, Party notary, java.util.List<? extends net.corda.core.crypto.CompositeKey> mustSign, TransactionType type, Timestamp timestamp)
An abstract class defining fields shared by all transaction types in the system.
inputs
- The inputs of this transaction.Note that in BaseTransaction subclasses the type of this list may change!outputs
- Ordered list of states defined by this transaction,along with the associated notaries.notary
- 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'tdouble spend anything.mustSign
- Composite keys that need to be fulfilled by signatures in order for the transaction to be valid.
In a class SignedTransaction
this list is used to check whether there are any missing signatures. Note that
there is nothing that forces the list to be the correct list of signers for this transaction until
the transaction is verified by using LedgerTransaction.verify
.
It includes the notary key, if the notary field is set.
type
- Pointer to a class that defines the behaviour of this transaction:either normal,or"notary changing".timestamp
- If specified,a time window in which this transaction may have been notarised.Contracts can check thistime window to find out when a transaction is deemed to have occurred,from the ledger's perspective.public void checkInvariants()
public boolean equals(java.lang.Object other)
public int hashCode()
public java.util.List<?> getInputs()
The inputs of this transaction.
Note that in BaseTransaction subclasses the type of this list may change!
public java.util.List<net.corda.core.contracts.TransactionState> getOutputs()
Ordered list of states defined by this transaction,
along with the associated notaries.
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'tdouble spend anything.
public java.util.List<net.corda.core.crypto.CompositeKey> getMustSign()
Composite keys that need to be fulfilled by signatures in order for the transaction to be valid.
In a class SignedTransaction
this list is used to check whether there are any missing signatures. Note that
there is nothing that forces the list to be the correct list of signers for this transaction until
the transaction is verified by using LedgerTransaction.verify
.
It includes the notary key, if the notary field is set.
class SignedTransaction
,
LedgerTransaction.verify
public TransactionType getType()
Pointer to a class that defines the behaviour of this transaction
:either normal,or"notary changing".
public Timestamp getTimestamp()
If specified,
a time window in which this transaction may have been notarised.Contracts can check thistime window to find out when a transaction is deemed to have occurred,from the ledger's perspective.