# Use Crypto Utilities
You can create Private Key, Public Key, and Address.
# Private Key
You can create a private key from a seed phrase:
<?php
require_once __DIR__ . '/vendor/autoload.php';
// Necessary import.
use deemru\WavesKit;
// Hide deprecated warnings temporarily.
error_reporting(E_ALL & ~E_DEPRECATED);
// Specify your account's seed phrase.
$seedPhrase = 'PASTE YOUR SEED PHRASE';
/* Specify the network chain ID:
* - Mainnet: 'W'
* - Testnet: 'T'
*/
$network = 'T';
// Initialize the SDK and set the seed.
$wk = new WavesKit($network);
$wk->setSeed($seedPhrase);
// Get the private key from the SDK.
$privateKey = $wk->getPrivateKey();
// Print the results.
echo "Seed Phrase: " . $seedPhrase . PHP_EOL;
echo "Sender's Private Key: " . $privateKey . PHP_EOL; // The private key will be displayed in the encrypted format.
# Public Key
You can create a public key from the seed phrase:
- Generate the private key.
- Place the following code after the private key generation:
// Get the public key. $publicKey = $wk->getPublicKey(); // Print the results. echo "Sender's Public Key: " . $publicKey . PHP_EOL;
# Address
You can create an address from the seed phrase:
Place the following code after the public key generation:
// Get the address. $address = $wk->getAddress(); // Print the results. echo "Sender's Address: " . $address . PHP_EOL;