Browse Source

constants: add some more type hints

master
SomberNight 2 years ago
parent
commit
5e08d6e486
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 11
      electrum/constants.py

11
electrum/constants.py

@ -25,6 +25,7 @@
import os
import json
from typing import Sequence, Tuple, Mapping, Type
from .util import inv_dict, all_subclasses
from . import bitcoin
@ -58,6 +59,14 @@ class AbstractNet:
BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELS: int = 0
BIP44_COIN_TYPE: int
LN_REALM_BYTE: int
DEFAULT_PORTS: Mapping[str, str]
DEFAULT_SERVERS: Mapping[str, Mapping[str, str]]
CHECKPOINTS: Sequence[Tuple[str, int]]
LN_DNS_SEEDS: Sequence[str]
XPRV_HEADERS: Mapping[str, int]
XPRV_HEADERS_INV: Mapping[int, str]
XPUB_HEADERS: Mapping[str, int]
XPUB_HEADERS_INV: Mapping[int, str]
@classmethod
def max_checkpoint(cls) -> int:
@ -184,7 +193,7 @@ class BitcoinSignet(BitcoinTestnet):
NETS_LIST = tuple(all_subclasses(AbstractNet))
# don't import net directly, import the module instead (so that net is singleton)
net = BitcoinMainnet
net = BitcoinMainnet # type: Type[AbstractNet]
def set_signet():
global net

Loading…
Cancel
Save