npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-lightning

v0.0.2

Published

:warning: This is pre-alpha software. Please use as your own risk.

Downloads

10

Readme

react-native-lightning

:warning: This is pre-alpha software. Please use as your own risk.

Description

This library hopes to simplify the process of adding Lightning via LND's Neutrino to any React-Native app.

Android Installation:

Video Walkthrough: [TODO]

If you have any trouble, please use this commit as a reference to what needs to be changed/added to your project to get everything working.

  1. Install Dependencies:

     yarn add react-native-lightning buffer react-native-randombytes react-native-crypto [email protected]
     yarn add -D rn-nodeify
     yarn install
  2. Start the project:

    react-native run-android

Example Usage

const lnd = require("react-native-lightning");
lnd.start();

iOS Installation (In Progress)

Manual (Android/iOS):

  1. yarn add react-native-lightning buffer react-native-randombytes

  2. Add the following to the end of your postinstall script in yourproject/package.json:

    • cd node_modules/react-native-lightning && yarn install && ./node_modules/.bin/rn-nodeify --install buffer,stream,assert,events,crypto,vm,process --hack
  3. Copy react-native-lightning/src/lnd.config to the following. (Note: Create the directories if they do not exist):

    • Android - android/app/src/main/assets/lnd.config
    • iOS - ios/lightning/lnd.config
  4. Copy necessary files over for Android & iOS respectively:

    • Android - Copy LndNativeModule.java & LndNativePackage.java to android/app/src/main/java/com/yourproject/ and be sure to replace "com.rnlightning" at the top of each file with the name of your own project.
    • iOS - Copy LndReactModule.h & LndReactModule.m to ios/lightning/.
  5. Generate the Lndmobile.aar & Lndmobile.framework files.

    • Option 1 - Generate them locally with lnd v0.9:
      • To generate these files, please follow the instructions detailed in the README of Lightning Lab's Lightning App here.
    • Option 2 - Download pre-generated files:
      • If you do not wish to generate these files locally you can download them here instead. However, I highly recommend you opt for option 1.
  6. Add the Lndmobile.aar & Lndmobile.framework files to the project:

    • Add the Lndmobile.aar file to android/Lndmobile
    • Add the Lndmobile.framework file to ios/lightning
  7. Add packages.add(new LndNativePackage()); to "getPackages" in MainApplication.java just above return packages"

  8. For Android you'll need these additional dependencies in YourProject/android/app/build.gradle:

  • implementation 'com.google.protobuf:protobuf-java:3.13.0'
  • implementation 'com.android.support:multidex:1.0.3'
  • Then Add multiDexEnabled true under defaultConfig in the same gradle file.
  1. Start the project:
    • iOS: react-native run-ios
    • Android: react-native run-android