Skip to content

Update SDK for underlying native SDKs alpha.3 version#40

Merged
taylanpince merged 8 commits into
masterfrom
update-native-sdk-alpha-3
Jun 26, 2026
Merged

Update SDK for underlying native SDKs alpha.3 version#40
taylanpince merged 8 commits into
masterfrom
update-native-sdk-alpha-3

Conversation

@tolgahan-arikan

@tolgahan-arikan tolgahan-arikan commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update the React Native SDK API to the alpha.3 native SDK shape with new OMSClient({ publishableKey }), instance wallet/indexer namespaces, and no legacy compatibility shims
  • bridge keyed native client instances on iOS and Android, including getBalances and getTransactionHistory
  • bump native SDK dependencies to 0.1.0-alpha.3 and align Android Kotlin/KotlinX versions required by the new Kotlin artifact
  • update README.md, API.md, CHANGELOG.md, PUBLISHING.md, tests, SDK example, and Trails example; leave the standalone Expo example on alpha.2 until the new package version is published
  • replace the old Claude workflows with the aligned single claude-review.yml workflow used by the Swift/Kotlin SDKs
  • pin CI/local CocoaPods Ruby to 3.4.9 and make Ruby 3.4 stdlib gems explicit for both example bundles
  • preinstall the Android NDK in CI with retry before Gradle configures the example app

Release prep included

  • package version is 0.1.0-alpha.3
  • Android resolves io.github.0xsequence:oms-client-kotlin-sdk:0.1.0-alpha.3
  • iOS resolves oms-client-swift-sdk 0.1.0-alpha.3
  • CHANGELOG.md includes the 0.1.0-alpha.3 entry dated 2026-06-26
  • npm currently has 0.1.0-alpha.1 and 0.1.0-alpha.2; 0.1.0-alpha.3 is not published yet

Validation

  • yarn prepare
  • yarn lint
  • yarn typecheck
  • yarn test
  • yarn npm publish --dry-run --access public --tag alpha
  • ./gradlew :app:assembleDebug in examples/sdk-example/android
  • ./gradlew :app:assembleDebug in examples/trails-actions-example/android
  • iOS simulator build for OmsClientReactNativeSdkExample
  • iOS simulator build for TrailsActionsDemo
  • runtime smoke test: SDK example on iOS simulator and Android emulator
  • runtime smoke test: SDK example email auth, sign message, verify signature
  • runtime smoke test: Trails example email auth and live Polygon balance load through oms.indexer.getBalances
  • yarn prettier --check README.md API.md PUBLISHING.md
  • yarn prettier --check .github/workflows/claude-review.yml
  • YAML parse check for .github/workflows/claude-review.yml
  • YAML parse check for .github/workflows/ci.yml
  • Ruby 3.4.9 local verification: bundle _2.4.22_ check && bundle _2.4.22_ exec pod --version in both iOS example bundles
  • git diff --check

Publishing steps after merge

  1. Wait for PR CI to pass, then merge to master.
  2. Check out and update master locally.
  3. Confirm the version is still available: npm view @0xsequence/oms-react-native-sdk@0.1.0-alpha.3 version. A 404 is expected before publish.
  4. Confirm native SDK artifacts are available from Maven Central and CocoaPods.
  5. From a clean master worktree, run the standard release checks from PUBLISHING.md.
  6. Run yarn prepare and yarn npm publish --dry-run --access public --tag alpha on master.
  7. Confirm npm auth with yarn npm whoami.
  8. Publish with yarn npm publish --access public --tag alpha.
  9. Confirm npm sees the release: npm view @0xsequence/oms-react-native-sdk@0.1.0-alpha.3 version.
  10. After npm confirms 0.1.0-alpha.3, update examples/expo-example to depend on the newly published package version.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@tolgahan-arikan tolgahan-arikan changed the title Update native SDKs to alpha.3 Update native SDKs for underlying native SDKs alpha.3 version Jun 25, 2026
@tolgahan-arikan tolgahan-arikan changed the title Update native SDKs for underlying native SDKs alpha.3 version Update SDK for underlying native SDKs alpha.3 version Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@tolgahan-arikan tolgahan-arikan marked this pull request as ready for review June 25, 2026 19:40
@tolgahan-arikan tolgahan-arikan requested a review from a team June 25, 2026 19:40
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude finished @tolgahan-arikan's task —— View job


PR Review: Update SDK for native SDKs alpha.3

