waves_logo Docs
  • Overview
    Overview
  • How-to Guides
    • Reading Blockchain Data
      Reading Blockchain Data
    • Creating & Broadcasting Transactions
      Creating & Broadcasting Transactions
    • Tokenization
      Tokenization
    • Airdrop
      Airdrop
    • Payments
      Payments
    • Exchange Tokens
      Exchange Tokens
    • Simple Voting
      Simple Voting
    • List as argument
      List as argument
    How-to Guides
  • Waves Smart Contracts
    Waves Smart Contracts
  • dApp
    • Creating & Launching dApp
      Creating & Launching dApp
    dApp
  • Smart Account
    • Creating smart account
      Creating smart account
    • Creating and deploying a script manually
      Creating and deploying a script manually
    • Video tutorials
      • Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
        Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
      • Waves Smart Account with multisignature
        Waves Smart Account with multisignature
      • Waves Smart Account with escrow service
        Waves Smart Account with escrow service
      • Creating multisignature account via Waves IDE tools
        Creating multisignature account via Waves IDE tools
      • Creating multisignature account via Waves Client
        Creating multisignature account via Waves Client
      • Waves console explained
        Waves console explained
      Video tutorials
    Smart Account
  • Smart Asset
    Smart Asset
  • Developer Tools
    • Waves IDE
      Waves IDE
    • Visual Studio Code Extension
      Visual Studio Code Extension
    • Surfboard
      Surfboard
    • Ride REPL
      Ride REPL
    Developer Tools
  • Signer ◆
    Signer ◆
  • Waves API
    • Data Service API
      Data Service API
    • Node REST API
      Node REST API
    • Node gRPC Server
      Node gRPC Server
    • Blockchain Updates
      Blockchain Updates
    Waves API
  • Client Libraries
    • Waves C#
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      Waves C#
    • Gowaves
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      Gowaves
    • WavesJ
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      WavesJ
    • Ts-lib-crypto & waves-transactions
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      Ts-lib-crypto & waves-transactions
    • Waves-PHP
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      Waves-PHP
    • WavesKit
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      WavesKit
    • PyWaves-CE
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      PyWaves-CE
    • Waves-rust
      • Install SDK
        Install SDK
      Waves-rust
    Client Libraries
      • English
      • Русский
      On this page
        • Private Key
        • Public Key
        • Address
      waves_logo Docs

          # 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:

          1. Generate the private key.
          2. 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:

          1. Generate the public key.

          2. 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;
            
          Send Transactions
          Interact With Node
          Send Transactions
          Interact With Node