Files
turbinepb-solana-starter/ts/prereqs/keygen.ts
2023-05-09 21:40:31 +08:00

9 lines
264 B
TypeScript

import { Keypair } from "@solana/web3.js";
//Generate a new keypair
let kp = Keypair.generate()
console.log(`You've generated a new Solana wallet: ${kp.publicKey.toBase58()}
To save your wallet, copy and paste the following into a JSON file:
[${kp.secretKey}]`)