net.corda.core.contracts.clauses

Package net.corda.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 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.

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.

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> : Clause<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.