corda / net.corda.core.contracts / HashAttachmentConstraint

HashAttachmentConstraint

data class HashAttachmentConstraint : AttachmentConstraint

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.

Constructors

<init>

HashAttachmentConstraint(attachmentId: SecureHash)

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.

Properties

attachmentId

val attachmentId: SecureHash

Functions

isSatisfiedBy

fun isSatisfiedBy(attachment: Attachment): Boolean

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

Companion Object Properties

disableHashConstraints

val disableHashConstraints: Boolean

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.