Skip to content

Commit bbd533a

Browse files
authored
feat(core): add misc features (#587)
* feat(core): add support for `Portuguese (Brazil)` * fix(core): add risk warning for eip712 message signing * fix(core): fix cardano sign message issue * fix(core): fix the ble pair code display issue * fix(core): update ethereum chains data and add erc-20 token `POL` support * fix(core/bootloader): optimize the device info entry in the bootloader mode * feat(core): add bip322_simple message sign for btc * fix(core): optimize message decoding logic * feat(core): add psbt sign support * feat(core): add sol ledger live derivation path support * feat(core): add sol offchain message sign * feat(core): prevent all chains, with the exception of EVM - based chains, from bypassing security checks * feat(core): add EVM - based chains such as sonic, hsk, dtc, along with their associated tokens. * feat(core/sol): add support for solana unsafe message signing * fix(core): track the update of cardano * feat(core): auto lock screen adjust * fix(core): fix cardano and polkadot get-address issue * chore(core): bump version to 4.10.0 * fix(trezorlib): fix ton issue
1 parent 900c8cf commit bbd533a

File tree

120 files changed

+7597
-1588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+7597
-1588
lines changed

common/defs/ethereum/chains

Submodule chains updated 2478 files

common/defs/evm_tokens/1.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,32 @@
157157
"__v": 0,
158158
"marketCap": "6126893790.915463"
159159
},
160+
{
161+
"_id": "62e8a3d28edb7c3c91a5586b",
162+
"name": "Polygon",
163+
"symbol": "POL",
164+
"address": "0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6",
165+
"decimals": 18,
166+
"logoURI": "https://common.onekey-asset.com/token/evm-1/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0.jpg",
167+
"impl": "evm",
168+
"status": "LISTED",
169+
"verified": true,
170+
"security": false,
171+
"addToIndex": false,
172+
"chainId": "1",
173+
"source": [
174+
"sushi",
175+
"Uniswap Labs Default",
176+
"Coingecko"
177+
],
178+
"checked": true,
179+
"coingeckoId": "matic-network",
180+
"swftId": "MATIC",
181+
"createdAt": "2022-08-02T04:10:58.228Z",
182+
"updatedAt": "2022-11-16T13:02:51.357Z",
183+
"__v": 0,
184+
"marketCap": "6126893790.915463"
185+
},
160186
{
161187
"_id": "62e8a3d28edb7c3c91a5585f",
162188
"name": "Wrapped BTC",
@@ -1263,6 +1289,31 @@
12631289
"updatedAt": "2022-09-16T16:46:49.461Z",
12641290
"__v": 0,
12651291
"marketCap": "192347985.13471806"
1292+
},
1293+
{
1294+
"_id": "",
1295+
"name": "HashKey Platform Token",
1296+
"symbol": "HSK",
1297+
"address": "0xe7c6bf469e97eeb0bfb74c8dbff5bd47d4c1c98a",
1298+
"decimals": 18,
1299+
"logoURI": "",
1300+
"impl": "evm",
1301+
"status": "LISTED",
1302+
"verified": true,
1303+
"security": false,
1304+
"addToIndex": false,
1305+
"chainId": "1",
1306+
"source": [
1307+
"sushi",
1308+
"Coingecko"
1309+
],
1310+
"checked": true,
1311+
"coingeckoId": "",
1312+
"swftId": "",
1313+
"createdAt": "",
1314+
"updatedAt": "",
1315+
"__v": 0,
1316+
"marketCap": ""
12661317
}
12671318
]
12681319
}

common/defs/evm_tokens/177.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "HashKey Chain",
3+
"chain": "HashKey Chain",
4+
"tokens": [
5+
{
6+
"name": "Wrapped HSK",
7+
"symbol": "WHSK",
8+
"address": "0xB210D2120d57b758EE163cFfb43e73728c471Cf1",
9+
"decimals": 18
10+
},
11+
{
12+
"name": "Wrapped Ether",
13+
"symbol": "WETH",
14+
"address": "0xefd4bC9afD210517803f293ABABd701CaeeCdfd0",
15+
"decimals": 18
16+
},
17+
{
18+
"name": "Tether USD",
19+
"symbol": "USDT",
20+
"address": "0xF1B50eD67A9e2CC94Ad3c477779E2d4cBfFf9029",
21+
"decimals": 6
22+
},
23+
{
24+
"name": "Wrapped BTC",
25+
"symbol": "WBTC",
26+
"address": "0x6119CA49a79f5825C8B345F8d7aC36B272565b14",
27+
"decimals": 8
28+
}
29+
]
30+
}

