Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

208
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda