1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 01:18:28 +00:00

defs: rename address_prefix to uri_prefix, drop ':', add more regexes

This commit is contained in:
Pavol Rusnak 2018-07-16 14:20:02 +02:00
parent bd2866f61b
commit c5045f0667
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
38 changed files with 40 additions and 40 deletions

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoincash:",
"uri_prefix": "bitcoincash",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoincash:",
"uri_prefix": "bitcoincash",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoingold:",
"uri_prefix": "bitcoingold",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoingold:",
"uri_prefix": "bitcoingold",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoin:",
"uri_prefix": "bitcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoin:",
"uri_prefix": "bitcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 150,
"address_prefix": "bitcore:",
"uri_prefix": "bitcore",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 150,
"address_prefix": "bitcoinprivate:",
"uri_prefix": "bitcoinprivate",
"min_address_length": 35,
"max_address_length": 95,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "crown:",
"uri_prefix": "crown",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 5460,
"blocktime_seconds": 150,
"address_prefix": "dash:",
"uri_prefix": "dash",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 5460,
"blocktime_seconds": 150,
"address_prefix": "dash:",
"uri_prefix": "dash",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoin:",
"uri_prefix": "bitcoin",
"min_address_length": 35,
"max_address_length": 35,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "bitcoin:",
"uri_prefix": "bitcoin",
"min_address_length": 35,
"max_address_length": 35,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 30,
"address_prefix": "denarius:",
"uri_prefix": "denarius",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 15,
"address_prefix": "digibyte:",
"uri_prefix": "digibyte",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 10000000,
"blocktime_seconds": 60,
"address_prefix": "dogecoin:",
"uri_prefix": "dogecoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 60,
"address_prefix": "feathercoin:",
"uri_prefix": "feathercoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 10000,
"blocktime_seconds": 60,
"address_prefix": "flashcoin:",
"uri_prefix": "flashcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "fujicoin:",
"uri_prefix": "fujicoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "groestlcoin:",
"uri_prefix": "groestlcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "groestlcoin:",
"uri_prefix": "groestlcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "koto:",
"uri_prefix": "koto",
"min_address_length": 35,
"max_address_length": 95,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 150,
"address_prefix": "litecoin:",
"uri_prefix": "litecoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 150,
"address_prefix": "litecoin:",
"uri_prefix": "litecoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 90,
"address_prefix": "monacoin:",
"uri_prefix": "monacoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 5460,
"blocktime_seconds": 40,
"address_prefix": "monetaryunit:",
"uri_prefix": "monetaryunit",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 60,
"address_prefix": "myriadcoin:",
"uri_prefix": "myriadcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 2940,
"blocktime_seconds": 600,
"address_prefix": "namecoin:",
"uri_prefix": "namecoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 10000000,
"blocktime_seconds": 60,
"address_prefix": "pesetacoin:",
"uri_prefix": "pesetacoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 5460,
"blocktime_seconds": 120,
"address_prefix": "terracoin:",
"uri_prefix": "terracoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 150,
"address_prefix": "vertcoin:",
"uri_prefix": "vertcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [],

View File

@ -33,7 +33,7 @@
},
"dust_limit": 54600,
"blocktime_seconds": 24,
"address_prefix": "viacoin:",
"uri_prefix": "viacoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 150,
"address_prefix": "zcash:",
"uri_prefix": "zcash",
"min_address_length": 35,
"max_address_length": 95,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 150,
"address_prefix": "zcash:",
"uri_prefix": "zcash",
"min_address_length": 35,
"max_address_length": 95,
"bitcore": [

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "zcoin:",
"uri_prefix": "zcoin",
"min_address_length": 27,
"max_address_length": 34,
"bitcore": [

View File

@ -33,7 +33,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 600,
"address_prefix": "testzcoin:",
"uri_prefix": "testzcoin",
"min_address_length": 27,
"max_address_length": 35,
"bitcore": [],

View File

@ -30,7 +30,7 @@
},
"dust_limit": 546,
"blocktime_seconds": 150,
"address_prefix": "zencash:",
"uri_prefix": "zencash",
"min_address_length": 35,
"max_address_length": 95,
"bitcore": [

View File

@ -102,12 +102,12 @@ def validate_coin(coin):
assert check_type(coin['dust_limit'], int)
assert check_type(coin['blocktime_seconds'], int)
assert check_type(coin['signed_message_header'], str)
assert check_type(coin['address_prefix'], str, regex=r'^.*:$')
assert check_type(coin['uri_prefix'], str, regex=r'^[a-z]+$')
assert check_type(coin['min_address_length'], int)
assert check_type(coin['max_address_length'], int)
assert coin['max_address_length'] >= coin['min_address_length']
assert check_type(coin['bech32_prefix'], str, nullable=True)
assert check_type(coin['cashaddr_prefix'], str, nullable=True)
assert check_type(coin['bech32_prefix'], str, regex=r'^[a-z]+$', nullable=True)
assert check_type(coin['cashaddr_prefix'], str, regex=r'^[a-z]+$', nullable=True)
assert check_type(coin['bitcore'], list, empty=True)
for bc in coin['bitcore']:
assert not bc.endswith('/')