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