validate interface can serve as a policy. Because the ABI is a single instruction, a working policy is short.
The wire contract
The 13 operations
Each core instruction issues exactly onevalidate(ValidateOperation) CPI, 1:1 with an operation variant:
Operations a policy doesn’t constrain simply return
Ok (pass-through) — you implement only the checks relevant to your purpose.
A minimal policy
This authorizes only transaction creation, and only for one hard-coded address. Every other operation passes through. No config account needed.Attaching it
A vault adopts your policy by pointing itspolicy_program at your program id (via update_vault_policy, while transactions are disabled). Policy state lives in a PDA seeded by the vault (seeds = [vault]), so each vault carries an isolated configuration.
Each shipped policy is a single-purpose building block, and a vault binds exactly one policy at a time. To enforce several constraints at once (owner-gated and amount-bounded and window-restricted), use a combinator policy that fans out to multiple checks — a planned addition.