Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
When printing out public and private key through console.log, I only get Unit8Array(32) returned

Learning how to create wallets on Solana. I am running node 16.14.0 and npm 8.3.1 on Windows 10 via bash command line and Visual Studios. Below is the code of my index.js file, but for some reason I am only getting Uint8Array(32) output for the public key, but nothing returns for Uint8Array(64) for the private key to see if my test works. Am I missing libraries that should be installed?

const {
   Connection,
   PublicKey,
   clusterApiUrl,
   Keypair,
   LAMPORTS_PER_SOL
} = require("@solana/web3.js")

const wallet = new Keypair()

const publicKey = wallet._keypair.publicKey
const secretKey = wallet._keypair.secretKey

console.log(publicKey)
console.log(secretKey)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I had to run

sudo apt-get update
sudo apt-get upgrade

I guess there was an issue with node 16.14.0 and/or npm 8.3.1, node 16.14.1 and npm 8.5.0 resolved it.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!