Library to generating Ethereum address from PHP.
Dependencies:
- phpecc
- keccak
You can install package via composer:
composer require doxadoxa/phpethaddress
To generate address with random private key.
$address = EthereumAddressGenerator::generate();
To generate address with exists private key.
$address = EthereumAddressGenerator::generate();
Accessing to private key and address (return as HEX-string):
$address->privateKey();
$address->publicKey();
To run tests use:
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests