Repository navigation
fix(onboarding): drop leaked web3.js 1.77 types, move HPL SDKs to v1-aware set; v5.0.5 - #385
bryzettler wants to merge 4 commits into
Conversation
@helium/data-credits-sdk 0.11.4-0.11.11 ship typings that reference jito-ts/node_modules/@solana/web3.js (1.77.4, an ambient declare module). tsc copied that reference into onboarding's build/*.d.ts, which shadows the installed web3.js types in every downstream app. 0.11.12 is the first clean version. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
madninja
left a comment
There was a problem hiding this comment.
The diagnosis is solid and the verification is the right kind: tsc --explainFiles to find the single file that pulls 1.77.4, a grep over build that returned five files before and none after, and a clean rebuild on the old lockfile to prove republishing alone would not have fixed it. The version range that carries the reference is stated precisely. No argument with the change as far as it goes.
One thing I would fold in, and one question.
Bump @helium/spl-utils too, to ^0.13.3 or later. @helium/onboarding calls sendAndConfirmWithRetry and bulkSendRawTransactions from spl-utils, and both contain maxSupportedTransactionVersion call sites. I checked the published tarballs: every 0.11.x and 0.13.0 through 0.13.2 ship those four sites at : 0, and 0.13.3 is the first with : 1 (0.13.4 is current). The dependency here is ^0.11.4, so the caret can never reach it. Mainnet has been producing v1 transactions since 2026-09-15, so onboarding is structurally pinned to the pre-v1 read path. It is latent rather than breaking today, since those functions read back transactions the caller just sent and web3.js 1.x cannot build a v1, but it is the same class of problem as helium/wallet-app#1055, and this PR is the natural place to close it while the ranges are already being moved.
Why only @helium/data-credits-sdk? The other HPL SDKs stay at ^0.11.4 while that one moves to ^0.11.12, so onboarding now spans two generations of a set that HPL publishes in lockstep. That is fine if the only goal is dropping the leaked reference, and the grep proves it worked. It is worth saying explicitly in the PR body whether the mixed set is intentional and bounded, or whether the whole @helium/* block should move together, because the next person to touch this will otherwise have to re-derive the answer. Related: @helium/currency-utils, helium-entity-manager-sdk, hotspot-utils and spl-utils all sit at ^0.11.4 against published 0.12/0.13 lines.
Minor: the PR body says 0.11.12 and later are clean for data-credits-sdk. Pinning the lockfile at exactly 0.11.12 while the range says ^0.11.12 means a fresh resolve can take a later 0.11.x, which is intended, but worth one line confirming the grep was run against the range rather than only the pinned version.
Once 5.0.5 is published, helium/wallet-app#1055 has a cast in BrowserWebViewScreen.tsx that exists only because of this bug and should come out.
spl-utils 0.13.3 is the first version that reads transactions with maxSupportedTransactionVersion 1. Move all HPL SDKs to the set published with it so onboarding resolves one spl-utils and one helium-sub-daos-sdk. - spl-utils ^0.13.3, data-credits-sdk ^0.12.1, currency-utils ^0.12.0, helium-entity-manager-sdk ^0.11.19, hotspot-utils ^0.11.19 - @solana/web3.js ^1.99.0 to match spl-utils 0.13, with the lockfile deduped to one 1.99.0 copy - currency-utils 0.12 getOraclePrice no longer takes a cluster Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@madninja Thanks. I made the changes in d66209f. spl-utils: It is now Why only data-credits-sdk: It was not intentional. The whole HPL block now moves to the set published on 2026-09-10: data-credits-sdk This bump needed two more changes:
Range vs. pin: I ran the grep against The build passes, a clean |
Problem
@helium/onboarding@5.0.4publishesbuild/*.d.tsfiles that start with:/// <reference types="jito-ts/node_modules/@solana/web3.js" />This affects 5 files:
SolanaOnboarding,MobileHotspotOnboarding,WifiHttpClient,ConfigurationClientand__mocks__/AssertMock. The reference loads web3.js 1.77.4, which declares its types as an ambientdeclare module "@solana/web3.js". That hides the installed web3.js types in downstream apps. wallet-app has type-checked against 1.77.4 no matter which web3.js it installs.Cause
onboarding's lockfile resolves
@helium/data-credits-sdk0.11.4. That version'slib/types/src/functions/mintDataCredits.d.tsalready contains the reference, through@pythnetwork/solana-utils@0.4.5→jito-ts@3.0.1→@solana/web3.js ~1.77.3.tsc --explainFilesshows it is the only file that loads 1.77.4. Versions 0.11.4 to 0.11.11 have the reference. 0.11.12 and later are clean.Change
@helium/*HPL block moves:@helium/spl-utils^0.11.4→^0.13.3. 0.13.3 is the first version whosesendAndConfirmWithRetryandbulkSendRawTransactionsread withmaxSupportedTransactionVersion: 1.@helium/data-credits-sdk^0.11.4→^0.12.1@helium/currency-utils^0.11.4→^0.12.0@helium/helium-entity-manager-sdk^0.11.4→^0.11.19@helium/hotspot-utils^0.11.4→^0.11.19spl-utils(0.13.4) andhelium-sub-daos-sdk(0.12.0).@solana/web3.js^1.91.1→^1.99.0, because spl-utils 0.13 requires^1.99.0. The lockfile is deduped to a single 1.99.0. Without this change, anchor and spl-utils each load their ownConnectiontype and the build fails.clusterfromgetOraclePrice. The private helpergetOraclePriceInCentsFromSolanano longer takes it.getUpdateMetaDatakeepsclusterin its public options type for compatibility, but no longer uses it.package.json, soyarn install --frozen-lockfilefailed before this change.jito-tsand its private web3.js 1.77.4 stay in the tree throughcurrency-utils→@pythnetwork/pyth-solana-receiver. No published HPL.d.tsreferences it, and nothing in onboarding'sbuilddoes.Verification
yarn buildinpackages/onboardingpasses.grep -rl 'reference types=".*node_modules' buildreturns nothing. It returned 5 files before this change. Onlynodeandbn.jstype references remain.grep -rl 'reference types=".*node_modules' node_modules/@helium/*/lib/typesreturns nothing. This checks the latest versions in each caret range, not only a hand-pinned version.yarn install --frozen-lockfilein a scratch copy passes. It installs web3.js only at 1.99.0, plus 1.77.4 nested underjito-ts.maxSupportedTransactionVersion: 1at all its call sites.jest packages/onboarding: 22 of 22 tests pass.Version 5.0.5
This PR also bumps every package to 5.0.5, following the pattern of #384 (lerna fixed mode):
Update yarn.lock files for release 5.0.5: a plainyarn installin each package moves the@helium/*lock entries from^5.0.3to^5.0.4.v5.0.5:lerna version 5.0.5 --no-push --no-git-tag-version. Itspreversionbuild passed for all 10 packages, and the rebuilt onboarding.d.tsfiles still carry no nested references.After merge, tag and publish 5.0.5 so consumers pick up the fixed typings.
After 5.0.5 is published, remove the cast in
BrowserWebViewScreen.tsxfrom helium/wallet-app#1055. It exists only because of this bug.