2025-08-24 18:03:20 +00:00
|
|
|
ELECTRUM_VERSION = '4.6.2' # version of the client package
|
2018-07-02 08:18:44 +02:00
|
|
|
|
2025-10-23 17:02:41 +00:00
|
|
|
PROTOCOL_VERSION_MIN = '1.4' # electrum protocol
|
2025-11-03 16:27:56 +00:00
|
|
|
PROTOCOL_VERSION_MAX = '1.6'
|
2016-08-31 13:50:46 +02:00
|
|
|
|
2014-08-13 16:05:43 +02:00
|
|
|
# The hash of the mnemonic seed must begin with this
|
2018-11-28 16:24:18 +01:00
|
|
|
SEED_PREFIX = '01' # Standard wallet
|
|
|
|
|
SEED_PREFIX_SW = '100' # Segwit wallet
|
|
|
|
|
SEED_PREFIX_2FA = '101' # Two-factor authentication
|
|
|
|
|
SEED_PREFIX_2FA_SW = '102' # Two-factor auth, using segwit
|
2017-01-16 09:48:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def seed_prefix(seed_type):
|
|
|
|
|
if seed_type == 'standard':
|
|
|
|
|
return SEED_PREFIX
|
|
|
|
|
elif seed_type == 'segwit':
|
|
|
|
|
return SEED_PREFIX_SW
|
2017-03-11 15:51:00 +01:00
|
|
|
elif seed_type == '2fa':
|
2017-01-16 09:48:38 +01:00
|
|
|
return SEED_PREFIX_2FA
|
2018-11-28 16:24:18 +01:00
|
|
|
elif seed_type == '2fa_segwit':
|
|
|
|
|
return SEED_PREFIX_2FA_SW
|
2024-02-22 11:45:18 +00:00
|
|
|
raise Exception(f"unknown seed_type: {seed_type!r}")
|