public class LedgerTransaction
extends BaseTransaction
A LedgerTransaction is derived from a class WireTransaction
. It is the result of doing the following operations:
Downloading and locally storing all the dependencies of the transaction.
Resolving the input states and loading them into memory.
Doing some basic key lookups on the class Command
s to see if any keys are from a recognised party, thus converting the
class Command
objects into class AuthenticatedObject
.
Deserialising the output states.
All the above refer to inputs using a (txhash, output index) pair.
Constructor and Description |
---|
LedgerTransaction(java.util.List<? extends net.corda.core.contracts.StateAndRef<?>> inputs,
java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs,
java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> commands,
java.util.List<? extends net.corda.core.contracts.Attachment> attachments,
SecureHash id,
Party notary,
java.util.List<? extends net.corda.core.crypto.CompositeKey> signers,
Timestamp timestamp,
TransactionType type)
A LedgerTransaction is derived from a
class WireTransaction . It is the result of doing the following operations: |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.util.List<net.corda.core.contracts.Attachment> |
getAttachments()
A list of
|
java.util.List<net.corda.core.contracts.AuthenticatedObject> |
getCommands()
Arbitrary data passed to the program of each input state.
|
SecureHash |
getId()
The hash of the original serialised WireTransaction.
|
java.util.List<net.corda.core.contracts.StateAndRef> |
getInputs()
The resolved input states which will be consumed/invalidated by the execution of this transaction.
|
int |
hashCode() |
<T extends ContractState> |
outRef(int index) |
TransactionForContract |
toTransactionForContract()
Strips the transaction down to a form that is usable by the contract verify functions
|
void |
verify()
Verifies this transaction and throws an exception if not valid, depending on the type. For general transactions:
|
checkInvariants, equals, getInputs, getMustSign, getNotary, getOutputs, getTimestamp, getType, hashCode, toString
getId
public LedgerTransaction(java.util.List<? extends net.corda.core.contracts.StateAndRef<?>> inputs, java.util.List<? extends net.corda.core.contracts.TransactionState<? extends net.corda.core.contracts.ContractState>> outputs, java.util.List<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> commands, java.util.List<? extends net.corda.core.contracts.Attachment> attachments, SecureHash id, Party notary, java.util.List<? extends net.corda.core.crypto.CompositeKey> signers, Timestamp timestamp, TransactionType type)
A LedgerTransaction is derived from a class WireTransaction
. It is the result of doing the following operations:
Downloading and locally storing all the dependencies of the transaction.
Resolving the input states and loading them into memory.
Doing some basic key lookups on the class Command
s to see if any keys are from a recognised party, thus converting the
class Command
objects into class AuthenticatedObject
.
Deserialising the output states.
All the above refer to inputs using a (txhash, output index) pair.
inputs
- The resolved input states which will be consumed/invalidated by the execution of this transaction.commands
- Arbitrary data passed to the program of each input state.attachments
- A list ofinterface Attachment
objects identified by the transaction that are needed for this transaction to verify.id
- The hash of the original serialised WireTransaction.class WireTransaction
,
class Command
,
class Command
,
class AuthenticatedObject
public <T extends ContractState> StateAndRef<T> outRef(int index)
public TransactionForContract toTransactionForContract()
Strips the transaction down to a form that is usable by the contract verify functions
public void verify()
Verifies this transaction and throws an exception if not valid, depending on the type. For general transactions:
The contracts are run with the transaction as the input.
The list of keys mentioned in commands is compared against the signers list.
public boolean equals(java.lang.Object other)
public int hashCode()
public java.util.List<net.corda.core.contracts.StateAndRef> getInputs()
The resolved input states which will be consumed/invalidated by the execution of this transaction.
public java.util.List<net.corda.core.contracts.AuthenticatedObject> getCommands()
Arbitrary data passed to the program of each input state.
public java.util.List<net.corda.core.contracts.Attachment> getAttachments()
A list of
interface Attachment
objects identified by the transaction that are needed for this transaction to verify.
interface Attachment
public SecureHash getId()
The hash of the original serialised WireTransaction.