Skip to content

Add support for react-native in fedimint-sdk#239

Open
MrImmortal09 wants to merge 24 commits intomainfrom
om/react-native
Open

Add support for react-native in fedimint-sdk#239
MrImmortal09 wants to merge 24 commits intomainfrom
om/react-native

Conversation

@MrImmortal09
Copy link
Member

@MrImmortal09 MrImmortal09 commented Jan 12, 2026

Closes #75


Npm test package : npm i @fedimint/react-native@0.0.0-om-rn1-dfe6143e445c58d8105884a823e1c5e9e7a3e589

@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

⚠️ No Changeset found

Latest commit: f975273

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security
Copy link

socket-security bot commented Jan 12, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​types/​react-native@​0.73.0991003850100
Updatednpm/​@​types/​bun@​1.2.23 ⏵ 1.3.81001004995 +3100
Addednpm/​@​react-native/​gradle-plugin@​0.76.91001004997100
Addednpm/​@​react-native/​typescript-config@​0.76.91001006397100
Addednpm/​@​react-native/​metro-config@​0.76.91001007297100
Addednpm/​@​react-native-community/​cli@​15.0.1981007596100
Updatednpm/​@​types/​react-dom@​19.2.1 ⏵ 19.2.3100 +110075 +187 -1100
Addednpm/​@​react-native/​eslint-config@​0.76.9991007697100
Addednpm/​@​types/​jest@​29.5.141001007781100
Updatednpm/​@​babel/​preset-env@​7.28.3 ⏵ 7.28.6971007797100
Updatednpm/​@​types/​react@​19.2.2 ⏵ 19.2.10100 +110079 +195100
Updatednpm/​@​types/​react@​19.2.2 ⏵ 18.3.2710010079 +195100
Updatednpm/​@​babel/​runtime@​7.25.6 ⏵ 7.28.6100 +1100 +27997100
Updatednpm/​@​babel/​core@​7.28.4 ⏵ 7.28.6971008097100
Addednpm/​@​react-native/​babel-preset@​0.76.9971008197100
Updatednpm/​@​types/​node@​24.7.2 ⏵ 22.19.71001008196100
Addedgem/​cocoapods@​1.15.285100100100100
Addednpm/​@​release-it/​conventional-changelog@​5.1.110010010086100
Addedgem/​activesupport@​7.2.2.188100100100100
Updatednpm/​@​changesets/​cli@​2.29.7 ⏵ 2.29.89610010089100
Addedgem/​xcodeproj@​1.25.193100100100100
Addedgem/​concurrent-ruby@​1.3.494100100100100
Addednpm/​@​commitlint/​config-conventional@​17.8.110010010095100
Addednpm/​@​react-native-community/​cli-platform-android@​15.0.19810010098100
Addednpm/​@​react-native-community/​cli-platform-ios@​15.0.110010010098100
Updatednpm/​@​tailwindcss/​postcss@​4.1.14 ⏵ 4.1.18100 +110010098100
Addednpm/​@​evilmartians/​lefthook@​1.13.6100100100100100

View full report

@socket-security
Copy link

socket-security bot commented Jan 12, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @react-native/debugger-frontend is 96.0% likely obfuscated

Confidence: 0.96

Location: Package overview

From: pnpm-lock.yamlnpm/@react-native/debugger-frontend@0.76.9

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@react-native/debugger-frontend@0.76.9. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report


console.log('Using DB Path (Rust):', rustPath);

await new WalletDirector(new ReactNativeTransport(), rustPath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awaiting a constructor feels strange? Think you can just remove the async.

initialize(dbPath?: string): Promise<boolean> {
if (this.initPromise) return this.initPromise
if (testFilename) {
if (dbPath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment for the purpose of the dbPath

Copy link
Member

@alexlwn123 alexlwn123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work... see comments

}

async initialize() {
async initialize(dbPath?: string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove param here? in the constructor, you must pass in the dbPath (assuming it's required). If you lazy load (and call initialize), it should use the dbPath passed in at the constructor (this.dbPath)

}

// TODO: Make this stateful... handle listing/joining/opening/closing wallets at this level
async createWallet() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* console.log(preview.config.global.meta.federation_name); // "My Federation"
* console.log(preview.config.global.consensus_version);
*/
async previewFederation(inviteCode: string): Promise<PreviewFederation> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* const parsedCode = await director.parseInviteCode(inviteCode);
* console.log(parsedCode.federation_id, parsedCode.url);
*/
async parseInviteCode(inviteCode: string): Promise<ParsedInviteCode> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* const parsedInvoice = await director.parseBolt11Invoice(invoiceStr);
* console.log(parsedInvoice.amount, parsedInvoice.expiry, parsedInvoice.memo);
*/
async parseBolt11Invoice(invoiceStr: string): Promise<ParsedBolt11Invoice> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add submodule initialization command in the contributing page in the docs?

flake.nix Outdated
Comment on lines 58 to 64
pkgs.go
pkgs.rustup
pkgs.cmake
pkgs.gnumake
pkgs.cargo
pkgs.cargo-ndk
pkgs.libclang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: verify this is the right way to pull this stuff in... not excited about pulling in the rust toolchain. Was hoping we could build rust inside of fedimint/fedimint.

@dpc any advice? cc @maan2003

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the right way, IMO.

flake.nix Outdated
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment stating this was copied from fedixyz/fedi

extra-trusted-public-keys = [
"fedimint.cachix.org-1:FpJJjy1iPVlvyv4OMiN5y9+/arFLPcnZhZVVCHCDYTs="
"fedibtc.cachix.org-1:KyG8I1663EYQm2ThciPUvjm1r9PHiZbOYz4goj+U76k="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpc @maan2003 is this okay? Is there somewhere else we should pull caches?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK. I wasn't even ware of the nix-community cache, but looks legit https://nix-community.org/cache/ so doesn't hurt to add it if you're pulling anything from nix-community

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10K lines?? is this all from react native?

@MrImmortal09 MrImmortal09 marked this pull request as ready for review January 13, 2026 19:34
@MrImmortal09 MrImmortal09 requested a review from elsirion January 14, 2026 12:01
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.

Make SDK work with React Native

3 participants