mirror of
https://github.com/luxdao/api.git
synced 2026-10-30 19:53:52 +00:00
10 lines
337 B
TypeScript
10 lines
337 B
TypeScript
// useful for generating a wallet for testing
|
|
// save the private key to .env
|
|
import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
|
|
|
|
const privateKey = generatePrivateKey();
|
|
const account = privateKeyToAccount(privateKey);
|
|
|
|
console.log('Private Key:\n', privateKey);
|
|
console.log('Wallet Address:\n', account.address);
|