Migrate JS client to Kit plugins#60
Merged
Merged
Conversation
This PR replaces the ad-hoc top-level helpers with a Kit-plugin-based client (`createTestClient()` + `programMetadataProgram()`) and a uniform `(client, input)` API for the metadata and buffer helpers. The plugin exposes `client.programMetadata.{createMetadata,updateMetadata,writeMetadata}` one-shots, composable instruction-plan variants, and new `createBuffer`/`createCanonicalBuffer`/`createNonCanonicalBuffer` instructions, all defaulting `payer` to `client.payer`. `MetadataInput` now takes optional `metadata` and `programData`, removing the RPC-based canonicity probe.
Bumps `@solana/kit` to ^6.9, adds `@solana/kit-plugin-rpc` and `@solana/kit-plugin-signer`, bumps `@solana-program/system` to ^0.12 and `@solana-program/compute-budget` to ^0.15, and moves to flat ESLint 9 config. Tests rewritten on top of the plugin; `_setup.ts` is now down to genuine fixtures.
c5713ef to
e8fbb7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the ad-hoc top-level helpers with a Kit-plugin-based client (
createTestClient()+programMetadataProgram()) and a uniform(client, input)API for the metadata and buffer helpers. The plugin exposesclient.programMetadata.{createMetadata,updateMetadata,writeMetadata}one-shots, composable instruction-plan variants, and newcreateBuffer/createCanonicalBuffer/createNonCanonicalBufferinstructions, all defaultingpayertoclient.payer.MetadataInputnow takes optionalmetadataandprogramData, removing the RPC-based canonicity probe.Bumps
@solana/kitto ^6.9, adds@solana/kit-plugin-rpcand@solana/kit-plugin-signer, bumps@solana-program/systemto ^0.12 and@solana-program/compute-budgetto ^0.15, and moves to flat ESLint 9 config. Tests rewritten on top of the plugin;_setup.tsis now down to genuine fixtures.