Hi I have a base58 string for an SPL token address (called a mint in the Solana docs); This is how I generated this string:
const mint = await createMint(
connection,
payer,
payer.publicKey,
payer.publicKey,
9 // We are using 9 to match the CLI decimal default exactly
);
//PublicKey {
// _bn: <BN: f18d4c56c6c9998782580321e8464aea9ffd4452879d5575aa62b856e837c871>>
//}
var mint58 = mint.toBase58();
//HFvDm6RsgU6Hxscw2YHhPMmjRVzTEigW1ma61kB9M79i
How to go the other way around, i.e. get from the mint58 to the public key in the correct data structure?
Thanks