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

@arquebus-io/libauth-react-native

v1.0.0

Published

React Native wrapper for libauth with full CashTokens support

Readme

libauth-react-native

React Native wrapper for libauth with full CashTokens support.

Uses Polygen to compile WebAssembly to native code for iOS and Android.

Installation

npm install @yourorg/libauth-react-native
# or
yarn add @yourorg/libauth-react-native

iOS

cd ios && pod install

Android

No additional steps - Gradle handles it automatically.

Usage

Use exactly like the original libauth:

import {
  generatePrivateKey,
  derivePublicKeyUncompressed,
  encodeCashAddress
} from '@yourorg/libauth-react-native';

// Generate wallet
const privateKey = generatePrivateKey();
const publicKey = derivePublicKeyUncompressed(privateKey);
const address = encodeCashAddress('bitcoincash', {
  type: 'p2pkh',
  payload: publicKey,
});

console.log('Address:', address);

CashTokens Support

Full support for CashTokens operations:

import {
  encodeTokenPrefix,
  decodeTokenPrefix,
  encodeFungibleTokenAmount
} from '@yourorg/libauth-react-native';

// Create a token-aware transaction
const tokenPrefix = encodeTokenPrefix({
  category: categoryId,
  nft: {
    capability: 'minting',
    commitment: commitmentData
  }
});

Advanced Features

All libauth features are available:

  • Wallet Operations: Key generation, HD wallets, address encoding/decoding
  • Transaction Building: Complete transaction construction and signing
  • Script Evaluation: Full Bitcoin Script VM implementation
  • CashTokens: Complete fungible and NFT token support
  • Authentication Templates: Bitauth IDE template support
  • Crypto Operations: SHA256, RIPEMD160, Secp256k1, and more

Performance

  • WASM crypto operations run at native speed
  • ~50x faster than pure JS implementations
  • No overhead - Polygen compiles WASM ahead of time

API Documentation

This library re-exports all functions from @bitauth/libauth. For complete API documentation, see:

Example App

See the example/ directory for a complete React Native app demonstrating:

  • Wallet generation
  • Address derivation
  • Transaction building
  • CashTokens operations

Requirements

  • React Native >= 0.60
  • iOS >= 12.0
  • Android minSdkVersion >= 21

Development

Building from Source

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run tests
npm test

# Link for development
npm link

Generating Native Code (Optional)

For maximum performance, you can compile the WASM modules to native C code:

  1. Install WABT (WebAssembly Binary Toolkit)

  2. Set the WABT_PATH environment variable:

    export WABT_PATH=/path/to/wabt/bin
  3. Generate native code:

    npm run generate-native

This generates C source files from libauth's WASM modules (secp256k1, sha256, ripemd160, etc.) which are then compiled to native code when building the iOS/Android apps.

Project Structure

libauth-react-native/
├── src/              # TypeScript source
├── lib/              # Compiled JavaScript
├── ios/              # iOS native module
│   └── Polygen/      # WASM compiled frameworks
├── android/          # Android native module
│   └── libs/         # WASM compiled libraries
└── example/          # Example React Native app

Troubleshooting

iOS Build Issues

If you encounter build errors on iOS:

cd ios
pod deintegrate
pod install

Android Build Issues

Clear the build cache:

cd android
./gradlew clean
cd ..
npx react-native run-android

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

Acknowledgments

  • libauth - The powerful Bitcoin library
  • Polygen - WASM to native compilation
  • React Native community