docs(subscriptions): document mainnet release changes#1562
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
Update the subscriptions docs for the first post-mainnet release: - Supported Tokens: the program now supports Token-2022 mints with a configured TransferHook (e.g. PYUSD); it forwards the mint's hook accounts into the TransferChecked CPI. Removes the stale claim that configured hooks are rejected. - Close Subscription Authority: correct the claim that closing revokes the token delegate approval. It does not — document the new RevokeSubscriptionAuthority instruction that clears it. - Recurring delegation: document the startTs=0 sentinel (start on landing; requires a non-zero expiry). - Add a Revoke Abandoned Delegation page for reclaiming sponsor rent from a delegation whose Subscription Authority is closed or rotated.
…an accounts and version pins
…ry hard stop, sponsor payer
- close-subscription-authority: the RevokeSubscriptionAuthorityBuilder sample was missing the required subscription_authority account (the builder panics without it); make the sample self-contained like the close sample above it - bump solana-instruction to ^3 in the three install snippets (the subscriptions crate depends on ~3.4) - revoke-abandoned-delegation: scope the recovery-path claim to the recorded payer and note the fully-spent fixed-delegation exception
Greptile SummaryThis PR updates the Subscriptions program docs for its first post-mainnet release, covering four changes across eight files. It adds a new
Confidence Score: 5/5Documentation-only PR; all changes are additive or corrective prose with no executable logic. Every change corrects a factual error, adds new instruction guides, or bumps dependency version strings in code samples. No executable code is introduced. The two findings are minor wording gaps in Notes sections and a cross-link that covers only half its target audience. subscription-plan.mdx (Notes missing 'resume') and revoke-abandoned.mdx (table link for fixed delegation). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([User]) -->|initSubscriptionAuthority| B[Subscription Authority PDA]
B -->|createFixedDelegation| C[Fixed Delegation PDA]
B -->|createRecurringDelegation| D[Recurring Delegation PDA]
B -->|subscribe| E[Subscription PDA]
C -->|transferFixed| F([Delegatee])
D -->|transferRecurring| F
E -->|transferSubscription| G([Merchant / Puller])
E -->|cancelSubscription| H{Cancelled}
H -->|resumeSubscription| E
H -->|revokeSubscription after expiry| Z1([Closed])
C -->|revokeDelegation| Z2([Closed])
D -->|revokeDelegation| Z3([Closed])
B -->|closeSubscriptionAuthority| Z4([Closed])
B -->|revokeSubscriptionAuthority| I([Delegate approval cleared])
subgraph Abandoned Recovery
C2[Stranded Fixed/Recurring PDA] -->|RevokeAbandonedDelegation| R1([Rent to recorded payer])
E2[Stranded Subscription PDA] -->|RevokeAbandonedSubscription| R2([Rent to recorded payer])
end
Z4 -.->|Authority closed| C2
Z4 -.->|Authority closed| E2
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A([User]) -->|initSubscriptionAuthority| B[Subscription Authority PDA]
B -->|createFixedDelegation| C[Fixed Delegation PDA]
B -->|createRecurringDelegation| D[Recurring Delegation PDA]
B -->|subscribe| E[Subscription PDA]
C -->|transferFixed| F([Delegatee])
D -->|transferRecurring| F
E -->|transferSubscription| G([Merchant / Puller])
E -->|cancelSubscription| H{Cancelled}
H -->|resumeSubscription| E
H -->|revokeSubscription after expiry| Z1([Closed])
C -->|revokeDelegation| Z2([Closed])
D -->|revokeDelegation| Z3([Closed])
B -->|closeSubscriptionAuthority| Z4([Closed])
B -->|revokeSubscriptionAuthority| I([Delegate approval cleared])
subgraph Abandoned Recovery
C2[Stranded Fixed/Recurring PDA] -->|RevokeAbandonedDelegation| R1([Rent to recorded payer])
E2[Stranded Subscription PDA] -->|RevokeAbandonedSubscription| R2([Rent to recorded payer])
end
Z4 -.->|Authority closed| C2
Z4 -.->|Authority closed| E2
Reviews (3): Last reviewed commit: "docs(subscriptions): address PR review f..." | Re-trigger Greptile |
…n revoke examples
amilz
left a comment
There was a problem hiding this comment.
IMO the 2 new guides would be better as a single "revoking authority/subscriptions" guide and include a table visually comparing the difference between the two (when you can use one vs the other).
Drop redundant token-program inline comments from the revoke examples (the surrounding prose already covers the SPL Token vs Token-2022 choice), document that a revoked subscription is closed and requires a new subscribe, and merge the two revoke-abandoned pages into a single guide with a comparison table of the two instructions.
Summary
Updates
apps/docs/content/docs/en/payments/subscriptions/for the four release changes:TransferHook(e.g. PYUSD) — it forwards the mint's hook accounts (hook program,ExtraAccountMetaListvalidation PDA, extras) into theTransferCheckedCPI. Removes the stale claim that configured hooks are rejected, and documents SDK auto-resolution (resolveTransferHookAccounts/ plugin client).RevokeSubscriptionAuthorityinstruction.startTs = 0sentinel (start on transaction landing; requires non-zeroexpiryTs).RevokeAbandonedDelegation, the recorded payer's path to reclaim rent from a fixed/recurring delegation whose Subscription Authority has been closed or rotated (the only recovery path forexpiry_ts == 0delegations). Added tometa.jsonnav.Notes for reviewers
Builderstyle.RevokeAbandonedDelegationhas no hand-written plugin overlay, so its TS sample uses the generatedgetRevokeAbandonedDelegationInstruction.proseWrap: always, printWidth 80).