title: Solana blockchain. How can i generate private key?
body: <pre><code>       const solanaWeb3 = require(&quot;@solana/web3.js&quot;);
      const solanatoken = require(&quot;@solana/spl-token&quot;);
      
        var wallet = solanaWeb3.Keypair.generate();
        console.log(&quot;public key...&quot;, wallet.publicKey);
        console.log(&quot;secret key...&quot;, wallet.secretKey);
      
        console.log(&quot;secret key...&quot;, JSON.stringify(wallet.secretKey.toString()));`enter preformatted text here`
  </code></pre>
  <p>I got</p>
  <pre><code>public key... PublicKey {
    _bn: &lt;BN: b5ec974285759f4004555c6890e045a4ce857c6a056895d77dd209c054e76556&gt;
  secret key... &quot;211,55,244,72,160,174,33,152,24,226,97,172,91,91,47,3,148,83,99,188,150,111,153,248,253,237,31,223,194,194,199,0,181,236,151,66,133,117,159,64,4,85,92,104,144,224,69,164,206,133,124,106,5,104,149,215,125,210,9,192,84,231,101,86&quot;
  </code></pre>
  <p>how I can get <code>private key</code>, like</p>
  <blockquote>
  <p>kNykCXNxgePDjFbDWjPNvXQRa8U12Ywc19dFVaQ7tebUj3m7H4sF4KKdJwM7yxxb3rqxchdjezX9Szh8bLcQAjb</p>
  </blockquote>
  <p>for use on the phantom wallet?
  docs: <a href="https://solana-labs.github.io/solana-web3.js/classes/Keypair.html" rel="nofollow noreferrer">https://solana-labs.github.io/solana-web3.js/classes/Keypair.html</a></p>