data class TransactionForContract
A transaction to be passed as input to a contract verification function. Defines helper methods to simplify verification logic in contracts.
InOutGroup |
data class InOutGroup<out T : ContractState, out K : Any> A set of related inputs and outputs that are connected by some common attributes. An InOutGroup is calculated using groupStates and is useful for handling cases where a transaction may contain similar but unrelated state evolutions, for example, a transaction that moves cash in two different currencies. The numbers must add up on both sides of the transaction, but the values must be summed independently per currency. Grouping can be used to simplify this logic. |
<init> |
TransactionForContract(inputs: List<ContractState>, outputs: List<ContractState>, attachments: List<Attachment>, commands: List<AuthenticatedObject<CommandData>>, origHash: SecureHash, inputNotary: Party? = null) A transaction to be passed as input to a contract verification function. Defines helper methods to simplify verification logic in contracts. |
attachments |
val attachments: List<Attachment> |
commands |
val commands: List<AuthenticatedObject<CommandData>> |
inStates |
val |
inputNotary |
val inputNotary: Party? |
inputs |
val inputs: List<ContractState> |
origHash |
val origHash: SecureHash |
outStates |
val |
outputs |
val outputs: List<ContractState> |
timestamp |
val timestamp: TimestampCommand? Get the timestamp command for this transaction, using the notary from the input states. |
equals |
fun equals(other: Any?): Boolean |
getTimestampBy |
fun getTimestampBy(timestampingAuthority: Party): TimestampCommand? Simply calls commands.getTimestampBy as a shortcut to make code completion more intuitive. |
getTimestampByName |
fun Simply calls commands.getTimestampByName as a shortcut to make code completion more intuitive. |
groupCommands |
fun <T : CommandData, K> groupCommands(keySelector: (AuthenticatedObject<T>) -> K): Map<K, List<AuthenticatedObject<T>>> |
groupStates |
fun <T : ContractState, K : Any> groupStates(ofType: Class<T>, selector: (T) -> K): List<InOutGroup<T, K>> Given a type and a function that returns a grouping key, associates inputs and outputs together so that they can be processed as one. The grouping key is any arbitrary object that can act as a map key (so must implement equals and hashCode). fun <T : ContractState, K : Any> groupStates(selector: (T) -> K): List<InOutGroup<T, K>> See the documentation for the reflection-based version of groupStates |
groupStatesInternal |
fun <T : ContractState, K : Any> |
hashCode |
fun hashCode(): Int |