Program
- Four instructions:
init_policy,execute_pull,set_paused, andupdate_policy. - Deployed to devnet at
6gHABW3Rn5dsTdXKN2xzRdb4g9v2DjYmc9sKq1Wn8my9. execute_pullevaluates the policy, then CPIs into Subscriptions & Allowances’transfer_fixedwith the Policy PDA signing asdelegatee.
Verification
- Kani proof of the policy-evaluation logic: 483 checks, 0 failures. See Security.
- Seven integration tests running Shugo and the real Subscriptions & Allowances binary together in LiteSVM.
SDK — @shugo/sdk
createPolicyAndDelegationandbuildExecutePullTransaction, plus instruction builders, address derivation, and account decoders. See the SDK Reference.
CLI — @shugo/cli
create-policy,show,pull,pause,resume, andupdate-policy. See the CLI Reference.- Verified end to end against live devnet: policy creation, a guarded pull, a pause that rejects the next pull on-chain, and resume.
Fixed
create-policyfailed on live clusters with S&A error 136 (StaleSubscriptionAuthority). The SDK passed a hardcoded0as the authority’s generation ID. A real authority’s ID is the slot it was created in, so the value was wrong on any real cluster; it only passed in tests because LiteSVM’s clock starts at slot 0. The SDK now passes S&A’s same-slot sentinel when it creates the authority in the same transaction, and reads the real value when the authority already exists. The test suite now runs at a realistic slot.
Known limitations
Token-2022 transfer-hook mints aren’t supported yet,init_policy doesn’t validate mints, and the program is unaudited and devnet-only. The full list is in the FAQ.(1).png?fit=max&auto=format&n=qzWg2aQwcoMXkrks&q=85&s=7bd9594b6c05a51ce5a41a26f4cb7e42)
(1).png?fit=max&auto=format&n=qzWg2aQwcoMXkrks&q=85&s=f7ad867613529ca7109dfe0b0dabd815)