Skip to content

Conversation

@gugell
Copy link
Contributor

@gugell gugell commented Nov 18, 2025

Description

Please provide:
This pull request adds integration for the new react-native-nitro-avalabs-crypto native module to enable fast, native-backed cryptographic operations in the mobile codebase. It updates dependency management, Metro bundler configuration, and workspace settings to support this module and its required environment. The changes also add Nitro-backed fast-paths to patched cryptography libraries for React Native, improving performance and compatibility.

Native Crypto Integration

  • Added react-native-nitro-avalabs-crypto as a workspace dependency in packages/core-mobile/package.json, and included it in the list of dependencies and Metro bundler resolution paths for React Native. Also updated metro.config.js to watch and resolve the new package. [1] [2] [3]
  • Introduced a CocoaPods spec file (NitroAvalabsCrypto.podspec) to support iOS build and autolinking for the native module, including custom build scripts for secp256k1.

Patched Crypto Libraries for Nitro Support

  • Patched @bitcoinerlab/secp256k1 and @noble/curves libraries to use Nitro-backed native implementations for key cryptographic operations (sign, verify, point addition, schnorr), with fallback to JS if native is unavailable. Also added React Native and browser shims to their package.json files for compatibility. [1] [2]

Workspace and Dependency Management

  • Added Nitro-related dependencies (nitrogen, react-native-nitro-modules) to the root package.json and updated script commands to support Nitro workspace operations. [1] [2]
  • Updated ignore files and configuration for Nitro workspace (e.g., .gitignore, .watchmanconfig) in the new crypto package. [1] [2]

Miscellaneous Updates

  • Updated Storybook and Babel plugin configuration and added Nitro modules to package manager overrides for correct dependency resolution. [1] [2]
  • Cleaned up unused dependency configuration in react-native.config.js.

These changes collectively enable Nitro-powered cryptographic operations in the mobile app, improving performance and compatibility for React Native environments.

QA Testing (if applicable)

  • Provide instructions for QA to test this feature thoroughly
  • State expected behavior / acceptance criteria

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

@gugell gugell force-pushed the @gugell/nativeCryptoLib branch from 30b3793 to 227bd89 Compare November 18, 2025 14:02
@gugell gugell force-pushed the @gugell/nativeCryptoLib branch from 25b7908 to a67653e Compare November 18, 2025 17:16
@gugell gugell force-pushed the @gugell/nativeCryptoLib branch from b8c4cea to e724773 Compare November 19, 2025 20:01
@gugell gugell force-pushed the @gugell/nativeCryptoLib branch from e724773 to 88705f9 Compare November 19, 2025 20:01
@gugell gugell marked this pull request as ready for review November 19, 2025 20:06
@gugell gugell closed this Nov 27, 2025
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