Similarly to Anchor's constraint = attribute, it can be used to ensure constraints for the given accounts. The constraint can use both regular and compressed accounts.
The most common use-case for it is ensuring the equality of public keys across regular and compressed accounts for security checks.
DNS example is updated to use it for ensuring that compressed NameRecord accounts can be modified only by original signers, with constraint = record.owner == signer.key().
Similarly to Anchor's
constraint =
attribute, it can be used to ensure constraints for the given accounts. The constraint can use both regular and compressed accounts.The most common use-case for it is ensuring the equality of public keys across regular and compressed accounts for security checks.
DNS example is updated to use it for ensuring that compressed
NameRecord
accounts can be modified only by original signers, withconstraint = record.owner == signer.key()
.