Skip to content

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

Open
naveen-imtb wants to merge 9 commits intomainfrom
remove/BSB-6-sdk-starkex-guardian-client
Open

refactor(passport): BSB-6: remove StarkEx support from Passport SDK#2808
naveen-imtb wants to merge 9 commits intomainfrom
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
Copy link
Copy Markdown

nx-cloud bot commented Mar 27, 2026

View your CI Pipeline Execution ↗ for commit c682840

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

☁️ Nx Cloud last updated this comment at 2026-03-27 05:57:09 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.
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.

1 participant