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

@tetherto/wdk-utils

v1.0.0-beta.2

Published

Utilities for Wallet Development Kit

Readme

@tetherto/wdk-utils

A collection of utilities for validating cryptocurrency addresses. This package provides a set of functions to validate various address formats from different blockchain networks.

🔍 About WDK

This module is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.

For detailed documentation about the complete WDK ecosystem, visit docs.wallet.tether.io.

🌟 Features

  • Bitcoin Address Validation: Supports P2PKH, P2SH, and Bech32 address formats.
  • EVM Address Validation: Validates Ethereum-like addresses, including EIP-55 checksum validation.
  • Lightning Network Validation: Validates Lightning invoices and Lightning addresses.
  • Spark Address Validation: Supports Spark address formats.
  • UMA Address Validation: Validates Universal Money Addresses.

⬇️ Installation

You can install the package using npm:

npm install @tetherto/wdk-utils

🚀 Quick Start

Importing validation functions

import {
  validateBitcoinAddress,
  validateEVMAddress,
  validateLightningInvoice,
  validateLightningAddress,
  validateSparkAddress,
  validateUmaAddress
} from '@tetherto/wdk-utils';

Usage Examples

// Bitcoin Address Validation
const btcResult = validateBitcoinAddress('bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh');
console.log('Bitcoin validation result:', btcResult);

// EVM Address Validation
const evmResult = validateEVMAddress('0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe');
console.log('EVM validation result:', evmResult);

// Lightning Invoice Validation
const lnInvoiceResult = validateLightningInvoice('lnbc...');
console.log('Lightning invoice validation result:', lnInvoiceResult);

// Lightning Address Validation
const lnAddressResult = validateLightningAddress('[email protected]');
console.log('Lightning address validation result:', lnAddressResult);

// Spark Address Validation
const sparkResult = validateSparkAddress('...');
console.log('Spark validation result:', sparkResult);

// UMA Address Validation
const umaResult = validateUmaAddress('[email protected]');
console.log('UMA validation result:', umaResult);

📚 API Reference

validateBitcoinAddress(address: string)

Validates a Bitcoin address.

  • Returns: { success: true, type: 'p2pkh' | 'p2sh' | 'bech32' } or { success: false, reason: string }

validateEVMAddress(address: string)

Validates an EVM address.

  • Returns: { success: true, type: 'evm' } or { success: false, reason: string }

validateLightningInvoice(address: string)

Validates a Lightning Network invoice.

  • Returns: { success: true, type: 'invoice' } or { success: false, reason: string }

validateLightningAddress(address: string)

Validates a Lightning Address.

  • Returns: { success: true, type: 'address' } or { success: false, reason: string }

validateSparkAddress(address: string)

Validates a Spark address.

  • Returns: { success: true, type: 'btc' | 'alphanumeric' } or { success: false, reason: string }

validateUmaAddress(address: string)

Validates a Universal Money Address.

  • Returns: { success: true, type: 'uma' } or { success: false, reason: string }

resolveUmaUsername(uma: string)

Resolves a UMA username to its components.

  • Returns: { localPart: string; domain: string; lightningAddress: string } | null

stripLightningPrefix(input: string)

Strips the "lightning:" prefix from a string.

  • Returns: string

🛠️ Development

Testing

# Install dependencies
npm install

# Run tests
npm test

📜 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🆘 Support

For support, please open an issue on the GitHub repository.