2016-10-20 14:40:46 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import json
|
2016-11-09 13:52:43 +00:00
|
|
|
|
|
|
|
fields = [
|
|
|
|
'coin_name',
|
|
|
|
'coin_shortcut',
|
2017-11-09 14:37:22 +00:00
|
|
|
'coin_label',
|
2016-11-09 13:52:43 +00:00
|
|
|
'address_type',
|
|
|
|
'address_type_p2sh',
|
2017-05-12 20:51:07 +00:00
|
|
|
'maxfee_kb',
|
2017-11-09 14:37:22 +00:00
|
|
|
'minfee_kb',
|
2016-11-09 13:52:43 +00:00
|
|
|
'signed_message_header',
|
2017-11-09 14:37:22 +00:00
|
|
|
'hash_genesis_block',
|
2017-04-24 13:59:30 +00:00
|
|
|
'xprv_magic',
|
2017-11-09 14:37:22 +00:00
|
|
|
'xpub_magic',
|
|
|
|
'bech32_prefix',
|
2017-04-24 13:59:30 +00:00
|
|
|
'bip44',
|
2017-04-26 13:46:08 +00:00
|
|
|
'segwit',
|
2017-11-09 14:37:22 +00:00
|
|
|
'forkid',
|
2018-02-08 17:58:03 +00:00
|
|
|
'force_bip143',
|
2017-11-09 14:37:22 +00:00
|
|
|
'default_fee_b',
|
|
|
|
'dust_limit',
|
|
|
|
'blocktime_minutes',
|
|
|
|
'firmware',
|
|
|
|
'address_prefix',
|
|
|
|
'min_address_length',
|
|
|
|
'max_address_length',
|
|
|
|
'bitcore',
|
2016-11-09 13:52:43 +00:00
|
|
|
]
|
2016-10-20 14:40:46 +00:00
|
|
|
|
2017-11-09 14:37:22 +00:00
|
|
|
coins = json.load(open('../../vendor/trezor-common/coins.json', 'r'))
|
2016-10-20 14:40:46 +00:00
|
|
|
|
2016-11-11 17:11:37 +00:00
|
|
|
print('COINS = [')
|
2016-10-20 14:40:46 +00:00
|
|
|
for c in coins:
|
2016-11-09 13:46:59 +00:00
|
|
|
print(' CoinType(')
|
2016-11-09 13:52:43 +00:00
|
|
|
for n in fields:
|
2017-04-24 13:59:30 +00:00
|
|
|
if n in ['xpub_magic', 'xprv_magic']:
|
|
|
|
print(' %s=0x%s,' % (n, c[n]))
|
|
|
|
else:
|
|
|
|
print(' %s=%s,' % (n, repr(c[n])))
|
2016-11-09 13:46:59 +00:00
|
|
|
print(' ),')
|
2016-10-20 14:40:46 +00:00
|
|
|
print(']\n')
|