com.r3corda.core.contracts.clauses

Package com.r3corda.core.contracts.clauses

Types

AllComposition class AllComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that all of the clauses must run for verification to pass.

AnyComposition class AnyComposition<in S : ContractState, C : CommandData, in K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that any number of the clauses can run.

Clause interface Clause<in S : ContractState, C : CommandData, in K : Any>
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).

FirstComposition class FirstComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K>

Compose a number of clauses, such that the first match is run, and it errors if none is run.

GroupClauseVerifier abstract class GroupClauseVerifier<S : ContractState, C : CommandData, K : Any> : ConcreteClause<ContractState, C, Unit>

Functions

matches fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): Boolean

Determine if the given list of commands matches the required commands for a clause to trigger.

verifyClause fun <C : CommandData> verifyClause(tx: TransactionForContract, clause: Clause<ContractState, C, Unit>, commands: List<AuthenticatedObject<C>>): Unit

Verify a transaction against the given list of clauses.