common/defs/evm_tokens/9798.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"name": "Data Trade Chain",
3+
"chain": "Data Trade Chain",
4+
"tokens": [
5+
{
6+
"id": "837d169e-6f33-535a-988c-8b2eb31dd0bd",
7+
"name": "HLT",
8+
"symbol": "HLT",
9+
"address": "0xE52a736828c782C2a4A345bBE8052aed010fc82D",
10+
"decimals": 2
11+
},
12+
{
13+
"id": "e2c7ceec-289d-5508-8c3d-ab33d36d6ecd",
14+
"name": "BV",
15+
"symbol": "BV",
16+
"address": "0x8E79850C50E525eB6Ba63e601E7b41888A1c9102",
17+
"decimals": 2
18+
},
19+
{
20+
"id": "ce5883e4-213b-55cb-b49c-2df48e5dea8e",
21+
"name": "dUSDT",
22+
"symbol": "dUSDT",
23+
"address": "0x36E6504c968f5C2A310B6AF7B97BC22cdd3402cc",
24+
"decimals": 6
25+
},
26+
{
27+
"id": "79cab3e2-b87b-53a3-9b5b-c120b9287749",
28+
"name": "dBTC",
29+
"symbol": "dBTC",
30+
"address": "0xE895c577D747bB5dbBc1F06cb44d6067680bE4be",
31+
"decimals": 8
32+
},
33+
{
34+
"id": "3f348ef3-1ced-5c1f-b25b-dbde27a12ab1",
35+
"name": "dETH",
36+
"symbol": "dETH",
37+
"address": "0x8B7160C1E9fDb689A060Ff0919E84915B0dFa04a",
38+
"decimals": 18
39+
},
40+
{
41+
"id": "ad4ea990-8cfe-5372-8102-a9aa7574a65c",
42+
"name": "DOS",
43+
"symbol": "DOS",
44+
"address": "0x745C11Fb4783Bd00A88a0B99420262f409FA8Bb8",
45+
"decimals": 2
46+
},
47+
{
48+
"id": "0128716b-1bc9-542b-a322-51d4e3be9270",
49+
"name": "CNV",
50+
"symbol": "CNV",
51+
"address": "0x899f0B9d67DD1B833fdaa90c8b09ea616d0e9E98",
52+
"decimals": 2
53+
},
54+
{
55+
"id": "7f37f71c-aee4-5876-9781-61eb5ede3e61",
56+
"name": "FEC",
57+
"symbol": "FEC",
58+
"address": "0xb88ad767B416197e62939dEc207431b561A9383B",
59+
"decimals": 4
60+
},
61+
{
62+
"id": "1e46303c-dcc6-5899-8b44-84dd2f348644",
63+
"name": "STC08375",
64+
"symbol": "STC08375",
65+
"address": "0x6d885b0B37C62Be0c72Ecd6a61Af2bfFf681419e",
66+
"decimals": 0
67+
}
68+
]
69+
}

