SomberNight
f8180c898c
mnemonic: make_seed: add sanity-check
...
When going through the wizard, this case would previously have errored later in the flow. (for '2fa' at least)
2024-06-10 20:14:22 +00:00
SomberNight
a2d5e31838
mnemonic: rename seed_type() fn
...
Some functions have an argument named "seed_type" in which it was annoying to call the seed_type() fn.
(especially for functions inside the same module)
2024-06-10 20:00:52 +00:00
SomberNight
b95fbbb86f
wizard: fix regression: allow passphrase for some '2fa' seeds
...
fixes https://github.com/spesmilo/electrum/issues/9088
2024-06-10 19:35:56 +00:00
SomberNight
ad95f8ad56
mnemonic: add comments
2024-01-22 03:27:20 +00:00
SomberNight
7007a0c1c9
mnemonic: add type hints
2024-01-22 03:27:17 +00:00
SomberNight
e9475345e4
qml wizard: "confirm seed" screen to normalize whitespaces
...
fixes https://github.com/spesmilo/electrum/issues/8442
2023-05-17 15:19:41 +00:00
SomberNight
373db76ac9
util: kill bh2u
...
no longer useful, and the name is so confusing...
2023-02-17 11:43:11 +00:00
SomberNight
9f08293c0e
mnemonic: make sure newly generated seeds are not valid as bip39
2021-04-08 16:24:10 +02:00
Benoit Verret
f731c38293
Minor style changes
2021-03-21 00:36:23 -04:00
SomberNight
d1302d3384
mnemonic: tighten seed_type check for old "2fa" type seeds
...
Seeds in the set difference could already not be restored: they raised
an exception in the wizard; now these are not recognised as valid seeds
anymore (so e.g. OK button in wizard will be disabled).
Also see comments in code.
2020-12-10 14:36:31 +01:00
SomberNight
933d8861ce
mnemonic.make_seed: de-duplicate num_bits default magic number
2020-12-08 10:00:34 +01:00
SomberNight
a0b096dcb2
mnemonic: implement Wordlist class
...
Wordlist subclasses 'tuple' so it can be transparently used.
'in' and '.index()' are fast.
Use Wordlist in bip39_is_checksum_valid, which makes that faster.
2020-02-29 00:20:11 +01:00
SomberNight
004acb906d
ecc: abstract away some usage of python-ecdsa: randrange
2020-02-11 16:41:45 +01:00
SomberNight
6e3875ceab
fix qt seed dialog (follow-up af86c7e3fd)
2019-11-15 23:50:05 +01:00
Manuel Barkhau
af86c7e3fd
fix: cache wordlists
2019-11-14 18:57:18 +00:00
Manuel Barkhau
b3f913340c
make Mnemonic.mnemonic_decode faster
...
list.index(word) is O(n)
dict[word] is O(log(n))
This makes a difference for Mnemonic.make_seed which
calls self.mnemonic_decode repeatedly.
2019-11-14 18:54:14 +00:00
SomberNight
1c75d939d9
commands: change API of "make_seed" and "create" commands
...
instead of "segwit" boolean, take a "seed_type" optional arg
default seed_type to "segwit"
previously these commands created legacy seeds by defalt
2019-08-09 22:02:01 +02:00
SomberNight
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
SomberNight
85a7aa291e
bip32: refactor whole module. clean-up.
2019-02-22 18:50:24 +01:00
SomberNight
b39c51adf7
mv "electrum seed" stuff from bitcoin.py to mnemonic.py
2019-02-22 18:01:54 +01:00
SomberNight
5a1778b7fe
start using util.resource_path
2019-02-04 20:27:03 +01:00
SomberNight
36f64d1ad9
bitcoin/ecc: some more type annotations
2018-11-18 22:07:27 +01:00
ThomasV
cd5152a02d
Merge pull request #4765 from SomberNight/cli_restore_cmd
...
cli/rpc: 'restore' and 'create' commands are now available via RPC
2018-10-12 10:48:09 +02:00
SomberNight
1233309ebd
cli/rpc: 'restore' and 'create' commands are now available via RPC
2018-10-11 20:57:15 +02:00
SomberNight
1ef804c652
small import clean-up
2018-10-11 16:30:30 +02:00
Janus
1e715113ab
remove pbkdf2 dependency, use stdlib instead
2018-07-18 14:34:59 +02:00
Janus
097ac144d9
file reorganization with top-level module
2018-07-13 14:01:37 +02:00