mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
src/apps/wallet: implement script_type handling in get_public_key; update vendor/trezor-common
This commit is contained in:
parent
fc427fa726
commit
ebdd8c9b07
@ -13,6 +13,8 @@ class CoinInfo:
|
||||
maxfee_kb: int,
|
||||
signed_message_header: str,
|
||||
xpub_magic: int,
|
||||
xpub_magic_segwit_p2sh: int,
|
||||
xpub_magic_segwit_native: int,
|
||||
bech32_prefix: str,
|
||||
cashaddr_prefix: str,
|
||||
slip44: int,
|
||||
@ -30,6 +32,8 @@ class CoinInfo:
|
||||
self.maxfee_kb = maxfee_kb
|
||||
self.signed_message_header = signed_message_header
|
||||
self.xpub_magic = xpub_magic
|
||||
self.xpub_magic_segwit_p2sh = xpub_magic_segwit_p2sh
|
||||
self.xpub_magic_segwit_native = xpub_magic_segwit_native
|
||||
self.bech32_prefix = bech32_prefix
|
||||
self.cashaddr_prefix = cashaddr_prefix
|
||||
self.slip44 = slip44
|
||||
@ -57,6 +61,8 @@ COINS = [
|
||||
maxfee_kb=2000000,
|
||||
signed_message_header="Bitcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=0x04b24746,
|
||||
bech32_prefix="bc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=0,
|
||||
@ -75,6 +81,8 @@ COINS = [
|
||||
maxfee_kb=10000000,
|
||||
signed_message_header="Bitcoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=0x044a5262,
|
||||
xpub_magic_segwit_native=0x045f1cf6,
|
||||
bech32_prefix="tb",
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -93,6 +101,8 @@ COINS = [
|
||||
maxfee_kb=500000,
|
||||
signed_message_header="Bitcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix="bitcoincash",
|
||||
slip44=145,
|
||||
@ -111,6 +121,8 @@ COINS = [
|
||||
maxfee_kb=10000000,
|
||||
signed_message_header="Bitcoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix="bchtest",
|
||||
slip44=1,
|
||||
@ -129,6 +141,8 @@ COINS = [
|
||||
maxfee_kb=500000,
|
||||
signed_message_header="Bitcoin Gold Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="btg",
|
||||
cashaddr_prefix=None,
|
||||
slip44=156,
|
||||
@ -147,6 +161,8 @@ COINS = [
|
||||
maxfee_kb=500000,
|
||||
signed_message_header="Bitcoin Gold Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=0x044a5262,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="tbtg",
|
||||
cashaddr_prefix=None,
|
||||
slip44=156,
|
||||
@ -165,6 +181,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="BitcoinPrivate Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=183,
|
||||
@ -183,6 +201,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="DarkCoin Signed Message:\n",
|
||||
xpub_magic=0x02fe52cc,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=5,
|
||||
@ -201,6 +221,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="DarkCoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -219,6 +241,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="Denarius Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=116,
|
||||
@ -237,6 +261,8 @@ COINS = [
|
||||
maxfee_kb=500000,
|
||||
signed_message_header="DigiByte Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="dgb",
|
||||
cashaddr_prefix=None,
|
||||
slip44=20,
|
||||
@ -255,6 +281,8 @@ COINS = [
|
||||
maxfee_kb=1000000000,
|
||||
signed_message_header="Dogecoin Signed Message:\n",
|
||||
xpub_magic=0x02facafd,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=3,
|
||||
@ -273,6 +301,8 @@ COINS = [
|
||||
maxfee_kb=40000000,
|
||||
signed_message_header="Feathercoin Signed Message:\n",
|
||||
xpub_magic=0x0488bc26,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="fc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=8,
|
||||
@ -291,6 +321,8 @@ COINS = [
|
||||
maxfee_kb=4000000,
|
||||
signed_message_header="Flashcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=120,
|
||||
@ -309,6 +341,8 @@ COINS = [
|
||||
maxfee_kb=10000000,
|
||||
signed_message_header="FujiCoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=0x04b24746,
|
||||
bech32_prefix="fc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=75,
|
||||
@ -327,6 +361,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="GroestlCoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=0x04b24746,
|
||||
bech32_prefix="grs",
|
||||
cashaddr_prefix=None,
|
||||
slip44=17,
|
||||
@ -345,6 +381,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="GroestlCoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=0x044a5262,
|
||||
xpub_magic_segwit_native=0x045f1cf6,
|
||||
bech32_prefix="tgrs",
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -363,6 +401,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="Koto Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=510,
|
||||
@ -381,6 +421,8 @@ COINS = [
|
||||
maxfee_kb=40000000,
|
||||
signed_message_header="Litecoin Signed Message:\n",
|
||||
xpub_magic=0x019da462,
|
||||
xpub_magic_segwit_p2sh=0x01b26ef6,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="ltc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=2,
|
||||
@ -399,6 +441,8 @@ COINS = [
|
||||
maxfee_kb=40000000,
|
||||
signed_message_header="Litecoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="tltc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -417,6 +461,8 @@ COINS = [
|
||||
maxfee_kb=5000000,
|
||||
signed_message_header="Monacoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="mona",
|
||||
cashaddr_prefix=None,
|
||||
slip44=22,
|
||||
@ -435,6 +481,8 @@ COINS = [
|
||||
maxfee_kb=100000,
|
||||
signed_message_header="MonetaryUnit Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=31,
|
||||
@ -453,6 +501,8 @@ COINS = [
|
||||
maxfee_kb=2000000,
|
||||
signed_message_header="Myriadcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=90,
|
||||
@ -471,6 +521,8 @@ COINS = [
|
||||
maxfee_kb=10000000,
|
||||
signed_message_header="Namecoin Signed Message:\n",
|
||||
xpub_magic=0x019da462,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=7,
|
||||
@ -489,6 +541,8 @@ COINS = [
|
||||
maxfee_kb=1000000000,
|
||||
signed_message_header="Pesetacoin Signed Message:\n",
|
||||
xpub_magic=0x0488c42e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="null",
|
||||
cashaddr_prefix=None,
|
||||
slip44=109,
|
||||
@ -507,6 +561,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="SmartCash Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=224,
|
||||
@ -525,6 +581,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="SmartCash Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=224,
|
||||
@ -543,6 +601,8 @@ COINS = [
|
||||
maxfee_kb=40000000,
|
||||
signed_message_header="Vertcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="vtc",
|
||||
cashaddr_prefix=None,
|
||||
slip44=28,
|
||||
@ -561,6 +621,8 @@ COINS = [
|
||||
maxfee_kb=40000000,
|
||||
signed_message_header="Viacoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=0x049d7cb2,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix="via",
|
||||
cashaddr_prefix=None,
|
||||
slip44=14,
|
||||
@ -579,6 +641,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="Zcash Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=133,
|
||||
@ -597,6 +661,8 @@ COINS = [
|
||||
maxfee_kb=10000000,
|
||||
signed_message_header="Zcash Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -615,6 +681,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="Zcoin Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=136,
|
||||
@ -633,6 +701,8 @@ COINS = [
|
||||
maxfee_kb=1000000,
|
||||
signed_message_header="Zcoin Signed Message:\n",
|
||||
xpub_magic=0x043587cf,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=1,
|
||||
@ -651,6 +721,8 @@ COINS = [
|
||||
maxfee_kb=2000000,
|
||||
signed_message_header="Zencash Signed Message:\n",
|
||||
xpub_magic=0x0488b21e,
|
||||
xpub_magic_segwit_p2sh=None,
|
||||
xpub_magic_segwit_native=None,
|
||||
bech32_prefix=None,
|
||||
cashaddr_prefix=None,
|
||||
slip44=121,
|
||||
|
@ -13,6 +13,8 @@ class CoinInfo:
|
||||
maxfee_kb: int,
|
||||
signed_message_header: str,
|
||||
xpub_magic: int,
|
||||
xpub_magic_segwit_p2sh: int,
|
||||
xpub_magic_segwit_native: int,
|
||||
bech32_prefix: str,
|
||||
cashaddr_prefix: str,
|
||||
slip44: int,
|
||||
@ -30,6 +32,8 @@ class CoinInfo:
|
||||
self.maxfee_kb = maxfee_kb
|
||||
self.signed_message_header = signed_message_header
|
||||
self.xpub_magic = xpub_magic
|
||||
self.xpub_magic_segwit_p2sh = xpub_magic_segwit_p2sh
|
||||
self.xpub_magic_segwit_native = xpub_magic_segwit_native
|
||||
self.bech32_prefix = bech32_prefix
|
||||
self.cashaddr_prefix = cashaddr_prefix
|
||||
self.slip44 = slip44
|
||||
@ -63,6 +67,8 @@ ATTRIBUTES = (
|
||||
("maxfee_kb", int),
|
||||
("signed_message_header", black_repr),
|
||||
("xpub_magic", hexfmt),
|
||||
("xpub_magic_segwit_p2sh", hexfmt),
|
||||
("xpub_magic_segwit_native", hexfmt),
|
||||
("bech32_prefix", black_repr),
|
||||
("cashaddr_prefix", black_repr),
|
||||
("slip44", int),
|
||||
|
@ -18,6 +18,7 @@ tokens = [
|
||||
(31102, b"\x72\xea\x35\x08\xd9\xd8\x17\xa9\x14\x65\xab\xb5\x9b\xe1\x0f\xef\x98\x57\xa0\x55", "DGT", 0), # esn / DGT
|
||||
(31102, b"\x01\x46\xb9\xdc\xd9\xfb\x2a\xbc\x1b\x5b\x13\x6c\x28\xd2\x0d\x00\x37\x52\x69\x61", "TOPM", 18), # esn / TOPM
|
||||
(61, b"\x08\x5f\xb4\xf2\x40\x31\xea\xed\xbc\x2b\x61\x1a\xa5\x28\xf2\x23\x43\xeb\x52\xdb", "BEC", 8), # etc / BEC
|
||||
(61, b"\x6a\xda\x6f\x48\xc8\x15\x68\x95\x02\xc4\x3e\xc1\xa5\x9f\x1b\x5d\xd3\xc0\x4e\x1f", "UNV", 18), # etc / UniversalCoin
|
||||
(1, b"\x4e\x84\xe9\xe5\xfb\x0a\x97\x26\x28\xcf\x45\x68\xc4\x03\x16\x7e\xf1\xd4\x04\x31", "$FFC", 18), # eth / $Fluzcoin
|
||||
(1, b"\xa0\x24\xe8\x05\x7e\xec\x47\x4a\x9b\x23\x56\x83\x37\x07\xdd\x05\x79\xe2\x6e\xf3", "$FXY", 18), # eth / $FIXY NETWORK
|
||||
(1, b"\xcd\xb7\xec\xfd\x34\x03\xee\xf3\x88\x2c\x65\xb7\x61\xef\x9b\x50\x54\x89\x0a\x47", "$HUR", 18), # eth / $Hurify Token
|
||||
@ -231,6 +232,7 @@ tokens = [
|
||||
(1, b"\x41\x9c\x4d\xb4\xb9\xe2\x5d\x6d\xb2\xad\x96\x91\xcc\xb8\x32\xc8\xd9\xfd\xa0\x5e", "DRGN", 18), # eth / Dragon
|
||||
(1, b"\x62\xd4\xc0\x46\x44\x31\x4f\x35\x86\x8b\xa4\xc6\x5c\xc2\x7a\x77\x68\x1d\xe7\xa9", "DRVH", 18), # eth / Driveholic Token
|
||||
(1, b"\x1e\x09\xbd\x8c\xad\xb4\x41\x63\x2e\x44\x1d\xb3\xe1\xd7\x99\x09\xee\x0a\x22\x56", "DSC", 1), # eth / Digital Safe Coin
|
||||
(1, b"\x03\xe3\xf0\xc2\x59\x65\xf1\x3d\xbb\xc5\x82\x46\x73\x8c\x18\x3e\x27\xb2\x6a\x56", "DSCP", 18), # eth / Disciplina Token
|
||||
(1, b"\x5a\xdc\x96\x1d\x6a\xc3\xf7\x06\x2d\x2e\xa4\x5f\xef\xb8\xd8\x16\x7d\x44\xb1\x90", "DTH", 18), # eth / dether
|
||||
(1, b"\xd2\x34\xbf\x24\x10\xa0\x00\x9d\xf9\xc3\xc6\x3b\x61\x0c\x09\x73\x8f\x18\xcc\xd7", "DTR", 8), # eth / DTR
|
||||
(1, b"\xf9\xf7\xc2\x9c\xfd\xf1\x9f\xcf\x1f\x2a\xa6\xb8\x4a\xa3\x67\xbc\xf1\xbd\x16\x76", "DTT", 18), # eth / Delphi Tech Token
|
||||
@ -374,6 +376,7 @@ tokens = [
|
||||
(1, b"\x95\x41\xfd\x8b\x9b\x5f\xa9\x73\x81\x78\x37\x83\xce\xbf\x2f\x5f\xa7\x93\xc2\x62", "KZN", 8), # eth / KaizenCoin
|
||||
(1, b"\xe5\x03\x65\xf5\xd6\x79\xcb\x98\xa1\xdd\x62\xd6\xf6\xe5\x8e\x59\x32\x1b\xcd\xdf", "LA", 18), # eth / LATOKEN
|
||||
(1, b"\xfd\x10\x7b\x47\x3a\xb9\x0e\x8f\xbd\x89\x87\x21\x44\xa3\xdc\x92\xc4\x0f\xa8\xc9", "LALA", 18), # eth / LALA World Token
|
||||
(1, b"\x4a\x37\xa9\x1e\xec\x4c\x97\xf9\x09\x0c\xe6\x6d\x21\xd3\xb3\xaa\xdf\x1a\xe5\xad", "LCT", 18), # eth / LiquorChain Token
|
||||
(1, b"\x51\x02\x79\x1c\xa0\x2f\xc3\x59\x53\x98\x40\x0b\xfe\x0e\x33\xd7\xb6\xc8\x22\x67", "LDC", 18), # eth / LEADCOIN
|
||||
(1, b"\x80\xfb\x78\x4b\x7e\xd6\x67\x30\xe8\xb1\xdb\xd9\x82\x0a\xfd\x29\x93\x1a\xab\x03", "LEND", 18), # eth / EHTLend
|
||||
(1, b"\xc7\x98\xcd\x1c\x49\xdb\x0e\x29\x73\x12\xe4\xc6\x82\x75\x26\x68\xce\x1d\xb2\xad", "LFR", 5), # eth / LifeRun Coin
|
||||
@ -608,6 +611,7 @@ tokens = [
|
||||
(1, b"\xc2\x7a\x2f\x05\xfa\x57\x7a\x83\xba\x0f\xdb\x4c\x38\x44\x3c\x07\x18\x35\x65\x01", "TAU", 18), # eth / Lamden Tau
|
||||
(1, b"\xfa\xcc\xd5\xfc\x83\xc3\xe4\xc3\xc1\xac\x1e\xf3\x5d\x15\xad\xf0\x6b\xcf\x20\x9c", "TBC2", 8), # eth / TBC2
|
||||
(1, b"\xaf\xe6\x05\x11\x34\x1a\x37\x48\x8d\xe2\x5b\xef\x35\x19\x52\x56\x2e\x31\xfc\xc1", "TBT", 8), # eth / TBitBot
|
||||
(1, b"\xfa\x0e\xf5\xe0\x34\xca\xe1\xae\x75\x2d\x59\xbd\xb8\xad\xcd\xe3\x7e\xd7\xab\x97", "TCA", 18), # eth / TangguoTao Token
|
||||
(1, b"\x2a\x1d\xba\xbe\x65\xc5\x95\xb0\x02\x2e\x75\x20\x8c\x34\x01\x41\x39\xd5\xd3\x57", "TDH", 18), # eth / TrustedHealth
|
||||
(1, b"\x85\xe0\x76\x36\x1c\xc8\x13\xa9\x08\xff\x67\x2f\x9b\xad\x15\x41\x47\x44\x02\xb2", "TEL", 2), # eth / Telcoin
|
||||
(1, b"\xa7\xf9\x76\xc3\x60\xeb\xbe\xd4\x46\x5c\x28\x55\x68\x4d\x1a\xae\x52\x71\xef\xa9", "TFL", 8), # eth / TrueFlip
|
||||
@ -618,6 +622,7 @@ tokens = [
|
||||
(1, b"\x80\xbc\x55\x12\x56\x1c\x7f\x85\xa3\xa9\x50\x8c\x7d\xf7\x90\x1b\x37\x0f\xa1\xdf", "TIO", 18), # eth / TIO
|
||||
(1, b"\xea\x1f\x34\x6f\xaf\x02\x3f\x97\x4e\xb5\xad\xaf\x08\x8b\xbc\xdf\x02\xd7\x61\xf4", "TIX", 18), # eth / Blocktix
|
||||
(1, b"\xaa\xaf\x91\xd9\xb9\x0d\xf8\x00\xdf\x4f\x55\xc2\x05\xfd\x69\x89\xc9\x77\xe7\x3a", "TKN", 8), # eth / TokenCard
|
||||
(1, b"\xb3\x61\x65\x50\xab\xc8\xaf\x79\xc7\xa5\x90\x2d\xef\x9e\xfa\x3b\xc9\xa9\x52\x00", "TLX", 8), # eth / Telex
|
||||
(1, b"\x08\xf5\xa9\x23\x5b\x08\x17\x3b\x75\x69\xf8\x36\x45\xd2\xc7\xfb\x55\xe8\xcc\xd8", "TNT", 8), # eth / Tierion Network Token
|
||||
(1, b"\x8e\xb9\x65\xee\x9c\xcf\xbc\xe7\x6c\x0a\x06\x26\x44\x92\xc0\xaf\xef\xc2\x82\x6d", "TOOR", 18), # eth / ToorCoin
|
||||
(1, b"\x56\x6f\xd7\x99\x9b\x1f\xc3\x98\x80\x22\xbd\x38\x50\x7a\x48\xf0\xbc\xf2\x2c\x77", "TRCN", 18), # eth / The Real Coin
|
||||
@ -629,6 +634,8 @@ tokens = [
|
||||
(1, b"\x24\x69\x27\x91\xbc\x44\x4c\x5c\xd0\xb8\x1e\x3c\xbc\xab\xa4\xb0\x4a\xcd\x1f\x3b", "UKG", 18), # eth / UnikoinGold
|
||||
(1, b"\x89\x20\x5a\x3a\x3b\x2a\x69\xde\x6d\xbf\x7f\x01\xed\x13\xb2\x10\x8b\x2c\x43\xe7", "Unicorn", 0), # eth / Unicorn
|
||||
(1, b"\xd0\x1d\xb7\x3e\x04\x78\x55\xef\xb4\x14\xe6\x20\x20\x98\xc4\xbe\x4c\xd2\x42\x3b", "UQC", 18), # eth / Uquid Coin
|
||||
(1, b"\x93\x16\x84\x13\x9f\x75\x6c\x24\xec\x07\x31\xe9\xf7\x4f\xe5\x0e\x55\x48\xdd\xef", "URB", 18), # eth / Urbit Data
|
||||
(1, b"\xa0\xb8\x69\x91\xc6\x21\x8b\x36\xc1\xd1\x9d\x4a\x2e\x9e\xb0\xce\x36\x06\xeb\x48", "USDC", 6), # eth / USD//Coin
|
||||
(1, b"\xd7\x60\xad\xdf\xb2\x4d\x9c\x01\xfe\x4b\xfe\xa7\x47\x5c\x5e\x36\x36\x68\x40\x58", "USDM", 2), # eth / Mether (USDM)
|
||||
(1, b"\xda\xc1\x7f\x95\x8d\x2e\xe5\x23\xa2\x20\x62\x06\x99\x45\x97\xc1\x3d\x83\x1e\xc7", "USDT", 6), # eth / USD Tether (erc20)
|
||||
(1, b"\x70\xa7\x28\x33\xd6\xbf\x7f\x50\x8c\x82\x24\xce\x59\xea\x1e\xf3\xd0\xea\x3a\x38", "UTK", 18), # eth / UTK
|
||||
@ -637,7 +644,7 @@ tokens = [
|
||||
(1, b"\x57\xc7\x5e\xcc\xc8\x55\x71\x36\xd3\x26\x19\xa1\x91\xfb\xcd\xc8\x85\x60\xd7\x11", "VDG", 0), # eth / VeriDocGlobal
|
||||
(1, b"\x82\xbd\x52\x6b\xdb\x71\x8c\x6d\x4d\xd2\x29\x1e\xd0\x13\xa5\x18\x6c\xae\x2d\xca", "VDOC", 18), # eth / Duty of Care Token
|
||||
(1, b"\x34\x0d\x2b\xde\x5e\xb2\x8c\x1e\xed\x91\xb2\xf7\x90\x72\x3e\x3b\x16\x06\x13\xb7", "VEE", 18), # eth / BLOCKv
|
||||
(1, b"\xd8\x50\x94\x2e\xf8\x81\x1f\x2a\x86\x66\x92\xa6\x23\x01\x1b\xde\x52\xa4\x62\xc1", "VEN", 18), # eth / Vechain
|
||||
(1, b"\xd8\x50\x94\x2e\xf8\x81\x1f\x2a\x86\x66\x92\xa6\x23\x01\x1b\xde\x52\xa4\x62\xc1", "VEN", 18), # eth / VeChain
|
||||
(1, b"\xeb\xed\x4f\xf9\xfe\x34\x41\x3d\xb8\xfc\x82\x94\x55\x6b\xbd\x15\x28\xa4\xda\xca", "VENUS", 3), # eth / VENUS
|
||||
(1, b"\x8f\x34\x70\xa7\x38\x8c\x05\xee\x4e\x7a\xf3\xd0\x1d\x8c\x72\x2b\x0f\xf5\x23\x74", "VERI", 18), # eth / Veritas
|
||||
(1, b"\x2c\x97\x4b\x2d\x0b\xa1\x71\x6e\x64\x4c\x1f\xc5\x99\x82\xa8\x9d\xdd\x2f\xf7\x24", "VIB", 18), # eth / VIB
|
||||
@ -650,6 +657,7 @@ tokens = [
|
||||
(1, b"\xed\xba\xf3\xc5\x10\x03\x02\xdc\xdd\xa5\x32\x69\x32\x2f\x37\x30\xb1\xf0\x41\x6d", "VRS", 5), # eth / Veros
|
||||
(1, b"\x5c\x54\x3e\x7a\xe0\xa1\x10\x4f\x78\x40\x6c\x34\x0e\x9c\x64\xfd\x9f\xce\x51\x70", "VSL", 18), # eth / Vdice
|
||||
(1, b"\x28\x6b\xda\x14\x13\xa2\xdf\x81\x73\x1d\x49\x30\xce\x2f\x86\x2a\x35\xa6\x09\xfe", "WaBi", 18), # eth / WaBi
|
||||
(1, b"\x82\x9a\x4c\xa1\x30\x33\x83\xf1\x08\x2b\x6b\x1f\xb9\x37\x11\x6e\x4b\x3b\x56\x05", "WATT", 18), # eth / WorkChain App Token
|
||||
(1, b"\x39\xbb\x25\x9f\x66\xe1\xc5\x9d\x5a\xbe\xf8\x83\x75\x97\x9b\x4d\x20\xd9\x80\x22", "WAX", 8), # eth / WAX
|
||||
(1, b"\x74\x95\x1b\x67\x7d\xe3\x2d\x59\x6e\xe8\x51\xa2\x33\x33\x69\x26\xe6\xa2\xcd\x09", "WBA", 7), # eth / WeBetCrypto
|
||||
(1, b"\x8f\x93\x6f\xe0\xfa\xf0\x60\x4c\x9c\x0e\xf2\x40\x6b\xde\x0a\x65\x36\x55\x15\xd6", "WCN", 18), # eth / WorldCoinNetwork
|
||||
|
@ -1,3 +1,5 @@
|
||||
from trezor import wire
|
||||
from trezor.messages import InputScriptType
|
||||
from trezor.messages.HDNodeType import HDNodeType
|
||||
from trezor.messages.PublicKey import PublicKey
|
||||
|
||||
@ -7,13 +9,30 @@ from apps.common import coins, layout, seed
|
||||
async def get_public_key(ctx, msg):
|
||||
coin_name = msg.coin_name or "Bitcoin"
|
||||
coin = coins.by_name(coin_name)
|
||||
script_type = msg.script_type or InputScriptType.SPENDADDRESS
|
||||
|
||||
curve_name = msg.ecdsa_curve_name
|
||||
if not curve_name:
|
||||
curve_name = coin.curve_name
|
||||
node = await seed.derive_node(ctx, msg.address_n, curve_name=curve_name)
|
||||
|
||||
node_xpub = node.serialize_public(coin.xpub_magic)
|
||||
if script_type == InputScriptType.SPENDADDRESS and coin.xpub_magic is not None:
|
||||
node_xpub = node.serialize_public(coin.xpub_magic)
|
||||
elif (
|
||||
coin.segwit
|
||||
and script_type == InputScriptType.SPENDP2SHWITNESS
|
||||
and coin.xpub_magic_segwit_p2sh is not None
|
||||
):
|
||||
node_xpub = node.serialize_public(coin.xpub_magic_segwit_p2sh)
|
||||
elif (
|
||||
coin.segwit
|
||||
and script_type == InputScriptType.SPENDWITNESS
|
||||
and coin.xpub_magic_segwit_native is not None
|
||||
):
|
||||
node_xpub = node.serialize_public(coin.xpub_magic_segwit_native)
|
||||
else:
|
||||
raise wire.DataError("Invalid combination of coin and script_type")
|
||||
|
||||
pubkey = node.public_key()
|
||||
if pubkey[0] == 1:
|
||||
pubkey = b"\x00" + pubkey[1:]
|
||||
|
2
vendor/trezor-common
vendored
2
vendor/trezor-common
vendored
@ -1 +1 @@
|
||||
Subproject commit a3cf029042f092bc2e42ede0a2fa5fa1df2ec2d9
|
||||
Subproject commit 625f9663e1ab7a600db7f14455b8a4435ef4560b
|
Loading…
Reference in New Issue
Block a user