PHP code example of folm / folm-ecdsa

1. Go to this page and download the library: Download folm/folm-ecdsa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

folm / folm-ecdsa example snippets


use FolmPHP\FolmECDSA\FolmECDSA;

$folmECDSA->setPrivateKey($k);

$folmECDSA->generateRandomPrivateKey($nonce);

$folmECDSA->getPrivateKey();

$folmECDSA->getWif();

$folmECDSA->getPubKey();

$folmECDSA->getUncompressedPubKey();

$folmECDSA->getPubKeyPoints();

$folmECDSA->getAddress();

$folmECDSA->getUncompressedAddress();

$folmECDSA->validateAddress($address);

$folmECDSA->validateWifKey($wif);

$folmECDSA->signMessage('message');

$folmECDSA->checkSignatureForRawMessage($signedMessage);

$folmECDSA->signHash($hash);

$folmECDSA->checkDerSignature($pubKey, $signature, $hash)