mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 17:09:44 +00:00
defs: fix segwit related fields
This commit is contained in:
parent
893aedf392
commit
792a4eddb5
@ -1,38 +1,38 @@
|
||||
{
|
||||
"coin_name": "Actinium",
|
||||
"coin_shortcut": "ACM",
|
||||
"coin_label": "Actinium",
|
||||
"website": "https://actinium.org",
|
||||
"github": "https://github.com/Actinium-project/Actinium",
|
||||
"maintainer": "Harris Brakmic <brakmic@actinium.org>",
|
||||
"curve_name": "secp256k1",
|
||||
"address_type": 53,
|
||||
"address_type_p2sh": 55,
|
||||
"maxfee_kb": 40000000,
|
||||
"minfee_kb": 100000,
|
||||
"signed_message_header": "Actinium Signed Message:\n",
|
||||
"hash_genesis_block": "28d77872e23714562f49a1be792c276623c1bbe3fdcf21b6035cfde78b00b824",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": "acm",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 228,
|
||||
"segwit": true,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"coin_name": "Actinium",
|
||||
"coin_shortcut": "ACM",
|
||||
"coin_label": "Actinium",
|
||||
"website": "https://actinium.org",
|
||||
"github": "https://github.com/Actinium-project/Actinium",
|
||||
"maintainer": "Harris Brakmic <brakmic@actinium.org>",
|
||||
"curve_name": "secp256k1",
|
||||
"address_type": 53,
|
||||
"address_type_p2sh": 55,
|
||||
"maxfee_kb": 40000000,
|
||||
"minfee_kb": 100000,
|
||||
"signed_message_header": "Actinium Signed Message:\n",
|
||||
"hash_genesis_block": "28d77872e23714562f49a1be792c276623c1bbe3fdcf21b6035cfde78b00b824",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "acm",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 228,
|
||||
"segwit": true,
|
||||
"decred": false,
|
||||
"fork_id": null,
|
||||
"force_bip143": false,
|
||||
"bip115": false,
|
||||
"default_fee_b": {
|
||||
"Normal": 1000
|
||||
},
|
||||
"dust_limit": 546,
|
||||
"blocktime_seconds": 150,
|
||||
"uri_prefix": "actinium",
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [],
|
||||
"cooldown": 100
|
||||
},
|
||||
"dust_limit": 546,
|
||||
"blocktime_seconds": 150,
|
||||
"uri_prefix": "actinium",
|
||||
"min_address_length": 27,
|
||||
"max_address_length": 34,
|
||||
"bitcore": [],
|
||||
"blockbook": [],
|
||||
"cooldown": 100
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "btg",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 156,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 70615956,
|
||||
"xpub_magic": 70617039,
|
||||
"xpub_magic_segwit_p2sh": 71979618,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 73342198,
|
||||
"bech32_prefix": "tbtg",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 156,
|
||||
|
@ -16,7 +16,7 @@
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": null,
|
||||
"bech32_prefix": "bsd",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 91,
|
||||
"segwit": true,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "dgb",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 20,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76077806,
|
||||
"xpub_magic": 76069926,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "fc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 8,
|
||||
|
@ -15,8 +15,8 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "flash",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 120,
|
||||
"segwit": true,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 15264107,
|
||||
"xpub_magic": 1526049,
|
||||
"xpub_magic_segwit_p2sh": 28471030,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "flo",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 216,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xpub_magic": 27106558,
|
||||
"xprv_magic": 27108450,
|
||||
"xpub_magic_segwit_p2sh": 28471030,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "game",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 101,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 27106558,
|
||||
"xpub_magic": 27108450,
|
||||
"xpub_magic_segwit_p2sh": 28471030,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "ltc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 2,
|
||||
|
@ -14,8 +14,8 @@
|
||||
"hash_genesis_block": "4966625a4b2851d9fdee139e56211a0d88575f59ed816ff5e6a63deb4e3e29a0",
|
||||
"xprv_magic": 70615956,
|
||||
"xpub_magic": 70617039,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_p2sh": 71979618,
|
||||
"xpub_magic_segwit_native": 73342198,
|
||||
"bech32_prefix": "tltc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 1,
|
||||
|
@ -16,7 +16,7 @@
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": null,
|
||||
"bech32_prefix": "mec",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 217,
|
||||
"segwit": true,
|
||||
|
@ -12,10 +12,10 @@
|
||||
"minfee_kb": 100000,
|
||||
"signed_message_header": "Monacoin Signed Message:\n",
|
||||
"hash_genesis_block": "ff9f1c0116d19de7c9963845e129f9ed1bfc0b376eb54fd7afa42e0d418c8bb6",
|
||||
"xpub_magic": 76067358,
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "mona",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 22,
|
||||
|
@ -14,9 +14,9 @@
|
||||
"hash_genesis_block": "00000ffde4c020b5938441a0ea3d314bf619eff0b38f32f78f7583cffa1ea485",
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": null,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "xmy",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 90,
|
||||
"segwit": true,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "nix",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 400,
|
||||
|
@ -12,11 +12,11 @@
|
||||
"minfee_kb": 1000,
|
||||
"signed_message_header": "Pesetacoin Signed Message:\n",
|
||||
"hash_genesis_block": "edfe5830b53251bfff733600b1cd5c192e761c011b055f07924634818c906438",
|
||||
"xpub_magic": 76071982,
|
||||
"xprv_magic": 76079604,
|
||||
"xpub_magic": 76071982,
|
||||
"xpub_magic_segwit_p2sh": null,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"bech32_prefix": "null",
|
||||
"bech32_prefix": null,
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 109,
|
||||
"segwit": false,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "vtc",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 28,
|
||||
|
@ -15,7 +15,7 @@
|
||||
"xprv_magic": 76066276,
|
||||
"xpub_magic": 76067358,
|
||||
"xpub_magic_segwit_p2sh": 77429938,
|
||||
"xpub_magic_segwit_native": null,
|
||||
"xpub_magic_segwit_native": 78792518,
|
||||
"bech32_prefix": "via",
|
||||
"cashaddr_prefix": null,
|
||||
"slip44": 14,
|
||||
|
@ -414,36 +414,29 @@ def check_key_uniformity(coins):
|
||||
def check_segwit(coins):
|
||||
for coin in coins:
|
||||
segwit = coin["segwit"]
|
||||
segwit_fields = [
|
||||
"bech32_prefix",
|
||||
"xpub_magic_segwit_native",
|
||||
"xpub_magic_segwit_p2sh",
|
||||
]
|
||||
if segwit:
|
||||
if coin["xpub_magic_segwit_native"] is None:
|
||||
print_log(
|
||||
logging.WARNING,
|
||||
coin["name"],
|
||||
"segwit is True => xpub_magic_segwit_native should be set",
|
||||
)
|
||||
# return False
|
||||
if coin["xpub_magic_segwit_p2sh"] is None:
|
||||
print_log(
|
||||
logging.WARNING,
|
||||
coin["name"],
|
||||
"segwit is True => xpub_magic_segwit_p2sh should be set",
|
||||
)
|
||||
# return False
|
||||
for field in segwit_fields:
|
||||
if coin[field] is None:
|
||||
print_log(
|
||||
logging.ERROR,
|
||||
coin["name"],
|
||||
"segwit is True => %s should be set" % field,
|
||||
)
|
||||
return False
|
||||
else:
|
||||
if coin["xpub_magic_segwit_native"] is not None:
|
||||
print_log(
|
||||
logging.ERROR,
|
||||
coin["name"],
|
||||
"segwit is False => xpub_magic_segwit_native should NOT be set",
|
||||
)
|
||||
return False
|
||||
if coin["xpub_magic_segwit_p2sh"] is not None:
|
||||
print_log(
|
||||
logging.ERROR,
|
||||
coin["name"],
|
||||
"segwit is False => xpub_magic_segwit_p2sh should NOT be set",
|
||||
)
|
||||
return False
|
||||
for field in segwit_fields:
|
||||
if coin[field] is not None:
|
||||
print_log(
|
||||
logging.ERROR,
|
||||
coin["name"],
|
||||
"segwit is True => %s should NOT be set" % field,
|
||||
)
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user