Skip to content

refactor(passport)!: BSB-6: remove StarkEx support from Passport SDK#2808

Merged
JCSanPedro merged 13 commits into
mainfrom
remove/BSB-6-sdk-starkex-guardian-client
Apr 7, 2026
Merged

refactor(passport)!: BSB-6: remove StarkEx support from Passport SDK#2808
JCSanPedro merged 13 commits into
mainfrom
remove/BSB-6-sdk-starkex-guardian-client

Conversation

@naveen-imtb

Copy link
Copy Markdown
Contributor
  • PR is titled with conventional commit style naming: type(scope): message
  • Breaking change indicated with ! after scope

Summary

Remove all StarkEx/IMX provider code from the Passport SDK, completing the SDK-side cleanup for the Guardian StarkEx deprecation (BSB-6).

Detail and impact of the change

Removed

  • connectImx() and connectImxSilent() public methods from the Passport class
  • Entire starkEx/ directory: PassportImxProvider, PassportImxProviderFactory, ImxGuardianClient, getStarkSigner, and all StarkEx workflows (transfer, order, trades, exchange, registration)
  • utils/imxUser.ts (toUserImx helper and UserImx type)
  • imxPublicApiDomain, immutableXClient, imxApiClients fields from PassportOverrides interface
  • imxPublicApiDomain property from PassportConfiguration
  • IMX-specific imports: IMXProvider, IMXClient, ImxApiClients, imxApiConfig, MagicTeeApiClients, createConfig

Changed

  • linkExternalWallet() now uses isUserZkEvm(user) instead of the removed toUserImx() helper to check registration status
  • buildPrivateVars() simplified to only create Auth — all IMX setup (WalletConfiguration for IMX GuardianClient, MagicTEESigner, ImxApiClients, PassportImxProviderFactory) removed

Anything else worth calling out?

Breaking change: This removes the connectImx() and connectImxSilent() public API methods and modifies the PassportOverrides public interface. Consumers using StarkEx/IMX through Passport will need to migrate.

All zkEVM/multi-rollup functionality is unaffected — connectEvm(), auth methods, linkExternalWallet(), and getLinkedAddresses() work as before. The removed imports (WalletConfiguration, GuardianClient, MagicTEESigner, ConfirmationScreen) were exclusively used in the IMX setup path within buildPrivateVars; the zkEVM flow uses connectWallet() which creates these internally.

21 files changed, 8 insertions, 1,688 deletions. All 23 tests pass, lint clean.

Remove all StarkEx/IMX provider code from the Passport SDK package.
This is a breaking change - connectImx() and connectImxSilent() public
methods are removed, and PassportOverrides no longer accepts IMX-specific
fields (imxPublicApiDomain, immutableXClient, imxApiClients).

Deleted: starkEx/ directory (provider, factory, guardian client, workflows),
utils/imxUser.ts, and all associated tests.
Simplified linkExternalWallet() to use isUserZkEvm() instead of toUserImx().
@naveen-imtb naveen-imtb requested a review from a team as a code owner March 27, 2026 02:40
@nx-cloud

nx-cloud Bot commented Mar 27, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit a60b578

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 2s View ↗
nx affected -t build,lint,test ✅ Succeeded 8s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-07 05:33:56 UTC

Remove withPassportError, isAPIError re-exports from passportError.ts
and AuthEvents, WalletEvents re-exports from types.ts — these were only
consumed by the deleted StarkEx code and caused CI bundle warnings about
unused imports from external modules.
Add local process type declaration in logger.ts to fix TS2580 error
during typegen (pre-existing issue exposed by Nx cache invalidation).
Remove imxPublicApiDomain, imxApiClients, immutableXClient from
overrides in sdk-sample-app and game-bridge, and clean up unused
imports (IMXClient, ImxApiClients, createConfig, xClient).
@naveen-imtb naveen-imtb requested a review from a team as a code owner March 27, 2026 02:54
Delete entire components/imx/ directory (8 files), remove connectImx,
imxProvider, sdkClient, and all IMX-related imports/state/UI from
PassportProvider, ImmutableProvider, index page, and Status component.
Remove @imtbl/x-client and @imtbl/x-provider dependencies.
Regenerate pnpm-lock.yaml to match sdk-sample-app package.json changes
that removed @imtbl/x-client and @imtbl/x-provider dependencies.
This example app is entirely dependent on connectImx() and IMXProvider
which were removed as part of StarkEx cleanup. The app has no value
without IMX/StarkEx functionality.
@naveen-imtb naveen-imtb changed the title refactor(passport)!: BSB-6: remove StarkEx support from Passport SDK refactor(passport): BSB-6: remove StarkEx support from Passport SDK Mar 27, 2026
Remove @imtbl/x-client from game-bridge and passport/sdk package.json,
and @imtbl/x-provider from passport/sdk — neither package imports these
modules after StarkEx code removal.
Skip starkCurve legacy key generation tests and IMXClient production
test that make live HTTP calls to https://api.x.immutable.com. These
are flaky in CI and the entire x-client package is deprecated as part
of StarkEx cleanup.
JCSanPedro
JCSanPedro previously approved these changes Mar 29, 2026
@naveen-imtb naveen-imtb changed the title refactor(passport): BSB-6: remove StarkEx support from Passport SDK refactor(passport)!: BSB-6: remove StarkEx support from Passport SDK Mar 29, 2026
…x entrypoint

Delete the entire x-client and x-provider StarkEx packages, remove the
@imtbl/sdk/x public entrypoint, clean up toolkit's convertToSignableToken
helper (only consumed by x-client/x-provider), delete IMX functional tests,
remove deprecated IMX example app, and update workspace config.
Revert removal of x-client and x-provider packages and the @imtbl/sdk/x
entrypoint. These will be removed in a dedicated follow-up PR to keep
the Passport StarkEx cleanup scoped to passport-specific changes.
These tests hit api.x.immutable.com with no mocking, causing failures
when Nx cache misses. StarkEx/IMX is deprecated and these tests will
be removed when x-client is deleted in a follow-up PR.
JCSanPedro
JCSanPedro previously approved these changes Mar 30, 2026
@JCSanPedro JCSanPedro enabled auto-merge April 7, 2026 05:18
@JCSanPedro JCSanPedro added this pull request to the merge queue Apr 7, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 7, 2026
@JCSanPedro JCSanPedro added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit e715bb8 Apr 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants