Skip to content

React Native compatibility audit + fixes #19

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, compat, audit, drips, help-wanted
Tier: L (1–2 weeks)
Type: compat / audit

Context

The Wraith whitepaper roadmap includes a mobile app. That app will use React Native (Expo, almost certainly). RN has notoriously sharp edges for crypto libraries: no Buffer by default, no crypto.getRandomValues without polyfills, Hermes engine has subtly different BigInt semantics in older versions, and atob/btoa aren't always there. Right now the SDK is web-only — nobody has tried it on RN.

We need a structured audit + the polyfills needed to ship.

Scope

  1. Spin up a fresh Expo app under examples/react-native-stellar/ (Expo SDK 51+ with the new architecture).
  2. Try to use @wraith-protocol/sdk/chains/stellar end-to-end:
    • deriveStealthKeys from a sample signature
    • generateStealthAddress
    • scanAnnouncements over a small fixture
  3. For each failure, document:
    • Root cause (missing global, type mismatch, native module missing, etc.)
    • Whether the fix belongs in:
      • The SDK itself (we should be cross-platform out of the box)
      • A @wraith-protocol/sdk-rn-polyfills companion package
      • The consumer's app entry point (with documentation)
  4. Implement the fixes.
  5. Document the integration in docs/guides/react-native-setup.mdx.

Specific things to expect

  • crypto.getRandomValues polyfill via expo-crypto or react-native-get-random-values.
  • Buffer polyfill via buffer if anything uses it.
  • TextEncoder / TextDecoder polyfills (Hermes has them since v0.74).
  • atob/btoa polyfills.
  • BigInt literal compatibility on Hermes — should be fine on recent versions but verify.
  • Metro bundler config that resolves the SDK's subpath exports correctly.

Acceptance criteria

  • examples/react-native-stellar/ works end-to-end on iOS Simulator and Android emulator.
  • All necessary polyfills documented.
  • Setup guide in docs.
  • If a companion polyfill package is needed, scaffolded and published as @wraith-protocol/sdk-rn-polyfills.
  • CI: smoke test that runs the example through Expo's CLI to confirm it builds.

Why this matters

Mobile is the Stellar use case for most LATAM and Asia-Pacific users. Without RN compatibility, Wraith on Stellar is desktop-only — a massive addressable-market cut.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programauditProduces a written report as primary deliverablecompatBrowser / runtime compatibilitydripsFunded via Drips Networkhelp wantedExtra attention is neededstellarTouches Stellar / Soroban code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions