Download the PHP package raphaelcangucu/multicoin-address-validator without Composer

On this page you can find all versions of the php package raphaelcangucu/multicoin-address-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package multicoin-address-validator

Multicoin Address Validator PHP

A PHP library for validating cryptocurrency wallet addresses across multiple cryptocurrencies. This library is a PHP port of the popular JavaScript multicoin-address-validator library, built with modern PHP practices, SOLID principles, and comprehensive OOP design.

Features

Installation

Install via Composer:

Quick Start

Supported Cryptocurrencies

This library supports 25+ cryptocurrencies across multiple blockchain networks, including major cryptocurrencies, ERC-20 tokens, and Bitcoin derivatives.

Major Cryptocurrencies

ERC-20 & Ethereum-Compatible Tokens

Enhanced Ethereum Validation: Our EthereumValidator features industry-leading compatibility:

Bitcoin Derivatives & Forks

Network Support

Each cryptocurrency supports multiple networks where applicable:

Address Format Support

API Reference

WalletAddressValidator

validate(string $address, ?string $currency = null, array $options = []): bool

Validates a cryptocurrency address.

Parameters:

Options:

Example:

getCurrencies(): array

Returns all supported currencies.

findCurrency(string $nameOrSymbol): ?array

Finds a currency by name or symbol.

isSupported(string $nameOrSymbol): bool

Checks if a currency is supported.

Advanced Usage

Custom Validator

Custom Currency Registration

Batch Validation

Testing

Run the test suite:

Test Results Summary

The library has been thoroughly tested with a comprehensive test suite:

PHPUnit Test Results

Comprehensive Testing Suite:

The library includes three comprehensive test files demonstrating validation capabilities:

  1. Real-World Address Validation (examples/test_provided_addresses.php):

    • ✅ 207/207 provided addresses validated successfully (100% success rate)
    • ❌ 0/207 addresses failed validation
  2. Comprehensive Address Coverage (examples/test_comprehensive_addresses.php):

    • ✅ 60/60 addresses across all supported cryptocurrencies (100% success rate)
    • Covers major cryptocurrencies, ERC-20 tokens, and Bitcoin derivatives
    • Tests multiple address formats per currency (P2PKH, P2SH, Bech32, etc.)
  3. Invalid Address Security Testing (examples/test_invalid_addresses.php):
    • ✅ 56/56 invalid addresses correctly rejected (100% accuracy)
    • Tests malformed addresses, wrong formats, cross-currency confusion
    • Demonstrates robust security against invalid input

Breakdown by Currency:

Network Coverage: The test suite validates addresses across 14 different cryptocurrencies and multiple network types (mainnet, testnet, legacy formats, SegWit, Bech32, etc.), demonstrating comprehensive support for real-world cryptocurrency address formats.

Enhanced Ethereum/ERC-20 Compatibility: The library features a significantly enhanced EthereumValidator that provides industry-leading compatibility:

This demonstrates the library's excellent reliability for production use with real cryptocurrency addresses across multiple blockchain ecosystems, with special emphasis on Ethereum ecosystem compatibility.

Architecture

This library follows SOLID principles and clean architecture:

Key Components

Requirements

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

License

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

Credits

Changelog

See CHANGELOG.md for version history.


Made with ❤️ for secure cryptocurrency applications


All versions of multicoin-address-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
ext-mbstring Version *
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package raphaelcangucu/multicoin-address-validator contains the following files

Loading the files please wait ....