
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@tetherto/wdk-utils
Advanced tools
A collection of utilities for validating cryptocurrency addresses. This package provides a set of functions to validate various address formats from different blockchain networks.
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.
You can install the package using npm:
npm install @tetherto/wdk-utils
import {
validateBitcoinAddress,
validateEVMAddress,
validateLightningInvoice,
validateLightningAddress,
validateSparkAddress,
validateUmaAddress
} from '@tetherto/wdk-utils';
// 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('user@domain.com');
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('$user@domain.com');
console.log('UMA validation result:', umaResult);
validateBitcoinAddress(address: string)Validates a Bitcoin address.
{ success: true, type: 'p2pkh' | 'p2sh' | 'bech32' } or { success: false, reason: string }validateEVMAddress(address: string)Validates an EVM address.
{ success: true, type: 'evm' } or { success: false, reason: string }validateLightningInvoice(address: string)Validates a Lightning Network invoice.
{ success: true, type: 'invoice' } or { success: false, reason: string }validateLightningAddress(address: string)Validates a Lightning Address.
{ success: true, type: 'address' } or { success: false, reason: string }validateSparkAddress(address: string)Validates a Spark address.
{ success: true, type: 'btc' | 'alphanumeric' } or { success: false, reason: string }validateUmaAddress(address: string)Validates a Universal Money Address.
{ success: true, type: 'uma' } or { success: false, reason: string }resolveUmaUsername(uma: string)Resolves a UMA username to its components.
{ localPart: string; domain: string; lightningAddress: string } | nullstripLightningPrefix(input: string)Strips the "lightning:" prefix from a string.
string# Install dependencies
npm install
# Run tests
npm test
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For support, please open an issue on the GitHub repository.
FAQs
Utilities for Wallet Development Kit
We found that @tetherto/wdk-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.