mirror of
https://github.com/hanzodao/api.git
synced 2026-10-30 20:01:09 +00:00
* ENG-744 Added debugging settings, and pretty * Added pretty to dev dependency * fix(prettier): remove ignore file --------- Co-authored-by: John Huang <[email protected]>
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);
|