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-ufsecp

v3.4.0

Published

React Native bindings for UltrafastSecp256k1 — high-performance secp256k1 ECC (ufsecp C ABI v1)

Readme

react-native-ultrafast-secp256k1

High-performance secp256k1 elliptic curve cryptography for React Native, powered by UltrafastSecp256k1.

Uses native C/C++ through JSI (Android NDK + iOS) for maximum performance -- no bridge overhead.

Features

  • ECDSA -- sign, verify, recover (RFC 6979, low-S)
  • Schnorr -- BIP-340 sign/verify
  • ECDH -- shared secret derivation
  • BIP-32 -- HD key derivation
  • Taproot -- BIP-341 output key tweaking
  • Addresses -- P2PKH, P2WPKH, P2TR
  • WIF -- encode/decode
  • Hashing -- SHA-256, HASH160, tagged hash
  • Key tweaking -- negate, add, multiply
  • Ethereum -- Keccak-256, EIP-55 addresses, EIP-155 sign, ecrecover
  • BIP-39 -- mnemonic generation, validation, seed derivation
  • Multi-coin wallet -- 7-coin address dispatch (BTC/LTC/DOGE/DASH/ETH/BCH/TRX)
  • Batch verification -- ECDSA + Schnorr batch verify with invalid identification
  • MuSig2 -- BIP-327 multi-signatures (key agg, nonce gen, partial sign, aggregate)
  • FROST -- threshold signatures (keygen, sign, aggregate, verify)
  • Adaptor signatures -- Schnorr + ECDSA adaptor pre-sign, adapt, extract
  • Pedersen commitments -- commit, verify, sum balance, switch commitments
  • ZK proofs -- knowledge proof, DLEQ proof, Bulletproof range proof
  • Multi-scalar multiplication -- Shamir's trick, MSM
  • Pubkey arithmetic -- add, negate, combine N keys
  • SHA-512 -- full SHA-512 hash
  • Message signing -- BIP-137 Bitcoin message sign/verify

Install

npm install react-native-ultrafast-secp256k1
cd ios && pod install

Quick Start

import { UfsecpContext } from 'react-native-ultrafast-secp256k1/lib/ufsecp';

const ctx = await UfsecpContext.create();

// Generate public key from 32-byte private key
const privkey = Buffer.from('...', 'hex'); // use secure random source
const pubkey = await ctx.pubkeyCreate(privkey.toString('hex'));

The package root entrypoint is a legacy stateless bridge. Prefer the context-based UfsecpContext API for the standardized binding security model.

ECDSA Sign & Verify

const msgHash = await UfsecpContext.sha256(Buffer.from('hello world').toString('hex'));

// Sign
const sig = await ctx.ecdsaSign(msgHash, privkey.toString('hex'));

// Verify
const valid = await ctx.ecdsaVerify(msgHash, sig, pubkey);
console.log('valid:', valid); // true

Schnorr (BIP-340)

const xOnlyPub = await ctx.pubkeyXonly(privkey.toString('hex'));
const msg = await UfsecpContext.sha256(Buffer.from('schnorr message').toString('hex'));
const auxRand = Buffer.alloc(32); // use crypto.getRandomValues in production

const schnorrSig = await ctx.schnorrSign(msg, privkey.toString('hex'), auxRand.toString('hex'));
const ok = await ctx.schnorrVerify(msg, schnorrSig, xOnlyPub);

Bitcoin Addresses

const p2wpkh = await ctx.addrP2wpkh(pubkey, 0);   // bc1q...
const p2tr = await ctx.addrP2tr(xOnlyPub, 0);     // bc1p...

BIP-32 HD Derivation

const seed = Buffer.alloc(64); // use proper entropy
const master = await ctx.bip32Master(seed.toString('hex'));
const child = await ctx.bip32DerivePath(master, "m/44'/0'/0'/0/0");
const childPriv = await ctx.bip32Privkey(child);

Platform Requirements

| Platform | Requirement | |----------|-------------| | Android | NDK, minSdkVersion 21+ | | iOS | iOS 13+, CocoaPods | | React Native | >= 0.71.0 |

Smoke Validation

bash libs/UltrafastSecp256k1/scripts/validate_bindings.sh

The validator runs a default mock-bridge contract smoke in plain Node.js to verify the JavaScript bridge surface without requiring Android/iOS bootstrapping.

Set UFSECP_VALIDATE_REACT_NATIVE=1 and provide a React Native/Jest test harness to additionally run the native React Native smoke suite against a real bridge.

Architecture Note

The C ABI layer uses the fast (variable-time) implementation for maximum throughput. A constant-time (CT) layer with identical mathematical operations is available via the C++ headers for applications requiring timing-attack resistance.

License

MIT

Links