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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-nitro-lndltc

v0.0.5

Published

react-native-nitro-lndltc

Downloads

165

Readme

react-native-nitro-lndltc

A high-performance React Native library for interacting with lndltc (Litecoin Lightning Network Daemon), built with NitroModules and C++.

Features

  • Direct ArrayBuffer bridge
  • Protobuf-es for type-safe request/response serialization
  • Server-streaming subscriptions with cancellation support
  • React Native new architecture only

Installation

bun add react-native-nitro-lndltc react-native-nitro-modules

liblnd binary

This library does not bundle the lndltc binary. You must provide liblnd yourself. Prebuilt binaries are available at: https://static.nexuswallet.com/lndmobile/

iOS

  1. Download and place liblnd.a in your React Native project's ios/ folder.
  2. Add liblnd.a to Build Phases -> Link Binary With Libraries
  3. Also add libresolv.tbd to linked libraries
  4. Run bun run pods

Android

Place liblnd.so for each architecture in your app's jniLibs:

android/app/src/main/jniLibs/
  arm64-v8a/liblnd.so
  armeabi-v7a/liblnd.so
  x86/liblnd.so
  x86_64/liblnd.so

Usage

Start the daemon

import { start, subscribeState, WalletState } from 'react-native-nitro-lndltc'

// Write lnd.conf to your app's documents directory first, then:
const subscription = subscribeState(
  (response) => {
    console.log('State:', WalletState[response.state])
  },
  (error) => console.error(error)
)

await start(`--lnddir=${lndDir}`)

Create or unlock a wallet

import { genSeed, initWallet, unlockWallet } from 'react-native-nitro-lndltc'

// First run: generate seed and create wallet
const seed = await genSeed({})
const { adminMacaroon } = await initWallet({
  walletPassword: new TextEncoder().encode('mypassword'),
  cipherSeedMnemonic: seed.cipherSeedMnemonic,
})

// Subsequent runs: unlock
await unlockWallet({
  walletPassword: new TextEncoder().encode('mypassword'),
})

Query wallet info

import {
  getInfo,
  walletBalance,
  newAddress,
  AddressType,
} from 'react-native-nitro-lndltc'

const info = await getInfo()
console.log(info.version, info.blockHeight, info.syncedToChain)

const balance = await walletBalance({})
console.log('Balance:', balance.confirmedBalance, 'sat')

const { address } = await newAddress({ type: AddressType.WITNESS_PUBKEY_HASH })
console.log('Address:', address)

Send coins

import { sendCoins } from 'react-native-nitro-lndltc'

const { txid } = await sendCoins({
  addr: 'ltc1q...',
  amount: BigInt(100000),
  targetConf: 6,
})

Subscribe to transactions

import { subscribeTransactions } from 'react-native-nitro-lndltc'

const subscription = subscribeTransactions(
  {},
  (tx) => {
    console.log('New tx:', tx.txHash, tx.amount, 'sat')
  },
  (error) => console.error(error)
)

// Later: stop receiving updates
subscription.cancel()

Other methods

import {
  estimateFee,
  getTransactions,
  getRecoveryInfo,
  stopDaemon,
  neutrinoKitStatus,
  walletKitListUnspent,
  walletKitLabelTransaction,
  walletKitFundPsbt,
  walletKitFinalizePsbt,
  walletKitImportMwebScanKey,
  walletKitPrepareMwebPresign,
} from 'react-native-nitro-lndltc'

API

Daemon lifecycle

| Function | Description | |----------|-------------| | start(args) | Start the lnd daemon with CLI flags | | stopDaemon() | Stop the daemon | | subscribeState(onState, onError) | Subscribe to wallet state changes. Returns Subscription |

Wallet management

| Function | Description | |----------|-------------| | genSeed(request?) | Generate a new wallet seed | | initWallet(request) | Create a new wallet with password and seed | | unlockWallet(request) | Unlock an existing wallet | | walletBalance(request?) | Get wallet balance (total, confirmed, unconfirmed) | | newAddress(request) | Generate a new address (P2WPKH, P2SH-P2WPKH, MWEB) |

Transactions

| Function | Description | |----------|-------------| | getTransactions(request?) | Get transaction history | | sendCoins(request) | Send coins to an address | | estimateFee(request) | Estimate transaction fee | | subscribeTransactions(request, onTx, onError) | Live transaction updates. Returns Subscription |

Node info

| Function | Description | |----------|-------------| | getInfo() | Get node info (version, pubkey, sync status, etc.) | | getRecoveryInfo() | Get wallet recovery progress | | neutrinoKitStatus() | Get neutrino light client sync status |

WalletKit

| Function | Description | |----------|-------------| | walletKitImportAccount(request) | Import a watch-only account | | walletKitListAccounts(request?) | List wallet accounts | | walletKitListAddresses(request?) | List addresses for all accounts | | walletKitListLeases(request?) | List currently locked UTXOs | | walletKitListUnspent(request?) | List unspent outputs | | walletKitLabelTransaction(request) | Label a transaction | | walletKitReleaseOutput(request) | Release a previously locked UTXO | | walletKitPublishTransaction(request) | Publish a raw transaction to the network | | walletKitSignMessageWithAddr(request) | Sign a message with an address's private key | | walletKitVerifyMessageWithAddr(request) | Verify a signed message against an address | | walletKitSignPsbt(request) | Sign a PSBT with wallet keys | | walletKitFundPsbt(request) | Create and fund a PSBT | | walletKitFinalizePsbt(request) | Finalize a PSBT into a broadcast-ready transaction | | walletKitImportMwebScanKey(request) | Import an MWEB scan key for HW wallet integration | | walletKitPrepareMwebPresign(request) | Attach MWEB presign fields (sender key + stealth scalar) to a funded PSBT for an external signer |

Types

// Enums
import { AddressType, WalletState, OutputScriptType, ChangeAddressType } from 'react-native-nitro-lndltc'

// Subscription handle (returned by subscribe methods)
import type { Subscription } from 'react-native-nitro-lndltc'

Example app

See the example/ directory for a working app with daemon management, wallet creation, balance display, address generation, and live transaction streaming.