Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces several important updates focused on improving cryptography performance and compatibility, particularly for React Native environments. The most significant changes are the addition of native bindings for secp256k1 and noble-curves libraries, enabling faster cryptographic operations via native code (Nitro/Avalabs), and updating package patching and dependency management to ensure these enhancements are used consistently. Additionally, Ruby version requirements for the mobile core package have been bumped.
Cryptography: Native Nitro/Avalabs Integration
Added native bindings to
@bitcoinerlab/secp256k1and@noble/curveslibraries, allowing key operations (sign, verify, point addition, and Schnorr signatures) to use fast native implementations when available, with fallback to JavaScript if needed. This improves both performance and compatibility for React Native apps. (.yarn/patches/@bitcoinerlab-secp256k1-npm-1.2.0-1098d4b329.patch,.yarn/patches/@noble-curves-npm-1.9.7-2b9efc8ab4.patch) [1] [2]Modified cryptographic functions in
dist/index.jsandabstract/weierstrass.jsto prefer native Nitro/Avalabs implementations for sign/verify and point addition, with robust fallback mechanisms and logging for troubleshooting. [1] [2]Dependency and Patch Management
Updated
package.jsonto consistently use patched versions of@noble/curvesand@bitcoinerlab/secp256k1, ensuring all variants and version ranges resolve to the enhanced, Nitro-compatible builds.Added React Native and browser compatibility fields to the
package.jsonfiles of patched libraries (@bitcoinerlab/secp256k1,@noble/curves), mapping Node.js modules to browser/React Native equivalents for seamless cross-platform support. [1] [2]Ruby Version Update
.ruby-versionandGemfile. [1] [2]Testing
Dev Testing (if applicable)
QA Testing (if applicable)
Checklist
Please check all that apply (if applicable)