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

@avalabs/crypto-sdk

v1.0.2

Published

Cross-platform crypto SDK facade. Re-exports a unified address-derivation API backed by @avalabs/crypto-nitro on React Native and @avalabs/crypto-wasm everywhere else. Consumers install only this package; the bundler picks the right backend via package.js

Downloads

3,578

Readme

@avalabs/crypto-sdk

Cross-platform crypto SDK facade. Exposes a single unified API for batched address derivation; the bundler picks the right backend per platform via package.json exports conditions — no Platform.OS checks in consumer code.

Install

You must install the wrapper for your target platform alongside this package. The wrappers are declared as optional peer dependencies, so npm/pnpm won't warn if you forget — but import from this package will fail at runtime when the missing wrapper can't be resolved.

# React Native (iOS + Android)
pnpm add @avalabs/crypto-sdk @avalabs/crypto-nitro

# Browser / Chrome extension / Node
pnpm add @avalabs/crypto-sdk @avalabs/crypto-wasm

Cross-platform libraries that consume this SDK should re-declare the wrappers as optional peer deps so the choice propagates to the final app.

Usage

import {
  init,
  deriveAddressesFromXpubs,
  deriveAddressesForEvm,
  deriveAddressesForBtc,
  deriveAddressesForSvm,
  deriveAddressesForAvalanche,
} from '@avalabs/crypto-sdk';

// Required once before any derive*() call on the wasm backend.
// A no-op on the nitro backend, but always safe to call.
await init();

// Xpub-driven flow (Ledger / watch-only).
const rows = await deriveAddressesFromXpubs(
  evmXpub,
  avalancheXpubs,
  /*isTestnet=*/ false,
  /*accountIndices=*/ [0, 1, 2, 3, 4],
);

// Per-chain encoders — feed already-derived pubkeys.
const evmAddresses = await deriveAddressesForEvm(evmPubkeys);
const btcAddresses = await deriveAddressesForBtc(evmPubkeys, /*isTestnet=*/ false);
const svmAddresses = await deriveAddressesForSvm(ed25519Pubkeys);
const avaxBundles = await deriveAddressesForAvalanche(avaxPubkeys, evmPubkeys, false);

See src/contract.ts for the full CryptoApi interface.

API surface

| Function | Input shape | Returns | | ------------------------------------------------------------------------------ | ------------------------------------ | -------------------------------------- | | init() | — | Promise<void> | | deriveAddressesFromXpubs(evmXpub, avalancheXpubs, isTestnet, accountIndices) | strings + index array | Promise<DerivedSecp256k1Addresses[]> | | deriveAddressesForEvm(publicKeys) | 33-byte compressed secp256k1 pubkeys | Promise<string[]> (EIP-55 hex) | | deriveAddressesForBtc(publicKeys, isTestnet) | 33-byte compressed secp256k1 pubkeys | Promise<string[]> (bech32 P2WPKH) | | deriveAddressesForSvm(publicKeys) | 32-byte Ed25519 pubkeys | Promise<string[]> (base58) | | deriveAddressesForAvalanche(avaxPks, evmPks, isTestnet) | parallel pubkey arrays | Promise<DerivedAvalancheAddresses[]> |

All batched calls cap at 1024 elements per invocation and validate per-element pubkey length / SEC1 prefix at the boundary.

What's not in the facade

Lower-level primitives — sign, verify, signSchnorr, verifySchnorr, getPublicKey*, getExtendedPublicKey, pointAddScalar — currently exist only in @avalabs/crypto-nitro. To use them on React Native, import them directly from the nitro package:

import { sign, verify, getExtendedPublicKey } from '@avalabs/crypto-nitro';

Adding the equivalents to @avalabs/crypto-wasm is what would let those operations move into this facade.