1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-29 01:28:10 +00:00
trezor-firmware/src/apps/common/coins.py

278 lines
8.4 KiB
Python
Raw Normal View History

from trezor.messages.CoinType import CoinType
2017-11-09 14:37:22 +00:00
# the following list is generated using tools/codegen/gen_coins.py
# do not edit manually!
COINS = [
CoinType(
coin_name='Bitcoin',
coin_shortcut='BTC',
2017-11-09 14:37:22 +00:00
coin_label='Bitcoin',
address_type=0,
address_type_p2sh=5,
2017-05-12 23:29:49 +00:00
maxfee_kb=500000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Bitcoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
xprv_magic=0x0488ade4,
2017-11-09 14:37:22 +00:00
xpub_magic=0x0488b21e,
bech32_prefix='bc',
bip44=0,
2017-11-09 14:37:22 +00:00
segwit=True,
forkid=None,
default_fee_b={'Low': 10, 'Economy': 70, 'Normal': 140, 'High': 200},
dust_limit=546,
blocktime_minutes=10,
firmware='stable',
address_prefix='bitcoin:',
min_address_length=27,
max_address_length=34,
bitcore=['https://btc-bitcore3.trezor.io', 'https://btc-bitcore1.trezor.io'],
),
CoinType(
coin_name='Testnet',
coin_shortcut='TEST',
2017-11-09 14:37:22 +00:00
coin_label='Testnet',
address_type=111,
address_type_p2sh=196,
2017-05-12 20:51:07 +00:00
maxfee_kb=10000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Bitcoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943',
xprv_magic=0x04358394,
2017-11-09 14:37:22 +00:00
xpub_magic=0x043587cf,
bech32_prefix='tb',
bip44=1,
2017-04-26 13:46:08 +00:00
segwit=True,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=546,
blocktime_minutes=10,
firmware='stable',
address_prefix='bitcoin:',
min_address_length=27,
max_address_length=34,
bitcore=['https://testnet-bitcore3.trezor.io', 'https://testnet-bitcore4.trezor.io'],
),
2017-08-15 15:29:14 +00:00
CoinType(
coin_name='Bcash',
coin_shortcut='BCH',
2017-11-09 14:37:22 +00:00
coin_label='Bitcoin Cash',
2017-08-15 15:29:14 +00:00
address_type=0,
address_type_p2sh=5,
maxfee_kb=500000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
2017-08-15 15:29:14 +00:00
signed_message_header='Bitcoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
2017-08-15 15:29:14 +00:00
xprv_magic=0x0488ade4,
2017-11-09 14:37:22 +00:00
xpub_magic=0x0488b21e,
bech32_prefix=None,
2017-08-15 15:29:14 +00:00
bip44=145,
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=0,
default_fee_b={'Low': 10, 'Economy': 70, 'Normal': 140, 'High': 200},
dust_limit=546,
blocktime_minutes=10,
firmware='stable',
address_prefix='bitcoincash:',
min_address_length=27,
max_address_length=34,
bitcore=['https://bch-bitcore2.trezor.io'],
2017-08-15 15:29:14 +00:00
),
CoinType(
coin_name='Bcash Testnet',
coin_shortcut='TBCH',
2017-11-09 14:37:22 +00:00
coin_label='Bitcoin Cash Testnet',
2017-08-15 15:29:14 +00:00
address_type=111,
address_type_p2sh=196,
maxfee_kb=10000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
2017-08-15 15:29:14 +00:00
signed_message_header='Bitcoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943',
2017-08-15 15:29:14 +00:00
xprv_magic=0x04358394,
2017-11-09 14:37:22 +00:00
xpub_magic=0x043587cf,
bech32_prefix=None,
2017-08-15 15:29:14 +00:00
bip44=1,
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=0,
default_fee_b={'Normal': 10},
dust_limit=546,
blocktime_minutes=10,
firmware='debug',
address_prefix='bitcoincash:',
min_address_length=27,
max_address_length=34,
bitcore=[],
2017-08-15 15:29:14 +00:00
),
CoinType(
coin_name='Namecoin',
coin_shortcut='NMC',
2017-11-09 14:37:22 +00:00
coin_label='Namecoin',
address_type=52,
address_type_p2sh=5,
2017-05-12 20:51:07 +00:00
maxfee_kb=10000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Namecoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='000000000062b72c5e2ceb45fbc8587e807c155b0da735e6483dfba2f0a9c770',
xprv_magic=0x019d9cfe,
2017-11-09 14:37:22 +00:00
xpub_magic=0x019da462,
bech32_prefix=None,
bip44=7,
2017-04-26 13:46:08 +00:00
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=2940,
blocktime_minutes=10,
firmware='stable',
address_prefix='namecoin:',
min_address_length=27,
max_address_length=34,
bitcore=[],
),
CoinType(
coin_name='Litecoin',
coin_shortcut='LTC',
2017-11-09 14:37:22 +00:00
coin_label='Litecoin',
address_type=48,
2017-05-12 20:51:07 +00:00
address_type_p2sh=50,
2017-08-15 15:29:14 +00:00
maxfee_kb=40000000,
2017-11-09 14:37:22 +00:00
minfee_kb=100000,
signed_message_header='Litecoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2',
xprv_magic=0x019d9cfe,
2017-11-09 14:37:22 +00:00
xpub_magic=0x019da462,
bech32_prefix='ltc',
bip44=2,
2017-04-26 13:46:08 +00:00
segwit=True,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 1000},
dust_limit=54600,
blocktime_minutes=2.5,
firmware='stable',
address_prefix='litecoin:',
min_address_length=27,
max_address_length=34,
bitcore=['https://ltc-bitcore3.trezor.io'],
),
CoinType(
coin_name='Dogecoin',
coin_shortcut='DOGE',
2017-11-09 14:37:22 +00:00
coin_label='Dogecoin',
address_type=30,
address_type_p2sh=22,
2017-05-12 20:51:07 +00:00
maxfee_kb=1000000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Dogecoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691',
xprv_magic=0x02fac398,
2017-11-09 14:37:22 +00:00
xpub_magic=0x02facafd,
bech32_prefix=None,
bip44=3,
2017-04-26 13:46:08 +00:00
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=10000000,
blocktime_minutes=1,
firmware='stable',
address_prefix='dogecoin:',
min_address_length=27,
max_address_length=34,
bitcore=[],
),
CoinType(
coin_name='Dash',
coin_shortcut='DASH',
2017-11-09 14:37:22 +00:00
coin_label='Dash',
address_type=76,
address_type_p2sh=16,
2017-05-12 20:51:07 +00:00
maxfee_kb=100000,
2017-11-09 14:37:22 +00:00
minfee_kb=10000,
signed_message_header='DarkCoin Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6',
xprv_magic=0x02fe52f8,
2017-11-09 14:37:22 +00:00
xpub_magic=0x02fe52cc,
bech32_prefix=None,
bip44=5,
2017-04-26 13:46:08 +00:00
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=5460,
blocktime_minutes=2.5,
firmware='stable',
address_prefix='dash:',
min_address_length=27,
max_address_length=34,
bitcore=['https://dash-bitcore1.trezor.io', 'https://dash-bitcore3.trezor.io'],
),
CoinType(
coin_name='Zcash',
coin_shortcut='ZEC',
2017-11-09 14:37:22 +00:00
coin_label='Zcash',
address_type=7352,
address_type_p2sh=7357,
2017-05-12 20:51:07 +00:00
maxfee_kb=1000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Zcash Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='00040fe8ec8471911baa1db1266ea15dd06b4a8a5c453883c000b031973dce08',
xprv_magic=0x0488ade4,
2017-11-09 14:37:22 +00:00
xpub_magic=0x0488b21e,
bech32_prefix=None,
bip44=133,
2017-04-26 13:46:08 +00:00
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=546,
blocktime_minutes=2.5,
firmware='stable',
address_prefix='zcash:',
min_address_length=35,
max_address_length=95,
bitcore=['https://zec-bitcore1.trezor.io/'],
),
CoinType(
coin_name='Zcash Testnet',
coin_shortcut='TAZ',
2017-11-09 14:37:22 +00:00
coin_label='Zcash Testnet',
address_type=7461,
address_type_p2sh=7354,
2017-05-12 20:51:07 +00:00
maxfee_kb=10000000,
2017-11-09 14:37:22 +00:00
minfee_kb=1000,
signed_message_header='Zcash Signed Message:\n',
2017-11-09 14:37:22 +00:00
hash_genesis_block='05a60a92d99d85997cce3b87616c089f6124d7342af37106edc76126334a2c38',
xprv_magic=0x04358394,
2017-11-09 14:37:22 +00:00
xpub_magic=0x043587cf,
bech32_prefix=None,
bip44=1,
2017-04-26 13:46:08 +00:00
segwit=False,
2017-11-09 14:37:22 +00:00
forkid=None,
default_fee_b={'Normal': 10},
dust_limit=546,
blocktime_minutes=2.5,
firmware='debug',
address_prefix='zcash:',
min_address_length=35,
max_address_length=95,
bitcore=[],
),
]
def by_shortcut(shortcut):
for c in COINS:
if c.coin_shortcut == shortcut:
return c
2016-11-15 10:57:18 +00:00
raise ValueError('Unknown coin shortcut "%s"' % shortcut)
def by_name(name):
for c in COINS:
if c.coin_name == name:
return c
2016-11-15 10:57:18 +00:00
raise ValueError('Unknown coin name "%s"' % name)
def by_address_type(version):
for c in COINS:
if c.address_type == version:
return c
2016-11-15 10:57:18 +00:00
raise ValueError('Unknown coin address type %d' % version)