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

132
Vistas
How can I get account information for an HD wallet on Solana?

I am using solana.web3.js. The connection.getAccountInfo() works fine when I'm not using HD wallets (eg if I use Keypair.fromSeed()) per the Solana Cookbook ).

However I am now using BIP44 HD Wallets to make multiple wallets from a single seed:

const mnemonic =
  (12 word phrase);
const seed = bip39.mnemonicToSeedSync(mnemonic, ""); 
for (let i = 0; i < 10; i++) {
  const path = `m/44'/501'/${i}'/0'`;
  const keypair = Keypair.fromSeed(derivePath(path, seed.toString("hex")).key);
  console.log(`${path} => ${keypair.publicKey.toBase58()}`);
}

When I try to get the account info from the first account (the one with the keyPath m/44'/501'/0'/0':

const account = await connection.getAccountInfo(wallets[0].publicKey);

getAccountInfo() fails with:

Error: Could not find account '(publicKey here)'

How can I get account information for an HD wallet?

about 4 years ago · Juan Pablo Isaza
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