2016-10-20 14:40:46 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import json
|
|
|
|
from collections import OrderedDict
|
|
|
|
|
2016-10-20 15:07:56 +00:00
|
|
|
coins = json.load(open('../../trezor-common/coins.json', 'r'))
|
2016-10-20 14:40:46 +00:00
|
|
|
|
|
|
|
print('_coins = [')
|
|
|
|
for c in coins:
|
|
|
|
d = OrderedDict()
|
|
|
|
for n in ['coin_name', 'coin_shortcut', 'maxfee_kb', 'address_type', 'address_type_p2sh', 'address_type_p2wpkh', 'address_type_p2wsh', 'signed_message_header', 'bip44']:
|
|
|
|
d[n] = c[n]
|
|
|
|
d['xpub_magic'] = int(c['xpub_magic'], 16)
|
|
|
|
d['xprv_magic'] = int(c['xprv_magic'], 16)
|
2016-11-06 14:50:39 +00:00
|
|
|
print(' {')
|
2016-10-20 14:40:46 +00:00
|
|
|
for k in d:
|
2016-11-06 14:50:39 +00:00
|
|
|
print(' %s: %s,' % (repr(k), repr(d[k])))
|
|
|
|
print(' },')
|
2016-10-20 14:40:46 +00:00
|
|
|
print(']\n')
|