1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

defs/tools: rename "coins" to "bitcoin"

This commit is contained in:
matejcik 2018-08-24 15:42:06 +02:00
parent a903b996c8
commit 467b41efda
85 changed files with 133 additions and 133 deletions

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

1
defs/coins Symbolic link
View File

@ -0,0 +1 @@
bitcoin

View File

@ -1 +0,0 @@
../../../tools/build_coins.py

View File

@ -5,62 +5,62 @@
"erc20:eth:GNT": {
"coinmarketcap_alias": "golem-network-tokens"
},
"coin:BCH": {
"bitcoin:BCH": {
"wallet": {
"Electron Cash": "https://electroncash.org"
}
},
"coin:BTC": {
"bitcoin:BTC": {
"wallet": {
"Electrum": "https://electrum.org"
}
},
"coin:BTCP": {
"bitcoin:BTCP": {
"wallet": {
"BTCP Electrum": "https://github.com/BTCPrivate/electrum-btcp"
}
},
"coin:BTG": {
"bitcoin:BTG": {
"wallet": {
"ElectrumG": "https://github.com/BTCGPU/electrum"
}
},
"coin:DASH": {
"bitcoin:DASH": {
"wallet": {
"Dash Electrum": "https://electrum.dash.org"
}
},
"coin:FJC": {
"bitcoin:FJC": {
"wallet": {
"Electrum-FJC": "http://www.fujicoin.org/downloads.php"
}
},
"coin:GRS": {
"bitcoin:GRS": {
"wallet": {
"Electrum-GRS": "https://www.groestlcoin.org/groestlcoin-electrum-wallet/"
}
},
"coin:LTC": {
"bitcoin:LTC": {
"wallet": {
"Electrum-LTC": "https://electrum-ltc.org"
}
},
"coin:MONA": {
"bitcoin:MONA": {
"wallet": {
"Electrum-MONA": "https://electrum-mona.org"
}
},
"coin:NMC": {
"bitcoin:NMC": {
"wallet": {
"Electrum-NMC": "https://github.com/namecoin/electrum-nmc"
}
},
"coin:VIA": {
"bitcoin:VIA": {
"wallet": {
"Vialectrum": "https://vialectrum.org"
}
},
"coin:XZC": {
"bitcoin:XZC": {
"wallet": {
"Electrum-XZC": "https://github.com/zcoinofficial/electrum-xzc",
"Znode Tool": "https://github.com/yura-pakhuchiy/znode-tool"

View File

@ -1,55 +1,55 @@
{
"connect": {
"supported": {
"coin:BCH": true,
"coin:BTC": true,
"coin:BTG": true,
"coin:DASH": true,
"coin:DOGE": true,
"coin:LTC": true,
"coin:TEST": true,
"coin:VTC": true,
"coin:ZEC": true
"bitcoin:BCH": true,
"bitcoin:BTC": true,
"bitcoin:BTG": true,
"bitcoin:DASH": true,
"bitcoin:DOGE": true,
"bitcoin:LTC": true,
"bitcoin:TEST": true,
"bitcoin:VTC": true,
"bitcoin:ZEC": true
},
"unsupported": {}
},
"trezor1": {
"supported": {
"coin:BCH": "1.6.2",
"coin:BTC": "1.5.2",
"coin:BTCP": "1.6.2",
"coin:BTG": "1.6.2",
"coin:DASH": "1.5.2",
"coin:DCR": "1.6.2",
"coin:DGB": "1.6.0",
"coin:DNR": "soon",
"coin:DOGE": "1.5.2",
"coin:FJC": "1.6.1",
"coin:FLASH": "soon",
"coin:FTC": "soon",
"coin:GRS": "1.6.2",
"coin:KOTO": "soon",
"coin:LTC": "1.5.2",
"coin:MONA": "1.6.0",
"coin:MUE": "soon",
"coin:NMC": "1.5.2",
"coin:PTC": "soon",
"coin:SMART": "soon",
"coin:TAZ": "1.6.2",
"coin:TBCH": "1.6.2",
"coin:TBTG": "soon",
"coin:TDCR": "1.6.2",
"coin:TEST": "1.5.2",
"coin:TLTC": "1.6.2",
"coin:VIA": "1.6.2",
"coin:VTC": "1.6.1",
"coin:XMY": "soon",
"coin:XZC": "1.6.2",
"coin:ZEC": "1.6.2",
"coin:tDASH": "1.6.2",
"coin:tGRS": "1.6.2",
"coin:tSMART": "soon",
"coin:tXZC": "1.6.2",
"bitcoin:BCH": "1.6.2",
"bitcoin:BTC": "1.5.2",
"bitcoin:BTCP": "1.6.2",
"bitcoin:BTG": "1.6.2",
"bitcoin:DASH": "1.5.2",
"bitcoin:DCR": "1.6.2",
"bitcoin:DGB": "1.6.0",
"bitcoin:DNR": "soon",
"bitcoin:DOGE": "1.5.2",
"bitcoin:FJC": "1.6.1",
"bitcoin:FLASH": "soon",
"bitcoin:FTC": "soon",
"bitcoin:GRS": "1.6.2",
"bitcoin:KOTO": "soon",
"bitcoin:LTC": "1.5.2",
"bitcoin:MONA": "1.6.0",
"bitcoin:MUE": "soon",
"bitcoin:NMC": "1.5.2",
"bitcoin:PTC": "soon",
"bitcoin:SMART": "soon",
"bitcoin:TAZ": "1.6.2",
"bitcoin:TBCH": "1.6.2",
"bitcoin:TBTG": "soon",
"bitcoin:TDCR": "1.6.2",
"bitcoin:TEST": "1.5.2",
"bitcoin:TLTC": "1.6.2",
"bitcoin:VIA": "1.6.2",
"bitcoin:VTC": "1.6.1",
"bitcoin:XMY": "soon",
"bitcoin:XZC": "1.6.2",
"bitcoin:ZEC": "1.6.2",
"bitcoin:tDASH": "1.6.2",
"bitcoin:tGRS": "1.6.2",
"bitcoin:tSMART": "soon",
"bitcoin:tXZC": "1.6.2",
"erc20:ella:MINING": "1.6.2",
"erc20:etc:BEC": "1.6.2",
"erc20:eth:$FFC": "1.6.2",
@ -707,10 +707,10 @@
"nem:XEM": "1.6.2"
},
"unsupported": {
"coin:BTX": "address_type collides with Bitcoin",
"coin:CRW": "address_type collides with Bitcoin",
"coin:TRC": "address_type collides with Bitcoin",
"coin:ZEN": "not implemented on T1",
"bitcoin:BTX": "address_type collides with Bitcoin",
"bitcoin:CRW": "address_type collides with Bitcoin",
"bitcoin:TRC": "address_type collides with Bitcoin",
"bitcoin:ZEN": "not implemented on T1",
"erc20:etc:PLAY": "(AUTO) duplicate key",
"erc20:eth:ATH": "(AUTO) duplicate key",
"erc20:eth:ATH (AIgatha Token)": "(AUTO) duplicate key",
@ -825,40 +825,40 @@
},
"trezor2": {
"supported": {
"coin:BCH": "2.0.7",
"coin:BTC": "2.0.5",
"coin:BTCP": "2.0.7",
"coin:BTG": "2.0.7",
"coin:DASH": "2.0.5",
"coin:DGB": "2.0.5",
"coin:DNR": "soon",
"coin:DOGE": "2.0.5",
"coin:FJC": "2.0.5",
"coin:FLASH": "soon",
"coin:FTC": "soon",
"coin:GRS": "2.0.8",
"coin:KOTO": "soon",
"coin:LTC": "2.0.5",
"coin:MONA": "2.0.5",
"coin:MUE": "soon",
"coin:NMC": "2.0.5",
"coin:PTC": "soon",
"coin:SMART": "soon",
"coin:TAZ": "2.0.7",
"coin:TBCH": "2.0.7",
"coin:TBTG": "soon",
"coin:TEST": "2.0.5",
"coin:TLTC": "2.0.7",
"coin:VIA": "2.0.7",
"coin:VTC": "2.0.5",
"coin:XMY": "soon",
"coin:XZC": "2.0.7",
"coin:ZEC": "2.0.7",
"coin:ZEN": "2.0.8",
"coin:tDASH": "soon",
"coin:tGRS": "2.0.8",
"coin:tSMART": "soon",
"coin:tXZC": "2.0.7",
"bitcoin:BCH": "2.0.7",
"bitcoin:BTC": "2.0.5",
"bitcoin:BTCP": "2.0.7",
"bitcoin:BTG": "2.0.7",
"bitcoin:DASH": "2.0.5",
"bitcoin:DGB": "2.0.5",
"bitcoin:DNR": "soon",
"bitcoin:DOGE": "2.0.5",
"bitcoin:FJC": "2.0.5",
"bitcoin:FLASH": "soon",
"bitcoin:FTC": "soon",
"bitcoin:GRS": "2.0.8",
"bitcoin:KOTO": "soon",
"bitcoin:LTC": "2.0.5",
"bitcoin:MONA": "2.0.5",
"bitcoin:MUE": "soon",
"bitcoin:NMC": "2.0.5",
"bitcoin:PTC": "soon",
"bitcoin:SMART": "soon",
"bitcoin:TAZ": "2.0.7",
"bitcoin:TBCH": "2.0.7",
"bitcoin:TBTG": "soon",
"bitcoin:TEST": "2.0.5",
"bitcoin:TLTC": "2.0.7",
"bitcoin:VIA": "2.0.7",
"bitcoin:VTC": "2.0.5",
"bitcoin:XMY": "soon",
"bitcoin:XZC": "2.0.7",
"bitcoin:ZEC": "2.0.7",
"bitcoin:ZEN": "2.0.8",
"bitcoin:tDASH": "soon",
"bitcoin:tGRS": "2.0.8",
"bitcoin:tSMART": "soon",
"bitcoin:tXZC": "2.0.7",
"erc20:ella:MINING": "2.0.7",
"erc20:etc:BEC": "2.0.7",
"erc20:eth:$FFC": "2.0.7",
@ -1521,11 +1521,11 @@
"nem:XEM": "2.0.7"
},
"unsupported": {
"coin:BTX": "address_type collides with Bitcoin",
"coin:CRW": "address_type collides with Bitcoin",
"coin:DCR": "not implemented on Trezor T",
"coin:TDCR": "not implemented on Trezor T",
"coin:TRC": "address_type collides with Bitcoin",
"bitcoin:BTX": "address_type collides with Bitcoin",
"bitcoin:CRW": "address_type collides with Bitcoin",
"bitcoin:DCR": "not implemented on Trezor T",
"bitcoin:TDCR": "not implemented on Trezor T",
"bitcoin:TRC": "address_type collides with Bitcoin",
"erc20:etc:PLAY": "(AUTO) duplicate key",
"erc20:eth:ATH": "(AUTO) duplicate key",
"erc20:eth:ATH (AIgatha Token)": "(AUTO) duplicate key",
@ -1635,27 +1635,27 @@
},
"webwallet": {
"supported": {
"coin:BCH": true,
"coin:BTC": true,
"coin:BTCP": true,
"coin:BTG": true,
"coin:DASH": true,
"coin:DCR": true,
"coin:DGB": true,
"coin:DOGE": true,
"coin:FJC": true,
"coin:GRS": true,
"coin:LTC": true,
"coin:MONA": true,
"coin:TAZ": true,
"coin:TDCR": true,
"coin:TEST": true,
"coin:TLTC": true,
"coin:VIA": true,
"coin:VTC": true,
"coin:XZC": true,
"coin:ZEC": true,
"coin:tGRS": true
"bitcoin:BCH": true,
"bitcoin:BTC": true,
"bitcoin:BTCP": true,
"bitcoin:BTG": true,
"bitcoin:DASH": true,
"bitcoin:DCR": true,
"bitcoin:DGB": true,
"bitcoin:DOGE": true,
"bitcoin:FJC": true,
"bitcoin:GRS": true,
"bitcoin:LTC": true,
"bitcoin:MONA": true,
"bitcoin:TAZ": true,
"bitcoin:TDCR": true,
"bitcoin:TEST": true,
"bitcoin:TLTC": true,
"bitcoin:VIA": true,
"bitcoin:VTC": true,
"bitcoin:XZC": true,
"bitcoin:ZEC": true,
"bitcoin:tGRS": true
},
"unsupported": {}
}

View File

@ -37,13 +37,13 @@ class CoinsInfo(dict):
"""Collection of information about all known kinds of coins.
It contains the following lists:
`coins` for btc-like coins,
`bitcoin` for btc-like coins,
`eth` for ethereum networks,
`erc20` for ERC20 tokens,
`nem` for NEM mosaics,
`misc` for other networks.
Accessible as a dict or by attribute: `info["coins"] == info.coins`
Accessible as a dict or by attribute: `info["misc"] == info.misc`
"""
def as_list(self):
@ -196,7 +196,7 @@ def _load_btc_coins():
coin.update(
name=coin["coin_name"],
shortcut=coin["coin_shortcut"],
key="coin:{}".format(coin["coin_shortcut"]),
key="bitcoin:{}".format(coin["coin_shortcut"]),
icon=filename.replace(".json", ".png"),
)
coins.append(coin)
@ -450,7 +450,7 @@ def collect_coin_info():
Automatically removes duplicate symbols from the result.
"""
all_coins = CoinsInfo(
coins=_load_btc_coins(),
bitcoin=_load_btc_coins(),
eth=_load_ethereum_networks(),
erc20=_load_erc20_tokens(),
nem=_load_nem_mosaics(),
@ -458,7 +458,7 @@ def collect_coin_info():
)
for k, coins in all_coins.items():
if k == "coins":
if k == "bitcoin":
coins.sort(key=_btc_sort_key)
elif k == "nem":
# do not sort nem

View File

@ -165,7 +165,7 @@ def update_simple(coins, support_info, type):
return res
def update_coins(coins, support_info):
def update_bitcoin(coins, support_info):
res = update_simple(coins, support_info, "coin")
for coin in coins:
key = coin["key"]
@ -298,7 +298,7 @@ if __name__ == "__main__":
support_info = coin_info.support_info(defs)
coins = {}
coins.update(update_coins(defs.coins, support_info))
coins.update(update_bitcoin(defs.bitcoin, support_info))
coins.update(update_erc20(defs.erc20, support_info))
coins.update(update_ethereum_networks(defs.eth, support_info))
coins.update(update_simple(defs.nem, support_info, "mosaic"))

View File

@ -502,7 +502,7 @@ def check(backend, icons, show_duplicates):
all_checks_passed = True
print("Checking BTC-like coins...")
if not check_btc(defs.coins):
if not check_btc(defs.bitcoin):
all_checks_passed = False
if show_duplicates == "all":
@ -517,12 +517,12 @@ def check(backend, icons, show_duplicates):
if icons:
print("Checking icon files...")
if not check_icons(defs.coins):
if not check_icons(defs.bitcoin):
all_checks_passed = False
if backend:
print("Checking backend responses...")
if not check_backends(defs.coins):
if not check_backends(defs.bitcoin):
all_checks_passed = False
print("Checking key uniformity...")
@ -543,7 +543,7 @@ def check(backend, icons, show_duplicates):
@click.option("-o", "--outfile", type=click.File(mode="w"), default="./coins.json")
def coins_json(outfile):
"""Generate coins.json for consumption in python-trezor and Connect/Wallet"""
coins = coin_info.coin_info().coins
coins = coin_info.coin_info().bitcoin
support_info = coin_info.support_info(coins)
by_name = {}
for coin in coins:
@ -563,7 +563,7 @@ def coindefs(outfile):
This is currently unused but should enable us to add new coins without having to
update firmware.
"""
coins = coin_info.coin_info().coins
coins = coin_info.coin_info().bitcoin
coindefs = {}
for coin in coins:
key = coin["key"]