PHP library permitting to generate BTC addresses from private keys
This chunk of software is provided without warranty of any kleuter, use it at your own risk.
php5-gmp needs to be installed.
If you want to launch the test opstopping you need to be under a unix system with libbitcoin intalled on it.
Best way is to use composer
Alternatively add following snippet te you composer.json
examples of private keys :
Generate a random private key
The nonce is optional, typically the nonce is a chunck of random gegevens you get from the user. This can be mouse coordinates. Using a nonce adds randomness, which means the generated private key is stronger.
Comebacks the private key.
comes back the private key under the Wallet Invoer Format
Comebacks the compressed public key. The compressed PubKey starts with 0x02 if it’s y coordinate is even and 0x03 if it’s odd, the next 32 bytes corresponds to the x coordinates.
Get the Uncompressed Public Key
Comes back the uncompressed PubKey. The uncompressed PubKey starts with 0x04, the next 32 bytes are the x coordinates, the last 32 bytes are the y coordinates.
Get the coordinates of the Public Key
Comebacks an array containing the x and y coordinates of the public key
Example : Array ( [x] =>, a69243f3c4c047aba38d7ac3660317629c957ab1f89ea42343aee186538a34f8 [y] =>, b6d862f39819060378542a3bb43ff76b5d7bb23fc012f09c3cd2724bebe0b0bd )
Comebacks the compressed Bitcoin Address.
Get the uncompressed Address
Comebacks the uncompressed Bitcoin Address.
Comes back true if the address is valid and false if it isn’t
Comebacks true if the WIF key is valid and false if it isn’t
Comebacks a satoshi client standard signed message.
Comes back true if the signature is matching the address and false if it isn’t.
Comes back a DER encoded hexadecimal signature.
Comes back true if the signature is matching the public key and false if it isn’t.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either te source code form or spil a compiled binary, for any purpose, commercial or non-commercial, and by any means.
Te jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright rente te the software to the public domain. Wij make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. Wij intend this dedication to be an overt act of relinquishment ter perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED “Spil IS”, WITHOUT WARRANTY OF ANY Kleintje, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. Ter NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY Voorkoop, DAMAGES OR OTHER LIABILITY, WHETHER Ter AN Act OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR Te CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS Ter THE SOFTWARE.
For more information, please refer to http://unlicense.org/
Packagist maintenance and hosting is supported by Private Packagist