common/defs/support.json

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@
21312131
"eth:JOYS": "1.9.5",
21322132
"eth:KAR": "1.9.5",
21332133
"eth:KCS": "1.10.3",
2134-
"eth:KLAY": "1.9.5",
2134+
"eth:KAIA": "1.9.5",
21352135
"eth:KTO:2559": "1.10.3",
21362136
"eth:L1": "1.10.5",
21372137
"eth:L99": "1.10.4",
@@ -2252,7 +2252,7 @@
22522252
"eth:tGOR:420": "1.9.5",
22532253
"eth:tGOR:5": "1.9.5",
22542254
"eth:tKAL": "1.9.4",
2255-
"eth:tKLAY": "1.9.5",
2255+
"eth:tKAIA": "1.9.5",
22562256
"eth:tKOR": "1.9.5",
22572257
"eth:tKOT": "1.9.4",
22582258
"eth:tKOV": "1.6.2",
@@ -4286,6 +4286,7 @@
42864286
"erc20:eth:eUSD": "2.0.7",
42874287
"erc20:eth:eosDAC": "2.0.7",
42884288
"erc20:eth:fstETHDAI": "2.3.1",
4289+
"erc20:eth:HSK": "4.10.0",
42894290
"erc20:eth:iBAT": "2.3.0",
42904291
"erc20:eth:iBNB": "2.3.0",
42914292
"erc20:eth:iBTC": "2.3.0",
@@ -4697,7 +4698,7 @@
46974698
"eth:BTA": "2.4.3",
46984699
"eth:BTCIX": "2.4.4",
46994700
"eth:BTM": "2.4.4",
4700-
"eth:BTT": "2.4.3",
4701+
"eth:BTT:199": "2.4.3",
47014702
"eth:CATE": "2.4.2",
47024703
"eth:CCP": "2.4.4",
47034704
"eth:CELO": "2.3.7",
@@ -4710,6 +4711,7 @@
47104711
"eth:DAX": "2.4.2",
47114712
"eth:DEV": "2.4.3",
47124713
"eth:DIODE": "2.3.7",
4714+
"eth:DTT": "4.10.0",
47134715
"eth:DTH": "2.4.4",
47144716
"eth:DWU": "2.4.2",
47154717
"eth:DYNO": "2.4.4",
@@ -4744,7 +4746,7 @@
47444746
"eth:EWT": "2.3.5",
47454747
"eth:EXP": "2.0.7",
47464748
"eth:FETH": "2.4.2",
4747-
"eth:FIL": "4.3.0",
4749+
"eth:FIL:314": "4.3.0",
47484750
"eth:FIN": "2.3.5",
47494751
"eth:FLR": "2.3.7",
47504752
"eth:FSN": "2.4.2",
@@ -4758,9 +4760,10 @@
47584760
"eth:GT": "2.4.2",
47594761
"eth:GooD": "2.4.2",
47604762
"eth:HAIC": "2.4.2",
4761-
"eth:HO": "2.4.4",
4763+
"eth:HO:1280": "2.4.4",
47624764
"eth:HOP": "2.4.4",
47634765
"eth:HPB": "2.1.1",
4766+
"eth:HSK": "4.10.0",
47644767
"eth:HT": "2.3.7",
47654768
"eth:ILT": "2.3.5",
47664769
"eth:IORA": "2.4.4",
@@ -4770,14 +4773,14 @@
47704773
"eth:JOYS": "2.3.7",
47714774
"eth:KAR": "2.3.7",
47724775
"eth:KCS": "2.4.2",
4773-
"eth:KLAY": "2.3.7",
4776+
"eth:KAIA": "2.3.7",
47744777
"eth:KTO:2559": "2.4.2",
4775-
"eth:L1": "2.4.4",
4778+
"eth:L1:29": "2.4.4",
47764779
"eth:L99": "2.4.3",
47774780
"eth:LA": "2.4.4",
47784781
"eth:LISINSKI": "2.3.5",
47794782
"eth:MATH": "2.3.7",
4780-
"eth:MATIC": "2.3.5",
4783+
"eth:POL": "2.3.5",
47814784
"eth:META": "2.1.1",
47824785
"eth:METIS": "2.4.4",
47834786
"eth:MINTME": "2.4.2",
@@ -4786,7 +4789,7 @@
47864789
"eth:MOLE": "2.4.4",
47874790
"eth:MOVR": "2.4.2",
47884791
"eth:MTR": "2.3.7",
4789-
"eth:MTT": "2.4.2",
4792+
"eth:MTT:16000": "2.4.2",
47904793
"eth:MUSIC": "2.0.8",
47914794
"eth:NEON:245022934": "2.4.3",
47924795
"eth:NEW": "2.3.7",
@@ -4803,7 +4806,7 @@
48034806
"eth:ONE:1666600003": "2.3.7",
48044807
"eth:ONG": "2.4.2",
48054808
"eth:OY": "2.4.4",
4806-
"eth:PALM": "2.4.3",
4809+
"eth:PALM:11297108109": "2.4.3",
48074810
"eth:PETH": "2.4.2",
48084811
"eth:PHT": "2.3.5",
48094812
"eth:PHX": "2.4.4",
@@ -4812,7 +4815,7 @@
48124815
"eth:PLS": "2.4.3",
48134816
"eth:POA": "2.3.5",
48144817
"eth:POLIS": "2.4.4",
4815-
"eth:POP": "2.4.3",
4818+
"eth:POP:1213": "2.4.3",
48164819
"eth:PRB": "2.4.4",
48174820
"eth:QKC:100000": "2.4.2",
48184821
"eth:QKC:100001": "2.4.2",
@@ -4832,6 +4835,7 @@
48324835
"eth:ROSE": "2.4.4",
48334836
"eth:RPG": "2.4.4",
48344837
"eth:RUPX": "2.3.7",
4838+
"eth:S": "4.10.0",
48354839
"eth:SDN": "2.4.3",
48364840
"eth:SETM": "2.4.4",
48374841
"eth:SGB": "2.4.2",
@@ -4843,15 +4847,15 @@
48434847
"eth:SPOA": "2.4.4",
48444848
"eth:SRN": "2.4.3",
48454849
"eth:Seele": "2.4.4",
4846-
"eth:TAO": "2.3.5",
4850+
"eth:TAO:558": "2.3.5",
48474851
"eth:TBG": "2.3.7",
48484852
"eth:TCH": "2.3.5",
48494853
"eth:TCLO": "2.3.5",
48504854
"eth:TELE:8000": "2.4.4",
48514855
"eth:TETC": "2.3.5",
48524856
"eth:TFI": "2.3.7",
48534857
"eth:TLOS:40": "2.4.2",
4854-
"eth:TOMO:88": "2.4.4",
4858+
"eth:VIC": "2.4.4",
48554859
"eth:TOYS": "2.3.7",
48564860
"eth:TPEP": "2.3.5",
48574861
"eth:TSF": "2.3.5",
@@ -4896,14 +4900,14 @@
48964900
"eth:tETH:5": "4.3.0",
48974901
"eth:tETH:11155111": "4.9.1",
48984902
"eth:tKAL": "2.3.5",
4899-
"eth:tKLAY": "2.3.7",
4903+
"eth:tKAIA": "2.3.7",
49004904
"eth:tKOR": "2.3.7",
49014905
"eth:tKOT": "2.3.5",
49024906
"eth:tKOV": "2.0.7",
49034907
"eth:tMATH": "2.3.7",
4904-
"eth:tMATIC": "2.3.5",
4908+
"eth:tMATIC:80001": "2.3.5",
49054909
"eth:tMETC": "2.3.5",
4906-
"eth:tNEW": "2.3.7",
4910+
"eth:tNEW:1007": "2.3.7",
49074911
"eth:tNRG": "2.3.5",
49084912
"eth:tPHT": "2.3.5",
49094913
"eth:tRBTC": "2.0.7",

