Add appendTransactionMessageInstructionPlan function#1247
Merged
Conversation
🦋 Changeset detectedLatest commit: b734299 The changes in this PR will be included in the next version bump. This PR includes changesets to release 43 packages
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 |
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
BundleMonUnchanged files (136)
No change in files bundle size Final result: ✅ View report in BundleMon website ➡️ |
5fdabb0 to
a7cf6f0
Compare
Contributor
|
Documentation Preview: https://kit-docs-9m2lhwlu6-anza-tech.vercel.app |
28150ea to
eb39cb1
Compare
cbf7d1d to
227bc3c
Compare
eb39cb1 to
a58f181
Compare
lorisleiva
reviewed
Jan 27, 2026
lorisleiva
reviewed
Jan 27, 2026
Member
lorisleiva
left a comment
There was a problem hiding this comment.
Thank you! Great tests and typetests. 🙏
a58f181 to
22a708f
Compare
22a708f to
56fff00
Compare
56fff00 to
b734299
Compare
Contributor
|
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.

Problem
For APIs that operate on
TransactionMessage, it is not currently possible to use instruction plans. Often this makes sense, many instruction plans won't fit in a single message and require the transaction planning capabilities. But in some cases, like the simpleSequentialInstructionPlanthat we added to the token client, it is possible to add the instructions from these to a transaction message.Summary of Changes
appendTransactionMessageInstructionPlan(plan, message), which flattens an instruction plan and then adds the instructions to the messageSingleInstructionPlan, it appends the instruction to the messageMessagePackerInstructionPlan, it attempts to pack the message with its instructions. If it is able to fit within the capacity of the message, then this is successful. Note that we assume a stricter type thanpackMessageToCapacityguarantees, and if this function behaves differently to what is expected (appending instructions) then the returned type from this function will be inaccurate. This is intentional because it's more useful to return a strong type from this function.