-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmessages.py
More file actions
11850 lines (10147 loc) · 391 KB
/
messages.py
File metadata and controls
11850 lines (10147 loc) · 391 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Automatically generated by pb2py
# fmt: off
# isort:skip_file
from enum import IntEnum
from typing import Sequence, Optional
from . import protobuf
class BinanceOrderType(IntEnum):
OT_UNKNOWN = 0
MARKET = 1
LIMIT = 2
OT_RESERVED = 3
class BinanceOrderSide(IntEnum):
SIDE_UNKNOWN = 0
BUY = 1
SELL = 2
class BinanceTimeInForce(IntEnum):
TIF_UNKNOWN = 0
GTE = 1
TIF_RESERVED = 2
IOC = 3
class MessageType(IntEnum):
Initialize = 0
Ping = 1
Success = 2
Failure = 3
ChangePin = 4
WipeDevice = 5
GetEntropy = 9
Entropy = 10
LoadDevice = 13
ResetDevice = 14
SetBusy = 16
Features = 17
PinMatrixRequest = 18
PinMatrixAck = 19
Cancel = 20
LockDevice = 24
ApplySettings = 25
ButtonRequest = 26
ButtonAck = 27
ApplyFlags = 28
GetNonce = 31
Nonce = 33
BackupDevice = 34
EntropyRequest = 35
EntropyAck = 36
PassphraseRequest = 41
PassphraseAck = 42
RecoveryDevice = 45
WordRequest = 46
WordAck = 47
GetFeatures = 55
SdProtect = 79
ChangeWipeCode = 82
EndSession = 83
DoPreauthorized = 84
PreauthorizedRequest = 85
CancelAuthorization = 86
RebootToBootloader = 87
GetFirmwareHash = 88
FirmwareHash = 89
UnlockPath = 93
UnlockedPathRequest = 94
SetU2FCounter = 63
GetNextU2FCounter = 80
NextU2FCounter = 81
Deprecated_PassphraseStateRequest = 77
Deprecated_PassphraseStateAck = 78
FirmwareErase = 6
FirmwareUpload = 7
FirmwareRequest = 8
FirmwareErase_ex = 16
SelfTest = 32
Reboot = 30000
FirmwareUpdateEmmc = 30001
GetPublicKey = 11
PublicKey = 12
SignTx = 15
TxRequest = 21
TxAck = 22
GetAddress = 29
Address = 30
TxAckPaymentRequest = 37
SignMessage = 38
VerifyMessage = 39
MessageSignature = 40
GetOwnershipId = 43
OwnershipId = 44
GetOwnershipProof = 49
OwnershipProof = 50
AuthorizeCoinJoin = 51
SignPsbt = 10052
SignedPsbt = 10053
CipherKeyValue = 23
CipheredKeyValue = 48
SignIdentity = 53
SignedIdentity = 54
GetECDHSessionKey = 61
ECDHSessionKey = 62
CosiCommit = 71
CosiCommitment = 72
CosiSign = 73
CosiSignature = 74
BatchGetPublickeys = 10016
EcdsaPublicKeys = 10017
DebugLinkDecision = 100
DebugLinkGetState = 101
DebugLinkState = 102
DebugLinkStop = 103
DebugLinkLog = 104
DebugLinkMemoryRead = 110
DebugLinkMemory = 111
DebugLinkMemoryWrite = 112
DebugLinkFlashErase = 113
DebugLinkLayout = 9001
DebugLinkReseedRandom = 9002
DebugLinkRecordScreen = 9003
DebugLinkEraseSdCard = 9005
DebugLinkWatchLayout = 9006
EmmcFixPermission = 30100
EmmcPath = 30101
EmmcPathInfo = 30102
EmmcFile = 30103
EmmcFileRead = 30104
EmmcFileWrite = 30105
EmmcFileDelete = 30106
EmmcDir = 30107
EmmcDirList = 30108
EmmcDirMake = 30109
EmmcDirRemove = 30110
EthereumGetPublicKey = 450
EthereumPublicKey = 451
EthereumGetAddress = 56
EthereumAddress = 57
EthereumSignTx = 58
EthereumSignTxEIP1559 = 452
EthereumTxRequest = 59
EthereumTxAck = 60
EthereumSignMessage = 64
EthereumVerifyMessage = 65
EthereumMessageSignature = 66
EthereumSignTypedData = 464
EthereumTypedDataStructRequest = 465
EthereumTypedDataStructAck = 466
EthereumTypedDataValueRequest = 467
EthereumTypedDataValueAck = 468
EthereumTypedDataSignature = 469
EthereumSignTypedHash = 470
EthereumGetPublicKeyOneKey = 20100
EthereumPublicKeyOneKey = 20101
EthereumGetAddressOneKey = 20102
EthereumAddressOneKey = 20103
EthereumSignTxOneKey = 20104
EthereumSignTxEIP1559OneKey = 20105
EthereumTxRequestOneKey = 20106
EthereumTxAckOneKey = 20107
EthereumSignMessageOneKey = 20108
EthereumVerifyMessageOneKey = 20109
EthereumMessageSignatureOneKey = 20110
EthereumSignTypedDataOneKey = 20111
EthereumTypedDataStructRequestOneKey = 20112
EthereumTypedDataStructAckOneKey = 20113
EthereumTypedDataValueRequestOneKey = 20114
EthereumTypedDataValueAckOneKey = 20115
EthereumTypedDataSignatureOneKey = 20116
EthereumSignTypedHashOneKey = 20117
EthereumGnosisSafeTxAck = 20118
EthereumGnosisSafeTxRequest = 20119
NEMGetAddress = 67
NEMAddress = 68
NEMSignTx = 69
NEMSignedTx = 70
NEMDecryptMessage = 75
NEMDecryptedMessage = 76
TezosGetAddress = 150
TezosAddress = 151
TezosSignTx = 152
TezosSignedTx = 153
TezosGetPublicKey = 154
TezosPublicKey = 155
StellarSignTx = 202
StellarTxOpRequest = 203
StellarGetAddress = 207
StellarAddress = 208
StellarCreateAccountOp = 210
StellarPaymentOp = 211
StellarPathPaymentStrictReceiveOp = 212
StellarManageSellOfferOp = 213
StellarCreatePassiveSellOfferOp = 214
StellarSetOptionsOp = 215
StellarChangeTrustOp = 216
StellarAllowTrustOp = 217
StellarAccountMergeOp = 218
StellarManageDataOp = 220
StellarBumpSequenceOp = 221
StellarManageBuyOfferOp = 222
StellarPathPaymentStrictSendOp = 223
StellarSignedTx = 230
CardanoGetPublicKey = 305
CardanoPublicKey = 306
CardanoGetAddress = 307
CardanoAddress = 308
CardanoTxItemAck = 313
CardanoTxAuxiliaryDataSupplement = 314
CardanoTxWitnessRequest = 315
CardanoTxWitnessResponse = 316
CardanoTxHostAck = 317
CardanoTxBodyHash = 318
CardanoSignTxFinished = 319
CardanoSignTxInit = 320
CardanoTxInput = 321
CardanoTxOutput = 322
CardanoAssetGroup = 323
CardanoToken = 324
CardanoTxCertificate = 325
CardanoTxWithdrawal = 326
CardanoTxAuxiliaryData = 327
CardanoPoolOwner = 328
CardanoPoolRelayParameters = 329
CardanoGetNativeScriptHash = 330
CardanoNativeScriptHash = 331
CardanoTxMint = 332
CardanoTxCollateralInput = 333
CardanoTxRequiredSigner = 334
CardanoTxInlineDatumChunk = 335
CardanoTxReferenceScriptChunk = 336
CardanoTxReferenceInput = 337
CardanoSignMessage = 350
CardanoMessageSignature = 351
RippleGetAddress = 400
RippleAddress = 401
RippleSignTx = 402
RippleSignedTx = 403
MoneroTransactionInitRequest = 501
MoneroTransactionInitAck = 502
MoneroTransactionSetInputRequest = 503
MoneroTransactionSetInputAck = 504
MoneroTransactionInputViniRequest = 507
MoneroTransactionInputViniAck = 508
MoneroTransactionAllInputsSetRequest = 509
MoneroTransactionAllInputsSetAck = 510
MoneroTransactionSetOutputRequest = 511
MoneroTransactionSetOutputAck = 512
MoneroTransactionAllOutSetRequest = 513
MoneroTransactionAllOutSetAck = 514
MoneroTransactionSignInputRequest = 515
MoneroTransactionSignInputAck = 516
MoneroTransactionFinalRequest = 517
MoneroTransactionFinalAck = 518
MoneroKeyImageExportInitRequest = 530
MoneroKeyImageExportInitAck = 531
MoneroKeyImageSyncStepRequest = 532
MoneroKeyImageSyncStepAck = 533
MoneroKeyImageSyncFinalRequest = 534
MoneroKeyImageSyncFinalAck = 535
MoneroGetAddress = 540
MoneroAddress = 541
MoneroGetWatchKey = 542
MoneroWatchKey = 543
DebugMoneroDiagRequest = 546
DebugMoneroDiagAck = 547
MoneroGetTxKeyRequest = 550
MoneroGetTxKeyAck = 551
MoneroLiveRefreshStartRequest = 552
MoneroLiveRefreshStartAck = 553
MoneroLiveRefreshStepRequest = 554
MoneroLiveRefreshStepAck = 555
MoneroLiveRefreshFinalRequest = 556
MoneroLiveRefreshFinalAck = 557
EosGetPublicKey = 600
EosPublicKey = 601
EosSignTx = 602
EosTxActionRequest = 603
EosTxActionAck = 604
EosSignedTx = 605
BinanceGetAddress = 700
BinanceAddress = 701
BinanceGetPublicKey = 702
BinancePublicKey = 703
BinanceSignTx = 704
BinanceTxRequest = 705
BinanceTransferMsg = 706
BinanceOrderMsg = 707
BinanceCancelMsg = 708
BinanceSignedTx = 709
StarcoinGetAddress = 10300
StarcoinAddress = 10301
StarcoinGetPublicKey = 10302
StarcoinPublicKey = 10303
StarcoinSignTx = 10304
StarcoinSignedTx = 10305
StarcoinSignMessage = 10306
StarcoinMessageSignature = 10307
StarcoinVerifyMessage = 10308
ConfluxGetAddress = 10112
ConfluxAddress = 10113
ConfluxSignTx = 10114
ConfluxTxRequest = 10115
ConfluxTxAck = 10116
ConfluxSignMessage = 10117
ConfluxSignMessageCIP23 = 10118
ConfluxMessageSignature = 10119
TronGetAddress = 10501
TronAddress = 10502
TronSignTx = 10503
TronSignedTx = 10504
TronSignMessage = 10505
TronMessageSignature = 10506
NearGetAddress = 10701
NearAddress = 10702
NearSignTx = 10703
NearSignedTx = 10704
AptosGetAddress = 10600
AptosAddress = 10601
AptosSignTx = 10602
AptosSignedTx = 10603
AptosSignMessage = 10604
AptosMessageSignature = 10605
WebAuthnListResidentCredentials = 800
WebAuthnCredentials = 801
WebAuthnAddResidentCredential = 802
WebAuthnRemoveResidentCredential = 803
SolanaGetAddress = 10100
SolanaAddress = 10101
SolanaSignTx = 10102
SolanaSignedTx = 10103
SolanaSignOffChainMessage = 10104
SolanaMessageSignature = 10105
SolanaSignUnsafeMessage = 10106
CosmosGetAddress = 10800
CosmosAddress = 10801
CosmosSignTx = 10802
CosmosSignedTx = 10803
AlgorandGetAddress = 10900
AlgorandAddress = 10901
AlgorandSignTx = 10902
AlgorandSignedTx = 10903
PolkadotGetAddress = 11000
PolkadotAddress = 11001
PolkadotSignTx = 11002
PolkadotSignedTx = 11003
SuiGetAddress = 11100
SuiAddress = 11101
SuiSignTx = 11102
SuiSignedTx = 11103
SuiSignMessage = 11104
SuiMessageSignature = 11105
SuiTxRequest = 11106
SuiTxAck = 11107
FilecoinGetAddress = 11200
FilecoinAddress = 11201
FilecoinSignTx = 11202
FilecoinSignedTx = 11203
KaspaGetAddress = 11300
KaspaAddress = 11301
KaspaSignTx = 11302
KaspaSignedTx = 11303
KaspaTxInputRequest = 11304
KaspaTxInputAck = 11305
NexaGetAddress = 11400
NexaAddress = 11401
NexaSignTx = 11402
NexaSignedTx = 11403
NexaTxInputRequest = 11404
NexaTxInputAck = 11405
NostrGetPublicKey = 11500
NostrPublicKey = 11501
NostrSignEvent = 11502
NostrSignedEvent = 11503
NostrEncryptMessage = 11504
NostrEncryptedMessage = 11505
NostrDecryptMessage = 11506
NostrDecryptedMessage = 11507
NostrSignSchnorr = 11508
NostrSignedSchnorr = 11509
LnurlAuth = 11600
LnurlAuthResp = 11601
NervosGetAddress = 11701
NervosAddress = 11702
NervosSignTx = 11703
NervosSignedTx = 11704
NervosTxRequest = 11705
NervosTxAck = 11706
TonGetAddress = 11901
TonAddress = 11902
TonSignMessage = 11903
TonSignedMessage = 11904
TonSignProof = 11905
TonSignedProof = 11906
TonTxAck = 11907
ScdoGetAddress = 12001
ScdoAddress = 12002
ScdoSignTx = 12003
ScdoSignedTx = 12004
ScdoTxAck = 12005
ScdoSignMessage = 12006
ScdoSignedMessage = 12007
AlephiumGetAddress = 12101
AlephiumAddress = 12102
AlephiumSignTx = 12103
AlephiumSignedTx = 12104
AlephiumTxRequest = 12105
AlephiumTxAck = 12106
AlephiumBytecodeRequest = 12107
AlephiumBytecodeAck = 12108
AlephiumSignMessage = 12109
AlephiumMessageSignature = 12110
BenfenGetAddress = 12201
BenfenAddress = 12202
BenfenSignTx = 12203
BenfenSignedTx = 12204
BenfenSignMessage = 12205
BenfenMessageSignature = 12206
BenfenTxRequest = 12207
BenfenTxAck = 12208
NeoGetAddress = 12301
NeoAddress = 12302
NeoSignTx = 12303
NeoSignedTx = 12304
DeviceBackToBoot = 903
RebootToBoardloader = 904
DeviceInfoSettings = 10001
GetDeviceInfo = 10002
DeviceInfo = 10003
ReadSEPublicKey = 10004
SEPublicKey = 10005
WriteSEPublicCert = 10006
ReadSEPublicCert = 10007
SEPublicCert = 10008
SESignMessage = 10012
SEMessageSignature = 10013
ResourceUpload = 10018
ZoomRequest = 10019
ResourceRequest = 10020
ResourceAck = 10021
ResourceUpdate = 10022
ListResDir = 10023
FileInfoList = 10024
OnekeyGetFeatures = 10025
OnekeyFeatures = 10026
WriteSEPrivateKey = 10027
class FailureType(IntEnum):
UnexpectedMessage = 1
ButtonExpected = 2
DataError = 3
ActionCancelled = 4
PinExpected = 5
PinCancelled = 6
PinInvalid = 7
InvalidSignature = 8
ProcessError = 9
NotEnoughFunds = 10
NotInitialized = 11
PinMismatch = 12
WipeCodeMismatch = 13
InvalidSession = 14
FirmwareError = 99
class ButtonRequestType(IntEnum):
Other = 1
FeeOverThreshold = 2
ConfirmOutput = 3
ResetDevice = 4
ConfirmWord = 5
WipeDevice = 6
ProtectCall = 7
SignTx = 8
FirmwareCheck = 9
Address = 10
PublicKey = 11
MnemonicWordCount = 12
MnemonicInput = 13
_Deprecated_ButtonRequest_PassphraseType = 14
UnknownDerivationPath = 15
RecoveryHomepage = 16
Success = 17
Warning = 18
PassphraseEntry = 19
PinEntry = 20
class PinMatrixRequestType(IntEnum):
Current = 1
NewFirst = 2
NewSecond = 3
WipeCodeFirst = 4
WipeCodeSecond = 5
class InputScriptType(IntEnum):
SPENDADDRESS = 0
SPENDMULTISIG = 1
EXTERNAL = 2
SPENDWITNESS = 3
SPENDP2SHWITNESS = 4
SPENDTAPROOT = 5
class OutputScriptType(IntEnum):
PAYTOADDRESS = 0
PAYTOSCRIPTHASH = 1
PAYTOMULTISIG = 2
PAYTOOPRETURN = 3
PAYTOWITNESS = 4
PAYTOP2SHWITNESS = 5
PAYTOTAPROOT = 6
class DecredStakingSpendType(IntEnum):
SSGen = 0
SSRTX = 1
class AmountUnit(IntEnum):
BITCOIN = 0
MILLIBITCOIN = 1
MICROBITCOIN = 2
SATOSHI = 3
class RequestType(IntEnum):
TXINPUT = 0
TXOUTPUT = 1
TXMETA = 2
TXFINISHED = 3
TXEXTRADATA = 4
TXORIGINPUT = 5
TXORIGOUTPUT = 6
TXPAYMENTREQ = 7
class RebootType(IntEnum):
Normal = 0
Boardloader = 1
BootLoader = 2
class CardanoDerivationType(IntEnum):
LEDGER = 0
ICARUS = 1
ICARUS_TREZOR = 2
class CardanoAddressType(IntEnum):
BASE = 0
BASE_SCRIPT_KEY = 1
BASE_KEY_SCRIPT = 2
BASE_SCRIPT_SCRIPT = 3
POINTER = 4
POINTER_SCRIPT = 5
ENTERPRISE = 6
ENTERPRISE_SCRIPT = 7
BYRON = 8
REWARD = 14
REWARD_SCRIPT = 15
class CardanoNativeScriptType(IntEnum):
PUB_KEY = 0
ALL = 1
ANY = 2
N_OF_K = 3
INVALID_BEFORE = 4
INVALID_HEREAFTER = 5
class CardanoNativeScriptHashDisplayFormat(IntEnum):
HIDE = 0
BECH32 = 1
POLICY_ID = 2
class CardanoTxOutputSerializationFormat(IntEnum):
ARRAY_LEGACY = 0
MAP_BABBAGE = 1
class CardanoCertificateType(IntEnum):
STAKE_REGISTRATION = 0
STAKE_DEREGISTRATION = 1
STAKE_DELEGATION = 2
STAKE_POOL_REGISTRATION = 3
STAKE_REGISTRATION_CONWAY = 7
STAKE_DEREGISTRATION_CONWAY = 8
VOTE_DELEGATION = 9
class CardanoDRepType(IntEnum):
KEY_HASH = 0
SCRIPT_HASH = 1
ABSTAIN = 2
NO_CONFIDENCE = 3
class CardanoPoolRelayType(IntEnum):
SINGLE_HOST_IP = 0
SINGLE_HOST_NAME = 1
MULTIPLE_HOST_NAME = 2
class CardanoTxAuxiliaryDataSupplementType(IntEnum):
NONE = 0
CVOTE_REGISTRATION_SIGNATURE = 1
class CardanoCVoteRegistrationFormat(IntEnum):
CIP15 = 0
CIP36 = 1
class CardanoTxSigningMode(IntEnum):
ORDINARY_TRANSACTION = 0
POOL_REGISTRATION_AS_OWNER = 1
MULTISIG_TRANSACTION = 2
PLUTUS_TRANSACTION = 3
class CardanoTxWitnessType(IntEnum):
BYRON_WITNESS = 0
SHELLEY_WITNESS = 1
class BackupType(IntEnum):
Bip39 = 0
Slip39_Basic = 1
Slip39_Advanced = 2
class SafetyCheckLevel(IntEnum):
Strict = 0
PromptAlways = 1
PromptTemporarily = 2
class OneKeyDeviceType(IntEnum):
CLASSIC = 0
CLASSIC1S = 1
MINI = 2
TOUCH = 3
PRO = 5
class OneKeySeType(IntEnum):
THD89 = 0
SE608A = 1
class OneKeySEState(IntEnum):
BOOT = 0
APP = 1
class Capability(IntEnum):
Bitcoin = 1
Bitcoin_like = 2
Binance = 3
Cardano = 4
Crypto = 5
EOS = 6
Ethereum = 7
Lisk = 8
Monero = 9
NEM = 10
Ripple = 11
Stellar = 12
Tezos = 13
U2F = 14
Shamir = 15
ShamirGroups = 16
PassphraseEntry = 17
class SdProtectOperationType(IntEnum):
DISABLE = 0
ENABLE = 1
REFRESH = 2
class RecoveryDeviceType(IntEnum):
ScrambledWords = 0
Matrix = 1
class WordRequestType(IntEnum):
Plain = 0
Matrix9 = 1
Matrix6 = 2
class ResourceType(IntEnum):
WallPaper = 0
Nft = 1
class DebugSwipeDirection(IntEnum):
UP = 0
DOWN = 1
LEFT = 2
RIGHT = 3
class DebugButton(IntEnum):
NO = 0
YES = 1
INFO = 2
class EthereumDefinitionType(IntEnum):
NETWORK = 0
TOKEN = 1
class EthereumGnosisSafeTxOperation(IntEnum):
CALL = 0
DELEGATE_CALL = 1
class EthereumDataTypeOneKey(IntEnum):
UINT = 1
INT = 2
BYTES = 3
STRING = 4
BOOL = 5
ADDRESS = 6
ARRAY = 7
STRUCT = 8
class EthereumDataType(IntEnum):
UINT = 1
INT = 2
BYTES = 3
STRING = 4
BOOL = 5
ADDRESS = 6
ARRAY = 7
STRUCT = 8
class MoneroNetworkType(IntEnum):
MAINNET = 0
TESTNET = 1
STAGENET = 2
FAKECHAIN = 3
class NEMMosaicLevy(IntEnum):
MosaicLevy_Absolute = 1
MosaicLevy_Percentile = 2
class NEMSupplyChangeType(IntEnum):
SupplyChange_Increase = 1
SupplyChange_Decrease = 2
class NEMModificationType(IntEnum):
CosignatoryModification_Add = 1
CosignatoryModification_Delete = 2
class NEMImportanceTransferMode(IntEnum):
ImportanceTransfer_Activate = 1
ImportanceTransfer_Deactivate = 2
class SolanaOffChainMessageVersion(IntEnum):
MESSAGE_VERSION_0 = 0
class SolanaOffChainMessageFormat(IntEnum):
V0_RESTRICTED_ASCII = 0
V0_LIMITED_UTF8 = 1
class StellarAssetType(IntEnum):
NATIVE = 0
ALPHANUM4 = 1
ALPHANUM12 = 2
class StellarMemoType(IntEnum):
NONE = 0
TEXT = 1
ID = 2
HASH = 3
RETURN = 4
class StellarSignerType(IntEnum):
ACCOUNT = 0
PRE_AUTH = 1
HASH = 2
class TezosContractType(IntEnum):
Implicit = 0
Originated = 1
class TezosBallotType(IntEnum):
Yay = 0
Nay = 1
Pass = 2
class TonWalletVersion(IntEnum):
V4R2 = 3
class TonWorkChain(IntEnum):
BASECHAIN = 0
MASTERCHAIN = 1
class TronResourceCode(IntEnum):
BANDWIDTH = 0
ENERGY = 1
TRON_POWER = 2
class AlephiumGetAddress(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12101
FIELDS = {
1: protobuf.Field("address_n", "uint32", repeated=True, required=False),
2: protobuf.Field("show_display", "bool", repeated=False, required=False),
3: protobuf.Field("include_public_key", "bool", repeated=False, required=False),
4: protobuf.Field("target_group", "uint32", repeated=False, required=False),
}
def __init__(
self,
*,
address_n: Optional[Sequence["int"]] = None,
show_display: Optional["bool"] = None,
include_public_key: Optional["bool"] = None,
target_group: Optional["int"] = None,
) -> None:
self.address_n: Sequence["int"] = address_n if address_n is not None else []
self.show_display = show_display
self.include_public_key = include_public_key
self.target_group = target_group
class AlephiumAddress(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12102
FIELDS = {
1: protobuf.Field("address", "string", repeated=False, required=True),
2: protobuf.Field("public_key", "bytes", repeated=False, required=False),
3: protobuf.Field("derived_path", "uint32", repeated=True, required=False),
}
def __init__(
self,
*,
address: "str",
derived_path: Optional[Sequence["int"]] = None,
public_key: Optional["bytes"] = None,
) -> None:
self.derived_path: Sequence["int"] = derived_path if derived_path is not None else []
self.address = address
self.public_key = public_key
class AlephiumSignTx(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12103
FIELDS = {
1: protobuf.Field("address_n", "uint32", repeated=True, required=False),
2: protobuf.Field("data_initial_chunk", "bytes", repeated=False, required=True),
3: protobuf.Field("data_length", "uint32", repeated=False, required=False),
}
def __init__(
self,
*,
data_initial_chunk: "bytes",
address_n: Optional[Sequence["int"]] = None,
data_length: Optional["int"] = None,
) -> None:
self.address_n: Sequence["int"] = address_n if address_n is not None else []
self.data_initial_chunk = data_initial_chunk
self.data_length = data_length
class AlephiumSignedTx(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12104
FIELDS = {
1: protobuf.Field("signature", "bytes", repeated=False, required=True),
2: protobuf.Field("address", "string", repeated=False, required=True),
}
def __init__(
self,
*,
signature: "bytes",
address: "str",
) -> None:
self.signature = signature
self.address = address
class AlephiumTxRequest(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12105
FIELDS = {
1: protobuf.Field("data_length", "uint32", repeated=False, required=False),
2: protobuf.Field("public_key", "bytes", repeated=False, required=False),
3: protobuf.Field("signature", "bytes", repeated=False, required=False),
}
def __init__(
self,
*,
data_length: Optional["int"] = None,
public_key: Optional["bytes"] = None,
signature: Optional["bytes"] = None,
) -> None:
self.data_length = data_length
self.public_key = public_key
self.signature = signature
class AlephiumTxAck(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12106
FIELDS = {
1: protobuf.Field("data_chunk", "bytes", repeated=False, required=True),
}
def __init__(
self,
*,
data_chunk: "bytes",
) -> None:
self.data_chunk = data_chunk
class AlephiumBytecodeRequest(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12107
FIELDS = {
1: protobuf.Field("data_length", "uint32", repeated=False, required=False),
2: protobuf.Field("public_key", "bytes", repeated=False, required=False),
3: protobuf.Field("signature", "bytes", repeated=False, required=False),
}
def __init__(
self,
*,
data_length: Optional["int"] = None,
public_key: Optional["bytes"] = None,
signature: Optional["bytes"] = None,
) -> None:
self.data_length = data_length
self.public_key = public_key
self.signature = signature
class AlephiumBytecodeAck(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12108
FIELDS = {
1: protobuf.Field("bytecode_data", "bytes", repeated=False, required=True),
}
def __init__(
self,
*,
bytecode_data: "bytes",
) -> None:
self.bytecode_data = bytecode_data
class AlephiumSignMessage(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 12109
FIELDS = {
1: protobuf.Field("address_n", "uint32", repeated=True, required=False),
2: protobuf.Field("message", "bytes", repeated=False, required=False),
3: protobuf.Field("message_type", "bytes", repeated=False, required=False),
}
def __init__(
self,
*,
address_n: Optional[Sequence["int"]] = None,
message: Optional["bytes"] = None,
message_type: Optional["bytes"] = None,
) -> None:
self.address_n: Sequence["int"] = address_n if address_n is not None else []
self.message = message
self.message_type = message_type