litvinjuan / ethereum-validator
PHP implementation to validate ethereum addresses
Installs: 1 297
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.0
- greensea/keccak: ^1.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-10-22 04:49:55 UTC
README
Ethereum Validator provides an easy way to validate a given string is a valid ethereum address.
Installation
You may install Ethereum Validator via Composer:
composer require litvinjuan/ethereum-validator
Usage
Ethereum Validator has a static isValidAddress
method that receives a string containing the ethereum address and returns true
if the address is valid, or false
if it's not:
use litvinjuan\EthereumValidator\EthereumValidator; $address = '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'; if (EthereumValidator::isValidAddress($address)) { // Valid Address } // Invalid Address
Contributing
Thank you for considering contributing to Ethereum Validator! Please read the contributing guidelines before opening a PR.
##License
Ethereum Validator is open-sourced software licensed under the MIT license.