jack 6 months ago
parent
commit
45de57cefd
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tools/generateWallet.py

+ 12 - 0
tools/generateWallet.py

@@ -0,0 +1,12 @@
+from web3 import Web3
+from eth_account import Account
+from bip44 import Wallet
+
+mnemonic = "enough fatigue alarm good adjust honey bamboo pony hero spy body crisp"
+w = Wallet(mnemonic)
+
+for i in range(20):
+    private_key, address = w.derive_account("eth", i)
+    account = Account.from_key(private_key)
+    print(f"Private Key {i+1}: {private_key.hex()}")
+    print(f"Address {i+1}: {account.address}")