common/protob/messages-bitcoin.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ message SignMessage {
154154
optional string coin_name = 3 [default='Bitcoin']; // coin to use for signing
155155
optional InputScriptType script_type = 4 [default=SPENDADDRESS]; // used to distinguish between various address formats (non-segwit, segwit, etc.)
156156
optional bool no_script_type = 5; // don't include script type information in the recovery byte of the signature, same as in Bitcoin Core
157+
optional bool is_bip322_simple = 10[default=false]; // use BIP-322 simple format for signing
157158
}
158159

159160
/**
@@ -621,3 +622,21 @@ message AuthorizeCoinJoin {
621622
optional AmountUnit amount_unit = 8 [default=BITCOIN]; // show amounts in
622623
}
623624

625+
/**
626+
* Request: Ask device to sign a taproot transaction
627+
* @start
628+
* @next SignedPsbt
629+
* @next Failure
630+
*/
631+
message SignPsbt {
632+
required bytes psbt = 1; // PSBT to be signed
633+
optional string coin_name = 2[default='Bitcoin'];
634+
}
635+
636+
/**
637+
* Response: Contains the signed PSBT
638+
* @end
639+
*/
640+
message SignedPsbt {
641+
required bytes psbt = 1; // PSBT to be finalized
642+
}

0 commit comments

Comments
 (0)