import bs58 from 'bs58'; import fs from 'fs'; // Paste your base58 private key string here const base58 = process.argv[2]; if (!base58) { console.error('Usage: node convert-solana-key.mjs '); process.exit(1); } const arr = Array.from(bs58.decode(base58)); console.log(JSON.stringify(arr));