The wire contract
Policy state lives in a PDA seeded by the vault (
seeds = [vault]) under the policy’s own program id, so each vault carries an isolated policy configuration. Operations a policy doesn’t constrain return Ok (pass-through).
The 13 operations
Thirteen core instructions each issue exactly onevalidate(ValidateOperation) CPI, with a 1:1 mapping between instruction and operation variant.
Failure semantics
Rejections surface as typed errors —TransactionAlreadyPending, NotEnoughSigners, AmountTooHigh / AmountTooLow, UnauthorizedSender — and either revert create_tx or leave did_execute false on execute_tx. Authorization leaves no partial state.
Build a custom policy
Implement this interface with a complete Rust skeleton.