{"id":29342836,"url":"https://github.com/BlixtWallet/react-native-nitro-ark","last_synced_at":"2025-07-08T11:07:59.296Z","repository":{"id":298394143,"uuid":"957527884","full_name":"BlixtWallet/react-native-nitro-ark","owner":"BlixtWallet","description":"Pure C++ Nitro Modules for Ark","archived":false,"fork":false,"pushed_at":"2025-07-02T04:02:03.000Z","size":2199,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T04:13:58.687Z","etag":null,"topics":["ark","bitcoin","bitcoin-layer2","cpp","nitro-modules","react-native","rust","scaling","self-custody"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlixtWallet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-30T15:40:13.000Z","updated_at":"2025-07-02T04:02:06.000Z","dependencies_parsed_at":"2025-06-12T00:40:25.127Z","dependency_job_id":null,"html_url":"https://github.com/BlixtWallet/react-native-nitro-ark","commit_stats":null,"previous_names":["niteshbalusu11/react-native-nitro-ark","blixtwallet/react-native-nitro-ark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlixtWallet/react-native-nitro-ark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlixtWallet%2Freact-native-nitro-ark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlixtWallet%2Freact-native-nitro-ark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlixtWallet%2Freact-native-nitro-ark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlixtWallet%2Freact-native-nitro-ark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlixtWallet","download_url":"https://codeload.github.com/BlixtWallet/react-native-nitro-ark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlixtWallet%2Freact-native-nitro-ark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263747278,"owners_count":23505083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ark","bitcoin","bitcoin-layer2","cpp","nitro-modules","react-native","rust","scaling","self-custody"],"created_at":"2025-07-08T11:07:58.064Z","updated_at":"2025-07-08T11:07:59.282Z","avatar_url":"https://github.com/BlixtWallet.png","language":"Rust","readme":"# React Native Nitro Ark Module\n\nThis directory contains the React Native module that bridges your React Native application with the underlying Rust [Ark](https://codeberg.org/ark-bitcoin/bark) project by [Second](https://second.tech), facilitated by the C++ FFI layer in [`bark-cpp`](./bark-cpp). It leverages [React Native NitroModules](https://github.com/mrousavy/nitro) for efficient communication between JavaScript/TypeScript and native C++ code.\n\n## Installing the react-native-nitro-ark module\n\n- To install the `react-native-nitro-ark` module, run the following command in your React Native project directory:\n- For all methods and type definitions refer to the [`react-native-nitro-ark/src/index.tsx`](./react-native-nitro-ark/src/index.tsx) file.\n\n```bash\nnpm install react-native-nitro-ark react-native-nitro-modules\n# or\nyarn add react-native-nitro-ark react-native-nitro-modules\n```\n\n- Download the Android binary and put it inside `node_modules/react-native-nitro-ark/android/src/main/jniLibs/arm64-v8a`.\n- Download the iOS binary, `unzip` it and put it inside `node_modules/react-native-nitro-ark/Ark.xcframework`.\n\n## Purpose\n\nThe primary goal of this module is to expose the rust functions of the \"Ark\" Rust project to your React Native application. It provides:\n\n1.  A TypeScript API ([`src/`](./react-native-nitro-ark/src/)) for easy consumption from your React Native JavaScript/TypeScript code.\n2.  Native C++ implementations ([`cpp/`](./react-native-nitro-ark/cpp/)) that utilize the [`bark-cpp`](./bark-cpp/) FFI to call into the Rust core logic.\n\nThis allows you to write high-performance core logic in Rust and seamlessly integrate it into your cross-platform React Native application.\n\n## Directory Structure\n\n-   **[`bark-cpp/`](./bark-cpp/)**: Contains the C++ FFI code that directly interfaces with the Rust \"Ark\" project. This code is compiled into a static library for Android and iOS.\n-   **[`react-native-nitro-ark/cpp/`](./react-native-nitro-ark/cpp/)**: Contains the C++ code specific to this React Native Nitro module. This code:\n    -   Includes the necessary headers from React Native Nitro.\n    -   Links against the static library produced by `bark-cpp`.\n    -   Implements the native methods that are exposed to the TypeScript side.\n    -   Calls the functions provided by the `bark-cpp` FFI layer.\n-   **[`react-native-nitro-ark/react-native/src/`](./react-native-nitro-ark/react-native/src/)**: Contains the TypeScript/JavaScript code that defines the public API of this module. This is what your React Native application will import and use. It makes calls to the native C++ methods defined in the [`cpp/`](./react-native-nitro-ark/cpp/) directory via the React Native Nitro bridge.\n-   **[`react-native-nitro-ark/example/`](./react-native-nitro-ark/example/)**: Contains an example React Native application that demonstrates how to use the `react-native-nitro-ark` module. This directory includes the necessary files to set up a React Native project and showcases the usage of the TypeScript API.\n\n## How it Works\n\nThe interaction flow is generally as follows:\n\n1.  **React Native App (JS/TS):** Your application code imports and calls functions from the TypeScript API exposed in [`react-native-nitro-ark/src/`](./react-native-nitro-ark/src/).\n2.  **TypeScript API ([`react-native-nitro-ark/src/`](./react-native-nitro-ark/src/))**: These TypeScript functions act as a wrapper. They use React Native Nitro's mechanisms to invoke corresponding native C++ methods.\n3.  **React Native Nitro Bridge:** Nitro efficiently marshals data and forwards the call from JavaScript to the native C++ environment.\n4.  **Nitro C++ Module ([`react-native-nitro-ark/cpp/`](./react-native-nitro-ark/cpp/))**: The C++ methods implemented here receive the call.\n5.  **FFI Call:** This C++ code then calls the relevant functions exposed by the [`bark-cpp`](./bark-cpp/) FFI layer. These [`bark-cpp`](./bark-cpp/) functions are available because the static library produced from [`bark-cpp`](./bark-cpp/) is linked into the application.\n6.  **Bark C++ FFI ([`react-native-nitro-ark/bark-cpp/`](./react-native-nitro-ark/bark-cpp/))**: This layer translates the C++ call into a call to the Rust \"Ark\" project's compiled code.\n\n## Building and Integration\n\n-   The `bark-cpp` code needs to be compiled into static libraries for each target platform (iOS and Android).\n-   This React Native module (`react-native-nitro-ark`) then links against these precompiled static libraries.\n-   Ensure that your main application's build system (Xcode for iOS, Gradle for Android) is configured to:\n    -   Compile and link the C++ code in [`react-native-nitro-ark/cpp/`](./react-native-nitro-ark/cpp/).\n    -   Link the static libraries from `bark-cpp`.\n    -   Integrate the React Native Nitro module correctly.\n\nRefer to the React Native Nitro documentation and the specific build configurations within the [`ios/`](./react-native-nitro-ark/ios/) and [`android/`](./react-native-nitro-ark/android/) directories for detailed integration steps.\n\n## Dependencies\n\n-   Rust\n-   React Native\n-   The compiled static libraries from `bark-cpp`.\n","funding_links":[],"categories":["Published"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlixtWallet%2Freact-native-nitro-ark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBlixtWallet%2Freact-native-nitro-ark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBlixtWallet%2Freact-native-nitro-ark/lists"}