Version Packages#1305
Merged
Merged
Conversation
e06a29e to
4bfe795
Compare
4bfe795 to
5c37c8b
Compare
lorisleiva
approved these changes
Feb 4, 2026
Contributor
Author
|
🔎💬 Inkeep AI search and chat service is syncing content for source 'Solana Kit Docs' |
Contributor
Author
|
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@solana/instruction-plans@6.0.0
Major Changes
#1302
5f12df2Thanks @lorisleiva! - TheexecuteTransactionMessagecallback increateTransactionPlanExecutornow receives a mutable context object as its first argument. This context can be incrementally populated during execution (e.g. with the latest transaction message, the compiled transaction, or custom properties) and is preserved in the resultingSingleTransactionPlanResultregardless of the outcome. If an error is thrown at any point in the callback, any attributes already saved to the context will still be available in theFailedSingleTransactionPlanResult, which is useful for debugging failures or building recovery plans.The callback must now return either a
Signatureor a fullTransactionobject directly, instead of wrapping the result in an object.BREAKING CHANGES
executeTransactionMessagecallback signature changed. The callback now receives(context, message, config)instead of(message, config)and returnsSignature | Transactioninstead of{ transaction: Transaction } | { signature: Signature }.const executor = createTransactionPlanExecutor({ - executeTransactionMessage: async (message, { abortSignal }) => { + executeTransactionMessage: async (context, message, { abortSignal }) => { const transaction = await signTransactionMessageWithSigners(message); + context.transaction = transaction; await sendAndConfirmTransaction(transaction, { commitment: 'confirmed' }); - return { transaction }; + return transaction; } });Custom context is now set via mutation instead of being returned. Previously, custom context was returned as part of the result object. Now, it must be set directly on the mutable context argument.
const executor = createTransactionPlanExecutor({ - executeTransactionMessage: async (message) => { - const transaction = await signAndSend(message); - return { transaction, context: { custom: 'value' } }; + executeTransactionMessage: async (context, message) => { + context.custom = 'value'; + const transaction = await signAndSend(message); + return transaction; } });#1293
5c810acThanks @lorisleiva! - Reshape the successfulSingleTransactionPlanResultfactory functions. ThesuccessfulSingleTransactionPlanResulthelper now accepts a context object (which must include asignatureproperty) instead of a separatesignatureargument. A newsuccessfulSingleTransactionPlanResultFromTransactionhelper is introduced for the common case of creating a successful result from a fullTransactionobject.BREAKING CHANGES
successfulSingleTransactionPlanResultrenamed tosuccessfulSingleTransactionPlanResultFromTransaction. If you were creating a successful result from aTransaction, update the function name.successfulSingleTransactionPlanResultFromSignaturerenamed tosuccessfulSingleTransactionPlanResultwith a new signature. Thesignatureis no longer a separate argument — it must be included in thecontextobject.#1309
bd3d5f1Thanks @lorisleiva! - Add a newplanTypeproperty to allInstructionPlan,TransactionPlan, andTransactionPlanResulttypes to distinguish them from each other at runtime. This property is a string literal with the value'instructionPlan','transactionPlan', or'transactionPlanResult'respectively. It also adds new type guard functions that make use of that new property:isInstructionPlan,isTransactionPlan, andisTransactionPlanResult.BREAKING CHANGES
InstructionPlan,TransactionPlan, andTransactionPlanResulttype guards updated. All factories have been updated to add the newplanTypeproperty but any custom instantiation of these types must be updated to include it as well.const myInstructionPlan: InstructionPlan = { kind: 'parallel', plans: [/* ... */], + planType: 'instructionPlan', }; const myTransactionPlan: TransactionPlan = { kind: 'parallel', plans: [/* ... */], + planType: 'transactionPlan', }; const myTransactionPlanResult: TransactionPlanResult = { kind: 'parallel', plans: [/* ... */], + planType: 'transactionPlanResult', };#1311
91cdb71Thanks @lorisleiva! - Remove deprecated functiongetAllSingleTransactionPlansBREAKING CHANGES
getAllSingleTransactionPlansremoved. UseflattenTransactionPlaninstead.#1276
2fbad6aThanks @lorisleiva! - ReshapeSingleTransactionPlanResultfrom a single object type with astatusdiscriminated union into three distinct types:SuccessfulSingleTransactionPlanResult,FailedSingleTransactionPlanResult, andCanceledSingleTransactionPlanResult. This flattens the result structure so thatstatusis now a string literal ('successful','failed', or'canceled') and properties likecontext,error, andplannedMessagelive at the top level of each variant.Other changes include:
Rename the
messageproperty toplannedMessageon all single transaction plan result types. This makes it clearer that this original planned message from theTransactionPlan, not the final message that was sent to the network.Move the
contextobject from inside thestatusfield to the top level of each result variant. All variants now carry acontext— not just successful ones.Expand
contextattribute to optionally includemessage,signature, andtransactionproperties. These properties are meant to hold the actualTransactionMessage,Signature, andTransactionused when the transaction was sent to the network — which may differ from the originallyplannedMessage.Remove the now-unused
TransactionPlanResultStatustype.failedSingleTransactionPlanResultandcanceledSingleTransactionPlanResultnow accept an optionalcontextparameter too.BREAKING CHANGES
Accessing the status kind. Replace
result.status.kindwithresult.status.if (result.status.kind === 'successful') { /_ ... _/ }
if (result.status === 'successful') { /_ ... _/ }
const sig = result.status.signature;
const sig = result.context.signature;
const tx = result.status.transaction;
const tx = result.context.transaction;
const err = result.status.error;
const err = result.error;
const ctx = result.status.context;
const ctx = result.context;
const msg = result.message;
const msg = result.plannedMessage;
Minor Changes
f8ef83eThanks @lorisleiva! - Add missingTContext,TTransactionMessageand/orTSingletype parameters toTransactionPlanResulttypes and helper functions to better preserve type information through narrowing operations.Patch Changes
f80b6de,b82df4c,986a09c]:@solana/transaction-messages@6.0.0
Major Changes
b82df4cThanks @mcintyre94! - Remove the export of BaseTransactionMessage, which was previously deprecated. Use TransactionMessage instead.Patch Changes
#1287
f80b6deThanks @mcintyre94! - Refactor compressTransactionMessageUsingAddressLookupTables to not use BaseTransactionMessage#1288
986a09cThanks @mcintyre94! - Refactor transaction-messages package to stop using BaseTransactionMessageUpdated dependencies []:
@solana/accounts@6.0.0
Patch Changes
@solana/addresses@6.0.0
Patch Changes
@solana/assertions@6.0.0
Patch Changes
@solana/codecs@6.0.0
Patch Changes
@solana/codecs-core@6.0.0
Patch Changes
@solana/codecs-data-structures@6.0.0
Patch Changes
@solana/codecs-numbers@6.0.0
Patch Changes
@solana/codecs-strings@6.0.0
Patch Changes
@solana/compat@6.0.0
Patch Changes
@solana/instructions@6.0.0
Patch Changes
@solana/keys@6.0.0
Patch Changes
@solana/kit@6.0.0
Patch Changes
f80b6de,5f12df2,b82df4c,5c810ac,bd3d5f1,986a09c,f8ef83e,91cdb71,2fbad6a]:@solana/offchain-messages@6.0.0
Patch Changes
@solana/options@6.0.0
Patch Changes
@solana/programs@6.0.0
Patch Changes
@solana/react@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/rpc@6.0.0
Patch Changes
@solana/rpc-api@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/rpc-graphql@6.0.0
Patch Changes
@solana/rpc-spec@6.0.0
Patch Changes
@solana/rpc-subscriptions@6.0.0
Patch Changes
@solana/rpc-subscriptions-api@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/rpc-subscriptions-channel-websocket@6.0.0
Patch Changes
@solana/rpc-subscriptions-spec@6.0.0
Patch Changes
@solana/rpc-transformers@6.0.0
Patch Changes
@solana/rpc-transport-http@6.0.0
Patch Changes
@solana/rpc-types@6.0.0
Patch Changes
@solana/signers@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/subscribable@6.0.0
Patch Changes
@solana/sysvars@6.0.0
Patch Changes
@solana/transaction-confirmation@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/transactions@6.0.0
Patch Changes
f80b6de,b82df4c,986a09c]:@solana/errors@6.0.0
@solana/fast-stable-stringify@6.0.0
@solana/functional@6.0.0
@solana/nominal-types@6.0.0
@solana/plugin-core@6.0.0
@solana/promises@6.0.0
@solana/rpc-parsed-types@6.0.0
@solana/rpc-spec-types@6.0.0
@solana/webcrypto-ed25519-polyfill@6.0.0