fenguoz / minter-php-bip-44
There is no license information available for the latest version (1.1.0) of this package.
1.1.0
2024-08-13 02:28 UTC
Requires
- php: >=7.2
- simplito/elliptic-php: ~1.0.6
Requires (Dev)
- phpunit/phpunit: ~7.5 || ~9.0
This package is auto-updated.
Last update: 2024-12-13 03:09:00 UTC
README
About
This is a pure PHP SDK for working with BIP-44 standart
Installing
composer require fenguoz/minter-php-bip-44
Using SDK
Get private key by path
Returns a string
Example
- Get private key by path and seed
use BIP\BIP44; $seed = 'a95e6ca6908e9d6051479c0083e62d2dd3067878091455d52fef322032bf888ebaa6482a343b8c6b2e6d051c3a1701228358d27af550e65a858ce612c4713933'; $HDKey = BIP44::fromMasterSeed($seed)->derive("m/44'/60'/0'/0/0"); echo $HDKey->privateKey; // 2e1c993e0b05e1facc80d405fba18c9fa263d89e4caffe342417c40c7c46742f
- Get extended keys by path and seed
use BIP\BIP44; $seed = 'a95e6ca6908e9d6051479c0083e62d2dd3067878091455d52fef322032bf888ebaa6482a343b8c6b2e6d051c3a1701228358d27af550e65a858ce612c4713933'; $HDKey = BIP44::fromMasterSeed($seed)->derive("m/44'/60'/0'/0"); echo $HDKey->getPublicExtendedKey(); // xpub6Dnoiy4pCzyjYYan4SNvbnKH9pZNHvHKWrMGWD6RnZ7SC4RA57S1csNfYXbCywk27x4cGdwdYFr2cRwa3fGfG9nDV2z7B5njAFNshjzeA2n echo $HDKey->getPrivateExtendedKey(); // xprv9zoTKTXvNdRSL4WJxQqvEeNYbnistTZU9dRfhpgpEDaTKG61Xa7m554BhEZdsQB8y5eK2k5XdZNoRQv9zFD7sN9hnuW28NdsYtC1J8kvsNe
License
The BIP-44 PHP SDK is open-sourced software licensed under the MIT license.