trezor-core/tools/coins-gen.py

24 lines
462 B
Python
Raw Normal View History

#!/usr/bin/env python3
import json
2016-11-09 05:52:43 -08:00
fields = [
'coin_name',
'coin_shortcut',
'address_type',
'maxfee_kb',
'address_type_p2sh',
'address_type_p2wpkh',
'address_type_p2wsh',
'signed_message_header',
]
2016-10-20 08:07:56 -07:00
coins = json.load(open('../../trezor-common/coins.json', 'r'))
2016-11-11 09:11:37 -08:00
print('COINS = [')
for c in coins:
print(' CoinType(')
2016-11-09 05:52:43 -08:00
for n in fields:
print(' %s=%s,' % (n, repr(c[n])))
print(' ),')
print(']\n')