-
Notifications
You must be signed in to change notification settings - Fork 987
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: added verifications to fallback test
- Loading branch information
1 parent
f0e0c95
commit 9782ba2
Showing
5 changed files
with
158 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from bip_utils import Bip39SeedGenerator, Bip44, Bip44Coins, Bip44Changes | ||
|
||
|
||
def generate_wallet_address(passphrase: str, number: int = 1): | ||
# Derive accounts using the standard MetaMask path | ||
seed_bytes = Bip39SeedGenerator(passphrase).Generate() | ||
bip44_mst_ctx = Bip44.FromSeed(seed_bytes, Bip44Coins.ETHEREUM) | ||
|
||
# Generate first n addresses | ||
expected_addresses = list() | ||
for i in range(number): | ||
bip44_acc_ctx = bip44_mst_ctx.Purpose().Coin().Account(0).Change(Bip44Changes.CHAIN_EXT).AddressIndex(i) | ||
expected_addresses.append(bip44_acc_ctx.PublicKey().ToAddress().lower()) | ||
|
||
return expected_addresses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters