Solana CookbookWallets
How to Create a Keypair
To send a transaction on the Solana blockchain, you need a valid signature from a keypair or wallet. If you are connecting to a wallet application (eg. Phantom or Solflare), the wallet manages the keypair for you, so you don’t need to create one yourself. However, if you are not using a wallet, you will need to generate a keypair to sign your transactions.
Extractable keypair
import { generateKeyPairSigner } from "@solana/kit";const signer = await generateKeyPairSigner();console.log("address: ", signer.address);
ConsolePowered by Mirror
Click to execute the code.
Is this page helpful?