-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
latentvector
committed
Sep 4, 2024
1 parent
5bedb69
commit 4415cb4
Showing
12 changed files
with
1,140 additions
and
2,034 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,10 @@ | ||
def is_mnemonic(s: str) -> bool: | ||
import re | ||
# Match 12 or 24 words separated by spaces | ||
return bool(re.match(r'^(\w+ ){11}\w+$', s)) or bool(re.match(r'^(\w+ ){23}\w+$', s)) | ||
|
||
def is_private_key(s: str) -> bool: | ||
import re | ||
# Match a 64-character hexadecimal string | ||
pattern = r'^[0-9a-fA-F]{64}$' | ||
return bool(re.match(pattern, s)) |
Empty file.
Oops, something went wrong.