Reviewed the TS public API, the iOS/Android/JS bridge layers, auth/signing/tx flows, docs, and tests. Overall this is a clean, well-structured migration to the instance-based new OMSClient({ publishableKey }) shape with keyed native clients and no legacy shims. A few things worth addressing before merge.

Blockers

1. Fee-selection token derived differently on iOS vs Android

  • iOS (ios/OmsClientReactNativeSdkImpl.swift:991) maps selection straight from the SDK: feeOptionSelectionDictionary(option.selection){ token: selection.token }.
  • Android (android/.../OmsClientReactNativeSdkModule.kt:907,914-918) ignores the SDK-provided selection and re-derives it: feeOptionSelectionMap(option.feeOption)tokenId?.trim() ?: token.symbol.

The selection.token value is what the app round-trips back through respondToFeeOptionSelection to pick which token pays the gas fee. If the native FeeOptionWithBalance.selection.token ever differs from tokenId ?? symbol (e.g. an address-based or canonical token id), Android will submit a different fee token than iOS — a real cross-platform correctness/fee-security issue. Android should use the SDK's option.selection like iOS does (assuming the Kotlin type exposes it). Please confirm the Kotlin FeeOptionWithBalance shape and align the two.

Non-blocking issues

2. getBalances / getTransactionHistory default networkType diverges

  • Android defaults missing networkType to IndexerNetworkType.MAINNETS (:460, :484).
  • iOS passes value.networkType through as nil when absent (OmsClientReactNativeSdkImpl.swift:1151,1172), letting the native SDK choose its own default.

If the Swift SDK's internal default isn't also MAINNETS, the two platforms will query different network sets for the same JS call. Recommend making the default explicit and identical on both sides (or letting both pass through nil).

3. Android tokenBalancesPageMap assumes non-null page fields
android/.../OmsClientReactNativeSdkModule.kt:745-750 uses putInt/putBoolean directly on page.page, page.pageSize, page.more. iOS treats all three as optional (OmsClientReactNativeSdkImpl.swift:853-858, .map(NSNumber.init) ?? NSNull()), and the TS type appears to allow nulls. If the Kotlin fields are non-null primitives this is fine; if they're nullable it won't compile / will NPE. Worth double-checking the Kotlin types match the nullable TS contract.

4. verifyMessageSignature wallet-address arg asymmetry (likely fine — confirm)
iOS passes an explicit walletAddress: requireActiveWalletAddress(client) into isValidMessageSignature (:511-513), while Android omits it (:509-513) and relies on the active session internally. Behavior is probably equivalent, but flagging the API-shape asymmetry in case the Kotlin overload defaults to a different address source.

Nits

  • OmsClientReactNativeSdkImpl.swift:386,429statusPolling ?? TransactionStatusPollingOptions() rebuilds defaults when nil; harmless but the ?? fallback duplicates the SDK's own defaulting. Minor.

Things that look good

  • No backwards-compat shims — confirmed; the API is cleanly the new shape only.
  • Expo example dependency policy respectedexamples/expo-example/package.json:15 stays on 0.1.0-alpha.2 while root is 0.1.0-alpha.3, matching the "update only after publish" policy. PR body documents this.
  • DocsAPI.md, README.md, PUBLISHING.md updated consistently with the new OMSClient/wallet/indexer surface.
  • Native version bumps aligned — podspec (0.1.0-alpha.3) + android/build.gradle (0.1.0-alpha.3, Kotlin 2.3.20, coroutines/serialization 1.11.0) bumped together per the maintenance matrix.
  • Per-client session-expiry routing is well covered in test/client.native.test.js (clientId scoping, replay clearing, pending-selection ownership). Indexer param serialization is also tested.

Test coverage gap

Tests exercise auth/session/indexer routing well, but there's no coverage for the fee-option selection round-trip (onFeeOptionSelectionRequestrespondToFeeOptionSelection) or sendTransaction/signMessage param marshaling. Given issue #1 above, a JS-level test asserting the fee selection.token flows back unchanged would help guard the cross-platform contract. Native parity (iOS vs Android dictionary shapes) still relies on manual smoke tests per TESTING.md.


This is a review only — no code changed. Issue #1 is the one I'd want resolved (or explained) before merge; the rest are confirm-or-fix.
· update-native-sdk-alpha-3

@taylanpince taylanpince merged commit 051ee2f into master Jun 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants