crypto-validator-fns
v1.1.93
Published
A comprehensive set of utility functions for cryptocurrency transaction validation and verification
Downloads
15
Readme
Crypto Validator Functions
A comprehensive set of utility functions to enhance the user experience for cryptocurrency transactions and validations. This library provides robust validation for cryptocurrency addresses, transaction hashes, and other blockchain-related data across multiple cryptocurrencies.
Features
- 🔒 Secure and reliable cryptocurrency address validation
- 🔍 Transaction hash verification
- ⚡ Zero dependencies
- 💪 TypeScript support
- 🧪 Thoroughly tested
- 🌐 Cross-platform compatibility
Installation
npm install crypto-validator-fns
# or
yarn add crypto-validator-fnsUsage
const { isValidBitcoinAddress, isValidEthereumAddress } = require('crypto-validator-fns');
// Validate Bitcoin address
console.log(isValidBitcoinAddress('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa')); // true
// Validate Ethereum address
console.log(isValidEthereumAddress('0x742d35Cc6634C0532925a3b844Bc454e4438f44e')); // trueAPI Documentation
Bitcoin Functions
isValidBitcoinAddress(address: string): boolean
Validates a Bitcoin address (supports Legacy, SegWit, and Native SegWit addresses).
Ethereum Functions
isValidEthereumAddress(address: string): boolean
Validates an Ethereum address with checksum verification.
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development
- Clone the repository
- Install dependencies:
npm install - Run tests:
npm test - Submit a PR
License
This project is licensed under the MIT License - see the LICENSE file for details.
Security
For any security concerns, please email [email protected] or open a security advisory on GitHub.
Support
Changelog
See CHANGELOG.md for a list of changes.
