Skip to content

Commit a9f0d45

Browse files
committed
docs(subscriptions): tighten prose into leads + bullets
1 parent b32194d commit a9f0d45

3 files changed

Lines changed: 31 additions & 42 deletions

File tree

apps/docs/content/docs/en/payments/subscriptions/close-subscription-authority.mdx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@ delegate for a user's token account. Close it when the user no longer has active
88
fixed delegations, recurring delegations, or subscription delegations for that
99
mint.
1010

11-
Closing the account returns its rent to the account's lamport funder. The funder
12-
is usually the user, but it can be any payer that funded the Subscription
13-
Authority account. If any active delegation still depends on the authority,
14-
close those delegations first.
15-
16-
Closing does not clear the SPL Token delegate approval on the user's token
17-
account. Once the Subscription Authority PDA is gone that approval is inert —
18-
nothing can move funds with it — but it stays recorded on the token account
19-
until the user revokes it explicitly. See
11+
Closing returns the account's rent to its funder (the user, or whichever payer
12+
funded it). Close any active delegations first.
13+
14+
Closing does **not** clear the SPL Token delegate approval. Once the PDA is gone
15+
the approval is inert, but it stays on the token account until revoked — see
2016
[Revoke The Delegate Approval](#revoke-the-delegate-approval).
2117

2218
## Close The Authority
@@ -83,13 +79,10 @@ until the user revokes it explicitly. See
8379

8480
## Revoke The Delegate Approval
8581

86-
Closing the Subscription Authority leaves the delegate approval on the user's
87-
token account. That approval is harmless once the PDA is closed, but the user
88-
can clear it — returning the token account to a clean state — with
89-
`RevokeSubscriptionAuthority`. It calls the token program's `Revoke` and is
90-
signed by the user, so it works whether or not the Subscription Authority still
91-
exists. Send it on its own, or in the same transaction as
92-
`CloseSubscriptionAuthority`.
82+
`RevokeSubscriptionAuthority` clears the leftover delegate approval from the
83+
user's token account. It calls the token program's `Revoke`, signed by the user,
84+
so it works whether or not the Subscription Authority still exists. Send it
85+
standalone or alongside `CloseSubscriptionAuthority`.
9386

9487
<Tabs items={["TypeScript", "Rust"]}>
9588
<Tab value="TypeScript">

apps/docs/content/docs/en/payments/subscriptions/overview.mdx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,17 @@ The program supports three authorization models:
4646

4747
## Supported Tokens
4848

49-
The program supports tokens created with both SPL Token and Token-2022,
50-
including Token-2022 mints that configure a `TransferHook` (for example, PYUSD).
51-
On each delegated transfer the program forwards the mint's hook accounts — the
52-
hook program, its `ExtraAccountMetaList` validation PDA, and any extra accounts
53-
the hook requires — into the Token-2022 `TransferChecked` CPI, so the hook's
54-
policy is always enforced.
55-
56-
When you build a transfer with the SDK these hook accounts are resolved for you.
57-
The TypeScript plugin client (`transferFixed`, `transferRecurring`,
58-
`transferSubscription`) reads them from the mint and appends them automatically.
59-
If you build the instruction another way, resolve them with
60-
`resolveTransferHookAccounts` and pass the result as `transferHookAccounts`.
49+
Supports SPL Token and Token-2022, including Token-2022 mints with a configured
50+
`TransferHook` (e.g. PYUSD).
51+
52+
On each delegated transfer the program forwards the mint's hook accounts (hook
53+
program, `ExtraAccountMetaList` PDA, extras) into the `TransferChecked` CPI, so
54+
the hook policy is enforced. The SDK resolves them for you:
55+
56+
- Plugin client (`transferFixed`, `transferRecurring`, `transferSubscription`) —
57+
appended automatically.
58+
- Building manually — call `resolveTransferHookAccounts`, pass
59+
`transferHookAccounts`.
6160

6261
## On-Chain Events
6362

apps/docs/content/docs/en/payments/subscriptions/revoke-abandoned-delegation.mdx

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,25 @@ description:
66
---
77

88
A fixed or recurring delegation holds rent that normally returns to its recorded
9-
payer when the delegation is revoked. If a sponsor funded the delegation and the
10-
user later closes or replaces their Subscription Authority, that delegation is
11-
left permanently unusable and its rent would otherwise be stuck.
12-
`RevokeAbandonedDelegation` lets the recorded payer reclaim that rent.
9+
payer on revoke. If a sponsor funded it and the user later closes or replaces
10+
their Subscription Authority, the delegation is stranded and its rent stuck.
11+
`RevokeAbandonedDelegation` lets the recorded payer reclaim it.
1312

1413
## When It Applies
1514

16-
The program only allows this when the delegation is provably dead — its recorded
17-
Subscription Authority has been closed, or it has been closed and recreated so
18-
the authority's `init_id` no longer matches the delegation. Both states are
19-
irreversible, so a live delegation can never be closed this way.
15+
Allowed only when the delegation is provably dead — its Subscription Authority
16+
was closed, or closed and recreated (so `init_id` no longer matches). A live
17+
delegation can never be closed this way.
2018

21-
This is also the only recovery path for a never-expiring delegation
22-
(`expiry_ts == 0`). Ordinary
19+
It's the only recovery path for a never-expiring delegation (`expiry_ts == 0`):
20+
ordinary
2321
[revoke](/docs/payments/subscriptions/recurring-delegation#revoke-the-delegation)
24-
closes a delegation on expiry, which a never-expiring delegation never reaches.
22+
only fires on expiry, which never arrives.
2523

2624
## Reclaim The Rent
2725

28-
The recorded payer signs. Pass the abandoned delegation PDA and the Subscription
29-
Authority recorded on it (the account may already be closed). Rent returns to
30-
the payer.
26+
The recorded payer signs. Pass the dead delegation PDA and its recorded
27+
Subscription Authority (which may already be closed). Rent returns to the payer.
3128

3229
<Tabs items={["TypeScript", "Rust"]}>
3330
<Tab value="TypeScript">

0 commit comments

Comments
 (0)