com.r3corda.contracts.clause / NetClause

NetClause

open class NetClause<P> : SingleClause

Clause for netting contract states. Currently only supports obligation contract.



Constructors

<init> NetClause()

Clause for netting contract states. Currently only supports obligation contract.

Properties

ifMatched open val ifMatched: MatchBehaviour

Behaviour if this clause is not matches

ifNotMatched open val ifNotMatched: MatchBehaviour

Behaviour if this clause is matched

requiredCommands open val requiredCommands: Set<Class<out CommandData>>

Classes for commands which must ALL be present in transaction for this clause to be triggered

Functions

verify open fun verify(tx: TransactionForContract, commands: Collection<AuthenticatedObject<CommandData>>): Set<CommandData>

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.

verifyNetCommand fun verifyNetCommand(inputs: List<State<P>>, outputs: List<State<P>>, command: AuthenticatedObject<Net>, netState: NetState<P>): Unit

Verify a netting command. This handles both close-out and payment netting.

Inheritors

Net class Net<P> : NetClause<P>

Clause for supporting netting of obligations.