I want to create a paper wallet for solana addresses. But how do I generate the address and private key for Solana using javascript? Is there a simple library I can use without all the extra bells and whistles? I just want to generate an address and private key that's it.
-
Did you try looking in the Solana cookbook?– mikemaccana ♦Commented Aug 8, 2022 at 15:47
-
solanacookbook.com/getting-started/…– Patoshi パトシCommented Aug 8, 2022 at 15:48
-
Yes that's it. Did you try solanacookbook.com/references/… ?– mikemaccana ♦Commented Aug 8, 2022 at 15:49
Add a comment
|
1 Answer
You can generate a keypair with the @solana/web3.js library. Per the Solana Cookbook:
import { Keypair } from "@solana/web3.js";
let keypair = Keypair.generate();