Skip to content

artlu99/poor-richards-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poor Richard's Wallet

The simplest possible EVM wallet. Private keys are generated locally and encrypted at rest.

Dependencies

Usage

1. Install dependencies

bun install

2. Generate new wallet

⚠️ WARNING: Overwrites existing keys!

bun overwrite-with-new-key

3. [OPTIONAL]: Mix key with randomness beacon

⚠️ WARNING: Overwrites existing keys!

Mixes local entropy with web-based entropy to create a new key.

bun overwrite-with-mixed-key

When to use mixing

  • Use mixing if you want to inject external entropy due to concerns about local key generation
  • Skip mixing step when external dependencies are inappropriate

Tradeoffs:

  • Mixing:

    • ✅ Adds external entropy from public randomness beacon
    • ❌ Requires internet connection to fetch beacon
    • ❌ Introduces external dependency
  • Local-only key generation:

    • ✅ Fewer dependencies
    • ✅ Works offline
    • ❌ No external entropy source (relies on OpenSSL's PRNG)

4. View public address

bun view-account

5. Export private key

⚠️ WARNING: Run this in a secure setting only!

bunx dotenvx get PK > secret.key

Important

  • Backup .env.keys: This file is used to decrypt your keys. If lost, funds may be lost.

Inspired by @iammatthias' post.

About

The simplest possible EVM wallet

Topics

Resources

License

Stars

Watchers

Forks

Contributors