You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/apps/cardano/helpers/protocol_magics.py

16 lines
264 B

MAINNET = 764824073
TESTNET = 1097911063
NAMES = {
MAINNET: "Mainnet",
TESTNET: "Testnet",
}
def is_mainnet(protocol_magic: int) -> bool:
return protocol_magic == MAINNET
def to_ui_string(value: int) -> str:
return NAMES.get(value, "Unknown")