corda / net.corda.core.contracts / AttachmentConstraint

AttachmentConstraint

@DoNotImplement interface AttachmentConstraint

Constrain which contract-code-containing attachment can be used with a Contract.

Functions

isSatisfiedBy

Returns whether the given contract attachment can be used with the ContractState associated with this constraint object.

abstract fun isSatisfiedBy(attachment: Attachment): Boolean

Inheritors

AlwaysAcceptAttachmentConstraint

An AttachmentConstraint where isSatisfiedBy always returns true.

object AlwaysAcceptAttachmentConstraint : AttachmentConstraint

AutomaticHashConstraint

object AutomaticHashConstraint : AttachmentConstraint

AutomaticPlaceholderConstraint

This AttachmentConstraint is a convenience class that acts as a placeholder and will be automatically resolved by the platform when set on an output state. It is the default constraint of all output states.

object AutomaticPlaceholderConstraint : AttachmentConstraint

HashAttachmentConstraint

An AttachmentConstraint that verifies by hash. The state protected by this constraint can only be used in a transaction created with that version of the jar. And a receiving node will only accept it if a cordapp with that hash has (is) been deployed on the node.

data class HashAttachmentConstraint : AttachmentConstraint

SignatureAttachmentConstraint

An AttachmentConstraint that verifies that the attachment has signers that fulfil the provided PublicKey. See: Signature Constraints

data class SignatureAttachmentConstraint : AttachmentConstraint

WhitelistedByZoneAttachmentConstraint

An AttachmentConstraint that verifies that the hash of the attachment is in the network parameters whitelist. See: net.corda.core.node.NetworkParameters.whitelistedContractImplementations It allows for centralized control over the cordapps that can be used.

object WhitelistedByZoneAttachmentConstraint : AttachmentConstraint