abstract class Clause<in S : ContractState, C : CommandData, in K : Any>A clause of a contract, containing a chunk of verification logic. That logic may be delegated to other clauses, or provided directly by this clause.
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.See Also
| <init> |
Clause()A clause of a contract, containing a chunk of verification logic. That logic may be delegated to other clauses, or provided directly by this clause. |
| requiredCommands |
open val requiredCommands: Set<Class<out CommandData>>Determine whether this clause runs or not |
| getExecutionPath |
open 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. |
| AbstractConserveAmount |
abstract class AbstractConserveAmount<S : FungibleAsset<T>, C : CommandData, T : Any> : Clause<S, C, Issued<T>>Standardised clause for checking input/output balances of fungible assets. Requires that a Move command is provided, and errors if absent. Must be the last clause under a grouping clause; errors on no-match, ends on match. |
| AbstractIssue |
abstract class AbstractIssue<in S : ContractState, C : CommandData, T : Any> : Clause<S, C, Issued<T>>Standard issue clause for contracts that issue fungible assets. |
| ClauseVerifier |
class ClauseVerifier<S : LinearState, C : CommandData> : Clause<S, C, Unit>Standard clause to verify the LinearState safety properties. |
| 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. |
| FilterOn |
class FilterOn<S : ContractState, C : CommandData, K : Any> : Clause<ContractState, C, K>Filter the states that are passed through to the wrapped clause, to restrict them to a specific type. |
| GroupClauseVerifier |
abstract class GroupClauseVerifier<S : ContractState, C : CommandData, K : Any> : Clause<ContractState, C, Unit> |
| Move |
class Move : Clause<State, Commands, Issued<Terms>> |
| NetClause |
open class NetClause<C : CommandData, P> : Clause<ContractState, C, Unit>Clause for netting contract states. Currently only supports obligation contract. |
| NoZeroSizedOutputs |
open class NoZeroSizedOutputs<in S : FungibleAsset<T>, C : CommandData, T : Any> : Clause<S, C, Issued<T>>Clause for fungible asset contracts, which enforces that no output state should have a balance of zero. |
| Redeem |
class Redeem : Clause<State, Commands, Issued<Terms>> |
| SetLifecycle |
class SetLifecycle<P> : Clause<State<P>, Commands, Issued<Terms<P>>>Obligation-specific clause for changing the lifecycle of one or more states. |
| Settle |
class Settle<P> : Clause<State<P>, Commands, Issued<Terms<P>>>Obligation-specific clause for settling an outstanding obligation by witnessing change of ownership of other states to fulfil |
| VerifyLifecycle |
class VerifyLifecycle<S : ContractState, C : CommandData, T : Any, P> : Clause<S, C, T>Obligation-specific clause for verifying that all states are in normal lifecycle. In a group clause set, this must be run after any lifecycle change clause, which is the only clause that involve non-standard lifecycle states on input/output. |