Repository navigation
feat: add launch token support and require node 22 - #31
Merged
Merged
Conversation
Fix the single-test command (pnpm --filter ... exec vitest) and the middleware hook names (adjustQuoteParams/beforeSwap/afterSwap). Document the swap flow, group ordering, swap-txn re-signing, Tinyman v1 and logger gotchas, the examples build CI runs, and the release process. Fold the commit conventions from .claude/skills/commit-messages.md into CLAUDE.md and delete that file; as a flat .md under skills/ it was never loaded as a skill.
- algosdk 3.8.0; React examples on @txnlab/use-wallet-react v5 with per-wallet adapter packages (@txnlab/use-wallet-pera, @txnlab/use-wallet-defly, @galaxypay/use-wallet-lute) replacing the direct connector deps and the deprecated lute-connect
- React 19, Vite 8, @vitejs/plugin-react 6, ESLint 10, Vitest 5, tsdown 0.23, dotenv 18, semantic-release changelog 7 / git 11
- TypeScript 6.0.3 (typescript-eslint supports <6.1); @types/node stays on 22.x per renovate pin
- composer: attach the caught error as cause when re-throwing (ESLint 10 preserve-caught-error)
- node-cli: call dotenv config({ quiet: true }) to suppress dotenv 18's startup log
- Node 22 baseline: SDK engines >=22 (build target node22); root engines ^22.22.2 || >=24.15 for tooling; READMEs updated
Conflicts in package.json files and the lockfile resolved to the newer version on each side: main's algosdk 3.9.0, tsdown 0.23.1, prettier 3.9.10 and typescript-eslint 8.71.2, and this branch's majors (ESLint 10, Vitest 5, TypeScript 6, semantic-release plugins, React 19, use-wallet v5, dotenv 18). Lockfile regenerated from main's.
Support quoting and executing swaps of HayLaunch launch tokens before bonding completes. - fetchQuote/newQuote accept an optional slippage (0 to under 100), validated before the API call; newQuote records it on the SwapQuote. - quote.launch is normalized to bigints, including for middleware. - newSwap warns when a launch quote is executed at a different slippage than it was fetched with. - getSummary() adds launch details (side, tokenNum, curveTxnId, bondingAmount, refund). A buy's output is the curve call's ARC-4 return value; a sell's input is the number of launch tokens sold. Behavior change for all swaps: getInputTransactionId() and the optional note now go on the user-signed transfer to the router's app address, falling back to the last user-signed transaction. Before, they went on whichever transaction the user signed. Regular swaps have one user-signed transaction, so they are unaffected. BREAKING CHANGE: @txnlab/haystack-router now requires Node.js 22 or later.
drichar
previously approved these changes
Oct 15, 2026
drichar
left a comment
Contributor
There was a problem hiding this comment.
Nice work on this, review of the code changes looks good. Left some minor inline comments.
About the commit/release: the semantic release preset we use (angular) doesn't recognize feat!: (TIL). I ran the commit-analyzer and release-notes-generator against a few versions:
feat!:with no footer: no release at allfeat!:with theBREAKING CHANGE:footer: 3.0.0, but the entry shows up as a raw line with no "Features" headingfeat:with theBREAKING CHANGE:footer: 3.0.0 with correct notes
So the footer is what triggers the major bump, but the ! messes up the changelog. Let's squash with:
feat: add launch token support and require node 22 (#31)
BREAKING CHANGE: @txnlab/haystack-router now requires Node.js 22 or later.
(Trim GitHub's default squash body down to just that so all the individual commits don't end up in the notes.)
I can address the minor comments myself and merge if it's easier, lmk. Approved 👍
txnlab-release-bot Bot
added a commit
that referenced
this pull request
Oct 16, 2026
# [3.0.0](v2.0.5...v3.0.0) (2026-10-16) ### Features * add launch token support and require node 22 ([#31](#31)) ([359eea6](359eea6)) ### BREAKING CHANGES * @txnlab/haystack-router now requires Node.js 22 or later.
Contributor
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Breaking change
@txnlab/haystack-routernow requires Node.js 22 or later (engines.node>=22, build target node22). This releases as 3.0.0.Squash-merge note: semantic-release reads only the squash commit, and the
BREAKING CHANGE:footer is what triggers the major bump. Keep this footer in the squash message. Don't add!to the title: the angular preset's header pattern doesn't accept it, and the commit would drop out of the Features section.Published SDK
Launch tokens (HayLaunch, before bonding completes)
fetchQuote/newQuoteaccept an optionalslippage(at least 0, under 100), validated before the API call.quote.launchis normalized to bigints (side, tokenNum, bondingTokenId, bondingSurplus, refund, graduates), including in the quote middleware sees.SwapQuotefromnewQuoterecords the slippage it was fetched with;newSwapwarns if a launch quote is executed at a different slippage.getSummary().launchreports side, tokenNum,curveTxnId,bondingAmountandrefund. A buy's output is the curve call's ARC-4 return value; a sell's input is the launch tokens sold.Behavior change for all swaps:
getInputTransactionId()and the optionalnotenow go on the user-signed transfer to the router's app address, falling back to the last user-signed transaction. Regular swaps have one user-signed transaction, so they are unaffected.Other: two re-thrown composer errors now keep the original as
cause.Examples (not published)
@galaxypay/use-wallet-lute, replacing the deprecatedlute-connect).resetNetworkdropped, since v5 no longer persists the network by default.quiet: true).Repo tooling
engines:^22.22.2 || >=24.15(required by the semantic-release plugins)..claude/CLAUDE.mdrewritten; the unloaded commit-message skill file is folded into it.Testing
client.test.ts. 232 tests;pnpm run ciand the example builds pass.Note for the router team (not blocking)
Quote amounts above 2^53 lose precision as JSON numbers.