Skip to content

Remove payer config option from transaction planner plugins#192

Merged
lorisleiva merged 1 commit into
mainfrom
04-14-remove_payer_config_option_from_transaction_planner_plugins
Apr 16, 2026
Merged

Remove payer config option from transaction planner plugins#192
lorisleiva merged 1 commit into
mainfrom
04-14-remove_payer_config_option_from_transaction_planner_plugins

Conversation

@lorisleiva
Copy link
Copy Markdown
Member

This PR removes the Partial<ClientWithPayer> pattern from the transaction planner plugins. The payer must now be provided on the client (e.g. via a payer plugin) rather than passed as a config override, aligning with the composable plugin model.

This PR removes the `Partial<ClientWithPayer>` pattern from the transaction planner plugins. The payer must now be provided on the client (e.g. via a payer plugin) rather than passed as a config override, aligning with the composable plugin model.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: a18d01f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@solana/kit-plugin-rpc Minor
@solana/kit-plugin-litesvm Minor
@solana/kit-client-rpc Minor
@solana/kit-plugins Minor
@solana/kit-client-litesvm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorisleiva lorisleiva marked this pull request as ready for review April 14, 2026 19:42
Copy link
Copy Markdown
Member Author

lorisleiva commented Apr 14, 2026

@lorisleiva
Copy link
Copy Markdown
Member Author

@trevor-cortex

Copy link
Copy Markdown

@trevor-cortex trevor-cortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Clean removal of the payer config option from both rpcTransactionPlanner and litesvmTransactionPlanner. The payer is now required on the client via ClientWithPayer (instead of Partial<ClientWithPayer>), enforced at the type level rather than at runtime. This aligns with the composable plugin model.

Notes

  • Both plugins (litesvm and rpc) receive identical changes — good consistency.
  • The generic constraint change from Partial<ClientWithPayer> to ClientWithPayer is the key enforcement mechanism — TypeScript will now catch missing payers at compile time.
  • The runtime error path is removed entirely, which is the right call since the type system handles it now.
  • Tests correctly shift from "throws at runtime" to @ts-expect-error + not.toThrow(), confirming the enforcement is purely at the type level.
  • Changeset is properly marked as minor with breaking change documentation and a clear migration example.

LGTM 👍 — straightforward and well-scoped.

@lorisleiva lorisleiva merged commit 4de71b9 into main Apr 16, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants