diff --git a/common/defs/README.md b/common/defs/README.md index 9e35918a4..7c9b43144 100644 --- a/common/defs/README.md +++ b/common/defs/README.md @@ -86,7 +86,7 @@ If you want to add a **wallet link**, modify the file [`wallets.json`](wallets.j # Support Information We keep track of support status of each built-in coin over our devices. That is -`trezor1` for Trezor One, `trezor2` for Trezor T, `connect` for [Connect](https://github.com/trezor/connect) +`T1B1` for Trezor One, `T2T1` for Trezor T, `T2B1` for Trezor R, `connect` for [Connect](https://github.com/trezor/connect) and `suite` for [Trezor Suite](https://suite.trezor.io/). In further description, the word "device" applies to Connect and Suite as well. diff --git a/common/defs/support.json b/common/defs/support.json index 381267c56..b049e6275 100644 --- a/common/defs/support.json +++ b/common/defs/support.json @@ -1,88 +1,5 @@ { - "connect": { - "supported": { - "bitcoin:ACM": true, - "bitcoin:AXE": true, - "bitcoin:BCH": true, - "bitcoin:BTC": true, - "bitcoin:BTCP": true, - "bitcoin:BTG": true, - "bitcoin:BTX": true, - "bitcoin:DASH": true, - "bitcoin:DCR": true, - "bitcoin:DGB": true, - "bitcoin:DOGE": true, - "bitcoin:FIRO": true, - "bitcoin:FJC": true, - "bitcoin:FLO": true, - "bitcoin:FTC": true, - "bitcoin:KMD": true, - "bitcoin:KOTO": true, - "bitcoin:LTC": true, - "bitcoin:MONA": true, - "bitcoin:NMC": true, - "bitcoin:PPC": true, - "bitcoin:REGTEST": true, - "bitcoin:RITO": true, - "bitcoin:RVN": true, - "bitcoin:SYS": true, - "bitcoin:TAZ": true, - "bitcoin:TBCH": true, - "bitcoin:TBTG": true, - "bitcoin:TDCR": true, - "bitcoin:TEST": true, - "bitcoin:UNO": true, - "bitcoin:VIA": true, - "bitcoin:VTC": true, - "bitcoin:XPM": true, - "bitcoin:XRC": true, - "bitcoin:XSN": true, - "bitcoin:XVG": true, - "bitcoin:ZCR": true, - "bitcoin:ZEC": true, - "bitcoin:tDASH": true, - "bitcoin:tFIRO": true, - "bitcoin:tLTC": true, - "bitcoin:tPPC": true, - "eth:tETH:3": true, - "misc:ADA": true, - "misc:BNB": true, - "misc:EOS": true, - "misc:XLM": true, - "misc:XRP": true, - "misc:XTZ": true, - "misc:tADA": true, - "misc:tXRP": true, - "nem:BREEZE": true, - "nem:DIM": true, - "nem:DIMTOK": true, - "nem:PAC:CHS": true, - "nem:PAC:HRT": true, - "nem:XEM": true - }, - "unsupported": {} - }, - "suite": { - "supported": { - "bitcoin:BCH": true, - "bitcoin:BTC": true, - "bitcoin:BTG": true, - "bitcoin:DASH": true, - "bitcoin:DGB": true, - "bitcoin:DOGE": true, - "bitcoin:LTC": true, - "bitcoin:NMC": true, - "bitcoin:REGTEST": true, - "bitcoin:TEST": true, - "bitcoin:VTC": true, - "bitcoin:ZEC": true, - "eth:tETH:3": true, - "misc:XRP": true, - "misc:tXRP": true - }, - "unsupported": {} - }, - "trezor1": { + "T1B1": { "supported": { "bitcoin:ACM": "1.7.2", "bitcoin:AXE": "1.7.3", @@ -195,7 +112,120 @@ "misc:tXRP": "not implemented" } }, - "trezor2": { + "T2B1": { + "supported": { + "bitcoin:ACM": "2.6.1", + "bitcoin:AXE": "2.6.1", + "bitcoin:BCH": "2.6.1", + "bitcoin:BTC": "2.6.1", + "bitcoin:BTCP": "2.6.1", + "bitcoin:BTX": "2.6.1", + "bitcoin:CPU": "2.6.1", + "bitcoin:CRW": "2.6.1", + "bitcoin:DOGE": "2.6.1", + "bitcoin:ELEMENTS": "2.6.1", + "bitcoin:FIRO": "2.6.1", + "bitcoin:FJC": "2.6.1", + "bitcoin:FLO": "2.6.1", + "bitcoin:FTC": "2.6.1", + "bitcoin:GRS": "2.6.1", + "bitcoin:KMD": "2.6.1", + "bitcoin:KOTO": "2.6.1", + "bitcoin:LTC": "2.6.1", + "bitcoin:MONA": "2.6.1", + "bitcoin:PPC": "2.6.1", + "bitcoin:QTUM": "2.6.1", + "bitcoin:REGTEST": "2.6.1", + "bitcoin:RITO": "2.6.1", + "bitcoin:RVN": "2.6.1", + "bitcoin:SMART": "2.6.1", + "bitcoin:SYS": "2.6.1", + "bitcoin:TAZ": "2.6.1", + "bitcoin:TBCH": "2.6.1", + "bitcoin:TEST": "2.6.1", + "bitcoin:UNO": "2.6.1", + "bitcoin:VIA": "2.6.1", + "bitcoin:VIPS": "2.6.1", + "bitcoin:XPM": "2.6.1", + "bitcoin:XRC": "2.6.1", + "bitcoin:XSN": "2.6.1", + "bitcoin:XVG": "2.6.1", + "bitcoin:ZCR": "2.6.1", + "bitcoin:ZEC": "2.6.1", + "bitcoin:tFIRO": "2.6.1", + "bitcoin:tGRS": "2.6.1", + "bitcoin:tLTC": "2.6.1", + "bitcoin:tPPC": "2.6.1", + "bitcoin:tQTUM": "2.6.1", + "bitcoin:tRVN": "2.6.1", + "bitcoin:tSMART": "2.6.1", + "erc20:bnb:ATOM": "2.6.1", + "erc20:eth:AAVE": "2.6.1", + "erc20:eth:APE": "2.6.1", + "erc20:eth:AXS": "2.6.1", + "erc20:eth:BUSD": "2.6.1", + "erc20:eth:CHZ": "2.6.1", + "erc20:eth:CRO": "2.6.1", + "erc20:eth:DAI": "2.6.1", + "erc20:eth:FRAX": "2.6.1", + "erc20:eth:LEO": "2.6.1", + "erc20:eth:LINK": "2.6.1", + "erc20:eth:MANA": "2.6.1", + "erc20:eth:MATIC": "2.6.1", + "erc20:eth:OKB": "2.6.1", + "erc20:eth:QNT": "2.6.1", + "erc20:eth:SAND": "2.6.1", + "erc20:eth:SHIB": "2.6.1", + "erc20:eth:STETH": "2.6.1", + "erc20:eth:UNI": "2.6.1", + "erc20:eth:USDC": "2.6.1", + "erc20:eth:USDT": "2.6.1", + "erc20:eth:WBTC": "2.6.1", + "erc20:eth:XCN": "2.6.1", + "erc20:matic:WAVAX": "2.6.1", + "eth:BNB:56": "2.6.1", + "eth:ETC:61": "2.6.1", + "eth:ETH:1": "2.6.1", + "eth:MATIC:137": "2.6.1", + "eth:tETH:3": "2.6.1", + "eth:tETH:4": "2.6.1", + "eth:tETH:5": "2.6.1", + "misc:ADA": "2.6.1", + "misc:BNB": "2.6.1", + "misc:MAID": "2.6.1", + "misc:OMNI": "2.6.1", + "misc:USDT": "2.6.1", + "misc:XLM": "2.6.1", + "misc:XMR": "2.6.1", + "misc:XRP": "2.6.1", + "misc:XTZ": "2.6.1", + "misc:tADA": "2.6.1", + "misc:tXRP": "2.6.1", + "nem:BREEZE": "2.6.1", + "nem:DIM": "2.6.1", + "nem:DIMTOK": "2.6.1", + "nem:PAC:CHS": "2.6.1", + "nem:PAC:HRT": "2.6.1" + }, + "unsupported": { + "bitcoin:BTG": "not for T2B1 (#2793)", + "bitcoin:DASH": "not for T2B1 (#2793)", + "bitcoin:DCR": "not for T2B1 (#2793)", + "bitcoin:DGB": "not for T2B1 (#2793)", + "bitcoin:NMC": "not for T2B1 (#2793)", + "bitcoin:PART": "incompatible fork", + "bitcoin:TBTG": "not for T2B1 (#2793)", + "bitcoin:TDCR": "not for T2B1 (#2793)", + "bitcoin:TRC": "address_type collides with Bitcoin", + "bitcoin:VTC": "not for T2B1 (#2793)", + "bitcoin:tDASH": "not for T2B1 (#2793)", + "bitcoin:tPART": "incompatible fork", + "misc:EOS": "not for T2B1 (#2793)", + "misc:LSK": "Incompatible mainnet hard-fork", + "nem:XEM": "not for T2B1 (#2793)" + } + }, + "T2T1": { "supported": { "bitcoin:ACM": "2.0.10", "bitcoin:AXE": "2.0.11", @@ -307,5 +337,88 @@ "bitcoin:tPART": "incompatible fork", "misc:LSK": "Incompatible mainnet hard-fork" } + }, + "connect": { + "supported": { + "bitcoin:ACM": true, + "bitcoin:AXE": true, + "bitcoin:BCH": true, + "bitcoin:BTC": true, + "bitcoin:BTCP": true, + "bitcoin:BTG": true, + "bitcoin:BTX": true, + "bitcoin:DASH": true, + "bitcoin:DCR": true, + "bitcoin:DGB": true, + "bitcoin:DOGE": true, + "bitcoin:FIRO": true, + "bitcoin:FJC": true, + "bitcoin:FLO": true, + "bitcoin:FTC": true, + "bitcoin:KMD": true, + "bitcoin:KOTO": true, + "bitcoin:LTC": true, + "bitcoin:MONA": true, + "bitcoin:NMC": true, + "bitcoin:PPC": true, + "bitcoin:REGTEST": true, + "bitcoin:RITO": true, + "bitcoin:RVN": true, + "bitcoin:SYS": true, + "bitcoin:TAZ": true, + "bitcoin:TBCH": true, + "bitcoin:TBTG": true, + "bitcoin:TDCR": true, + "bitcoin:TEST": true, + "bitcoin:UNO": true, + "bitcoin:VIA": true, + "bitcoin:VTC": true, + "bitcoin:XPM": true, + "bitcoin:XRC": true, + "bitcoin:XSN": true, + "bitcoin:XVG": true, + "bitcoin:ZCR": true, + "bitcoin:ZEC": true, + "bitcoin:tDASH": true, + "bitcoin:tFIRO": true, + "bitcoin:tLTC": true, + "bitcoin:tPPC": true, + "eth:tETH:3": true, + "misc:ADA": true, + "misc:BNB": true, + "misc:EOS": true, + "misc:XLM": true, + "misc:XRP": true, + "misc:XTZ": true, + "misc:tADA": true, + "misc:tXRP": true, + "nem:BREEZE": true, + "nem:DIM": true, + "nem:DIMTOK": true, + "nem:PAC:CHS": true, + "nem:PAC:HRT": true, + "nem:XEM": true + }, + "unsupported": {} + }, + "suite": { + "supported": { + "bitcoin:BCH": true, + "bitcoin:BTC": true, + "bitcoin:BTG": true, + "bitcoin:DASH": true, + "bitcoin:DGB": true, + "bitcoin:DOGE": true, + "bitcoin:LTC": true, + "bitcoin:NMC": true, + "bitcoin:REGTEST": true, + "bitcoin:TEST": true, + "bitcoin:VTC": true, + "bitcoin:ZEC": true, + "eth:tETH:3": true, + "misc:XRP": true, + "misc:tXRP": true + }, + "unsupported": {} } } diff --git a/common/tools/README.md b/common/tools/README.md index 2aed7c592..b0cf350e4 100644 --- a/common/tools/README.md +++ b/common/tools/README.md @@ -55,7 +55,7 @@ for token in defs.erc20: support_info = coin_info.support_info(defs.misc) for key, support in support_info.values(): - t2_support = support["trezor2"] + t2_support = support["T2T1"] coin_name = dict_by_coin_key[key] if t2_support: print(coin_name, "is supported since version", t2_support) @@ -94,15 +94,15 @@ support statuses at the same time: $ ./support.py show Ontology misc:ONT - Ontology (ONT) * connect : NO - * trezor1 : support info missing - * trezor2 : support info missing + * T1B1 : support info missing + * T2T1 : support info missing * suite : NO -$ ./support.py set misc:ONT trezor1=no -r "not planned on T1" trezor2=2.4.7 +$ ./support.py set misc:ONT T1B1=no -r "not planned on T1" T2T1=2.4.7 misc:ONT - Ontology (ONT) * connect : NO - * trezor1 : NO (reason: not planned on T1) - * trezor2 : 2.4.7 + * T1B1 : NO (reason: not planned on T1) + * T2T1 : 2.4.7 * suite : NO ``` diff --git a/common/tools/coin_info.py b/common/tools/coin_info.py index 1ea7c38c8..0b8e65fba 100755 --- a/common/tools/coin_info.py +++ b/common/tools/coin_info.py @@ -39,15 +39,17 @@ class SupportItemVersion(TypedDict): class SupportData(TypedDict): connect: SupportItemBool suite: SupportItemBool - trezor1: SupportItemVersion - trezor2: SupportItemVersion + t1b1: SupportItemVersion + t2t1: SupportItemVersion + t2b1: SupportItemVersion class SupportInfoItem(TypedDict): connect: bool suite: bool - trezor1: Literal[False] | str - trezor2: Literal[False] | str + t1b1: Literal[False] | str + t2t1: Literal[False] | str + t2b1: Literal[False] | str SupportInfo = Dict[str, SupportInfoItem] @@ -452,7 +454,7 @@ def _load_fido_apps() -> FidoApps: RELEASES_URL = "https://data.trezor.io/firmware/{}/releases.json" MISSING_SUPPORT_MEANS_NO = ("connect", "suite") -VERSIONED_SUPPORT_INFO = ("trezor1", "trezor2") +VERSIONED_SUPPORT_INFO = ("T1B1", "T2T1", "T2B1") def get_support_data() -> SupportData: @@ -461,14 +463,16 @@ def get_support_data() -> SupportData: def latest_releases() -> dict[str, Any]: - """Get latest released firmware versions for Trezor 1 and 2""" + """Get latest released firmware versions for all models""" if not requests: raise RuntimeError("requests library is required for getting release info") latest: dict[str, Any] = {} - for v in ("1", "2"): - releases = requests.get(RELEASES_URL.format(v)).json() - latest["trezor" + v] = max(tuple(r["version"]) for r in releases) + for model in VERSIONED_SUPPORT_INFO: + # TODO: support new UPPERCASE model names in RELEASES_URL + url_model = model.lower() # need to be e.g. t1b1 for now + releases = requests.get(RELEASES_URL.format(url_model)).json() + latest[model] = max(tuple(r["version"]) for r in releases) return latest @@ -505,7 +509,7 @@ def support_info(coins: Iterable[Coin] | CoinsInfo | dict[str, Coin]) -> Support Takes a collection of coins and generates a support-info entry for each. The support-info is a dict with keys based on `support.json` keys. - These are usually: "trezor1", "trezor2", "connect" and "suite". + These are usually: "T1B1", "T2T1", "T2B1", "connect" and "suite". The `coins` argument can be a `CoinsInfo` object, a list or a dict of coin items. diff --git a/common/tools/cointool.py b/common/tools/cointool.py index e38aad759..a9ba0d241 100755 --- a/common/tools/cointool.py +++ b/common/tools/cointool.py @@ -672,7 +672,7 @@ def check(backend: bool, icons: bool) -> None: type_choice = click.Choice(["bitcoin", "eth", "erc20", "nem", "misc"]) -device_choice = click.Choice(["connect", "suite", "trezor1", "trezor2"]) +device_choice = click.Choice(["connect", "suite", "T1B1", "T2T1", "T2B1"]) @cli.command() @@ -689,8 +689,8 @@ device_choice = click.Choice(["connect", "suite", "trezor1", "trezor2"]) @click.option("-f", "--filter", metavar="FIELD=FILTER", multiple=True, help="Include only coins that match a filter (-f taproot=true -f maintainer='*stick*')") @click.option("-F", "--filter-exclude", metavar="FIELD=FILTER", multiple=True, help="Exclude coins that match a filter (-F 'blockbook=[]' -F 'slip44=*')") @click.option("-t", "--exclude-tokens", is_flag=True, help="Exclude ERC20 tokens. Equivalent to '-E erc20'") -@click.option("-d", "--device-include", metavar="NAME", multiple=True, type=device_choice, help="Only include coins supported on these given devices (-d connect -d trezor1)") -@click.option("-D", "--device-exclude", metavar="NAME", multiple=True, type=device_choice, help="Only include coins not supported on these given devices (-D suite -D trezor2)") +@click.option("-d", "--device-include", metavar="NAME", multiple=True, type=device_choice, help="Only include coins supported on these given devices (-d connect -d T1B1)") +@click.option("-D", "--device-exclude", metavar="NAME", multiple=True, type=device_choice, help="Only include coins not supported on these given devices (-D suite -D T2T1)") # fmt: on def dump( outfile: TextIO, @@ -739,7 +739,7 @@ def dump( Also devices can be used as filters. For example to find out which coins are supported in Suite and connect but not on Trezor 1, it is possible to say - '-d suite -d connect -D trezor1'. + '-d suite -d connect -D T1B1'. Includes even the wallet data, unless turned off by '-W'. These can be filtered by using '-f', for example `-f 'wallet=*exodus*'` (* are necessary) diff --git a/common/tools/support.py b/common/tools/support.py index 332dbc69c..01605f0c4 100755 --- a/common/tools/support.py +++ b/common/tools/support.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +from __future__ import annotations + import json import os import re @@ -225,8 +227,7 @@ def check(ignore_missing): @cli.command() # fmt: off -@click.option("--v1", help="Version for T1 release (default: guess from latest)") -@click.option("--v2", help="Version for TT release (default: guess from latest)") +@click.option("-r", '--releases', multiple=True, type=str, help='Key-value pairs of model and version. E.g. "T2B1=2.6.1"') @click.option("-n", "--dry-run", is_flag=True, help="Do not write changes") @click.option("-f", "--force", is_flag=True, help="Proceed even with bad version/device info") @click.option("--skip-testnets/--no-skip-testnets", default=True, help="Automatically exclude testnets") @@ -234,11 +235,10 @@ def check(ignore_missing): @click.pass_context def release( ctx, - v1, - v2, - dry_run, - force, - skip_testnets, + releases: list[str], + dry_run: bool, + force: bool, + skip_testnets: bool, ): """Release a new Trezor firmware. @@ -248,27 +248,36 @@ def release( The tool will ask you to confirm each added coin. """ - latest_releases = coin_info.latest_releases() + # Transforming the user release input into a dict and validating + user_releases_dict = { + key: val for key, val in (release.split("=") for release in releases) + } + for key in user_releases_dict: + if key not in coin_info.VERSIONED_SUPPORT_INFO: + raise click.ClickException( + f"Unknown device: {key} - allowed are: {coin_info.VERSIONED_SUPPORT_INFO}" + ) - def bump_version(version_tuple): + def bump_version(version_tuple: tuple[int]) -> str: version_list = list(version_tuple) version_list[-1] += 1 return ".".join(str(n) for n in version_list) - # guess `version` if not given - if not v1: - v1 = bump_version(latest_releases["trezor1"]) - if not v2: - v2 = bump_version(latest_releases["trezor2"]) + latest_releases = coin_info.latest_releases() - versions = {"trezor1": v1, "trezor2": v2} + # Take version either from user or guess it from latest releases info + device_release_version: dict[str, str] = {} + for device in coin_info.VERSIONED_SUPPORT_INFO: + if device in user_releases_dict: + device_release_version[device] = user_releases_dict[device] + else: + device_release_version[device] = bump_version(latest_releases[device]) - for number in "1", "2": - device = f"trezor{number}" - version = versions[device] - if not force and not version.startswith(number + "."): + for device, version in device_release_version.items(): + version_starting_num = device[1] # "T1B1" -> "1", "T2B1" -> "2" + if not force and not version.startswith(version_starting_num + "."): raise click.ClickException( - f"Device trezor{device} should not be version {version}. " + f"Device {device} should not be version {version}. " "Use --force to proceed anyway." ) @@ -295,7 +304,7 @@ def release( if not unsupport_reason: return - for device, version in versions.items(): + for device, version in device_release_version.items(): if add: support_setdefault(device, coin["key"], version) else: @@ -311,7 +320,7 @@ def release( for coin in missing_list: if skip_testnets and coin["is_testnet"]: - for device, version in versions.items(): + for device, version in device_release_version.items(): support_setdefault(device, coin["key"], False, "(AUTO) exclude testnet") else: maybe_add(coin) @@ -346,13 +355,13 @@ def set_support_value(key, entries, reason): """Set a support info variable. Examples: - support.py set coin:BTC trezor1=1.10.5 trezor2=2.4.7 suite=yes connect=no - support.py set coin:LTC trezor1=yes connect= + support.py set coin:BTC T1B1=1.10.5 T2T1=2.4.7 suite=yes connect=no + support.py set coin:LTC T1B1=yes connect= Setting a variable to "yes", "true" or "1" sets support to true. Setting a variable to "no", "false" or "0" sets support to false. - (or null, in case of trezor1/2) - Setting variable to empty ("trezor1=") will set to null, or clear the entry. + (or null, in case of T1B1/T2T1) + Setting variable to empty ("T1B1=") will set to null, or clear the entry. Setting a variable to a particular version string (e.g., "2.4.7") will set that particular version. """ diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 98bbfdc61..55f33fd4e 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -70,8 +70,8 @@ CPPDEFINES_MOD += [ ('USE_ETHEREUM', '1' if EVERYTHING else '0'), ('USE_MONERO', '1' if EVERYTHING else '0'), ('USE_CARDANO', '1' if EVERYTHING else '0'), - ('USE_NEM', '1' if EVERYTHING else '0'), - ('USE_EOS', '1' if EVERYTHING else '0'), + ('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL != "R") else '0'), + ('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL != "R") else '0'), ] SOURCE_MOD += [ 'embed/extmod/trezorobj.c', @@ -601,9 +601,10 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ethereum/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ethereum*.py')) @@ -614,9 +615,10 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Monero*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py')) @@ -632,7 +634,8 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/webauthn/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/bitcoinlike.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/zcash_v4.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Zcash*.py')) diff --git a/core/SConscript.unix b/core/SConscript.unix index 2ca6b266f..e3d9f329e 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -75,8 +75,8 @@ CPPDEFINES_MOD += [ ('USE_ETHEREUM', '1' if EVERYTHING else '0'), ('USE_MONERO', '1' if EVERYTHING else '0'), ('USE_CARDANO', '1' if EVERYTHING else '0'), - ('USE_NEM', '1' if EVERYTHING else '0'), - ('USE_EOS', '1' if EVERYTHING else '0'), + ('USE_NEM', '1' if (EVERYTHING and TREZOR_MODEL != "R") else '0'), + ('USE_EOS', '1' if (EVERYTHING and TREZOR_MODEL != "R") else '0'), ] SOURCE_MOD += [ 'embed/extmod/trezorobj.c', @@ -684,9 +684,10 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/cardano/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Cardano*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/eos/*/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Eos*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ethereum/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ethereum*.py')) @@ -697,9 +698,10 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/DebugMonero*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Monero*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py')) @@ -715,7 +717,8 @@ if FROZEN: SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/webauthn/*.py')) - SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py')) + if TREZOR_MODEL != "R": + SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/decred.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/bitcoinlike.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/bitcoin/sign_tx/zcash_v4.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Zcash*.py')) diff --git a/core/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h b/core/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h index c946ea380..afae08650 100644 --- a/core/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h +++ b/core/embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h @@ -358,6 +358,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_trezorcrypto_HDNode_address_obj, #if !BITCOIN_ONLY +#if USE_NEM /// def nem_address(self, network: int) -> str: /// """ /// Compute a NEM address string from the HD node. @@ -425,6 +426,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN( mod_trezorcrypto_HDNode_nem_encrypt_obj, 5, 5, mod_trezorcrypto_HDNode_nem_encrypt); +#endif + /// def ethereum_pubkeyhash(self) -> bytes: /// """ /// Compute an Ethereum pubkeyhash (aka address) from the HD node. @@ -484,10 +487,12 @@ STATIC const mp_rom_map_elem_t mod_trezorcrypto_HDNode_locals_dict_table[] = { {MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&mod_trezorcrypto_HDNode_address_obj)}, #if !BITCOIN_ONLY +#if USE_NEM {MP_ROM_QSTR(MP_QSTR_nem_address), MP_ROM_PTR(&mod_trezorcrypto_HDNode_nem_address_obj)}, {MP_ROM_QSTR(MP_QSTR_nem_encrypt), MP_ROM_PTR(&mod_trezorcrypto_HDNode_nem_encrypt_obj)}, +#endif {MP_ROM_QSTR(MP_QSTR_ethereum_pubkeyhash), MP_ROM_PTR(&mod_trezorcrypto_HDNode_ethereum_pubkeyhash_obj)}, #endif diff --git a/core/site_scons/site_tools/micropython/__init__.py b/core/site_scons/site_tools/micropython/__init__.py index 16e27359c..d2fdd97fa 100644 --- a/core/site_scons/site_tools/micropython/__init__.py +++ b/core/site_scons/site_tools/micropython/__init__.py @@ -36,11 +36,13 @@ def generate(env): # replace "utils.BITCOIN_ONLY" with literal constant (True/False) # so the compiler can optimize out the things we don't want btc_only = env["bitcoin_only"] == "1" + is_t2b1 = env["TREZOR_MODEL"] == "R" backlight = env["backlight"] optiga = env["optiga"] interim = f"{target[:-4]}.i" # replace .mpy with .i sed_scripts = " ".join( [ + rf"-e 's/utils\.MODEL_IS_T2B1/{is_t2b1}/g'", rf"-e 's/utils\.BITCOIN_ONLY/{btc_only}/g'", rf"-e 's/utils\.USE_BACKLIGHT/{backlight}/g'", rf"-e 's/utils\.USE_OPTIGA/{optiga}/g'", diff --git a/core/src/apps/base.py b/core/src/apps/base.py index ef513d613..eee7f0ead 100644 --- a/core/src/apps/base.py +++ b/core/src/apps/base.py @@ -87,10 +87,8 @@ def get_features() -> Features: Capability.Binance, Capability.Cardano, Capability.Crypto, - Capability.EOS, Capability.Ethereum, Capability.Monero, - Capability.NEM, Capability.Ripple, Capability.Stellar, Capability.Tezos, @@ -100,6 +98,15 @@ def get_features() -> Features: Capability.PassphraseEntry, ] + # We do not support some currencies on T2B1 + if not utils.MODEL_IS_T2B1: + f.capabilities.extend( + [ + Capability.NEM, + Capability.EOS, + ] + ) + # Only some models are capable of SD card if utils.USE_SD_CARD: from trezor import sdcard diff --git a/core/src/apps/bitcoin/sign_tx/__init__.py b/core/src/apps/bitcoin/sign_tx/__init__.py index e6bd380e4..ac8c8803d 100644 --- a/core/src/apps/bitcoin/sign_tx/__init__.py +++ b/core/src/apps/bitcoin/sign_tx/__init__.py @@ -4,11 +4,6 @@ from trezor import utils from ..keychain import with_keychain -if not utils.BITCOIN_ONLY: - from apps.zcash.signer import Zcash - - from . import bitcoinlike, decred, zcash_v4 - if TYPE_CHECKING: from typing import Protocol @@ -74,13 +69,21 @@ async def sign_tx( signer_class: type[SignerClass] = bitcoin.Bitcoin else: if coin.decred: + from . import decred + signer_class = decred.Decred elif coin.overwintered: if msg.version == 5: + from apps.zcash.signer import Zcash + signer_class = Zcash else: + from . import zcash_v4 + signer_class = zcash_v4.ZcashV4 else: + from . import bitcoinlike + signer_class = bitcoinlike.Bitcoinlike signer = signer_class(msg, keychain, coin, approver).signer() diff --git a/core/src/apps/common/coininfo.py b/core/src/apps/common/coininfo.py index 8c47c4db2..8fa146f6b 100644 --- a/core/src/apps/common/coininfo.py +++ b/core/src/apps/common/coininfo.py @@ -94,142 +94,26 @@ class CoinInfo: # fmt: off def by_name(name: str) -> CoinInfo: - if name == "Bitcoin": - return CoinInfo( - name, # coin_name - "BTC", # coin_shortcut - 8, # decimals - 0, # address_type - 5, # address_type_p2sh - 2000000, # maxfee_kb - "Bitcoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0295b43f, # xpub_magic_multisig_segwit_p2sh - 0x02aa7ed3, # xpub_magic_multisig_segwit_native - "bc", # bech32_prefix - None, # cashaddr_prefix - 0, # slip44 - True, # segwit - True, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Regtest": - return CoinInfo( - name, # coin_name - "REGTEST", # coin_shortcut - 8, # decimals - 111, # address_type - 196, # address_type_p2sh - 10000000, # maxfee_kb - "Bitcoin Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x024289ef, # xpub_magic_multisig_segwit_p2sh - 0x02575483, # xpub_magic_multisig_segwit_native - "bcrt", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - True, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Testnet": - return CoinInfo( - name, # coin_name - "TEST", # coin_shortcut - 8, # decimals - 111, # address_type - 196, # address_type_p2sh - 10000000, # maxfee_kb - "Bitcoin Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x024289ef, # xpub_magic_multisig_segwit_p2sh - 0x02575483, # xpub_magic_multisig_segwit_native - "tb", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - True, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if not utils.BITCOIN_ONLY: - if name == "Actinium": + if utils.MODEL_IS_T2B1: + if name == "Bitcoin": return CoinInfo( name, # coin_name - "ACM", # coin_shortcut + "BTC", # coin_shortcut 8, # decimals - 53, # address_type - 55, # address_type_p2sh - 320000000000, # maxfee_kb - "Actinium Signed Message:\n", # signed_message_header + 0, # address_type + 5, # address_type_p2sh + 2000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header 0x0488b21e, # xpub_magic 0x049d7cb2, # xpub_magic_segwit_p2sh 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "acm", # bech32_prefix + 0x0295b43f, # xpub_magic_multisig_segwit_p2sh + 0x02aa7ed3, # xpub_magic_multisig_segwit_native + "bc", # bech32_prefix None, # cashaddr_prefix - 228, # slip44 + 0, # slip44 True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Axe": - return CoinInfo( - name, # coin_name - "AXE", # coin_shortcut - 8, # decimals - 55, # address_type - 16, # address_type_p2sh - 21000000000, # maxfee_kb - "DarkCoin Signed Message:\n", # signed_message_header - 0x02fe52cc, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 4242, # slip44 - False, # segwit - False, # taproot + True, # taproot None, # fork_id False, # force_bip143 False, # decred @@ -240,228 +124,25 @@ def by_name(name: str) -> CoinInfo: False, # overwintered None, # confidential_assets ) - if name == "Bcash": - return CoinInfo( - name, # coin_name - "BCH", # coin_shortcut - 8, # decimals - 0, # address_type - 5, # address_type_p2sh - 14000000, # maxfee_kb - "Bitcoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - "bitcoincash", # cashaddr_prefix - 145, # slip44 - False, # segwit - False, # taproot - 0, # fork_id - True, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Bcash Testnet": + if name == "Regtest": return CoinInfo( name, # coin_name - "TBCH", # coin_shortcut + "REGTEST", # coin_shortcut 8, # decimals 111, # address_type 196, # address_type_p2sh 10000000, # maxfee_kb "Bitcoin Signed Message:\n", # signed_message_header 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - "bchtest", # cashaddr_prefix - 1, # slip44 - False, # segwit - False, # taproot - 0, # fork_id - True, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Bgold": - return CoinInfo( - name, # coin_name - "BTG", # coin_shortcut - 8, # decimals - 38, # address_type - 23, # address_type_p2sh - 380000000, # maxfee_kb - "Bitcoin Gold Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "btg", # bech32_prefix - None, # cashaddr_prefix - 156, # slip44 - True, # segwit - False, # taproot - 79, # fork_id - True, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Bgold Testnet": - return CoinInfo( - name, # coin_name - "TBTG", # coin_shortcut - 8, # decimals - 111, # address_type - 196, # address_type_p2sh - 500000, # maxfee_kb - "Bitcoin Gold Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic 0x044a5262, # xpub_magic_segwit_p2sh 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "tbtg", # bech32_prefix + 0x024289ef, # xpub_magic_multisig_segwit_p2sh + 0x02575483, # xpub_magic_multisig_segwit_native + "bcrt", # bech32_prefix None, # cashaddr_prefix 1, # slip44 True, # segwit - False, # taproot - 79, # fork_id - True, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Bprivate": - return CoinInfo( - name, # coin_name - "BTCP", # coin_shortcut - 8, # decimals - 4901, # address_type - 5039, # address_type_p2sh - 32000000000, # maxfee_kb - "BitcoinPrivate Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 183, # slip44 - False, # segwit - False, # taproot - 42, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Bitcore": - return CoinInfo( - name, # coin_name - "BTX", # coin_shortcut - 8, # decimals - 3, # address_type - 125, # address_type_p2sh - 14000000000, # maxfee_kb - "BitCore Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "btx", # bech32_prefix - None, # cashaddr_prefix - 160, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "CPUchain": - return CoinInfo( - name, # coin_name - "CPU", # coin_shortcut - 8, # decimals - 28, # address_type - 30, # address_type_p2sh - 8700000000000, # maxfee_kb - "CPUchain Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "cpu", # bech32_prefix - None, # cashaddr_prefix - 363, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Crown": - return CoinInfo( - name, # coin_name - "CRW", # coin_shortcut - 8, # decimals - 95495, # address_type - 95473, # address_type_p2sh - 52000000000, # maxfee_kb - "Crown Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 72, # slip44 - False, # segwit - False, # taproot + True, # taproot None, # fork_id False, # force_bip143 False, # decred @@ -472,170 +153,1275 @@ def by_name(name: str) -> CoinInfo: False, # overwintered None, # confidential_assets ) - if name == "Dash": - return CoinInfo( - name, # coin_name - "DASH", # coin_shortcut - 8, # decimals - 76, # address_type - 16, # address_type_p2sh - 45000000, # maxfee_kb - "DarkCoin Signed Message:\n", # signed_message_header - 0x02fe52cc, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 5, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Dash Testnet": + if name == "Testnet": return CoinInfo( name, # coin_name - "tDASH", # coin_shortcut + "TEST", # coin_shortcut 8, # decimals - 140, # address_type - 19, # address_type_p2sh - 100000, # maxfee_kb - "DarkCoin Signed Message:\n", # signed_message_header + 111, # address_type + 196, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x024289ef, # xpub_magic_multisig_segwit_p2sh + 0x02575483, # xpub_magic_multisig_segwit_native + "tb", # bech32_prefix None, # cashaddr_prefix 1, # slip44 - False, # segwit - False, # taproot + True, # segwit + True, # taproot None, # fork_id False, # force_bip143 False, # decred False, # negative_fee 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Decred": - return CoinInfo( - name, # coin_name - "DCR", # coin_shortcut - 8, # decimals - 1855, # address_type - 1818, # address_type_p2sh - 220000000, # maxfee_kb - "Decred Signed Message:\n", # signed_message_header - 0x02fda926, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 42, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - True, # decred - False, # negative_fee - 'secp256k1-decred', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Decred Testnet": - return CoinInfo( - name, # coin_name - "TDCR", # coin_shortcut - 8, # decimals - 3873, # address_type - 3836, # address_type_p2sh - 10000000, # maxfee_kb - "Decred Signed Message:\n", # signed_message_header - 0x043587d1, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - True, # decred - False, # negative_fee - 'secp256k1-decred', # curve_name False, # extra_data False, # timestamp False, # overwintered None, # confidential_assets ) - if name == "DigiByte": + if not utils.BITCOIN_ONLY: + if name == "Actinium": + return CoinInfo( + name, # coin_name + "ACM", # coin_shortcut + 8, # decimals + 53, # address_type + 55, # address_type_p2sh + 320000000000, # maxfee_kb + "Actinium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "acm", # bech32_prefix + None, # cashaddr_prefix + 228, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Axe": + return CoinInfo( + name, # coin_name + "AXE", # coin_shortcut + 8, # decimals + 55, # address_type + 16, # address_type_p2sh + 21000000000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x02fe52cc, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 4242, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bcash": + return CoinInfo( + name, # coin_name + "BCH", # coin_shortcut + 8, # decimals + 0, # address_type + 5, # address_type_p2sh + 14000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + "bitcoincash", # cashaddr_prefix + 145, # slip44 + False, # segwit + False, # taproot + 0, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bcash Testnet": + return CoinInfo( + name, # coin_name + "TBCH", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + "bchtest", # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + 0, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bprivate": + return CoinInfo( + name, # coin_name + "BTCP", # coin_shortcut + 8, # decimals + 4901, # address_type + 5039, # address_type_p2sh + 32000000000, # maxfee_kb + "BitcoinPrivate Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 183, # slip44 + False, # segwit + False, # taproot + 42, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bitcore": + return CoinInfo( + name, # coin_name + "BTX", # coin_shortcut + 8, # decimals + 3, # address_type + 125, # address_type_p2sh + 14000000000, # maxfee_kb + "BitCore Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "btx", # bech32_prefix + None, # cashaddr_prefix + 160, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "CPUchain": + return CoinInfo( + name, # coin_name + "CPU", # coin_shortcut + 8, # decimals + 28, # address_type + 30, # address_type_p2sh + 8700000000000, # maxfee_kb + "CPUchain Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "cpu", # bech32_prefix + None, # cashaddr_prefix + 363, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Crown": + return CoinInfo( + name, # coin_name + "CRW", # coin_shortcut + 8, # decimals + 95495, # address_type + 95473, # address_type_p2sh + 52000000000, # maxfee_kb + "Crown Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 72, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Dogecoin": + return CoinInfo( + name, # coin_name + "DOGE", # coin_shortcut + 8, # decimals + 30, # address_type + 22, # address_type_p2sh + 1200000000000, # maxfee_kb + "Dogecoin Signed Message:\n", # signed_message_header + 0x02facafd, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 3, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Elements": + return CoinInfo( + name, # coin_name + "ELEMENTS", # coin_shortcut + 8, # decimals + 235, # address_type + 75, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "ert", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + {'address_prefix': 4, 'blech32_prefix': 'el'}, # confidential_assets + ) + if name == "Feathercoin": + return CoinInfo( + name, # coin_name + "FTC", # coin_shortcut + 8, # decimals + 14, # address_type + 5, # address_type_p2sh + 390000000000, # maxfee_kb + "Feathercoin Signed Message:\n", # signed_message_header + 0x0488bc26, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488bc26, # xpub_magic_multisig_segwit_p2sh + 0x0488bc26, # xpub_magic_multisig_segwit_native + "fc", # bech32_prefix + None, # cashaddr_prefix + 8, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Firo": + return CoinInfo( + name, # coin_name + "FIRO", # coin_shortcut + 8, # decimals + 82, # address_type + 7, # address_type_p2sh + 640000000, # maxfee_kb + "Zcoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 136, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Firo Testnet": + return CoinInfo( + name, # coin_name + "tFIRO", # coin_shortcut + 8, # decimals + 65, # address_type + 178, # address_type_p2sh + 1000000, # maxfee_kb + "Zcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Florincoin": + return CoinInfo( + name, # coin_name + "FLO", # coin_shortcut + 8, # decimals + 35, # address_type + 94, # address_type_p2sh + 78000000000, # maxfee_kb + "Florincoin Signed Message:\n", # signed_message_header + 0x00174921, # xpub_magic + 0x01b26ef6, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x00174921, # xpub_magic_multisig_segwit_p2sh + 0x00174921, # xpub_magic_multisig_segwit_native + "flo", # bech32_prefix + None, # cashaddr_prefix + 216, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Fujicoin": + return CoinInfo( + name, # coin_name + "FJC", # coin_shortcut + 8, # decimals + 36, # address_type + 16, # address_type_p2sh + 35000000000000, # maxfee_kb + "FujiCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0295b43f, # xpub_magic_multisig_segwit_p2sh + 0x02aa7ed3, # xpub_magic_multisig_segwit_native + "fc", # bech32_prefix + None, # cashaddr_prefix + 75, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Groestlcoin": + return CoinInfo( + name, # coin_name + "GRS", # coin_shortcut + 8, # decimals + 36, # address_type + 5, # address_type_p2sh + 16000000000, # maxfee_kb + "GroestlCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "grs", # bech32_prefix + None, # cashaddr_prefix + 17, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-groestl', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Groestlcoin Testnet": + return CoinInfo( + name, # coin_name + "tGRS", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 100000, # maxfee_kb + "GroestlCoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tgrs", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-groestl', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Komodo": + return CoinInfo( + name, # coin_name + "KMD", # coin_shortcut + 8, # decimals + 60, # address_type + 85, # address_type_p2sh + 4800000000, # maxfee_kb + "Komodo Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 141, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + True, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Koto": + return CoinInfo( + name, # coin_name + "KOTO", # coin_shortcut + 8, # decimals + 6198, # address_type + 6203, # address_type_p2sh + 1000000, # maxfee_kb + "Koto Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 510, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Litecoin": + return CoinInfo( + name, # coin_name + "LTC", # coin_shortcut + 8, # decimals + 48, # address_type + 50, # address_type_p2sh + 67000000, # maxfee_kb + "Litecoin Signed Message:\n", # signed_message_header + 0x019da462, # xpub_magic + 0x01b26ef6, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x019da462, # xpub_magic_multisig_segwit_p2sh + 0x019da462, # xpub_magic_multisig_segwit_native + "ltc", # bech32_prefix + None, # cashaddr_prefix + 2, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Litecoin Testnet": + return CoinInfo( + name, # coin_name + "tLTC", # coin_shortcut + 8, # decimals + 111, # address_type + 58, # address_type_p2sh + 40000000, # maxfee_kb + "Litecoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tltc", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Monacoin": + return CoinInfo( + name, # coin_name + "MONA", # coin_shortcut + 8, # decimals + 50, # address_type + 55, # address_type_p2sh + 2100000000, # maxfee_kb + "Monacoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "mona", # bech32_prefix + None, # cashaddr_prefix + 22, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Peercoin": + return CoinInfo( + name, # coin_name + "PPC", # coin_shortcut + 6, # decimals + 55, # address_type + 117, # address_type_p2sh + 13000000000, # maxfee_kb + "Peercoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "pc", # bech32_prefix + None, # cashaddr_prefix + 6, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Peercoin Testnet": + return CoinInfo( + name, # coin_name + "tPPC", # coin_shortcut + 6, # decimals + 111, # address_type + 196, # address_type_p2sh + 2000000, # maxfee_kb + "Peercoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tpc", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Primecoin": + return CoinInfo( + name, # coin_name + "XPM", # coin_shortcut + 8, # decimals + 23, # address_type + 83, # address_type_p2sh + 89000000000, # maxfee_kb + "Primecoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 24, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Qtum": + return CoinInfo( + name, # coin_name + "QTUM", # coin_shortcut + 8, # decimals + 58, # address_type + 50, # address_type_p2sh + 1000000000, # maxfee_kb + "Qtum Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "qc", # bech32_prefix + None, # cashaddr_prefix + 2301, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Qtum Testnet": + return CoinInfo( + name, # coin_name + "tQTUM", # coin_shortcut + 8, # decimals + 120, # address_type + 110, # address_type_p2sh + 40000000, # maxfee_kb + "Qtum Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tq", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ravencoin": + return CoinInfo( + name, # coin_name + "RVN", # coin_shortcut + 8, # decimals + 60, # address_type + 122, # address_type_p2sh + 170000000000, # maxfee_kb + "Raven Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 175, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ravencoin Testnet": + return CoinInfo( + name, # coin_name + "tRVN", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 170000000000, # maxfee_kb + "Raven Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ritocoin": + return CoinInfo( + name, # coin_name + "RITO", # coin_shortcut + 8, # decimals + 25, # address_type + 105, # address_type_p2sh + 39000000000000, # maxfee_kb + "Rito Signed Message:\n", # signed_message_header + 0x0534e7ca, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 19169, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "SmartCash": + return CoinInfo( + name, # coin_name + "SMART", # coin_shortcut + 8, # decimals + 63, # address_type + 18, # address_type_p2sh + 780000000000, # maxfee_kb + "SmartCash Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 224, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-smart', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "SmartCash Testnet": + return CoinInfo( + name, # coin_name + "tSMART", # coin_shortcut + 8, # decimals + 65, # address_type + 21, # address_type_p2sh + 1000000, # maxfee_kb + "SmartCash Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-smart', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Stakenet": + return CoinInfo( + name, # coin_name + "XSN", # coin_shortcut + 8, # decimals + 76, # address_type + 16, # address_type_p2sh + 11000000000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "xc", # bech32_prefix + None, # cashaddr_prefix + 199, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Syscoin": + return CoinInfo( + name, # coin_name + "SYS", # coin_shortcut + 8, # decimals + 63, # address_type + 5, # address_type_p2sh + 42000000000, # maxfee_kb + "Syscoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "sys", # bech32_prefix + None, # cashaddr_prefix + 57, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Unobtanium": + return CoinInfo( + name, # coin_name + "UNO", # coin_shortcut + 8, # decimals + 130, # address_type + 30, # address_type_p2sh + 53000000, # maxfee_kb + "Unobtanium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 92, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "VIPSTARCOIN": + return CoinInfo( + name, # coin_name + "VIPS", # coin_shortcut + 8, # decimals + 70, # address_type + 50, # address_type_p2sh + 140000000000000, # maxfee_kb + "VIPSTARCOIN Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "vips", # bech32_prefix + None, # cashaddr_prefix + 1919, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Verge": + return CoinInfo( + name, # coin_name + "XVG", # coin_shortcut + 6, # decimals + 30, # address_type + 33, # address_type_p2sh + 550000000000, # maxfee_kb + "Name: Dogecoin Dark\n", # signed_message_header + 0x022d2533, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 77, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Viacoin": + return CoinInfo( + name, # coin_name + "VIA", # coin_shortcut + 8, # decimals + 71, # address_type + 33, # address_type_p2sh + 14000000000, # maxfee_kb + "Viacoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "via", # bech32_prefix + None, # cashaddr_prefix + 14, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "ZCore": + return CoinInfo( + name, # coin_name + "ZCR", # coin_shortcut + 8, # decimals + 142, # address_type + 145, # address_type_p2sh + 170000000000, # maxfee_kb + "DarkNet Signed Message:\n", # signed_message_header + 0x04b24746, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 428, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Zcash": + return CoinInfo( + name, # coin_name + "ZEC", # coin_shortcut + 8, # decimals + 7352, # address_type + 7357, # address_type_p2sh + 51000000, # maxfee_kb + "Zcash Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 133, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Zcash Testnet": + return CoinInfo( + name, # coin_name + "TAZ", # coin_shortcut + 8, # decimals + 7461, # address_type + 7354, # address_type_p2sh + 10000000, # maxfee_kb + "Zcash Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Brhodium": + return CoinInfo( + name, # coin_name + "XRC", # coin_shortcut + 8, # decimals + 61, # address_type + 123, # address_type_p2sh + 1000000000, # maxfee_kb + "BitCoin Rhodium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 10291, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + raise ValueError # Unknown coin name + else: + if name == "Bitcoin": return CoinInfo( name, # coin_name - "DGB", # coin_shortcut + "BTC", # coin_shortcut 8, # decimals - 30, # address_type - 63, # address_type_p2sh - 130000000000, # maxfee_kb - "DigiByte Signed Message:\n", # signed_message_header + 0, # address_type + 5, # address_type_p2sh + 2000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header 0x0488b21e, # xpub_magic 0x049d7cb2, # xpub_magic_segwit_p2sh 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "dgb", # bech32_prefix + 0x0295b43f, # xpub_magic_multisig_segwit_p2sh + 0x02aa7ed3, # xpub_magic_multisig_segwit_native + "bc", # bech32_prefix None, # cashaddr_prefix - 20, # slip44 + 0, # slip44 True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Dogecoin": - return CoinInfo( - name, # coin_name - "DOGE", # coin_shortcut - 8, # decimals - 30, # address_type - 22, # address_type_p2sh - 1200000000000, # maxfee_kb - "Dogecoin Signed Message:\n", # signed_message_header - 0x02facafd, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 3, # slip44 - False, # segwit - False, # taproot + True, # taproot None, # fork_id False, # force_bip143 False, # decred @@ -646,54 +1432,25 @@ def by_name(name: str) -> CoinInfo: False, # overwintered None, # confidential_assets ) - if name == "Elements": + if name == "Regtest": return CoinInfo( name, # coin_name - "ELEMENTS", # coin_shortcut + "REGTEST", # coin_shortcut 8, # decimals - 235, # address_type - 75, # address_type_p2sh + 111, # address_type + 196, # address_type_p2sh 10000000, # maxfee_kb "Bitcoin Signed Message:\n", # signed_message_header 0x043587cf, # xpub_magic 0x044a5262, # xpub_magic_segwit_p2sh 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "ert", # bech32_prefix + 0x024289ef, # xpub_magic_multisig_segwit_p2sh + 0x02575483, # xpub_magic_multisig_segwit_native + "bcrt", # bech32_prefix None, # cashaddr_prefix 1, # slip44 True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - {'address_prefix': 4, 'blech32_prefix': 'el'}, # confidential_assets - ) - if name == "Feathercoin": - return CoinInfo( - name, # coin_name - "FTC", # coin_shortcut - 8, # decimals - 14, # address_type - 5, # address_type_p2sh - 390000000000, # maxfee_kb - "Feathercoin Signed Message:\n", # signed_message_header - 0x0488bc26, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488bc26, # xpub_magic_multisig_segwit_p2sh - 0x0488bc26, # xpub_magic_multisig_segwit_native - "fc", # bech32_prefix - None, # cashaddr_prefix - 8, # slip44 - True, # segwit - False, # taproot + True, # taproot None, # fork_id False, # force_bip143 False, # decred @@ -704,961 +1461,1513 @@ def by_name(name: str) -> CoinInfo: False, # overwintered None, # confidential_assets ) - if name == "Firo": - return CoinInfo( - name, # coin_name - "FIRO", # coin_shortcut - 8, # decimals - 82, # address_type - 7, # address_type_p2sh - 640000000, # maxfee_kb - "Zcoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 136, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Firo Testnet": + if name == "Testnet": return CoinInfo( name, # coin_name - "tFIRO", # coin_shortcut + "TEST", # coin_shortcut 8, # decimals - 65, # address_type - 178, # address_type_p2sh - 1000000, # maxfee_kb - "Zcoin Signed Message:\n", # signed_message_header + 111, # address_type + 196, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x024289ef, # xpub_magic_multisig_segwit_p2sh + 0x02575483, # xpub_magic_multisig_segwit_native + "tb", # bech32_prefix None, # cashaddr_prefix 1, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Florincoin": - return CoinInfo( - name, # coin_name - "FLO", # coin_shortcut - 8, # decimals - 35, # address_type - 94, # address_type_p2sh - 78000000000, # maxfee_kb - "Florincoin Signed Message:\n", # signed_message_header - 0x00174921, # xpub_magic - 0x01b26ef6, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x00174921, # xpub_magic_multisig_segwit_p2sh - 0x00174921, # xpub_magic_multisig_segwit_native - "flo", # bech32_prefix - None, # cashaddr_prefix - 216, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Fujicoin": - return CoinInfo( - name, # coin_name - "FJC", # coin_shortcut - 8, # decimals - 36, # address_type - 16, # address_type_p2sh - 35000000000000, # maxfee_kb - "FujiCoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0295b43f, # xpub_magic_multisig_segwit_p2sh - 0x02aa7ed3, # xpub_magic_multisig_segwit_native - "fc", # bech32_prefix - None, # cashaddr_prefix - 75, # slip44 - True, # segwit - True, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Groestlcoin": - return CoinInfo( - name, # coin_name - "GRS", # coin_shortcut - 8, # decimals - 36, # address_type - 5, # address_type_p2sh - 16000000000, # maxfee_kb - "GroestlCoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "grs", # bech32_prefix - None, # cashaddr_prefix - 17, # slip44 True, # segwit True, # taproot None, # fork_id False, # force_bip143 False, # decred False, # negative_fee - 'secp256k1-groestl', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Groestlcoin Testnet": - return CoinInfo( - name, # coin_name - "tGRS", # coin_shortcut - 8, # decimals - 111, # address_type - 196, # address_type_p2sh - 100000, # maxfee_kb - "GroestlCoin Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "tgrs", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - True, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1-groestl', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Komodo": - return CoinInfo( - name, # coin_name - "KMD", # coin_shortcut - 8, # decimals - 60, # address_type - 85, # address_type_p2sh - 4800000000, # maxfee_kb - "Komodo Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 141, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - True, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - True, # overwintered - None, # confidential_assets - ) - if name == "Koto": - return CoinInfo( - name, # coin_name - "KOTO", # coin_shortcut - 8, # decimals - 6198, # address_type - 6203, # address_type_p2sh - 1000000, # maxfee_kb - "Koto Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 510, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - True, # overwintered - None, # confidential_assets - ) - if name == "Litecoin": - return CoinInfo( - name, # coin_name - "LTC", # coin_shortcut - 8, # decimals - 48, # address_type - 50, # address_type_p2sh - 67000000, # maxfee_kb - "Litecoin Signed Message:\n", # signed_message_header - 0x019da462, # xpub_magic - 0x01b26ef6, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x019da462, # xpub_magic_multisig_segwit_p2sh - 0x019da462, # xpub_magic_multisig_segwit_native - "ltc", # bech32_prefix - None, # cashaddr_prefix - 2, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Litecoin Testnet": - return CoinInfo( - name, # coin_name - "tLTC", # coin_shortcut - 8, # decimals - 111, # address_type - 58, # address_type_p2sh - 40000000, # maxfee_kb - "Litecoin Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "tltc", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Monacoin": - return CoinInfo( - name, # coin_name - "MONA", # coin_shortcut - 8, # decimals - 50, # address_type - 55, # address_type_p2sh - 2100000000, # maxfee_kb - "Monacoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "mona", # bech32_prefix - None, # cashaddr_prefix - 22, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Namecoin": - return CoinInfo( - name, # coin_name - "NMC", # coin_shortcut - 8, # decimals - 52, # address_type - 5, # address_type_p2sh - 8700000000, # maxfee_kb - "Namecoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 7, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Peercoin": - return CoinInfo( - name, # coin_name - "PPC", # coin_shortcut - 6, # decimals - 55, # address_type - 117, # address_type_p2sh - 13000000000, # maxfee_kb - "Peercoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "pc", # bech32_prefix - None, # cashaddr_prefix - 6, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - True, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Peercoin Testnet": - return CoinInfo( - name, # coin_name - "tPPC", # coin_shortcut - 6, # decimals - 111, # address_type - 196, # address_type_p2sh - 2000000, # maxfee_kb - "Peercoin Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "tpc", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - True, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Primecoin": - return CoinInfo( - name, # coin_name - "XPM", # coin_shortcut - 8, # decimals - 23, # address_type - 83, # address_type_p2sh - 89000000000, # maxfee_kb - "Primecoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 24, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Qtum": - return CoinInfo( - name, # coin_name - "QTUM", # coin_shortcut - 8, # decimals - 58, # address_type - 50, # address_type_p2sh - 1000000000, # maxfee_kb - "Qtum Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "qc", # bech32_prefix - None, # cashaddr_prefix - 2301, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Qtum Testnet": - return CoinInfo( - name, # coin_name - "tQTUM", # coin_shortcut - 8, # decimals - 120, # address_type - 110, # address_type_p2sh - 40000000, # maxfee_kb - "Qtum Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - 0x044a5262, # xpub_magic_segwit_p2sh - 0x045f1cf6, # xpub_magic_segwit_native - 0x043587cf, # xpub_magic_multisig_segwit_p2sh - 0x043587cf, # xpub_magic_multisig_segwit_native - "tq", # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Ravencoin": - return CoinInfo( - name, # coin_name - "RVN", # coin_shortcut - 8, # decimals - 60, # address_type - 122, # address_type_p2sh - 170000000000, # maxfee_kb - "Raven Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 175, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Ravencoin Testnet": - return CoinInfo( - name, # coin_name - "tRVN", # coin_shortcut - 8, # decimals - 111, # address_type - 196, # address_type_p2sh - 170000000000, # maxfee_kb - "Raven Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Ritocoin": - return CoinInfo( - name, # coin_name - "RITO", # coin_shortcut - 8, # decimals - 25, # address_type - 105, # address_type_p2sh - 39000000000000, # maxfee_kb - "Rito Signed Message:\n", # signed_message_header - 0x0534e7ca, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 19169, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "SmartCash": - return CoinInfo( - name, # coin_name - "SMART", # coin_shortcut - 8, # decimals - 63, # address_type - 18, # address_type_p2sh - 780000000000, # maxfee_kb - "SmartCash Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 224, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1-smart', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "SmartCash Testnet": - return CoinInfo( - name, # coin_name - "tSMART", # coin_shortcut - 8, # decimals - 65, # address_type - 21, # address_type_p2sh - 1000000, # maxfee_kb - "SmartCash Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1-smart', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Stakenet": - return CoinInfo( - name, # coin_name - "XSN", # coin_shortcut - 8, # decimals - 76, # address_type - 16, # address_type_p2sh - 11000000000, # maxfee_kb - "DarkCoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "xc", # bech32_prefix - None, # cashaddr_prefix - 199, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Syscoin": - return CoinInfo( - name, # coin_name - "SYS", # coin_shortcut - 8, # decimals - 63, # address_type - 5, # address_type_p2sh - 42000000000, # maxfee_kb - "Syscoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "sys", # bech32_prefix - None, # cashaddr_prefix - 57, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Unobtanium": - return CoinInfo( - name, # coin_name - "UNO", # coin_shortcut - 8, # decimals - 130, # address_type - 30, # address_type_p2sh - 53000000, # maxfee_kb - "Unobtanium Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 92, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "VIPSTARCOIN": - return CoinInfo( - name, # coin_name - "VIPS", # coin_shortcut - 8, # decimals - 70, # address_type - 50, # address_type_p2sh - 140000000000000, # maxfee_kb - "VIPSTARCOIN Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "vips", # bech32_prefix - None, # cashaddr_prefix - 1919, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Verge": - return CoinInfo( - name, # coin_name - "XVG", # coin_shortcut - 6, # decimals - 30, # address_type - 33, # address_type_p2sh - 550000000000, # maxfee_kb - "Name: Dogecoin Dark\n", # signed_message_header - 0x022d2533, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 77, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - True, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Vertcoin": - return CoinInfo( - name, # coin_name - "VTC", # coin_shortcut - 8, # decimals - 71, # address_type - 5, # address_type_p2sh - 13000000000, # maxfee_kb - "Vertcoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "vtc", # bech32_prefix - None, # cashaddr_prefix - 28, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Viacoin": - return CoinInfo( - name, # coin_name - "VIA", # coin_shortcut - 8, # decimals - 71, # address_type - 33, # address_type_p2sh - 14000000000, # maxfee_kb - "Viacoin Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - 0x049d7cb2, # xpub_magic_segwit_p2sh - 0x04b24746, # xpub_magic_segwit_native - 0x0488b21e, # xpub_magic_multisig_segwit_p2sh - 0x0488b21e, # xpub_magic_multisig_segwit_native - "via", # bech32_prefix - None, # cashaddr_prefix - 14, # slip44 - True, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "ZCore": - return CoinInfo( - name, # coin_name - "ZCR", # coin_shortcut - 8, # decimals - 142, # address_type - 145, # address_type_p2sh - 170000000000, # maxfee_kb - "DarkNet Signed Message:\n", # signed_message_header - 0x04b24746, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 428, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - False, # extra_data - False, # timestamp - False, # overwintered - None, # confidential_assets - ) - if name == "Zcash": - return CoinInfo( - name, # coin_name - "ZEC", # coin_shortcut - 8, # decimals - 7352, # address_type - 7357, # address_type_p2sh - 51000000, # maxfee_kb - "Zcash Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 133, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - True, # overwintered - None, # confidential_assets - ) - if name == "Zcash Testnet": - return CoinInfo( - name, # coin_name - "TAZ", # coin_shortcut - 8, # decimals - 7461, # address_type - 7354, # address_type_p2sh - 10000000, # maxfee_kb - "Zcash Signed Message:\n", # signed_message_header - 0x043587cf, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 1, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee - 'secp256k1', # curve_name - True, # extra_data - False, # timestamp - True, # overwintered - None, # confidential_assets - ) - if name == "Brhodium": - return CoinInfo( - name, # coin_name - "XRC", # coin_shortcut - 8, # decimals - 61, # address_type - 123, # address_type_p2sh - 1000000000, # maxfee_kb - "BitCoin Rhodium Signed Message:\n", # signed_message_header - 0x0488b21e, # xpub_magic - None, # xpub_magic_segwit_p2sh - None, # xpub_magic_segwit_native - None, # xpub_magic_multisig_segwit_p2sh - None, # xpub_magic_multisig_segwit_native - None, # bech32_prefix - None, # cashaddr_prefix - 10291, # slip44 - False, # segwit - False, # taproot - None, # fork_id - False, # force_bip143 - False, # decred - False, # negative_fee 'secp256k1', # curve_name False, # extra_data False, # timestamp False, # overwintered None, # confidential_assets ) - raise ValueError # Unknown coin name + if not utils.BITCOIN_ONLY: + if name == "Actinium": + return CoinInfo( + name, # coin_name + "ACM", # coin_shortcut + 8, # decimals + 53, # address_type + 55, # address_type_p2sh + 320000000000, # maxfee_kb + "Actinium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "acm", # bech32_prefix + None, # cashaddr_prefix + 228, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Axe": + return CoinInfo( + name, # coin_name + "AXE", # coin_shortcut + 8, # decimals + 55, # address_type + 16, # address_type_p2sh + 21000000000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x02fe52cc, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 4242, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bcash": + return CoinInfo( + name, # coin_name + "BCH", # coin_shortcut + 8, # decimals + 0, # address_type + 5, # address_type_p2sh + 14000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + "bitcoincash", # cashaddr_prefix + 145, # slip44 + False, # segwit + False, # taproot + 0, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bcash Testnet": + return CoinInfo( + name, # coin_name + "TBCH", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + "bchtest", # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + 0, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bgold": + return CoinInfo( + name, # coin_name + "BTG", # coin_shortcut + 8, # decimals + 38, # address_type + 23, # address_type_p2sh + 380000000, # maxfee_kb + "Bitcoin Gold Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "btg", # bech32_prefix + None, # cashaddr_prefix + 156, # slip44 + True, # segwit + False, # taproot + 79, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bgold Testnet": + return CoinInfo( + name, # coin_name + "TBTG", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 500000, # maxfee_kb + "Bitcoin Gold Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tbtg", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + 79, # fork_id + True, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bprivate": + return CoinInfo( + name, # coin_name + "BTCP", # coin_shortcut + 8, # decimals + 4901, # address_type + 5039, # address_type_p2sh + 32000000000, # maxfee_kb + "BitcoinPrivate Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 183, # slip44 + False, # segwit + False, # taproot + 42, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Bitcore": + return CoinInfo( + name, # coin_name + "BTX", # coin_shortcut + 8, # decimals + 3, # address_type + 125, # address_type_p2sh + 14000000000, # maxfee_kb + "BitCore Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "btx", # bech32_prefix + None, # cashaddr_prefix + 160, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "CPUchain": + return CoinInfo( + name, # coin_name + "CPU", # coin_shortcut + 8, # decimals + 28, # address_type + 30, # address_type_p2sh + 8700000000000, # maxfee_kb + "CPUchain Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "cpu", # bech32_prefix + None, # cashaddr_prefix + 363, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Crown": + return CoinInfo( + name, # coin_name + "CRW", # coin_shortcut + 8, # decimals + 95495, # address_type + 95473, # address_type_p2sh + 52000000000, # maxfee_kb + "Crown Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 72, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Dash": + return CoinInfo( + name, # coin_name + "DASH", # coin_shortcut + 8, # decimals + 76, # address_type + 16, # address_type_p2sh + 45000000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x02fe52cc, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 5, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Dash Testnet": + return CoinInfo( + name, # coin_name + "tDASH", # coin_shortcut + 8, # decimals + 140, # address_type + 19, # address_type_p2sh + 100000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Decred": + return CoinInfo( + name, # coin_name + "DCR", # coin_shortcut + 8, # decimals + 1855, # address_type + 1818, # address_type_p2sh + 220000000, # maxfee_kb + "Decred Signed Message:\n", # signed_message_header + 0x02fda926, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 42, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + True, # decred + False, # negative_fee + 'secp256k1-decred', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Decred Testnet": + return CoinInfo( + name, # coin_name + "TDCR", # coin_shortcut + 8, # decimals + 3873, # address_type + 3836, # address_type_p2sh + 10000000, # maxfee_kb + "Decred Signed Message:\n", # signed_message_header + 0x043587d1, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + True, # decred + False, # negative_fee + 'secp256k1-decred', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "DigiByte": + return CoinInfo( + name, # coin_name + "DGB", # coin_shortcut + 8, # decimals + 30, # address_type + 63, # address_type_p2sh + 130000000000, # maxfee_kb + "DigiByte Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "dgb", # bech32_prefix + None, # cashaddr_prefix + 20, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Dogecoin": + return CoinInfo( + name, # coin_name + "DOGE", # coin_shortcut + 8, # decimals + 30, # address_type + 22, # address_type_p2sh + 1200000000000, # maxfee_kb + "Dogecoin Signed Message:\n", # signed_message_header + 0x02facafd, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 3, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Elements": + return CoinInfo( + name, # coin_name + "ELEMENTS", # coin_shortcut + 8, # decimals + 235, # address_type + 75, # address_type_p2sh + 10000000, # maxfee_kb + "Bitcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "ert", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + {'address_prefix': 4, 'blech32_prefix': 'el'}, # confidential_assets + ) + if name == "Feathercoin": + return CoinInfo( + name, # coin_name + "FTC", # coin_shortcut + 8, # decimals + 14, # address_type + 5, # address_type_p2sh + 390000000000, # maxfee_kb + "Feathercoin Signed Message:\n", # signed_message_header + 0x0488bc26, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488bc26, # xpub_magic_multisig_segwit_p2sh + 0x0488bc26, # xpub_magic_multisig_segwit_native + "fc", # bech32_prefix + None, # cashaddr_prefix + 8, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Firo": + return CoinInfo( + name, # coin_name + "FIRO", # coin_shortcut + 8, # decimals + 82, # address_type + 7, # address_type_p2sh + 640000000, # maxfee_kb + "Zcoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 136, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Firo Testnet": + return CoinInfo( + name, # coin_name + "tFIRO", # coin_shortcut + 8, # decimals + 65, # address_type + 178, # address_type_p2sh + 1000000, # maxfee_kb + "Zcoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Florincoin": + return CoinInfo( + name, # coin_name + "FLO", # coin_shortcut + 8, # decimals + 35, # address_type + 94, # address_type_p2sh + 78000000000, # maxfee_kb + "Florincoin Signed Message:\n", # signed_message_header + 0x00174921, # xpub_magic + 0x01b26ef6, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x00174921, # xpub_magic_multisig_segwit_p2sh + 0x00174921, # xpub_magic_multisig_segwit_native + "flo", # bech32_prefix + None, # cashaddr_prefix + 216, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Fujicoin": + return CoinInfo( + name, # coin_name + "FJC", # coin_shortcut + 8, # decimals + 36, # address_type + 16, # address_type_p2sh + 35000000000000, # maxfee_kb + "FujiCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0295b43f, # xpub_magic_multisig_segwit_p2sh + 0x02aa7ed3, # xpub_magic_multisig_segwit_native + "fc", # bech32_prefix + None, # cashaddr_prefix + 75, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Groestlcoin": + return CoinInfo( + name, # coin_name + "GRS", # coin_shortcut + 8, # decimals + 36, # address_type + 5, # address_type_p2sh + 16000000000, # maxfee_kb + "GroestlCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "grs", # bech32_prefix + None, # cashaddr_prefix + 17, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-groestl', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Groestlcoin Testnet": + return CoinInfo( + name, # coin_name + "tGRS", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 100000, # maxfee_kb + "GroestlCoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tgrs", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + True, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-groestl', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Komodo": + return CoinInfo( + name, # coin_name + "KMD", # coin_shortcut + 8, # decimals + 60, # address_type + 85, # address_type_p2sh + 4800000000, # maxfee_kb + "Komodo Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 141, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + True, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Koto": + return CoinInfo( + name, # coin_name + "KOTO", # coin_shortcut + 8, # decimals + 6198, # address_type + 6203, # address_type_p2sh + 1000000, # maxfee_kb + "Koto Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 510, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Litecoin": + return CoinInfo( + name, # coin_name + "LTC", # coin_shortcut + 8, # decimals + 48, # address_type + 50, # address_type_p2sh + 67000000, # maxfee_kb + "Litecoin Signed Message:\n", # signed_message_header + 0x019da462, # xpub_magic + 0x01b26ef6, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x019da462, # xpub_magic_multisig_segwit_p2sh + 0x019da462, # xpub_magic_multisig_segwit_native + "ltc", # bech32_prefix + None, # cashaddr_prefix + 2, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Litecoin Testnet": + return CoinInfo( + name, # coin_name + "tLTC", # coin_shortcut + 8, # decimals + 111, # address_type + 58, # address_type_p2sh + 40000000, # maxfee_kb + "Litecoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tltc", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Monacoin": + return CoinInfo( + name, # coin_name + "MONA", # coin_shortcut + 8, # decimals + 50, # address_type + 55, # address_type_p2sh + 2100000000, # maxfee_kb + "Monacoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "mona", # bech32_prefix + None, # cashaddr_prefix + 22, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Namecoin": + return CoinInfo( + name, # coin_name + "NMC", # coin_shortcut + 8, # decimals + 52, # address_type + 5, # address_type_p2sh + 8700000000, # maxfee_kb + "Namecoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 7, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Peercoin": + return CoinInfo( + name, # coin_name + "PPC", # coin_shortcut + 6, # decimals + 55, # address_type + 117, # address_type_p2sh + 13000000000, # maxfee_kb + "Peercoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "pc", # bech32_prefix + None, # cashaddr_prefix + 6, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Peercoin Testnet": + return CoinInfo( + name, # coin_name + "tPPC", # coin_shortcut + 6, # decimals + 111, # address_type + 196, # address_type_p2sh + 2000000, # maxfee_kb + "Peercoin Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tpc", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Primecoin": + return CoinInfo( + name, # coin_name + "XPM", # coin_shortcut + 8, # decimals + 23, # address_type + 83, # address_type_p2sh + 89000000000, # maxfee_kb + "Primecoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 24, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Qtum": + return CoinInfo( + name, # coin_name + "QTUM", # coin_shortcut + 8, # decimals + 58, # address_type + 50, # address_type_p2sh + 1000000000, # maxfee_kb + "Qtum Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "qc", # bech32_prefix + None, # cashaddr_prefix + 2301, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Qtum Testnet": + return CoinInfo( + name, # coin_name + "tQTUM", # coin_shortcut + 8, # decimals + 120, # address_type + 110, # address_type_p2sh + 40000000, # maxfee_kb + "Qtum Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + 0x044a5262, # xpub_magic_segwit_p2sh + 0x045f1cf6, # xpub_magic_segwit_native + 0x043587cf, # xpub_magic_multisig_segwit_p2sh + 0x043587cf, # xpub_magic_multisig_segwit_native + "tq", # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ravencoin": + return CoinInfo( + name, # coin_name + "RVN", # coin_shortcut + 8, # decimals + 60, # address_type + 122, # address_type_p2sh + 170000000000, # maxfee_kb + "Raven Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 175, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ravencoin Testnet": + return CoinInfo( + name, # coin_name + "tRVN", # coin_shortcut + 8, # decimals + 111, # address_type + 196, # address_type_p2sh + 170000000000, # maxfee_kb + "Raven Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Ritocoin": + return CoinInfo( + name, # coin_name + "RITO", # coin_shortcut + 8, # decimals + 25, # address_type + 105, # address_type_p2sh + 39000000000000, # maxfee_kb + "Rito Signed Message:\n", # signed_message_header + 0x0534e7ca, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 19169, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "SmartCash": + return CoinInfo( + name, # coin_name + "SMART", # coin_shortcut + 8, # decimals + 63, # address_type + 18, # address_type_p2sh + 780000000000, # maxfee_kb + "SmartCash Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 224, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-smart', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "SmartCash Testnet": + return CoinInfo( + name, # coin_name + "tSMART", # coin_shortcut + 8, # decimals + 65, # address_type + 21, # address_type_p2sh + 1000000, # maxfee_kb + "SmartCash Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1-smart', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Stakenet": + return CoinInfo( + name, # coin_name + "XSN", # coin_shortcut + 8, # decimals + 76, # address_type + 16, # address_type_p2sh + 11000000000, # maxfee_kb + "DarkCoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "xc", # bech32_prefix + None, # cashaddr_prefix + 199, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Syscoin": + return CoinInfo( + name, # coin_name + "SYS", # coin_shortcut + 8, # decimals + 63, # address_type + 5, # address_type_p2sh + 42000000000, # maxfee_kb + "Syscoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "sys", # bech32_prefix + None, # cashaddr_prefix + 57, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Unobtanium": + return CoinInfo( + name, # coin_name + "UNO", # coin_shortcut + 8, # decimals + 130, # address_type + 30, # address_type_p2sh + 53000000, # maxfee_kb + "Unobtanium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 92, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "VIPSTARCOIN": + return CoinInfo( + name, # coin_name + "VIPS", # coin_shortcut + 8, # decimals + 70, # address_type + 50, # address_type_p2sh + 140000000000000, # maxfee_kb + "VIPSTARCOIN Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "vips", # bech32_prefix + None, # cashaddr_prefix + 1919, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Verge": + return CoinInfo( + name, # coin_name + "XVG", # coin_shortcut + 6, # decimals + 30, # address_type + 33, # address_type_p2sh + 550000000000, # maxfee_kb + "Name: Dogecoin Dark\n", # signed_message_header + 0x022d2533, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 77, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + True, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Vertcoin": + return CoinInfo( + name, # coin_name + "VTC", # coin_shortcut + 8, # decimals + 71, # address_type + 5, # address_type_p2sh + 13000000000, # maxfee_kb + "Vertcoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "vtc", # bech32_prefix + None, # cashaddr_prefix + 28, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Viacoin": + return CoinInfo( + name, # coin_name + "VIA", # coin_shortcut + 8, # decimals + 71, # address_type + 33, # address_type_p2sh + 14000000000, # maxfee_kb + "Viacoin Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + 0x049d7cb2, # xpub_magic_segwit_p2sh + 0x04b24746, # xpub_magic_segwit_native + 0x0488b21e, # xpub_magic_multisig_segwit_p2sh + 0x0488b21e, # xpub_magic_multisig_segwit_native + "via", # bech32_prefix + None, # cashaddr_prefix + 14, # slip44 + True, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "ZCore": + return CoinInfo( + name, # coin_name + "ZCR", # coin_shortcut + 8, # decimals + 142, # address_type + 145, # address_type_p2sh + 170000000000, # maxfee_kb + "DarkNet Signed Message:\n", # signed_message_header + 0x04b24746, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 428, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + if name == "Zcash": + return CoinInfo( + name, # coin_name + "ZEC", # coin_shortcut + 8, # decimals + 7352, # address_type + 7357, # address_type_p2sh + 51000000, # maxfee_kb + "Zcash Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 133, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Zcash Testnet": + return CoinInfo( + name, # coin_name + "TAZ", # coin_shortcut + 8, # decimals + 7461, # address_type + 7354, # address_type_p2sh + 10000000, # maxfee_kb + "Zcash Signed Message:\n", # signed_message_header + 0x043587cf, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 1, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + True, # extra_data + False, # timestamp + True, # overwintered + None, # confidential_assets + ) + if name == "Brhodium": + return CoinInfo( + name, # coin_name + "XRC", # coin_shortcut + 8, # decimals + 61, # address_type + 123, # address_type_p2sh + 1000000000, # maxfee_kb + "BitCoin Rhodium Signed Message:\n", # signed_message_header + 0x0488b21e, # xpub_magic + None, # xpub_magic_segwit_p2sh + None, # xpub_magic_segwit_native + None, # xpub_magic_multisig_segwit_p2sh + None, # xpub_magic_multisig_segwit_native + None, # bech32_prefix + None, # cashaddr_prefix + 10291, # slip44 + False, # segwit + False, # taproot + None, # fork_id + False, # force_bip143 + False, # decred + False, # negative_fee + 'secp256k1', # curve_name + False, # extra_data + False, # timestamp + False, # overwintered + None, # confidential_assets + ) + raise ValueError # Unknown coin name diff --git a/core/src/apps/common/coininfo.py.mako b/core/src/apps/common/coininfo.py.mako index fba7ef0ac..38e3716bb 100644 --- a/core/src/apps/common/coininfo.py.mako +++ b/core/src/apps/common/coininfo.py.mako @@ -136,21 +136,37 @@ ATTRIBUTES = ( btc_names = ["Bitcoin", "Testnet", "Regtest"] -coins_btc = [c for c in supported_on("trezor2", bitcoin) if c.name in btc_names] -coins_alt = [c for c in supported_on("trezor2", bitcoin) if c.name not in btc_names] +# TODO: make this easily extendable for more models + +coins_btc_t2t1 = [c for c in supported_on("T2T1", bitcoin) if c.name in btc_names] +coins_alt_t2t1 = [c for c in supported_on("T2T1", bitcoin) if c.name not in btc_names] + +coins_btc_t2b1 = [c for c in supported_on("T2B1", bitcoin) if c.name in btc_names] +coins_alt_t2b1 = [c for c in supported_on("T2B1", bitcoin) if c.name not in btc_names] %>\ def by_name(name: str) -> CoinInfo: -% for coin in coins_btc: - if name == ${black_repr(coin["coin_name"])}: - return CoinInfo( - % for attr, func in ATTRIBUTES: - ${func(coin[attr])}, # ${attr} - % endfor - ) + if utils.MODEL_IS_T2B1: +% for coin in coins_btc_t2b1: + if name == ${black_repr(coin["coin_name"])}: + return CoinInfo( + % for attr, func in ATTRIBUTES: + ${func(coin[attr])}, # ${attr} + % endfor + ) +% endfor + if not utils.BITCOIN_ONLY: +% for coin in coins_alt_t2b1: + if name == ${black_repr(coin["coin_name"])}: + return CoinInfo( + % for attr, func in ATTRIBUTES: + ${func(coin[attr])}, # ${attr} + % endfor + ) % endfor - if not utils.BITCOIN_ONLY: -% for coin in coins_alt: + raise ValueError # Unknown coin name + else: +% for coin in coins_btc_t2t1: if name == ${black_repr(coin["coin_name"])}: return CoinInfo( % for attr, func in ATTRIBUTES: @@ -158,4 +174,13 @@ def by_name(name: str) -> CoinInfo: % endfor ) % endfor - raise ValueError # Unknown coin name + if not utils.BITCOIN_ONLY: +% for coin in coins_alt_t2t1: + if name == ${black_repr(coin["coin_name"])}: + return CoinInfo( + % for attr, func in ATTRIBUTES: + ${func(coin[attr])}, # ${attr} + % endfor + ) +% endfor + raise ValueError # Unknown coin name diff --git a/core/src/apps/ethereum/networks.py b/core/src/apps/ethereum/networks.py index b68f0f848..12a742026 100644 --- a/core/src/apps/ethereum/networks.py +++ b/core/src/apps/ethereum/networks.py @@ -7,6 +7,7 @@ from typing import TYPE_CHECKING +from trezor import utils from trezor.messages import EthereumNetworkInfo if TYPE_CHECKING: @@ -58,45 +59,89 @@ def by_slip44(slip44: int) -> EthereumNetworkInfo: # fmt: off def _networks_iterator() -> Iterator[NetworkInfoTuple]: - yield ( - 1, # chain_id - 60, # slip44 - "ETH", # symbol - "Ethereum", # name - ) - yield ( - 3, # chain_id - 1, # slip44 - "tETH", # symbol - "Ropsten", # name - ) - yield ( - 4, # chain_id - 1, # slip44 - "tETH", # symbol - "Rinkeby", # name - ) - yield ( - 5, # chain_id - 1, # slip44 - "tETH", # symbol - "Görli", # name - ) - yield ( - 56, # chain_id - 714, # slip44 - "BNB", # symbol - "Binance Smart Chain", # name - ) - yield ( - 61, # chain_id - 61, # slip44 - "ETC", # symbol - "Ethereum Classic", # name - ) - yield ( - 137, # chain_id - 966, # slip44 - "MATIC", # symbol - "Polygon", # name - ) + if utils.MODEL_IS_T2B1: + yield ( + 1, # chain_id + 60, # slip44 + "ETH", # symbol + "Ethereum", # name + ) + yield ( + 3, # chain_id + 1, # slip44 + "tETH", # symbol + "Ropsten", # name + ) + yield ( + 4, # chain_id + 1, # slip44 + "tETH", # symbol + "Rinkeby", # name + ) + yield ( + 5, # chain_id + 1, # slip44 + "tETH", # symbol + "Görli", # name + ) + yield ( + 56, # chain_id + 714, # slip44 + "BNB", # symbol + "Binance Smart Chain", # name + ) + yield ( + 61, # chain_id + 61, # slip44 + "ETC", # symbol + "Ethereum Classic", # name + ) + yield ( + 137, # chain_id + 966, # slip44 + "MATIC", # symbol + "Polygon", # name + ) + else: + yield ( + 1, # chain_id + 60, # slip44 + "ETH", # symbol + "Ethereum", # name + ) + yield ( + 3, # chain_id + 1, # slip44 + "tETH", # symbol + "Ropsten", # name + ) + yield ( + 4, # chain_id + 1, # slip44 + "tETH", # symbol + "Rinkeby", # name + ) + yield ( + 5, # chain_id + 1, # slip44 + "tETH", # symbol + "Görli", # name + ) + yield ( + 56, # chain_id + 714, # slip44 + "BNB", # symbol + "Binance Smart Chain", # name + ) + yield ( + 61, # chain_id + 61, # slip44 + "ETC", # symbol + "Ethereum Classic", # name + ) + yield ( + 137, # chain_id + 966, # slip44 + "MATIC", # symbol + "Polygon", # name + ) diff --git a/core/src/apps/ethereum/networks.py.mako b/core/src/apps/ethereum/networks.py.mako index 81a53fa16..e310600cf 100644 --- a/core/src/apps/ethereum/networks.py.mako +++ b/core/src/apps/ethereum/networks.py.mako @@ -7,6 +7,7 @@ from typing import TYPE_CHECKING +from trezor import utils from trezor.messages import EthereumNetworkInfo if TYPE_CHECKING: @@ -58,11 +59,21 @@ def by_slip44(slip44: int) -> EthereumNetworkInfo: # fmt: off def _networks_iterator() -> Iterator[NetworkInfoTuple]: -% for n in sorted(supported_on("trezor2", eth), key=lambda network: (int(network.chain_id), network.name)): - yield ( - ${n.chain_id}, # chain_id - ${n.slip44}, # slip44 - "${n.shortcut}", # symbol - "${n.name}", # name - ) + if utils.MODEL_IS_T2B1: +% for n in sorted(supported_on("T2B1", eth), key=lambda network: (int(network.chain_id), network.name)): + yield ( + ${n.chain_id}, # chain_id + ${n.slip44}, # slip44 + "${n.shortcut}", # symbol + "${n.name}", # name + ) +% endfor + else: +% for n in sorted(supported_on("T2T1", eth), key=lambda network: (int(network.chain_id), network.name)): + yield ( + ${n.chain_id}, # chain_id + ${n.slip44}, # slip44 + "${n.shortcut}", # symbol + "${n.name}", # name + ) % endfor diff --git a/core/src/apps/ethereum/tokens.py b/core/src/apps/ethereum/tokens.py index e010f6f9f..eeb61cf86 100644 --- a/core/src/apps/ethereum/tokens.py +++ b/core/src/apps/ethereum/tokens.py @@ -16,6 +16,7 @@ from typing import Iterator +from trezor import utils from trezor.messages import EthereumTokenInfo UNKNOWN_TOKEN = EthereumTokenInfo( @@ -41,150 +42,299 @@ def token_by_chain_address(chain_id: int, address: bytes) -> EthereumTokenInfo | def _token_iterator(chain_id: int) -> Iterator[tuple[bytes, str, int, str]]: - if chain_id == 1: # eth - yield ( # address, symbol, decimals, name - b"\x7f\xc6\x65\x00\xc8\x4a\x76\xad\x7e\x9c\x93\x43\x7b\xfc\x5a\xc3\x3e\x2d\xda\xe9", - "AAVE", - 18, - "Aave", - ) - yield ( # address, symbol, decimals, name - b"\x4d\x22\x44\x52\x80\x1a\xce\xd8\xb2\xf0\xae\xbe\x15\x53\x79\xbb\x5d\x59\x43\x81", - "APE", - 18, - "ApeCoin", - ) - yield ( # address, symbol, decimals, name - b"\xbb\x0e\x17\xef\x65\xf8\x2a\xb0\x18\xd8\xed\xd7\x76\xe8\xdd\x94\x03\x27\xb2\x8b", - "AXS", - 18, - "Axie Infinity", - ) - yield ( # address, symbol, decimals, name - b"\x4f\xab\xb1\x45\xd6\x46\x52\xa9\x48\xd7\x25\x33\x02\x3f\x6e\x7a\x62\x3c\x7c\x53", - "BUSD", - 18, - "Binance USD", - ) - yield ( # address, symbol, decimals, name - b"\x35\x06\x42\x4f\x91\xfd\x33\x08\x44\x66\xf4\x02\xd5\xd9\x7f\x05\xf8\xe3\xb4\xaf", - "CHZ", - 18, - "Chiliz", - ) - yield ( # address, symbol, decimals, name - b"\xa0\xb7\x3e\x1f\xf0\xb8\x09\x14\xab\x6f\xe0\x44\x4e\x65\x84\x8c\x4c\x34\x45\x0b", - "CRO", - 8, - "Cronos", - ) - yield ( # address, symbol, decimals, name - b"\x6b\x17\x54\x74\xe8\x90\x94\xc4\x4d\xa9\x8b\x95\x4e\xed\xea\xc4\x95\x27\x1d\x0f", - "DAI", - 18, - "Dai", - ) - yield ( # address, symbol, decimals, name - b"\x85\x3d\x95\x5a\xce\xf8\x22\xdb\x05\x8e\xb8\x50\x59\x11\xed\x77\xf1\x75\xb9\x9e", - "FRAX", - 18, - "Frax", - ) - yield ( # address, symbol, decimals, name - b"\x2a\xf5\xd2\xad\x76\x74\x11\x91\xd1\x5d\xfe\x7b\xf6\xac\x92\xd4\xbd\x91\x2c\xa3", - "LEO", - 18, - "LEO Token", - ) - yield ( # address, symbol, decimals, name - b"\x51\x49\x10\x77\x1a\xf9\xca\x65\x6a\xf8\x40\xdf\xf8\x3e\x82\x64\xec\xf9\x86\xca", - "LINK", - 18, - "Chainlink", - ) - yield ( # address, symbol, decimals, name - b"\x0f\x5d\x2f\xb2\x9f\xb7\xd3\xcf\xee\x44\x4a\x20\x02\x98\xf4\x68\x90\x8c\xc9\x42", - "MANA", - 18, - "Decentraland", - ) - yield ( # address, symbol, decimals, name - b"\x7d\x1a\xfa\x7b\x71\x8f\xb8\x93\xdb\x30\xa3\xab\xc0\xcf\xc6\x08\xaa\xcf\xeb\xb0", - "MATIC", - 18, - "Polygon", - ) - yield ( # address, symbol, decimals, name - b"\x75\x23\x1f\x58\xb4\x32\x40\xc9\x71\x8d\xd5\x8b\x49\x67\xc5\x11\x43\x42\xa8\x6c", - "OKB", - 18, - "OKB", - ) - yield ( # address, symbol, decimals, name - b"\x4a\x22\x0e\x60\x96\xb2\x5e\xad\xb8\x83\x58\xcb\x44\x06\x8a\x32\x48\x25\x46\x75", - "QNT", - 18, - "Quant", - ) - yield ( # address, symbol, decimals, name - b"\x38\x45\xba\xda\xde\x8e\x6d\xff\x04\x98\x20\x68\x0d\x1f\x14\xbd\x39\x03\xa5\xd0", - "SAND", - 18, - "The Sandbox", - ) - yield ( # address, symbol, decimals, name - b"\x95\xad\x61\xb0\xa1\x50\xd7\x92\x19\xdc\xf6\x4e\x1e\x6c\xc0\x1f\x0b\x64\xc4\xce", - "SHIB", - 18, - "Shiba Inu", - ) - yield ( # address, symbol, decimals, name - b"\xae\x7a\xb9\x65\x20\xde\x3a\x18\xe5\xe1\x11\xb5\xea\xab\x09\x53\x12\xd7\xfe\x84", - "STETH", - 18, - "Lido Staked Ether", - ) - yield ( # address, symbol, decimals, name - b"\x1f\x98\x40\xa8\x5d\x5a\xf5\xbf\x1d\x17\x62\xf9\x25\xbd\xad\xdc\x42\x01\xf9\x84", - "UNI", - 18, - "Uniswap", - ) - yield ( # address, symbol, decimals, name - b"\xa0\xb8\x69\x91\xc6\x21\x8b\x36\xc1\xd1\x9d\x4a\x2e\x9e\xb0\xce\x36\x06\xeb\x48", - "USDC", - 6, - "USD Coin", - ) - yield ( # address, symbol, decimals, name - b"\xda\xc1\x7f\x95\x8d\x2e\xe5\x23\xa2\x20\x62\x06\x99\x45\x97\xc1\x3d\x83\x1e\xc7", - "USDT", - 6, - "Tether", - ) - yield ( # address, symbol, decimals, name - b"\x22\x60\xfa\xc5\xe5\x54\x2a\x77\x3a\xa4\x4f\xbc\xfe\xdf\x7c\x19\x3b\xc2\xc5\x99", - "WBTC", - 8, - "Wrapped Bitcoin", - ) - yield ( # address, symbol, decimals, name - b"\xa2\xcd\x3d\x43\xc7\x75\x97\x8a\x96\xbd\xbf\x12\xd7\x33\xd5\xa1\xed\x94\xfb\x18", - "XCN", - 18, - "Chain", - ) - if chain_id == 56: # bnb - yield ( # address, symbol, decimals, name - b"\x0e\xb3\xa7\x05\xfc\x54\x72\x50\x37\xcc\x9e\x00\x8b\xde\xde\x69\x7f\x62\xf3\x35", - "ATOM", - 18, - "Cosmos Hub", - ) - if chain_id == 137: # matic - yield ( # address, symbol, decimals, name - b"\x2c\x89\xbb\xc9\x2b\xd8\x6f\x80\x75\xd1\xde\xcc\x58\xc7\xf4\xe0\x10\x7f\x28\x6b", - "WAVAX", - 18, - "Wrapped AVAX", - ) + if utils.MODEL_IS_T2B1: + if chain_id == 1: # eth + yield ( # address, symbol, decimals, name + b"\x7f\xc6\x65\x00\xc8\x4a\x76\xad\x7e\x9c\x93\x43\x7b\xfc\x5a\xc3\x3e\x2d\xda\xe9", + "AAVE", + 18, + "Aave", + ) + yield ( # address, symbol, decimals, name + b"\x4d\x22\x44\x52\x80\x1a\xce\xd8\xb2\xf0\xae\xbe\x15\x53\x79\xbb\x5d\x59\x43\x81", + "APE", + 18, + "ApeCoin", + ) + yield ( # address, symbol, decimals, name + b"\xbb\x0e\x17\xef\x65\xf8\x2a\xb0\x18\xd8\xed\xd7\x76\xe8\xdd\x94\x03\x27\xb2\x8b", + "AXS", + 18, + "Axie Infinity", + ) + yield ( # address, symbol, decimals, name + b"\x4f\xab\xb1\x45\xd6\x46\x52\xa9\x48\xd7\x25\x33\x02\x3f\x6e\x7a\x62\x3c\x7c\x53", + "BUSD", + 18, + "Binance USD", + ) + yield ( # address, symbol, decimals, name + b"\x35\x06\x42\x4f\x91\xfd\x33\x08\x44\x66\xf4\x02\xd5\xd9\x7f\x05\xf8\xe3\xb4\xaf", + "CHZ", + 18, + "Chiliz", + ) + yield ( # address, symbol, decimals, name + b"\xa0\xb7\x3e\x1f\xf0\xb8\x09\x14\xab\x6f\xe0\x44\x4e\x65\x84\x8c\x4c\x34\x45\x0b", + "CRO", + 8, + "Cronos", + ) + yield ( # address, symbol, decimals, name + b"\x6b\x17\x54\x74\xe8\x90\x94\xc4\x4d\xa9\x8b\x95\x4e\xed\xea\xc4\x95\x27\x1d\x0f", + "DAI", + 18, + "Dai", + ) + yield ( # address, symbol, decimals, name + b"\x85\x3d\x95\x5a\xce\xf8\x22\xdb\x05\x8e\xb8\x50\x59\x11\xed\x77\xf1\x75\xb9\x9e", + "FRAX", + 18, + "Frax", + ) + yield ( # address, symbol, decimals, name + b"\x2a\xf5\xd2\xad\x76\x74\x11\x91\xd1\x5d\xfe\x7b\xf6\xac\x92\xd4\xbd\x91\x2c\xa3", + "LEO", + 18, + "LEO Token", + ) + yield ( # address, symbol, decimals, name + b"\x51\x49\x10\x77\x1a\xf9\xca\x65\x6a\xf8\x40\xdf\xf8\x3e\x82\x64\xec\xf9\x86\xca", + "LINK", + 18, + "Chainlink", + ) + yield ( # address, symbol, decimals, name + b"\x0f\x5d\x2f\xb2\x9f\xb7\xd3\xcf\xee\x44\x4a\x20\x02\x98\xf4\x68\x90\x8c\xc9\x42", + "MANA", + 18, + "Decentraland", + ) + yield ( # address, symbol, decimals, name + b"\x7d\x1a\xfa\x7b\x71\x8f\xb8\x93\xdb\x30\xa3\xab\xc0\xcf\xc6\x08\xaa\xcf\xeb\xb0", + "MATIC", + 18, + "Polygon", + ) + yield ( # address, symbol, decimals, name + b"\x75\x23\x1f\x58\xb4\x32\x40\xc9\x71\x8d\xd5\x8b\x49\x67\xc5\x11\x43\x42\xa8\x6c", + "OKB", + 18, + "OKB", + ) + yield ( # address, symbol, decimals, name + b"\x4a\x22\x0e\x60\x96\xb2\x5e\xad\xb8\x83\x58\xcb\x44\x06\x8a\x32\x48\x25\x46\x75", + "QNT", + 18, + "Quant", + ) + yield ( # address, symbol, decimals, name + b"\x38\x45\xba\xda\xde\x8e\x6d\xff\x04\x98\x20\x68\x0d\x1f\x14\xbd\x39\x03\xa5\xd0", + "SAND", + 18, + "The Sandbox", + ) + yield ( # address, symbol, decimals, name + b"\x95\xad\x61\xb0\xa1\x50\xd7\x92\x19\xdc\xf6\x4e\x1e\x6c\xc0\x1f\x0b\x64\xc4\xce", + "SHIB", + 18, + "Shiba Inu", + ) + yield ( # address, symbol, decimals, name + b"\xae\x7a\xb9\x65\x20\xde\x3a\x18\xe5\xe1\x11\xb5\xea\xab\x09\x53\x12\xd7\xfe\x84", + "STETH", + 18, + "Lido Staked Ether", + ) + yield ( # address, symbol, decimals, name + b"\x1f\x98\x40\xa8\x5d\x5a\xf5\xbf\x1d\x17\x62\xf9\x25\xbd\xad\xdc\x42\x01\xf9\x84", + "UNI", + 18, + "Uniswap", + ) + yield ( # address, symbol, decimals, name + b"\xa0\xb8\x69\x91\xc6\x21\x8b\x36\xc1\xd1\x9d\x4a\x2e\x9e\xb0\xce\x36\x06\xeb\x48", + "USDC", + 6, + "USD Coin", + ) + yield ( # address, symbol, decimals, name + b"\xda\xc1\x7f\x95\x8d\x2e\xe5\x23\xa2\x20\x62\x06\x99\x45\x97\xc1\x3d\x83\x1e\xc7", + "USDT", + 6, + "Tether", + ) + yield ( # address, symbol, decimals, name + b"\x22\x60\xfa\xc5\xe5\x54\x2a\x77\x3a\xa4\x4f\xbc\xfe\xdf\x7c\x19\x3b\xc2\xc5\x99", + "WBTC", + 8, + "Wrapped Bitcoin", + ) + yield ( # address, symbol, decimals, name + b"\xa2\xcd\x3d\x43\xc7\x75\x97\x8a\x96\xbd\xbf\x12\xd7\x33\xd5\xa1\xed\x94\xfb\x18", + "XCN", + 18, + "Chain", + ) + if chain_id == 56: # bnb + yield ( # address, symbol, decimals, name + b"\x0e\xb3\xa7\x05\xfc\x54\x72\x50\x37\xcc\x9e\x00\x8b\xde\xde\x69\x7f\x62\xf3\x35", + "ATOM", + 18, + "Cosmos Hub", + ) + if chain_id == 137: # matic + yield ( # address, symbol, decimals, name + b"\x2c\x89\xbb\xc9\x2b\xd8\x6f\x80\x75\xd1\xde\xcc\x58\xc7\xf4\xe0\x10\x7f\x28\x6b", + "WAVAX", + 18, + "Wrapped AVAX", + ) + else: + if chain_id == 1: # eth + yield ( # address, symbol, decimals, name + b"\x7f\xc6\x65\x00\xc8\x4a\x76\xad\x7e\x9c\x93\x43\x7b\xfc\x5a\xc3\x3e\x2d\xda\xe9", + "AAVE", + 18, + "Aave", + ) + yield ( # address, symbol, decimals, name + b"\x4d\x22\x44\x52\x80\x1a\xce\xd8\xb2\xf0\xae\xbe\x15\x53\x79\xbb\x5d\x59\x43\x81", + "APE", + 18, + "ApeCoin", + ) + yield ( # address, symbol, decimals, name + b"\xbb\x0e\x17\xef\x65\xf8\x2a\xb0\x18\xd8\xed\xd7\x76\xe8\xdd\x94\x03\x27\xb2\x8b", + "AXS", + 18, + "Axie Infinity", + ) + yield ( # address, symbol, decimals, name + b"\x4f\xab\xb1\x45\xd6\x46\x52\xa9\x48\xd7\x25\x33\x02\x3f\x6e\x7a\x62\x3c\x7c\x53", + "BUSD", + 18, + "Binance USD", + ) + yield ( # address, symbol, decimals, name + b"\x35\x06\x42\x4f\x91\xfd\x33\x08\x44\x66\xf4\x02\xd5\xd9\x7f\x05\xf8\xe3\xb4\xaf", + "CHZ", + 18, + "Chiliz", + ) + yield ( # address, symbol, decimals, name + b"\xa0\xb7\x3e\x1f\xf0\xb8\x09\x14\xab\x6f\xe0\x44\x4e\x65\x84\x8c\x4c\x34\x45\x0b", + "CRO", + 8, + "Cronos", + ) + yield ( # address, symbol, decimals, name + b"\x6b\x17\x54\x74\xe8\x90\x94\xc4\x4d\xa9\x8b\x95\x4e\xed\xea\xc4\x95\x27\x1d\x0f", + "DAI", + 18, + "Dai", + ) + yield ( # address, symbol, decimals, name + b"\x85\x3d\x95\x5a\xce\xf8\x22\xdb\x05\x8e\xb8\x50\x59\x11\xed\x77\xf1\x75\xb9\x9e", + "FRAX", + 18, + "Frax", + ) + yield ( # address, symbol, decimals, name + b"\x2a\xf5\xd2\xad\x76\x74\x11\x91\xd1\x5d\xfe\x7b\xf6\xac\x92\xd4\xbd\x91\x2c\xa3", + "LEO", + 18, + "LEO Token", + ) + yield ( # address, symbol, decimals, name + b"\x51\x49\x10\x77\x1a\xf9\xca\x65\x6a\xf8\x40\xdf\xf8\x3e\x82\x64\xec\xf9\x86\xca", + "LINK", + 18, + "Chainlink", + ) + yield ( # address, symbol, decimals, name + b"\x0f\x5d\x2f\xb2\x9f\xb7\xd3\xcf\xee\x44\x4a\x20\x02\x98\xf4\x68\x90\x8c\xc9\x42", + "MANA", + 18, + "Decentraland", + ) + yield ( # address, symbol, decimals, name + b"\x7d\x1a\xfa\x7b\x71\x8f\xb8\x93\xdb\x30\xa3\xab\xc0\xcf\xc6\x08\xaa\xcf\xeb\xb0", + "MATIC", + 18, + "Polygon", + ) + yield ( # address, symbol, decimals, name + b"\x75\x23\x1f\x58\xb4\x32\x40\xc9\x71\x8d\xd5\x8b\x49\x67\xc5\x11\x43\x42\xa8\x6c", + "OKB", + 18, + "OKB", + ) + yield ( # address, symbol, decimals, name + b"\x4a\x22\x0e\x60\x96\xb2\x5e\xad\xb8\x83\x58\xcb\x44\x06\x8a\x32\x48\x25\x46\x75", + "QNT", + 18, + "Quant", + ) + yield ( # address, symbol, decimals, name + b"\x38\x45\xba\xda\xde\x8e\x6d\xff\x04\x98\x20\x68\x0d\x1f\x14\xbd\x39\x03\xa5\xd0", + "SAND", + 18, + "The Sandbox", + ) + yield ( # address, symbol, decimals, name + b"\x95\xad\x61\xb0\xa1\x50\xd7\x92\x19\xdc\xf6\x4e\x1e\x6c\xc0\x1f\x0b\x64\xc4\xce", + "SHIB", + 18, + "Shiba Inu", + ) + yield ( # address, symbol, decimals, name + b"\xae\x7a\xb9\x65\x20\xde\x3a\x18\xe5\xe1\x11\xb5\xea\xab\x09\x53\x12\xd7\xfe\x84", + "STETH", + 18, + "Lido Staked Ether", + ) + yield ( # address, symbol, decimals, name + b"\x1f\x98\x40\xa8\x5d\x5a\xf5\xbf\x1d\x17\x62\xf9\x25\xbd\xad\xdc\x42\x01\xf9\x84", + "UNI", + 18, + "Uniswap", + ) + yield ( # address, symbol, decimals, name + b"\xa0\xb8\x69\x91\xc6\x21\x8b\x36\xc1\xd1\x9d\x4a\x2e\x9e\xb0\xce\x36\x06\xeb\x48", + "USDC", + 6, + "USD Coin", + ) + yield ( # address, symbol, decimals, name + b"\xda\xc1\x7f\x95\x8d\x2e\xe5\x23\xa2\x20\x62\x06\x99\x45\x97\xc1\x3d\x83\x1e\xc7", + "USDT", + 6, + "Tether", + ) + yield ( # address, symbol, decimals, name + b"\x22\x60\xfa\xc5\xe5\x54\x2a\x77\x3a\xa4\x4f\xbc\xfe\xdf\x7c\x19\x3b\xc2\xc5\x99", + "WBTC", + 8, + "Wrapped Bitcoin", + ) + yield ( # address, symbol, decimals, name + b"\xa2\xcd\x3d\x43\xc7\x75\x97\x8a\x96\xbd\xbf\x12\xd7\x33\xd5\xa1\xed\x94\xfb\x18", + "XCN", + 18, + "Chain", + ) + if chain_id == 56: # bnb + yield ( # address, symbol, decimals, name + b"\x0e\xb3\xa7\x05\xfc\x54\x72\x50\x37\xcc\x9e\x00\x8b\xde\xde\x69\x7f\x62\xf3\x35", + "ATOM", + 18, + "Cosmos Hub", + ) + if chain_id == 137: # matic + yield ( # address, symbol, decimals, name + b"\x2c\x89\xbb\xc9\x2b\xd8\x6f\x80\x75\xd1\xde\xcc\x58\xc7\xf4\xe0\x10\x7f\x28\x6b", + "WAVAX", + 18, + "Wrapped AVAX", + ) diff --git a/core/src/apps/ethereum/tokens.py.mako b/core/src/apps/ethereum/tokens.py.mako index 7ec886965..afb60851d 100644 --- a/core/src/apps/ethereum/tokens.py.mako +++ b/core/src/apps/ethereum/tokens.py.mako @@ -16,6 +16,7 @@ from typing import Iterator +from trezor import utils from trezor.messages import EthereumTokenInfo <% from collections import defaultdict @@ -50,14 +51,27 @@ def token_by_chain_address(chain_id: int, address: bytes) -> EthereumTokenInfo | def _token_iterator(chain_id: int) -> Iterator[tuple[bytes, str, int, str]]: -% for token_chain_id, tokens in group_tokens(supported_on("trezor2", erc20)).items(): - if chain_id == ${token_chain_id}: # ${tokens[0].chain} - % for t in tokens: - yield ( # address, symbol, decimals, name - ${black_repr(t.address_bytes)}, - ${black_repr(t.symbol)}, - ${t.decimals}, - ${black_repr(t.name.strip())}, - ) - % endfor + if utils.MODEL_IS_T2B1: +% for token_chain_id, tokens in group_tokens(supported_on("T2B1", erc20)).items(): + if chain_id == ${token_chain_id}: # ${tokens[0].chain} + % for t in tokens: + yield ( # address, symbol, decimals, name + ${black_repr(t.address_bytes)}, + ${black_repr(t.symbol)}, + ${t.decimals}, + ${black_repr(t.name.strip())}, + ) + % endfor +% endfor + else: +% for token_chain_id, tokens in group_tokens(supported_on("T2T1", erc20)).items(): + if chain_id == ${token_chain_id}: # ${tokens[0].chain} + % for t in tokens: + yield ( # address, symbol, decimals, name + ${black_repr(t.address_bytes)}, + ${black_repr(t.symbol)}, + ${t.decimals}, + ${black_repr(t.name.strip())}, + ) + % endfor % endfor diff --git a/core/src/apps/nem/mosaic/nem_mosaics.py.mako b/core/src/apps/nem/mosaic/nem_mosaics.py.mako index e97520310..ed87beaa4 100644 --- a/core/src/apps/nem/mosaic/nem_mosaics.py.mako +++ b/core/src/apps/nem/mosaic/nem_mosaics.py.mako @@ -45,7 +45,7 @@ class Mosaic: def mosaics_iterator() -> Iterator[Mosaic]: -% for m in supported_on("trezor2", nem): +% for m in supported_on("T2T1", nem): yield Mosaic( "${m.name}", # name " ${m.ticker}", # ticker diff --git a/core/src/trezor/utils.py b/core/src/trezor/utils.py index 0110e17e5..8b31a8da0 100644 --- a/core/src/trezor/utils.py +++ b/core/src/trezor/utils.py @@ -23,6 +23,10 @@ from trezorutils import ( # noqa: F401 ) from typing import TYPE_CHECKING +# Will get replaced by "True" / "False" in the build process +# However, needs to stay as an exported symbol for the unit tests +MODEL_IS_T2B1: bool = INTERNAL_MODEL == "T2B1" + DISABLE_ANIMATION = 0 if __debug__: diff --git a/legacy/firmware/coin_info.c.mako b/legacy/firmware/coin_info.c.mako index 705da2161..5c3d87883 100644 --- a/legacy/firmware/coin_info.c.mako +++ b/legacy/firmware/coin_info.c.mako @@ -23,7 +23,7 @@ def hex(x): #include "secp256k1.h" const CoinInfo coins[COINS_COUNT] = { -% for c in supported_on("trezor1", bitcoin): +% for c in supported_on("T1B1", bitcoin): { .coin_name = ${c_str(c.coin_name)}, .coin_shortcut = ${c_str(c.coin_shortcut)}, diff --git a/legacy/firmware/coin_info.h.mako b/legacy/firmware/coin_info.h.mako index bcd16120b..a71816ae1 100644 --- a/legacy/firmware/coin_info.h.mako +++ b/legacy/firmware/coin_info.h.mako @@ -6,7 +6,7 @@ #include "coins.h" -<% coins_list = list(supported_on("trezor1", bitcoin)) %>\ +<% coins_list = list(supported_on("T1B1", bitcoin)) %>\ #define COINS_COUNT (${len(coins_list)}) extern const CoinInfo coins[COINS_COUNT]; diff --git a/legacy/firmware/ethereum_networks.c.mako b/legacy/firmware/ethereum_networks.c.mako index 92e10420d..a3b863e0d 100644 --- a/legacy/firmware/ethereum_networks.c.mako +++ b/legacy/firmware/ethereum_networks.c.mako @@ -1,4 +1,4 @@ -<% networks = list(supported_on("trezor1", eth)) %>\ +<% networks = list(supported_on("T1B1", eth)) %>\ // This file is automatically generated from ethereum_networks.c.mako // DO NOT EDIT diff --git a/legacy/firmware/ethereum_tokens.c.mako b/legacy/firmware/ethereum_tokens.c.mako index 462dc7085..79bad82b3 100644 --- a/legacy/firmware/ethereum_tokens.c.mako +++ b/legacy/firmware/ethereum_tokens.c.mako @@ -5,7 +5,7 @@ #include "ethereum.h" #include "ethereum_tokens.h" -<% erc20_list = list(supported_on("trezor1", erc20)) %>\ +<% erc20_list = list(supported_on("T1B1", erc20)) %>\ #define TOKENS_COUNT ${len(erc20_list)} static const EthereumTokenInfo tokens[TOKENS_COUNT] = { diff --git a/legacy/firmware/nem_mosaics.c.mako b/legacy/firmware/nem_mosaics.c.mako index 73f949790..83becf3a3 100644 --- a/legacy/firmware/nem_mosaics.c.mako +++ b/legacy/firmware/nem_mosaics.c.mako @@ -20,7 +20,7 @@ ATTRIBUTES_OPTIONAL = ( #include "nem_mosaics.h" const NEMMosaicDefinition NEM_MOSAIC_DEFINITIONS[NEM_MOSAIC_DEFINITIONS_COUNT] = { -% for m in supported_on("trezor1", nem): +% for m in supported_on("T1B1", nem): { % for attr, func in ATTRIBUTES_REQUIRED: % if attr in m: diff --git a/legacy/firmware/nem_mosaics.h.mako b/legacy/firmware/nem_mosaics.h.mako index 5667713b9..faec6b87b 100644 --- a/legacy/firmware/nem_mosaics.h.mako +++ b/legacy/firmware/nem_mosaics.h.mako @@ -6,7 +6,7 @@ #include "messages-nem.pb.h" -<% nem_list = list(supported_on("trezor1", nem)) %>\ +<% nem_list = list(supported_on("T1B1", nem)) %>\ #define NEM_MOSAIC_DEFINITIONS_COUNT (${len(nem_list)}) extern const NEMMosaicDefinition NEM_MOSAIC_DEFINITIONS[NEM_MOSAIC_DEFINITIONS_COUNT]; diff --git a/tests/device_tests/bitcoin/test_bgold.py b/tests/device_tests/bitcoin/test_bgold.py index f5aeb30b5..5411c5c2b 100644 --- a/tests/device_tests/bitcoin/test_bgold.py +++ b/tests/device_tests/bitcoin/test_bgold.py @@ -46,7 +46,7 @@ FAKE_TXHASH_a63dbe = bytes.fromhex( "a63dbedd8cd284bf0d3c468e84b9b0eeb14c3a08824eab8f80e7723a299f30db" ) -pytestmark = pytest.mark.altcoin +pytestmark = [pytest.mark.altcoin, pytest.mark.skip_tr] # All data taken from T1 diff --git a/tests/device_tests/bitcoin/test_dash.py b/tests/device_tests/bitcoin/test_dash.py index 21fbc3ef9..cb1966f33 100644 --- a/tests/device_tests/bitcoin/test_dash.py +++ b/tests/device_tests/bitcoin/test_dash.py @@ -39,7 +39,7 @@ TXHASH_15575a = bytes.fromhex( "15575a1c874bd60a819884e116c42e6791c8283ce1fc3b79f0d18531a61bbb8a" ) -pytestmark = pytest.mark.altcoin +pytestmark = [pytest.mark.altcoin, pytest.mark.skip_tr] def test_send_dash(client: Client): diff --git a/tests/device_tests/bitcoin/test_decred.py b/tests/device_tests/bitcoin/test_decred.py index 8f6de14bb..c031a95d7 100644 --- a/tests/device_tests/bitcoin/test_decred.py +++ b/tests/device_tests/bitcoin/test_decred.py @@ -49,7 +49,7 @@ FAKE_TXHASH_51bc9c = bytes.fromhex( "51bc9c71f10a81eef3caedb5333062eb4b1f70998adf02916fe98fdc04c572e8" ) -pytestmark = [pytest.mark.altcoin, pytest.mark.decred] +pytestmark = [pytest.mark.altcoin, pytest.mark.decred, pytest.mark.skip_tr] def test_send_decred(client: Client): diff --git a/tests/device_tests/bitcoin/test_signmessage.py b/tests/device_tests/bitcoin/test_signmessage.py index d76601f15..581bb8aac 100644 --- a/tests/device_tests/bitcoin/test_signmessage.py +++ b/tests/device_tests/bitcoin/test_signmessage.py @@ -28,12 +28,20 @@ from ...input_flows import InputFlowSignMessagePagination S = messages.InputScriptType -def case(id: str, *args: Any, altcoin: bool = False, skip_t1: bool = False): +def case( + id: str, + *args: Any, + altcoin: bool = False, + skip_t1: bool = False, + skip_tr: bool = False +): marks = [] if altcoin: marks.append(pytest.mark.altcoin) if skip_t1: marks.append(pytest.mark.skip_t1) + if skip_tr: + marks.append(pytest.mark.skip_tr) return pytest.param(*args, id=id, marks=marks) @@ -253,6 +261,7 @@ VECTORS = ( # case name, coin_name, path, script_type, address, message, signat "This is an example of a signed message.", "206b1f8ba47ef9eaf87aa900e41ab1e97f67e8c09292faa4acf825228d074c4b774484046dcb1d9bbf0603045dbfb328c3e1b0c09c5ae133e89e604a67a1fc6cca", altcoin=True, + skip_tr=True, ), case( "decred-empty", @@ -264,6 +273,7 @@ VECTORS = ( # case name, coin_name, path, script_type, address, message, signat "", "1fd2d57490b44a0361c7809768cad032d41ba1d4b7a297f935fc65ae05f71de7ea0c6c6fd265cc5154f1fa4acd7006b6a00ddd67fb7333c1594aff9120b3ba8024", altcoin=True, + skip_tr=True, ), ) diff --git a/tests/device_tests/bitcoin/test_signtx_payreq.py b/tests/device_tests/bitcoin/test_signtx_payreq.py index d199c7ade..9b590931c 100644 --- a/tests/device_tests/bitcoin/test_signtx_payreq.py +++ b/tests/device_tests/bitcoin/test_signtx_payreq.py @@ -36,11 +36,12 @@ PREV_TXES = {PREV_HASH: PREV_TX} pytestmark = [pytest.mark.skip_t1, pytest.mark.experimental] -def case(id, *args, altcoin=False): +def case(id, *args, altcoin: bool = False, skip_tr: bool = False): + marks = [] if altcoin: - marks = pytest.mark.altcoin - else: - marks = () + marks.append(pytest.mark.altcoin) + if skip_tr: + marks.append(pytest.mark.skip_tr) return pytest.param(*args, id=id, marks=marks) @@ -110,10 +111,16 @@ SERIALIZED_TX = "01000000000101e29305e85821ea86f2bca1fcfe45e7cb0c8de87b612479ee6 "payment_request_params", ( case( - "out0", (PaymentRequestParams([0], memos1, get_nonce=True),), altcoin=True + "out0", + (PaymentRequestParams([0], memos1, get_nonce=True),), + altcoin=True, + skip_tr=True, ), case( - "out1", (PaymentRequestParams([1], memos2, get_nonce=True),), altcoin=True + "out1", + (PaymentRequestParams([1], memos2, get_nonce=True),), + altcoin=True, + skip_tr=True, ), case("out2", (PaymentRequestParams([2], [], get_nonce=True),)), case( @@ -268,6 +275,7 @@ def test_payment_req_wrong_mac_refund(client: Client): @pytest.mark.altcoin +@pytest.mark.skip_tr def test_payment_req_wrong_mac_purchase(client: Client): # Test wrong MAC in payment request memo. memo = CoinPurchaseMemo( diff --git a/tests/device_tests/eos/test_get_public_key.py b/tests/device_tests/eos/test_get_public_key.py index f973c77a2..cda429ab1 100644 --- a/tests/device_tests/eos/test_get_public_key.py +++ b/tests/device_tests/eos/test_get_public_key.py @@ -27,6 +27,7 @@ from ...input_flows import InputFlowShowXpubQRCode @pytest.mark.altcoin @pytest.mark.eos @pytest.mark.skip_t1 +@pytest.mark.skip_tr # coin not supported @pytest.mark.setup_client(mnemonic=MNEMONIC12) def test_eos_get_public_key(client: Client): with client: diff --git a/tests/device_tests/eos/test_signtx.py b/tests/device_tests/eos/test_signtx.py index b05c4ad68..9837dd27c 100644 --- a/tests/device_tests/eos/test_signtx.py +++ b/tests/device_tests/eos/test_signtx.py @@ -30,6 +30,7 @@ pytestmark = [ pytest.mark.altcoin, pytest.mark.eos, pytest.mark.skip_t1, + pytest.mark.skip_tr, # coin not supported pytest.mark.setup_client(mnemonic=MNEMONIC12), ] diff --git a/tests/device_tests/nem/test_getaddress.py b/tests/device_tests/nem/test_getaddress.py index 7e72e716a..443631f94 100644 --- a/tests/device_tests/nem/test_getaddress.py +++ b/tests/device_tests/nem/test_getaddress.py @@ -25,6 +25,7 @@ from ...common import MNEMONIC12 @pytest.mark.altcoin @pytest.mark.nem +@pytest.mark.skip_tr # coin not supported, @pytest.mark.setup_client(mnemonic=MNEMONIC12) def test_nem_getaddress(client: Client): assert ( diff --git a/tests/device_tests/nem/test_signtx_mosaics.py b/tests/device_tests/nem/test_signtx_mosaics.py index ad6377f26..6c07c9d37 100644 --- a/tests/device_tests/nem/test_signtx_mosaics.py +++ b/tests/device_tests/nem/test_signtx_mosaics.py @@ -27,6 +27,7 @@ ADDRESS_N = parse_path("m/44h/1h/0h/0h/0h") pytestmark = [ pytest.mark.altcoin, pytest.mark.nem, + pytest.mark.skip_tr, # coin not supported, pytest.mark.setup_client(mnemonic=MNEMONIC12), ] diff --git a/tests/device_tests/nem/test_signtx_multisig.py b/tests/device_tests/nem/test_signtx_multisig.py index a438d09b7..3efa7352a 100644 --- a/tests/device_tests/nem/test_signtx_multisig.py +++ b/tests/device_tests/nem/test_signtx_multisig.py @@ -25,6 +25,7 @@ from ...common import MNEMONIC12 pytestmark = [ pytest.mark.altcoin, pytest.mark.nem, + pytest.mark.skip_tr, # coin not supported, pytest.mark.setup_client(mnemonic=MNEMONIC12), ] diff --git a/tests/device_tests/nem/test_signtx_others.py b/tests/device_tests/nem/test_signtx_others.py index e9ca78880..bfd357bd7 100644 --- a/tests/device_tests/nem/test_signtx_others.py +++ b/tests/device_tests/nem/test_signtx_others.py @@ -25,6 +25,7 @@ from ...common import MNEMONIC12 pytestmark = [ pytest.mark.altcoin, pytest.mark.nem, + pytest.mark.skip_tr, # coin not supported, pytest.mark.setup_client(mnemonic=MNEMONIC12), ] diff --git a/tests/device_tests/nem/test_signtx_transfers.py b/tests/device_tests/nem/test_signtx_transfers.py index a3b96f69a..527d3fea4 100644 --- a/tests/device_tests/nem/test_signtx_transfers.py +++ b/tests/device_tests/nem/test_signtx_transfers.py @@ -25,6 +25,7 @@ from ...common import MNEMONIC12 pytestmark = [ pytest.mark.altcoin, pytest.mark.nem, + pytest.mark.skip_tr, # coin not supported, pytest.mark.setup_client(mnemonic=MNEMONIC12), ] diff --git a/tests/ui_tests/fixtures.json b/tests/ui_tests/fixtures.json index 1274cb776..f70c0eb17 100644 --- a/tests/ui_tests/fixtures.json +++ b/tests/ui_tests/fixtures.json @@ -761,22 +761,6 @@ "TR_bitcoin-test_bcash.py::test_send_bch_multisig_wrongchange": "faad9ce4f88c1abe8e0e4c880c88c5422ffe49a3880049036f01f89ed0a8204f", "TR_bitcoin-test_bcash.py::test_send_bch_nochange": "8f53026a2ba7bb2946a775d42e27ff12810288e74e8fc06176f517ee2cabc170", "TR_bitcoin-test_bcash.py::test_send_bch_oldaddr": "aa1129e9d1a830c9c0fc5a33ecc95a1086f9831ea3b25d7e54c553f6b842aad4", -"TR_bitcoin-test_bgold.py::test_attack_change_input": "eee666767f83a9d3fa54e495ad398efb7b2c124c4b369e5645b8b2ecc0a2b257", -"TR_bitcoin-test_bgold.py::test_send_bitcoin_gold_change": "eee666767f83a9d3fa54e495ad398efb7b2c124c4b369e5645b8b2ecc0a2b257", -"TR_bitcoin-test_bgold.py::test_send_bitcoin_gold_nochange": "300d966de8e4858b1d4aaa5bbd612e207b0c4c795a201056c1fb802a1f6e0e32", -"TR_bitcoin-test_bgold.py::test_send_btg_external_presigned": "19fa7bebae4ed810dc6322a03b98037d41e4e60e4e247fdcff127e843e432458", -"TR_bitcoin-test_bgold.py::test_send_btg_multisig_change": "762b2f07b824181117293cfc89a5f6d0ca0233c947248927643a94a33b38e092", -"TR_bitcoin-test_bgold.py::test_send_mixed_inputs": "014c8de418f71ba83aa8036c7b7858bb8f16d938252da3a16c9536aee766c70f", -"TR_bitcoin-test_bgold.py::test_send_multisig_1": "e8f6fdb8da5035ddf07fd372a101f86f096a009bc54e1af1861f079b6bc49493", -"TR_bitcoin-test_bgold.py::test_send_p2sh": "b11530cd73e89a8c0cf97423d6fb24479524d70ae2bc8b425eacbeda3ac9ee46", -"TR_bitcoin-test_bgold.py::test_send_p2sh_witness_change": "4bc8ef43ff3e5ebcd66a1b42c74b37aedb028eb89b4c7507c93e8c761662286e", -"TR_bitcoin-test_dash.py::test_send_dash": "53ec61f3ecccd062b5ad5eb24a34758f251f043333e6d8e5761adb706753abd2", -"TR_bitcoin-test_dash.py::test_send_dash_dip2_input": "dce4ad2a6417e2e041eb5c71ff595fd9e8abb0f0c4173199c7c62ff3c896776e", -"TR_bitcoin-test_decred.py::test_decred_multisig_change": "8bd35c39d6361c3a5feac6ed8c97de8c3134d7978c021fda8956d5ed3cedb445", -"TR_bitcoin-test_decred.py::test_purchase_ticket_decred": "bcc0984b233a98bea521f76b8a6774e48f84f3e33043785c5647ef45291efb6d", -"TR_bitcoin-test_decred.py::test_send_decred": "e3f16c81bb094271fdb94bc5dbb3e1485f217bdf82e01f46979ea8f7645b95d6", -"TR_bitcoin-test_decred.py::test_send_decred_change": "9b76664898560172a8031d92fc8d0cf6d93d29734a53abce3ef727f272c00053", -"TR_bitcoin-test_decred.py::test_spend_from_stake_generation_and_revocation_decred": "607d9dfaea375d5c2b9893cd1a81b9f1b05f1201454b92677d1a03e6c41c4e92", "TR_bitcoin-test_descriptors.py::test_descriptors[Bitcoin-0-10025-InputScriptType.SPENDTAPROOT--ad9e3c78": "b548cc09a709153638392cd940bf0297c85b9bc7442cc06ff370590b9a91c6dc", "TR_bitcoin-test_descriptors.py::test_descriptors[Bitcoin-0-44-InputScriptType.SPENDADDRESS-pkh-efa37663": "55af89626933a7d87a0ce9d7f3d1ad74a80afb2ea304e57245424891d1f4c9a3", "TR_bitcoin-test_descriptors.py::test_descriptors[Bitcoin-0-49-InputScriptType.SPENDP2SHWITNESS-77f1e2d2": "9ba1431983d453d93d279f12730710fc846aa62af391b488aaa0de93e6d89eea", @@ -986,8 +970,6 @@ "TR_bitcoin-test_signmessage.py::test_signmessage[NFC message]": "ab3a71cb3e8eb516bdba44aa751d6f0fd4715a4635a84b54c2c0adaaf08319d5", "TR_bitcoin-test_signmessage.py::test_signmessage[NFKD message]": "ab3a71cb3e8eb516bdba44aa751d6f0fd4715a4635a84b54c2c0adaaf08319d5", "TR_bitcoin-test_signmessage.py::test_signmessage[bcash]": "c960bf499d53b56189fa15acc27115ed1b3ccbb5cab8b87036fc675c6ddf6992", -"TR_bitcoin-test_signmessage.py::test_signmessage[decred-empty]": "456a799a936e43e05da46a17ed56e3fc5bf08f828705e1b5a2be820e837f830a", -"TR_bitcoin-test_signmessage.py::test_signmessage[decred]": "e3fd9169aab4e0ad8b0e697adbec7ce3dbde009cd4e05171e4f2e6f6a0f76f87", "TR_bitcoin-test_signmessage.py::test_signmessage[grs-p2pkh]": "05019729b386a6380eec9109c41651e09050d5c61bf99ffa4ee266b85b70d67c", "TR_bitcoin-test_signmessage.py::test_signmessage[grs-segwit-native]": "b3d94052b376384494ac5645cf8ad2f1839fe51fc104e1a4cab8297e688a50d4", "TR_bitcoin-test_signmessage.py::test_signmessage[grs-segwit-p2sh]": "5f162905b7772ce35bdb42f17f9ffafe80cba2a1397623f2036551393ff04848", @@ -1088,15 +1070,12 @@ "TR_bitcoin-test_signtx_mixed_inputs.py::test_segwit_non_segwit_inputs": "dfc5684ecc27ba18a9870974098aeff0edefbab94a60959b047d130c14e31100", "TR_bitcoin-test_signtx_mixed_inputs.py::test_segwit_non_segwit_segwit_inputs": "50b75854569e1358d5f6d8f96dcc61c45e01458b00e33a17f93dcbd2e5db7709", "TR_bitcoin-test_signtx_payreq.py::test_payment_req_wrong_amount": "c072f90fecb07a693c09038a26d44eadae88854df02e0537aa99f946d641af83", -"TR_bitcoin-test_signtx_payreq.py::test_payment_req_wrong_mac_purchase": "19d738c0babfd39c17793e98e5d621e147d02367f4e4a7c712bb08c0f914a04e", "TR_bitcoin-test_signtx_payreq.py::test_payment_req_wrong_mac_refund": "19d738c0babfd39c17793e98e5d621e147d02367f4e4a7c712bb08c0f914a04e", "TR_bitcoin-test_signtx_payreq.py::test_payment_req_wrong_output": "249e65809ac735eec03907514834fa347df6fa2f44d63dfc09cc89defd85885e", "TR_bitcoin-test_signtx_payreq.py::test_payment_request[out0+out1]": "a573b011d1a31fc79e2cfdb6e687b5c8eb8d1803286d94afd09215a33c2ffb14", "TR_bitcoin-test_signtx_payreq.py::test_payment_request[out012]": "1594934f96bd424c407a5c77eaa18d8b613b02d8eb5831cee980d18b08cdc522", "TR_bitcoin-test_signtx_payreq.py::test_payment_request[out01]": "25c87a158b0c4cc2cc0e35fb28222170ef79ed3bf7f376ed69587c9111910dc8", -"TR_bitcoin-test_signtx_payreq.py::test_payment_request[out0]": "6d138367fa6a77784cc58530614435a443c142de8c2b550201a4452fe057812f", "TR_bitcoin-test_signtx_payreq.py::test_payment_request[out12]": "30ab6d261e64bb817338a8d5fca8c933c82142be1dc4a31b20ac42e1f1c2f2c9", -"TR_bitcoin-test_signtx_payreq.py::test_payment_request[out1]": "0b40c6267d6e3b23f32cc99dd5b712de77dbb01c6e868076add5fe7065a2fa3d", "TR_bitcoin-test_signtx_payreq.py::test_payment_request[out2]": "2da5ced4361fe9e80786d436a69b27d80812ff7a7d40ec3ad22b9cab87f66bdc", "TR_bitcoin-test_signtx_payreq.py::test_payment_request_details": "8c801bd0142e5c1ad4aad50b34c7debb1b8f17a2e0a87eb7f95531b9fd15e095", "TR_bitcoin-test_signtx_prevhash.py::test_invalid_prev_hash[]": "19d738c0babfd39c17793e98e5d621e147d02367f4e4a7c712bb08c0f914a04e", @@ -1461,23 +1440,6 @@ "TR_cardano-test_sign_tx.py::test_cardano_sign_tx_show_details[plutus_transaction_with_total_co-e846c221": "cde51419b852c289c267cc21a10dfbd793a1ef9641d29801745e0a237c6ea8e6", "TR_cardano-test_sign_tx.py::test_cardano_sign_tx_show_details[transaction_with_cip36_registrat-b9111c27": "7f4275e5f1da7312e87d53bbb92c6dd92eb79087c34b3af879c1011a8cb43f86", "TR_cardano-test_sign_tx.py::test_cardano_sign_tx_show_details[transaction_with_stake_deregistr-6e84da2f": "00419869d61f0875c4bf6b08ad1983e48d4daa7837fd9ab287e36a20696b5373", -"TR_eos-test_get_public_key.py::test_eos_get_public_key": "eb0aa54cfe9f6fec9ef3ecb30ed4f1f62ec51163248823e9e69a5f683f99ccea", -"TR_eos-test_signtx.py::test_eos_signtx_buyram": "e60c4713e28f92984a4ceb369c53bc7dc8b5c68f66e090d271983ce214d1f217", -"TR_eos-test_signtx.py::test_eos_signtx_buyrambytes": "eeb48edfe6cc7fef7e86ca0a0ff1474804df89bdaec3d329e19d5b241d70adb4", -"TR_eos-test_signtx.py::test_eos_signtx_delegate": "c52be103fe8205f73ec5cad7fa78ec63ed287efe3c2faccf30dd5d0e29c848c5", -"TR_eos-test_signtx.py::test_eos_signtx_deleteauth": "ce297fe2e737a920658ea595330303bcce87426ed184771d810ad49a343e1b34", -"TR_eos-test_signtx.py::test_eos_signtx_linkauth": "efa47b1f3e1d6158189325d039808a73d7892aa10216dcddcf9f528e304e6c23", -"TR_eos-test_signtx.py::test_eos_signtx_newaccount": "3464ade18d5cedc828ede6e57277ccacd1237887a5e64f4ee47a04cb3bc1e5d6", -"TR_eos-test_signtx.py::test_eos_signtx_refund": "194eee782504f5b9e657066fe3c359370f0f363e1ceae05acc1bca2f35694c96", -"TR_eos-test_signtx.py::test_eos_signtx_sellram": "070d6b2e30ca9dbddcafe4bdeff2d121090e9ee2f71ce487b402ac2f0f92bfe6", -"TR_eos-test_signtx.py::test_eos_signtx_setcontract": "2fe58a86cf7d27990ba3069254226f01774deede22ab5a39f885b11eb63ef78e", -"TR_eos-test_signtx.py::test_eos_signtx_transfer_token": "16642da419c7d0cc18b6f64f0553efc011a3cce224bd5f3f292aecfee4816d56", -"TR_eos-test_signtx.py::test_eos_signtx_undelegate": "49fc2ab8be93e26ec59bf5fb64c25cb3498ec1b6176f255c574e2bb83b153a9c", -"TR_eos-test_signtx.py::test_eos_signtx_unknown": "4b976c1ba143c2b202d28bebab97fee4cdce5a0a8c19ba5917809d5f03aa1d5f", -"TR_eos-test_signtx.py::test_eos_signtx_unlinkauth": "ba9edacffb6f7159184c900fab74e5f4f7ecc62ba676cf1fafee28ad071b881a", -"TR_eos-test_signtx.py::test_eos_signtx_updateauth": "588029c8b6930a4a362670964ca725ee49b902c37c301f8b5669c0b7cd869e60", -"TR_eos-test_signtx.py::test_eos_signtx_vote": "942fcbfa267d23630f72057ef9c3cc6c9efe97ba0d69019e55e779486b4eae3d", -"TR_eos-test_signtx.py::test_eos_signtx_vote_proxy": "76cd6c2d2c7676b04df7492b5ae1d884b1862c3423540ce49324d13601a3ee6e", "TR_ethereum-test_definitions.py::test_builtin": "0f7c5f3f28c296fa300571713636fd7f7603164a1b408b2b0319a8c30e543385", "TR_ethereum-test_definitions.py::test_builtin_token": "7277808c8458316cf889f650886c805a3c5cc96d0c03c53c5897d790f2b87e49", "TR_ethereum-test_definitions.py::test_chain_id_allowed": "f6a80cf048a64de10ed9c4ee49d754a3dee42c4665d59b0c5aba236fa0c20d44", @@ -1645,23 +1607,6 @@ "TR_misc-test_msg_signidentity.py::test_sign": "4ea3ff06287458ae5c08e118e489c0b432316521fbfa47ff587d748761f9c6c2", "TR_monero-test_getaddress.py::test_monero_getaddress": "5dc8b30cf58003e34eb6d1fb2bbe446578a291ed979d82699fa2b932a093fb61", "TR_monero-test_getwatchkey.py::test_monero_getwatchkey": "e0a4795c4167750f9b3a79ca5c8c5af31857a0aab102d1eb8f7722f6643656b9", -"TR_nem-test_getaddress.py::test_nem_getaddress": "b26ee6bdd9ad8c1cc8578e54c62ba2d18c096d4673941bb04354d92a7358e123", -"TR_nem-test_signtx_mosaics.py::test_nem_signtx_mosaic_creation": "5c1a1b10f09b91650944df080aa874e2aaaccb8102e88e1a2c98addfa49d3d0a", -"TR_nem-test_signtx_mosaics.py::test_nem_signtx_mosaic_creation_levy": "7faeacf4118d47a3c9e10fab4b9053aa93cb46a1b32e12831f91095ee7c0dc5a", -"TR_nem-test_signtx_mosaics.py::test_nem_signtx_mosaic_creation_properties": "d7e26600bdfbec93c1db2b5f09444a35a5fe9cf86950260a775842d25fe33fba", -"TR_nem-test_signtx_mosaics.py::test_nem_signtx_mosaic_supply_change": "b647a074c894f92139d7fe540c69e3354e3f168b6e6c58ad22f116a8fbe58581", -"TR_nem-test_signtx_multisig.py::test_nem_signtx_aggregate_modification": "2d60afa983f359691dc3f48281cde486ca3fec08cc0e981547e5b89d91b89ad0", -"TR_nem-test_signtx_multisig.py::test_nem_signtx_multisig": "0e4854bef1ecd2a5c5e9bca162c8529bca4e5bc1cb4650ea3fda070d67ed2aa0", -"TR_nem-test_signtx_multisig.py::test_nem_signtx_multisig_signer": "8dd64558a8fdfbfa9aa80a2755f3a95375c3512470eb64dc86f6d39d628979d0", -"TR_nem-test_signtx_others.py::test_nem_signtx_importance_transfer": "823ce7e09df8f9c28892044ac1e937a41e57587d53792f93c6653e362bc33086", -"TR_nem-test_signtx_others.py::test_nem_signtx_provision_namespace": "e5f3adcb7a15baaa2fae2ad1165d9956fd63a9db1ae9619e92777e5b7a629823", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_encrypted_payload": "8e4760a85f6a646ca1cf76e9337b0bdf6382356fdb9d79c4dcdd05504f118d3b", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_known_mosaic": "9f5ec0c863800fe55ce07d8a35e18ae7ff33768795c1ab4523c047e737241071", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_known_mosaic_with_levy": "20581f9ad888e420c5c5e0547f4d5c5b9dafea34954086b69a7f78e97023bb4b", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_multiple_mosaics": "7bbb5105dfabb6ba151a6ae85718be28bc54c1defdec66a6d7fe67b1e74c93e7", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_simple": "a354d16bbe7096d8c451d96eaa6058b9042a1c0356434ad5b772fd42f54b4e1b", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_unknown_mosaic": "1a7a2a7cfa818bdf213388438cf440c5815a8355e466251eae8b10e0dd57ed58", -"TR_nem-test_signtx_transfers.py::test_nem_signtx_xem_as_mosaic": "2006f688a42bc0ac7237a4857f1d48104e8e66e0e6806877b1697aea4aa945ce", "TR_reset_recovery-test_recovery_bip39_dryrun.py::test_bad_parameters[label-test]": "8c801bd0142e5c1ad4aad50b34c7debb1b8f17a2e0a87eb7f95531b9fd15e095", "TR_reset_recovery-test_recovery_bip39_dryrun.py::test_bad_parameters[language-test]": "8c801bd0142e5c1ad4aad50b34c7debb1b8f17a2e0a87eb7f95531b9fd15e095", "TR_reset_recovery-test_recovery_bip39_dryrun.py::test_bad_parameters[passphrase_protection-True]": "8c801bd0142e5c1ad4aad50b34c7debb1b8f17a2e0a87eb7f95531b9fd15e095", diff --git a/tools/check-bitcoin-only b/tools/check-bitcoin-only index 33a82f9ef..01f39279c 100755 --- a/tools/check-bitcoin-only +++ b/tools/check-bitcoin-only @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash RETURN=0 EXCEPTIONS=() @@ -18,7 +18,7 @@ for exception in "${EXCEPTIONS[@]}"; do done # dump all coins except the first 3 (Bitcoin, Testnet, Regtest) -ALTCOINS=$(./common/tools/cointool.py dump -l -p -t -d trezor1 -d trezor2 | grep '"name"' | cut -d '"' -f 4 | tail -n +4) +ALTCOINS=$(./common/tools/cointool.py dump -l -p -t -d T1B1 -d T2T1 -d T2B1 | grep '"name"' | cut -d '"' -f 4 | tail -n +4) # split on newlines only OLDIFS=$IFS IFS="