interface Clause<in S : ContractState, C : CommandData, in K : Any>S - the type of contract state this clause operates on.C - a common supertype of commands this clause operates on.K - the type of the grouping key for states this clause operates on. Use Unit if not applicable.| requiredCommands |
abstract val requiredCommands: Set<Class<out CommandData>>Determine whether this clause runs or not |
| getExecutionPath |
abstract fun getExecutionPath(commands: List<AuthenticatedObject<C>>): List<Clause<*, *, *>>Determine the subclauses which will be verified as a result of verifying this clause. |
| verify |
abstract fun verify(tx: TransactionForContract, inputs: List<S>, outputs: List<S>, commands: List<AuthenticatedObject<C>>, groupingKey: K?): Set<C>Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched. |
| log |
val log: <ERROR CLASS> |
| matches |
fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): BooleanDetermine if the given list of commands matches the required commands for a clause to trigger. |
| CompositeClause |
abstract class CompositeClause<in S : ContractState, C : CommandData, in K : Any> : Clause<S, C, K>Abstract supertype for clauses which compose other clauses together in some logical manner. |
| ConcreteClause |
abstract class ConcreteClause<in S : ContractState, C : CommandData, in T : Any> : Clause<S, C, T>Abstract supertype for clauses which provide their own verification logic, rather than delegating to subclauses. By default these clauses are always matched (they have no required commands). |