@onekeyfe/hd-transport 1.1.34-alpha.2 → 1.1.34-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/__tests__/build-receive.test.js +6 -8
  2. package/__tests__/decode-features.test.js +3 -2
  3. package/__tests__/messages.test.js +131 -0
  4. package/__tests__/protocol-v2-link-manager.test.js +351 -0
  5. package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
  6. package/__tests__/protocol-v2.test.js +899 -0
  7. package/dist/constants.d.ts +16 -5
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/index.d.ts +1398 -45
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1102 -85
  12. package/dist/protocols/index.d.ts +50 -0
  13. package/dist/protocols/index.d.ts.map +1 -0
  14. package/dist/protocols/v1/decode.d.ts +11 -0
  15. package/dist/protocols/v1/decode.d.ts.map +1 -0
  16. package/dist/protocols/v1/encode.d.ts +11 -0
  17. package/dist/protocols/v1/encode.d.ts.map +1 -0
  18. package/dist/protocols/v1/index.d.ts +5 -0
  19. package/dist/protocols/v1/index.d.ts.map +1 -0
  20. package/dist/protocols/v1/packets.d.ts +7 -0
  21. package/dist/protocols/v1/packets.d.ts.map +1 -0
  22. package/dist/{serialization → protocols/v1}/receive.d.ts +1 -1
  23. package/dist/protocols/v1/receive.d.ts.map +1 -0
  24. package/dist/protocols/v2/constants.d.ts +8 -0
  25. package/dist/protocols/v2/constants.d.ts.map +1 -0
  26. package/dist/protocols/v2/crc8.d.ts +3 -0
  27. package/dist/protocols/v2/crc8.d.ts.map +1 -0
  28. package/dist/protocols/v2/decode.d.ts +8 -0
  29. package/dist/protocols/v2/decode.d.ts.map +1 -0
  30. package/dist/protocols/v2/encode.d.ts +4 -0
  31. package/dist/protocols/v2/encode.d.ts.map +1 -0
  32. package/dist/protocols/v2/frame-assembler.d.ts +12 -0
  33. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -0
  34. package/dist/protocols/v2/index.d.ts +6 -0
  35. package/dist/protocols/v2/index.d.ts.map +1 -0
  36. package/dist/protocols/v2/link-manager.d.ts +36 -0
  37. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  38. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  39. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  40. package/dist/protocols/v2/session.d.ts +63 -0
  41. package/dist/protocols/v2/session.d.ts.map +1 -0
  42. package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
  43. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  44. package/dist/serialization/index.d.ts +6 -3
  45. package/dist/serialization/index.d.ts.map +1 -1
  46. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  47. package/dist/serialization/protobuf/messages.d.ts +1 -1
  48. package/dist/serialization/protobuf/messages.d.ts.map +1 -1
  49. package/dist/types/messages.d.ts +707 -12
  50. package/dist/types/messages.d.ts.map +1 -1
  51. package/dist/types/transport.d.ts +19 -5
  52. package/dist/types/transport.d.ts.map +1 -1
  53. package/dist/utils/logBlockCommand.d.ts.map +1 -1
  54. package/messages-protocol-v2.json +13544 -0
  55. package/package.json +3 -3
  56. package/scripts/protobuf-patches/TxInputType.js +1 -0
  57. package/scripts/protobuf-patches/index.js +2 -0
  58. package/scripts/protobuf-types.js +233 -18
  59. package/src/constants.ts +48 -6
  60. package/src/index.ts +47 -11
  61. package/src/protocols/index.ts +124 -0
  62. package/src/{serialization/protocol → protocols/v1}/decode.ts +4 -4
  63. package/src/{serialization/protocol → protocols/v1}/encode.ts +18 -13
  64. package/src/protocols/v1/index.ts +4 -0
  65. package/src/protocols/v1/packets.ts +53 -0
  66. package/src/{serialization → protocols/v1}/receive.ts +5 -5
  67. package/src/protocols/v2/constants.ts +7 -0
  68. package/src/protocols/v2/crc8.ts +34 -0
  69. package/src/protocols/v2/decode.ts +89 -0
  70. package/src/protocols/v2/encode.ts +90 -0
  71. package/src/protocols/v2/frame-assembler.ts +98 -0
  72. package/src/protocols/v2/index.ts +5 -0
  73. package/src/protocols/v2/link-manager.ts +162 -0
  74. package/src/protocols/v2/sequence-cursor.ts +10 -0
  75. package/src/protocols/v2/session.ts +339 -0
  76. package/src/protocols/v2/usb-transport-base.ts +194 -0
  77. package/src/serialization/index.ts +6 -5
  78. package/src/serialization/protobuf/decode.ts +7 -0
  79. package/src/serialization/protobuf/messages.ts +14 -5
  80. package/src/types/messages.ts +903 -13
  81. package/src/types/transport.ts +29 -5
  82. package/src/utils/logBlockCommand.ts +9 -1
  83. package/dist/serialization/protocol/decode.d.ts +0 -11
  84. package/dist/serialization/protocol/decode.d.ts.map +0 -1
  85. package/dist/serialization/protocol/encode.d.ts +0 -11
  86. package/dist/serialization/protocol/encode.d.ts.map +0 -1
  87. package/dist/serialization/protocol/index.d.ts +0 -3
  88. package/dist/serialization/protocol/index.d.ts.map +0 -1
  89. package/dist/serialization/receive.d.ts.map +0 -1
  90. package/dist/serialization/send.d.ts +0 -7
  91. package/dist/serialization/send.d.ts.map +0 -1
  92. package/src/serialization/protocol/index.ts +0 -2
  93. package/src/serialization/send.ts +0 -58
package/dist/index.d.ts CHANGED
@@ -4,36 +4,221 @@ import * as protobuf from 'protobufjs/light';
4
4
  import { Root } from 'protobufjs/light';
5
5
  import EventEmitter from 'events';
6
6
 
7
- declare function parseConfigure(data: protobuf.INamespace): protobuf.Root;
7
+ declare const decodeEnvelope: (byteBuffer: ByteBuffer__default) => {
8
+ typeId: number;
9
+ buffer: ByteBuffer__default;
10
+ };
11
+ declare const decodeFirstChunk: (bytes: ArrayBuffer) => {
12
+ length: number;
13
+ typeId: number;
14
+ restBuffer: ByteBuffer__default;
15
+ };
8
16
 
9
- declare function buildOne(messages: Root, name: string, data: Record<string, unknown>): Buffer;
17
+ type Options<Chunked> = {
18
+ chunked: Chunked;
19
+ addTrezorHeaders: boolean;
20
+ messageTypeId: number;
21
+ };
22
+ declare function encodeEnvelope(data: ByteBuffer__default, options: Options<true>): Buffer[];
23
+ declare function encodeEnvelope(data: ByteBuffer__default, options: Options<false>): Buffer;
24
+
25
+ declare function encodeEnvelopeMessage(messages: Root, name: string, data: Record<string, unknown>): Buffer;
26
+ declare const encodeMessageChunks: (messages: Root, name: string, data: Record<string, unknown>) => Buffer[];
27
+ declare const encodeTransportPackets: (messages: Root, name: string, data: Record<string, unknown>) => ByteBuffer__default[];
10
28
 
11
- declare function receiveOne(messages: Root, data: string): {
29
+ declare function decodeMessage(messages: Root, data: string): {
12
30
  message: {
13
31
  [key: string]: any;
14
32
  };
15
33
  type: string;
16
34
  };
17
35
 
18
- declare const decode: (byteBuffer: ByteBuffer__default) => {
19
- typeId: number;
20
- buffer: ByteBuffer__default;
21
- };
22
- declare const decodeChunked: (bytes: ArrayBuffer) => {
23
- length: number;
24
- typeId: number;
25
- restBuffer: ByteBuffer__default;
26
- };
36
+ declare const index_decodeEnvelope: typeof decodeEnvelope;
37
+ declare const index_decodeFirstChunk: typeof decodeFirstChunk;
38
+ declare const index_encodeEnvelope: typeof encodeEnvelope;
39
+ declare const index_encodeEnvelopeMessage: typeof encodeEnvelopeMessage;
40
+ declare const index_encodeMessageChunks: typeof encodeMessageChunks;
41
+ declare const index_encodeTransportPackets: typeof encodeTransportPackets;
42
+ declare const index_decodeMessage: typeof decodeMessage;
43
+ declare namespace index {
44
+ export {
45
+ index_decodeEnvelope as decodeEnvelope,
46
+ index_decodeFirstChunk as decodeFirstChunk,
47
+ index_encodeEnvelope as encodeEnvelope,
48
+ index_encodeEnvelopeMessage as encodeEnvelopeMessage,
49
+ index_encodeMessageChunks as encodeMessageChunks,
50
+ index_encodeTransportPackets as encodeTransportPackets,
51
+ index_decodeMessage as decodeMessage,
52
+ };
53
+ }
54
+
55
+ declare function parseConfigure(data: protobuf.INamespace): protobuf.Root;
56
+
57
+ declare const PROTO_HEAD_SOF = 90;
58
+ declare const PROTO_PRE_HEAD_SIZE = 4;
59
+ declare const PROTO_HEAD_CRC_SIZE = 8;
60
+ declare const CRC8_INIT = 48;
61
+ declare const PACKET_SIZE = 4096;
62
+ declare const PROTO_DATA_TYPE_PACKET = 0;
63
+ declare const PROTO_DATA_TYPE_ACK = 1;
64
+
65
+ declare const CRC8_TABLE: Uint8Array;
66
+ /**
67
+ * Compute CRC-8 over the first len bytes using the firmware-compatible initial value.
68
+ */
69
+ declare function crc8(data: Uint8Array, len: number): number;
70
+
71
+ /**
72
+ * Advance a Protocol V2 sequence counter: 1-255, wraps around skipping 0.
73
+ */
74
+ declare function nextProtoSeq(current: number): number;
75
+ /**
76
+ * Build a raw Protocol V2 frame (0x5A framing).
77
+ *
78
+ * Frame layout (PROTO_HEAD_CRC_SIZE = 8 overhead bytes):
79
+ * [0] SOF = 0x5A
80
+ * [1] frameLen low byte
81
+ * [2] frameLen high byte
82
+ * [3] CRC8 of bytes 0-2 (pre-header CRC)
83
+ * [4] router
84
+ * [5] attr = ((packetSrc & 0x0F) << 2) | dataType
85
+ * [6] seq (1-255, wraps skipping 0)
86
+ * [7..N-2] payload
87
+ * [N-1] CRC8 of bytes 0 to N-2 (frame CRC)
88
+ */
89
+ declare function encodeFrame(payload: Uint8Array | null, packetSrc?: number, router?: number, seq?: number): Uint8Array;
90
+ /**
91
+ * Build a Protocol V2 frame carrying a protobuf message.
92
+ *
93
+ * Payload layout:
94
+ * [0-1] messageTypeId as little-endian uint16
95
+ * [2..] protobuf-encoded message bytes
96
+ */
97
+ declare function encodeProtobufFrame(messageTypeId: number, pbPayload: Uint8Array, packetSrc?: number, router?: number, seq?: number): Uint8Array;
98
+
99
+ interface ProtoV2Frame {
100
+ /** Little-endian message type ID */
101
+ messageTypeId: number;
102
+ /** Raw protobuf-encoded payload (bytes after the 2-byte messageTypeId) */
103
+ pbPayload: Uint8Array;
104
+ /** Sequence number from the frame header */
105
+ seq: number;
106
+ }
107
+ declare function isAckFrame(data: Uint8Array): boolean;
108
+ /**
109
+ * Parse and validate a Protocol V2 response frame.
110
+ *
111
+ * Validates:
112
+ * - SOF byte (0x5A)
113
+ * - Header CRC (bytes 0-2)
114
+ * - Frame CRC (full frame except last byte)
115
+ *
116
+ * Returns the decoded messageTypeId, raw protobuf payload, and sequence number.
117
+ */
118
+ declare function decodeFrame(data: Uint8Array): ProtoV2Frame;
119
+
120
+ declare function concatUint8Arrays(arrays: Uint8Array[]): Uint8Array;
121
+ declare class ProtocolV2FrameAssembler {
122
+ private buffer;
123
+ private readonly maxFrameBytes;
124
+ constructor(maxFrameBytes?: number);
125
+ reset(): void;
126
+ push(chunk: Uint8Array): Uint8Array | undefined;
127
+ /**
128
+ * Append a chunk (optional) and extract every complete frame currently
129
+ * buffered. Same validation/throw semantics as push(); push() stays
130
+ * backward compatible for callers that drain one frame at a time.
131
+ */
132
+ drain(chunk?: Uint8Array): Uint8Array[];
133
+ private append;
134
+ private extractFrame;
135
+ }
27
136
 
28
- declare const decodeProtocol_decode: typeof decode;
29
- declare const decodeProtocol_decodeChunked: typeof decodeChunked;
30
- declare namespace decodeProtocol {
137
+ declare const protocolV2Codec_PROTO_HEAD_SOF: typeof PROTO_HEAD_SOF;
138
+ declare const protocolV2Codec_PROTO_PRE_HEAD_SIZE: typeof PROTO_PRE_HEAD_SIZE;
139
+ declare const protocolV2Codec_PROTO_HEAD_CRC_SIZE: typeof PROTO_HEAD_CRC_SIZE;
140
+ declare const protocolV2Codec_CRC8_INIT: typeof CRC8_INIT;
141
+ declare const protocolV2Codec_PACKET_SIZE: typeof PACKET_SIZE;
142
+ declare const protocolV2Codec_PROTO_DATA_TYPE_PACKET: typeof PROTO_DATA_TYPE_PACKET;
143
+ declare const protocolV2Codec_PROTO_DATA_TYPE_ACK: typeof PROTO_DATA_TYPE_ACK;
144
+ declare const protocolV2Codec_CRC8_TABLE: typeof CRC8_TABLE;
145
+ declare const protocolV2Codec_crc8: typeof crc8;
146
+ declare const protocolV2Codec_nextProtoSeq: typeof nextProtoSeq;
147
+ declare const protocolV2Codec_encodeFrame: typeof encodeFrame;
148
+ declare const protocolV2Codec_encodeProtobufFrame: typeof encodeProtobufFrame;
149
+ type protocolV2Codec_ProtoV2Frame = ProtoV2Frame;
150
+ declare const protocolV2Codec_isAckFrame: typeof isAckFrame;
151
+ declare const protocolV2Codec_decodeFrame: typeof decodeFrame;
152
+ declare const protocolV2Codec_concatUint8Arrays: typeof concatUint8Arrays;
153
+ type protocolV2Codec_ProtocolV2FrameAssembler = ProtocolV2FrameAssembler;
154
+ declare const protocolV2Codec_ProtocolV2FrameAssembler: typeof ProtocolV2FrameAssembler;
155
+ declare namespace protocolV2Codec {
31
156
  export {
32
- decodeProtocol_decode as decode,
33
- decodeProtocol_decodeChunked as decodeChunked,
157
+ protocolV2Codec_PROTO_HEAD_SOF as PROTO_HEAD_SOF,
158
+ protocolV2Codec_PROTO_PRE_HEAD_SIZE as PROTO_PRE_HEAD_SIZE,
159
+ protocolV2Codec_PROTO_HEAD_CRC_SIZE as PROTO_HEAD_CRC_SIZE,
160
+ protocolV2Codec_CRC8_INIT as CRC8_INIT,
161
+ protocolV2Codec_PACKET_SIZE as PACKET_SIZE,
162
+ protocolV2Codec_PROTO_DATA_TYPE_PACKET as PROTO_DATA_TYPE_PACKET,
163
+ protocolV2Codec_PROTO_DATA_TYPE_ACK as PROTO_DATA_TYPE_ACK,
164
+ protocolV2Codec_CRC8_TABLE as CRC8_TABLE,
165
+ protocolV2Codec_crc8 as crc8,
166
+ protocolV2Codec_nextProtoSeq as nextProtoSeq,
167
+ protocolV2Codec_encodeFrame as encodeFrame,
168
+ protocolV2Codec_encodeProtobufFrame as encodeProtobufFrame,
169
+ protocolV2Codec_ProtoV2Frame as ProtoV2Frame,
170
+ protocolV2Codec_isAckFrame as isAckFrame,
171
+ protocolV2Codec_decodeFrame as decodeFrame,
172
+ protocolV2Codec_concatUint8Arrays as concatUint8Arrays,
173
+ protocolV2Codec_ProtocolV2FrameAssembler as ProtocolV2FrameAssembler,
34
174
  };
35
175
  }
36
176
 
177
+ declare const PROTOCOL_V2_SYS_MESSAGE_THRESHOLD = 60000;
178
+ type ProtocolV2Schemas$1 = {
179
+ protocolV1: Root;
180
+ protocolV2: Root;
181
+ };
182
+ type ProtocolV2FrameOptions = {
183
+ packetSrc?: number;
184
+ router?: number;
185
+ /** Sequence number (1-255). Managed per-session by ProtocolV2Session. */
186
+ seq?: number;
187
+ };
188
+ declare const ProtocolV1: {
189
+ encodeEnvelope: typeof encodeEnvelopeMessage;
190
+ encodeMessageChunks: (messages: Root, name: string, data: Record<string, unknown>) => Buffer[];
191
+ encodeTransportPackets: (messages: Root, name: string, data: Record<string, unknown>) => ByteBuffer__default[];
192
+ decodeFirstChunk: (bytes: ArrayBuffer) => {
193
+ length: number;
194
+ typeId: number;
195
+ restBuffer: ByteBuffer__default;
196
+ };
197
+ decodeMessage: typeof decodeMessage;
198
+ };
199
+ declare const ProtocolV2: {
200
+ isAckFrame: typeof isAckFrame;
201
+ inspectFrame(schemas: ProtocolV2Schemas$1, frame: Uint8Array): {
202
+ messageName: string;
203
+ messageTypeId: number;
204
+ pbPayload: Uint8Array;
205
+ seq: number;
206
+ type: string;
207
+ };
208
+ encodeFrame(schemas: ProtocolV2Schemas$1, name: string, data: Record<string, unknown>, options?: ProtocolV2FrameOptions): Uint8Array;
209
+ decodeFrame(schemas: ProtocolV2Schemas$1, frame: Uint8Array): {
210
+ message: {
211
+ [key: string]: any;
212
+ };
213
+ messageName: string;
214
+ messageTypeId: number;
215
+ pbPayload: Uint8Array;
216
+ seq: number;
217
+ type: string;
218
+ };
219
+ };
220
+
221
+ type ProtocolType = 'V1' | 'V2';
37
222
  type OneKeyDeviceCommType = 'usb' | 'webusb' | 'ble' | 'webble' | 'electron-ble' | 'bridge' | 'emulator';
38
223
  type OneKeyUsbDeviceInfo = {
39
224
  path: string;
@@ -50,17 +235,26 @@ type OneKeyMobileDeviceInfo = {
50
235
  type OneKeyDeviceInfoBase = {
51
236
  commType: OneKeyDeviceCommType;
52
237
  };
53
- type OneKeyDeviceInfo = OneKeyDeviceInfoBase & OneKeyDeviceInfoWithSession & OneKeyMobileDeviceInfo;
238
+ type OneKeyDeviceInfo = OneKeyDeviceInfoBase & OneKeyDeviceInfoWithSession & OneKeyMobileDeviceInfo & {
239
+ protocolType?: ProtocolType;
240
+ };
54
241
  type AcquireInput = {
55
242
  path?: string;
56
243
  previous?: string | null;
57
244
  uuid?: string;
58
245
  forceCleanRunPromise?: boolean;
246
+ expectedProtocol?: ProtocolType;
59
247
  };
60
248
  type MessageFromOneKey = {
61
249
  type: string;
62
250
  message: Record<string, any>;
63
251
  };
252
+ type TransportCallOptions = {
253
+ timeoutMs?: number;
254
+ expectedTypes?: string[];
255
+ intermediateTypes?: string[];
256
+ onIntermediateResponse?: (response: MessageFromOneKey) => void;
257
+ };
64
258
  type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise<string>;
65
259
  type Transport = {
66
260
  enumerate(): Promise<Array<OneKeyDeviceInfo>>;
@@ -68,14 +262,16 @@ type Transport = {
68
262
  acquire(input: AcquireInput): Promise<string>;
69
263
  release(session: string, onclose: boolean): Promise<void>;
70
264
  configure(signedData: JSON | string): Promise<void>;
71
- call(session: string, name: string, data: Record<string, any>): Promise<MessageFromOneKey>;
265
+ configureProtocolV2?: (signedData: JSON | string) => Promise<void> | void;
266
+ call(session: string, name: string, data: Record<string, any>, options?: TransportCallOptions): Promise<MessageFromOneKey>;
72
267
  post(session: string, name: string, data: Record<string, any>): Promise<void>;
73
268
  read(session: string): Promise<MessageFromOneKey>;
74
269
  cancel(): Promise<void>;
75
270
  disconnect?: (session: string) => Promise<void>;
271
+ getProtocolType: (path: string) => ProtocolType | undefined;
76
272
  promptDeviceAccess?: () => Promise<USBDevice | BluetoothDevice | null>;
77
273
  init: ITransportInitFn;
78
- stop(): void;
274
+ stop(): void | Promise<void>;
79
275
  configured: boolean;
80
276
  version: string;
81
277
  name: string;
@@ -88,8 +284,10 @@ type LowLevelDevice = OneKeyDeviceInfoBase & {
88
284
  };
89
285
  type LowlevelTransportSharedPlugin = {
90
286
  enumerate: () => Promise<LowLevelDevice[]>;
91
- send: (uuid: string, data: string) => Promise<void>;
92
- receive: () => Promise<string>;
287
+ send: (uuid: string, data: string, options?: {
288
+ withoutResponse?: boolean;
289
+ }) => Promise<void>;
290
+ receive: (uuid?: string) => Promise<string>;
93
291
  connect: (uuid: string) => Promise<void>;
94
292
  disconnect: (uuid: string) => Promise<void>;
95
293
  init: () => Promise<void>;
@@ -372,6 +570,7 @@ type GetAddress = {
372
570
  };
373
571
  type Address = {
374
572
  address: string;
573
+ mac?: string;
375
574
  };
376
575
  type GetOwnershipId = {
377
576
  address_n: number[];
@@ -400,6 +599,13 @@ type VerifyMessage = {
400
599
  message: string;
401
600
  coin_name?: string;
402
601
  };
602
+ type CoinJoinRequest = {
603
+ fee_rate: number;
604
+ no_fee_threshold: number;
605
+ min_registrable_amount: number;
606
+ mask_public_key: string;
607
+ signature: string;
608
+ };
403
609
  type SignTx = {
404
610
  outputs_count: number;
405
611
  inputs_count: number;
@@ -413,6 +619,8 @@ type SignTx = {
413
619
  branch_id?: number;
414
620
  amount_unit?: AmountUnit;
415
621
  decred_staking_ticket?: boolean;
622
+ serialize?: boolean;
623
+ coinjoin_request?: CoinJoinRequest;
416
624
  };
417
625
  declare enum Enum_RequestType {
418
626
  TXINPUT = 0,
@@ -421,7 +629,8 @@ declare enum Enum_RequestType {
421
629
  TXFINISHED = 3,
422
630
  TXEXTRADATA = 4,
423
631
  TXORIGINPUT = 5,
424
- TXORIGOUTPUT = 6
632
+ TXORIGOUTPUT = 6,
633
+ TXPAYMENTREQ = 7
425
634
  }
426
635
  type RequestType = keyof typeof Enum_RequestType;
427
636
  type TxRequestDetailsType = {
@@ -456,6 +665,7 @@ type CommonTxInputType = {
456
665
  witness?: string;
457
666
  ownership_proof?: string;
458
667
  commitment_data?: string;
668
+ coinjoin_flags?: number;
459
669
  };
460
670
  type TxInputType = (CommonTxInputType & {
461
671
  address_n: number[];
@@ -595,12 +805,15 @@ type OwnershipProof = {
595
805
  };
596
806
  type AuthorizeCoinJoin = {
597
807
  coordinator: string;
598
- max_total_fee: number;
808
+ max_total_fee?: number;
599
809
  fee_per_anonymity?: number;
600
810
  address_n: number[];
601
811
  coin_name?: string;
602
812
  script_type?: InputScriptType;
603
813
  amount_unit?: AmountUnit;
814
+ max_rounds?: number;
815
+ max_coordinator_fee_rate?: number;
816
+ max_fee_per_kvbyte?: number;
604
817
  };
605
818
  type BIP32Address = {
606
819
  address_n: number[];
@@ -964,11 +1177,15 @@ declare enum FailureType {
964
1177
  Failure_PinMismatch = 12,
965
1178
  Failure_WipeCodeMismatch = 13,
966
1179
  Failure_InvalidSession = 14,
967
- Failure_FirmwareError = 99
1180
+ Failure_FirmwareError = 99,
1181
+ Failure_InvalidMessage = 1,
1182
+ Failure_UndefinedError = 2,
1183
+ Failure_UsageError = 3
968
1184
  }
969
1185
  type Failure = {
970
1186
  code?: FailureType;
971
1187
  message?: string;
1188
+ subcode?: number;
972
1189
  };
973
1190
  declare enum Enum_ButtonRequestType {
974
1191
  ButtonRequest_Other = 1,
@@ -1832,7 +2049,10 @@ type LnurlAuthResp = {
1832
2049
  declare enum Enum_BackupType {
1833
2050
  Bip39 = 0,
1834
2051
  Slip39_Basic = 1,
1835
- Slip39_Advanced = 2
2052
+ Slip39_Advanced = 2,
2053
+ Slip39_Single_Extendable = 3,
2054
+ Slip39_Basic_Extendable = 4,
2055
+ Slip39_Advanced_Extendable = 5
1836
2056
  }
1837
2057
  type BackupType = keyof typeof Enum_BackupType;
1838
2058
  declare enum Enum_SafetyCheckLevel {
@@ -1979,6 +2199,19 @@ type Features = {
1979
2199
  onekey_se04_state?: string | null;
1980
2200
  attach_to_pin_user?: boolean;
1981
2201
  unlocked_attach_pin?: boolean;
2202
+ coprocessor_bt_name?: string;
2203
+ coprocessor_version?: string;
2204
+ coprocessor_bt_enable?: boolean;
2205
+ romloader_version?: string;
2206
+ onekey_romloader_version?: string;
2207
+ onekey_romloader_hash?: string;
2208
+ onekey_bootloader_version?: string;
2209
+ onekey_bootloader_hash?: string;
2210
+ onekey_bootloader_build_id?: string;
2211
+ onekey_coprocessor_bt_name?: string;
2212
+ onekey_coprocessor_version?: string;
2213
+ onekey_coprocessor_build_id?: string;
2214
+ onekey_coprocessor_hash?: string;
1982
2215
  };
1983
2216
  type OnekeyFeatures = {
1984
2217
  onekey_device_type?: OneKeyDeviceType;
@@ -2025,6 +2258,28 @@ type OnekeyFeatures = {
2025
2258
  onekey_se02_boot_build_id?: string;
2026
2259
  onekey_se03_boot_build_id?: string;
2027
2260
  onekey_se04_boot_build_id?: string;
2261
+ onekey_romloader_version?: string;
2262
+ onekey_bootloader_version?: string;
2263
+ onekey_romloader_hash?: string;
2264
+ onekey_bootloader_hash?: string;
2265
+ onekey_romloader_build_id?: string;
2266
+ onekey_bootloader_build_id?: string;
2267
+ onekey_coprocessor_bt_name?: string;
2268
+ onekey_coprocessor_version?: string;
2269
+ onekey_coprocessor_build_id?: string;
2270
+ onekey_coprocessor_hash?: string;
2271
+ onekey_se01_bootloader_version?: string;
2272
+ onekey_se02_bootloader_version?: string;
2273
+ onekey_se03_bootloader_version?: string;
2274
+ onekey_se04_bootloader_version?: string;
2275
+ onekey_se01_bootloader_hash?: string;
2276
+ onekey_se02_bootloader_hash?: string;
2277
+ onekey_se03_bootloader_hash?: string;
2278
+ onekey_se04_bootloader_hash?: string;
2279
+ onekey_se01_bootloader_build_id?: string;
2280
+ onekey_se02_bootloader_build_id?: string;
2281
+ onekey_se03_bootloader_build_id?: string;
2282
+ onekey_se04_bootloader_build_id?: string;
2028
2283
  };
2029
2284
  type LockDevice = {};
2030
2285
  type EndSession = {};
@@ -2363,7 +2618,7 @@ type MoneroTransactionRsigData = {
2363
2618
  type MoneroGetAddress = {
2364
2619
  address_n: number[];
2365
2620
  show_display?: boolean;
2366
- network_type?: number;
2621
+ network_type?: number | MoneroNetworkType;
2367
2622
  account?: number;
2368
2623
  minor?: number;
2369
2624
  payment_id?: string;
@@ -2373,7 +2628,7 @@ type MoneroAddress = {
2373
2628
  };
2374
2629
  type MoneroGetWatchKey = {
2375
2630
  address_n: number[];
2376
- network_type?: number;
2631
+ network_type?: number | MoneroNetworkType;
2377
2632
  };
2378
2633
  type MoneroWatchKey = {
2379
2634
  watch_key?: string;
@@ -2399,7 +2654,7 @@ type MoneroTransactionData = {
2399
2654
  type MoneroTransactionInitRequest = {
2400
2655
  version?: number;
2401
2656
  address_n: number[];
2402
- network_type?: number;
2657
+ network_type?: number | MoneroNetworkType;
2403
2658
  tsx_data?: MoneroTransactionData;
2404
2659
  };
2405
2660
  type MoneroTransactionInitAck = {
@@ -2491,7 +2746,7 @@ type MoneroKeyImageExportInitRequest = {
2491
2746
  num?: number;
2492
2747
  hash?: string;
2493
2748
  address_n: number[];
2494
- network_type?: number;
2749
+ network_type?: number | MoneroNetworkType;
2495
2750
  subs: MoneroSubAddressIndicesList[];
2496
2751
  };
2497
2752
  type MoneroKeyImageExportInitAck = {};
@@ -2519,7 +2774,7 @@ type MoneroKeyImageSyncFinalAck = {
2519
2774
  };
2520
2775
  type MoneroGetTxKeyRequest = {
2521
2776
  address_n: number[];
2522
- network_type?: number;
2777
+ network_type?: number | MoneroNetworkType;
2523
2778
  salt1?: string;
2524
2779
  salt2?: string;
2525
2780
  tx_enc_keys?: string;
@@ -2534,7 +2789,7 @@ type MoneroGetTxKeyAck = {
2534
2789
  };
2535
2790
  type MoneroLiveRefreshStartRequest = {
2536
2791
  address_n: number[];
2537
- network_type?: number;
2792
+ network_type?: number | MoneroNetworkType;
2538
2793
  };
2539
2794
  type MoneroLiveRefreshStartAck = {};
2540
2795
  type MoneroLiveRefreshStepRequest = {
@@ -3298,6 +3553,7 @@ type TonSignedMessage = {
3298
3553
  signature?: string;
3299
3554
  signning_message?: string;
3300
3555
  init_data_length?: number;
3556
+ signing_message?: string;
3301
3557
  };
3302
3558
  type TonSignProof = {
3303
3559
  address_n: number[];
@@ -3451,6 +3707,551 @@ declare enum CommandFlags {
3451
3707
  Default = 0,
3452
3708
  Factory_Only = 1
3453
3709
  }
3710
+ type experimental_message = {};
3711
+ type experimental_field = {};
3712
+ type TextMemo = {
3713
+ text: string;
3714
+ };
3715
+ type RefundMemo = {
3716
+ address: string;
3717
+ mac: string;
3718
+ };
3719
+ type CoinPurchaseMemo = {
3720
+ coin_type: number;
3721
+ amount: UintType;
3722
+ address: string;
3723
+ mac: string;
3724
+ };
3725
+ type PaymentRequestMemo = {
3726
+ text_memo?: TextMemo;
3727
+ refund_memo?: RefundMemo;
3728
+ coin_purchase_memo?: CoinPurchaseMemo;
3729
+ };
3730
+ type TxAckPaymentRequest = {
3731
+ nonce?: string;
3732
+ recipient_name: string;
3733
+ memos?: PaymentRequestMemo[];
3734
+ amount?: UintType;
3735
+ signature: string;
3736
+ };
3737
+ type EthereumSignTypedDataQR = {
3738
+ address_n: number[];
3739
+ json_data?: string;
3740
+ chain_id?: number;
3741
+ metamask_v4_compat?: boolean;
3742
+ request_id?: string;
3743
+ };
3744
+ type InternalMyAddressRequest = {
3745
+ coin_type: number;
3746
+ chain_id: number;
3747
+ account_index: number;
3748
+ derive_type: number;
3749
+ };
3750
+ type StartSession = {
3751
+ session_id?: string;
3752
+ _skip_passphrase?: boolean;
3753
+ derive_cardano?: boolean;
3754
+ };
3755
+ type SetBusy = {
3756
+ expiry_ms?: number;
3757
+ };
3758
+ type GetFirmwareHash = {
3759
+ challenge?: string;
3760
+ };
3761
+ type FirmwareHash = {
3762
+ hash: string;
3763
+ };
3764
+ type GetNonce = {};
3765
+ type Nonce = {
3766
+ nonce: string;
3767
+ };
3768
+ type WriteSEPrivateKey = {
3769
+ private_key: string;
3770
+ };
3771
+ declare enum WallpaperTarget {
3772
+ Home = 0,
3773
+ Lock = 1
3774
+ }
3775
+ type SetWallpaper = {
3776
+ target: WallpaperTarget;
3777
+ path: string;
3778
+ };
3779
+ type GetWallpaper = {
3780
+ target: WallpaperTarget;
3781
+ };
3782
+ type Wallpaper = {
3783
+ target: WallpaperTarget;
3784
+ path: string;
3785
+ };
3786
+ type UnlockPath = {
3787
+ address_n: number[];
3788
+ mac?: string;
3789
+ };
3790
+ type UnlockedPathRequest = {
3791
+ mac?: string;
3792
+ };
3793
+ declare enum MoneroNetworkType {
3794
+ MAINNET = 0,
3795
+ TESTNET = 1,
3796
+ STAGENET = 2,
3797
+ FAKECHAIN = 3
3798
+ }
3799
+ type ViewAmount = {
3800
+ is_unlimited: boolean;
3801
+ num: string;
3802
+ };
3803
+ type ViewDetail = {
3804
+ key: number;
3805
+ value: string;
3806
+ is_overview: boolean;
3807
+ has_icon: boolean;
3808
+ };
3809
+ declare enum ViewTipType {
3810
+ Default = 0,
3811
+ Highlight = 1,
3812
+ Recommend = 2,
3813
+ Warning = 3,
3814
+ Danger = 4
3815
+ }
3816
+ type ViewTip = {
3817
+ type: ViewTipType;
3818
+ text: string;
3819
+ };
3820
+ type ViewRawData = {
3821
+ initial_data: string;
3822
+ placeholder: number;
3823
+ };
3824
+ declare enum ViewSignLayout {
3825
+ LayoutDefault = 0,
3826
+ LayoutSafeTxCreate = 1,
3827
+ LayoutFinalConfirm = 2,
3828
+ Layout7702 = 3,
3829
+ LayoutFlat = 4,
3830
+ LayoutEthApprove = 5
3831
+ }
3832
+ type ViewSignPage = {
3833
+ title: string;
3834
+ amount?: UintType;
3835
+ general: ViewDetail[];
3836
+ tip?: ViewTip;
3837
+ raw_data?: ViewRawData;
3838
+ slide_to_confirm?: boolean;
3839
+ layout?: ViewSignLayout;
3840
+ };
3841
+ type ViewVerifyPage = {
3842
+ title: string;
3843
+ address: string;
3844
+ path: string;
3845
+ network?: string;
3846
+ derive_type?: string;
3847
+ value_key?: number;
3848
+ };
3849
+ type ProtocolInfoRequest = {};
3850
+ type ProtocolInfo = {
3851
+ version: number;
3852
+ supported_messages: number[];
3853
+ protobuf_definition?: string;
3854
+ };
3855
+ declare enum DeviceErrorCode {
3856
+ DeviceError_None = 0,
3857
+ DeviceError_Busy = 1,
3858
+ DeviceError_NotInitialized = 2,
3859
+ DeviceError_ActionCancelled = 3,
3860
+ DeviceError_PinAlreadyUsed = 4,
3861
+ DeviceError_PersistFailed = 5,
3862
+ DeviceError_SeError = 6,
3863
+ DeviceError_InvalidLanguage = 7,
3864
+ DeviceError_WallpaperNotUsable = 8,
3865
+ DeviceError_DeviceLocked = 9
3866
+ }
3867
+ declare enum DeviceRebootType {
3868
+ Normal = 0,
3869
+ Romloader = 1,
3870
+ Bootloader = 2
3871
+ }
3872
+ type DeviceReboot = {
3873
+ reboot_type: DeviceRebootType;
3874
+ };
3875
+ type DeviceSettings = {
3876
+ label?: string;
3877
+ bt_enable?: boolean;
3878
+ language?: string;
3879
+ wallpaper_path?: string;
3880
+ brightness?: number;
3881
+ autolock_delay_ms?: number;
3882
+ autoshutdown_delay_ms?: number;
3883
+ animation_enable?: boolean;
3884
+ tap_to_wake?: boolean;
3885
+ haptic_feedback?: boolean;
3886
+ device_name_display_enabled?: boolean;
3887
+ airgap_mode?: boolean;
3888
+ usb_lock_enable?: boolean;
3889
+ random_keypad?: boolean;
3890
+ passphrase_enable?: boolean;
3891
+ fido_enabled?: boolean;
3892
+ };
3893
+ type DeviceSettingsGet = {};
3894
+ type DeviceSettingsSet = {
3895
+ settings: DeviceSettings;
3896
+ };
3897
+ declare enum DeviceSettingsPage {
3898
+ DeviceReset = 0,
3899
+ DevicePinChange = 1,
3900
+ DevicePassphrase = 2,
3901
+ DeviceAirgap = 3
3902
+ }
3903
+ type DeviceSettingsPageShow = {
3904
+ page: DeviceSettingsPage;
3905
+ field_name?: string;
3906
+ };
3907
+ type DeviceCertificate = {
3908
+ cert_and_pubkey: string;
3909
+ private_key?: string;
3910
+ };
3911
+ type DeviceCertificateWrite = {
3912
+ cert: DeviceCertificate;
3913
+ };
3914
+ type DeviceCertificateRead = {};
3915
+ type DeviceCertificateSignature = {
3916
+ data: string;
3917
+ };
3918
+ type DeviceCertificateSign = {
3919
+ data: string;
3920
+ };
3921
+ declare enum DeviceFirmwareTargetType {
3922
+ FW_MGMT_TARGET_INVALID = 0,
3923
+ FW_MGMT_TARGET_CRATE = 1,
3924
+ FW_MGMT_TARGET_ROMLOADER = 2,
3925
+ FW_MGMT_TARGET_BOOTLOADER = 3,
3926
+ FW_MGMT_TARGET_APPLICATION_P1 = 4,
3927
+ FW_MGMT_TARGET_APPLICATION_P2 = 5,
3928
+ FW_MGMT_TARGET_COPROCESSOR = 6,
3929
+ FW_MGMT_TARGET_SE01 = 7,
3930
+ FW_MGMT_TARGET_SE02 = 8,
3931
+ FW_MGMT_TARGET_SE03 = 9,
3932
+ FW_MGMT_TARGET_SE04 = 10
3933
+ }
3934
+ declare enum DeviceFirmwareUpdateTaskStatus {
3935
+ FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
3936
+ FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
3937
+ FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
3938
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
3939
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
3940
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
3941
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
3942
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
3943
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
3944
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
3945
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
3946
+ }
3947
+ type DeviceFirmwareTarget = {
3948
+ target_id: DeviceFirmwareTargetType;
3949
+ path: string;
3950
+ };
3951
+ type DeviceFirmwareUpdateRequest = {
3952
+ targets: DeviceFirmwareTarget[];
3953
+ };
3954
+ type DeviceFirmwareUpdateRecord = {
3955
+ target_id: DeviceFirmwareTargetType;
3956
+ status?: DeviceFirmwareUpdateTaskStatus;
3957
+ payload_version?: number;
3958
+ path?: string;
3959
+ };
3960
+ type DeviceFirmwareUpdateRecordFields = {
3961
+ status?: boolean;
3962
+ payload_version?: boolean;
3963
+ path?: boolean;
3964
+ };
3965
+ type DeviceFirmwareUpdateStatusGet = {
3966
+ fields?: DeviceFirmwareUpdateRecordFields;
3967
+ };
3968
+ type DeviceFirmwareUpdateStatus = {
3969
+ records: DeviceFirmwareUpdateRecord[];
3970
+ };
3971
+ declare enum DeviceFactoryAck {
3972
+ FACTORY_ACK_SUCCESS = 0,
3973
+ FACTORY_ACK_FAIL = 1
3974
+ }
3975
+ type DeviceFactoryInfoManufactureTime = {
3976
+ year: number;
3977
+ month: number;
3978
+ day: number;
3979
+ hour: number;
3980
+ minute: number;
3981
+ second: number;
3982
+ };
3983
+ type DeviceFactoryInfo = {
3984
+ version?: number;
3985
+ serial_number?: string;
3986
+ burn_in_completed?: boolean;
3987
+ factory_test_completed?: boolean;
3988
+ manufacture_time?: DeviceFactoryInfoManufactureTime;
3989
+ };
3990
+ type DeviceFactoryInfoSet = {
3991
+ info: DeviceFactoryInfo;
3992
+ };
3993
+ type DeviceFactoryInfoGet = {};
3994
+ type DeviceFactoryPermanentLock = {
3995
+ check_a: string;
3996
+ check_b: string;
3997
+ };
3998
+ type DeviceFactoryTest = {
3999
+ burn_in_test: boolean;
4000
+ };
4001
+ declare enum DeviceType {
4002
+ CLASSIC1 = 0,
4003
+ CLASSIC1S = 1,
4004
+ MINI = 2,
4005
+ TOUCH = 3,
4006
+ PRO = 5,
4007
+ CLASSIC1S_PURE = 6,
4008
+ PRO2 = 7,
4009
+ NEO = 8
4010
+ }
4011
+ declare enum DeviceSeType {
4012
+ THD89 = 0,
4013
+ SE608A = 1
4014
+ }
4015
+ declare enum DeviceSEState {
4016
+ BOOT = 0,
4017
+ APP_FACTORY = 51,
4018
+ APP = 85
4019
+ }
4020
+ type DeviceFirmwareImageInfo = {
4021
+ version?: string;
4022
+ build_id?: string;
4023
+ hash?: string;
4024
+ };
4025
+ type DeviceHardwareInfo = {
4026
+ Device_type?: DeviceType;
4027
+ serial_no?: string;
4028
+ hardware_version?: string;
4029
+ hardware_version_raw_adc?: number;
4030
+ };
4031
+ type DeviceMainMcuInfo = {
4032
+ romloader?: DeviceFirmwareImageInfo;
4033
+ bootloader?: DeviceFirmwareImageInfo;
4034
+ application?: DeviceFirmwareImageInfo;
4035
+ application_data?: DeviceFirmwareImageInfo;
4036
+ };
4037
+ type DeviceCoprocessorInfo = {
4038
+ bootloader?: DeviceFirmwareImageInfo;
4039
+ application?: DeviceFirmwareImageInfo;
4040
+ bt_adv_name?: string;
4041
+ bt_mac?: string;
4042
+ };
4043
+ type DeviceSEInfo = {
4044
+ bootloader?: DeviceFirmwareImageInfo;
4045
+ application?: DeviceFirmwareImageInfo;
4046
+ type?: DeviceSeType;
4047
+ state?: DeviceSEState;
4048
+ };
4049
+ type DeviceInfoTargets = {
4050
+ hw?: boolean;
4051
+ fw?: boolean;
4052
+ coprocessor?: boolean;
4053
+ se1?: boolean;
4054
+ se2?: boolean;
4055
+ se3?: boolean;
4056
+ se4?: boolean;
4057
+ status?: boolean;
4058
+ };
4059
+ type DeviceInfoTypes = {
4060
+ version?: boolean;
4061
+ build_id?: boolean;
4062
+ hash?: boolean;
4063
+ specific?: boolean;
4064
+ };
4065
+ type DeviceInfoGet = {
4066
+ targets?: DeviceInfoTargets;
4067
+ types?: DeviceInfoTypes;
4068
+ };
4069
+ type ProtocolV2DeviceInfo = {
4070
+ protocol_version: number;
4071
+ hw?: DeviceHardwareInfo;
4072
+ fw?: DeviceMainMcuInfo;
4073
+ coprocessor?: DeviceCoprocessorInfo;
4074
+ se1?: DeviceSEInfo;
4075
+ se2?: DeviceSEInfo;
4076
+ se3?: DeviceSEInfo;
4077
+ se4?: DeviceSEInfo;
4078
+ status?: DeviceStatus;
4079
+ };
4080
+ type DeviceSessionResume = {
4081
+ session_id: string;
4082
+ };
4083
+ type DeviceHostPassphrase = {
4084
+ passphrase: string;
4085
+ };
4086
+ type DevicePassphraseOnDevice = {};
4087
+ type DeviceAttachPinOnDevice = {};
4088
+ type DeviceWalletSelect = {
4089
+ host_passphrase?: DeviceHostPassphrase;
4090
+ passphrase_on_device?: DevicePassphraseOnDevice;
4091
+ attach_pin_on_device?: DeviceAttachPinOnDevice;
4092
+ };
4093
+ type DeviceSessionOpen = {
4094
+ resume?: DeviceSessionResume;
4095
+ select?: DeviceWalletSelect;
4096
+ };
4097
+ declare enum DeviceSessionOpen_FailureSubCodes {
4098
+ InvalidSession = 1
4099
+ }
4100
+ type DeviceSession = {
4101
+ session_id?: string;
4102
+ btc_test_address?: string;
4103
+ };
4104
+ type DeviceSessionAskPin = {};
4105
+ declare enum DeviceSessionAskPin_FailureSubCodes {
4106
+ UserCancel = 1
4107
+ }
4108
+ type DeviceStatus = {
4109
+ device_id?: string;
4110
+ unlocked?: boolean;
4111
+ init_states?: boolean;
4112
+ backup_required?: boolean;
4113
+ passphrase_enabled?: boolean;
4114
+ attach_to_pin_enabled?: boolean;
4115
+ unlocked_by_attach_to_pin?: boolean;
4116
+ };
4117
+ type DeviceStatusGet = {};
4118
+ declare enum DevOnboardingStep {
4119
+ DEV_ONBOARDING_STEP_UNKNOWN = 0,
4120
+ DEV_ONBOARDING_STEP_CHECKING = 1,
4121
+ DEV_ONBOARDING_STEP_PERSONALIZATION = 2,
4122
+ DEV_ONBOARDING_STEP_PIN = 3,
4123
+ DEV_ONBOARDING_STEP_SETUP = 4,
4124
+ DEV_ONBOARDING_STEP_DONE = 5
4125
+ }
4126
+ declare enum DevOnboardingPhase {
4127
+ DEV_ONBOARDING_PHASE_UNKNOWN = 0,
4128
+ DEV_ONBOARDING_PHASE_SAFETY_CHECK = 1,
4129
+ DEV_ONBOARDING_PHASE_PIN_SETUP = 2,
4130
+ DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
4131
+ DEV_ONBOARDING_PHASE_SETUP_CHOICE = 4,
4132
+ DEV_ONBOARDING_PHASE_WALLET_CREATE_START = 5,
4133
+ DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
4134
+ DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
4135
+ DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
4136
+ DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
4137
+ DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
4138
+ DEV_ONBOARDING_PHASE_WALLET_READY = 11,
4139
+ DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
4140
+ DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP = 13
4141
+ }
4142
+ declare enum DevOnboardingSetupKind {
4143
+ DEV_ONBOARDING_SETUP_KIND_UNKNOWN = 0,
4144
+ DEV_ONBOARDING_SETUP_KIND_CHOICE = 1,
4145
+ DEV_ONBOARDING_SETUP_KIND_CREATE = 2,
4146
+ DEV_ONBOARDING_SETUP_KIND_RESTORE = 3
4147
+ }
4148
+ declare enum DevOnboardingSetupMethod {
4149
+ DEV_ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
4150
+ DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
4151
+ DEV_ONBOARDING_SETUP_METHOD_SEEDCARD = 2
4152
+ }
4153
+ type DevOnboardingSetupStatus = {
4154
+ kind?: DevOnboardingSetupKind;
4155
+ method?: DevOnboardingSetupMethod;
4156
+ };
4157
+ type DevGetOnboardingStatus = {};
4158
+ type DevOnboardingStatus = {
4159
+ step?: DevOnboardingStep;
4160
+ phase?: DevOnboardingPhase;
4161
+ setup?: DevOnboardingSetupStatus;
4162
+ pin_set?: boolean;
4163
+ wallet_initialized?: boolean;
4164
+ };
4165
+ type FilesystemPermissionFix = {};
4166
+ type FilesystemPathInfo = {
4167
+ exist: boolean;
4168
+ size: number;
4169
+ year: number;
4170
+ month: number;
4171
+ day: number;
4172
+ hour: number;
4173
+ minute: number;
4174
+ second: number;
4175
+ readonly: boolean;
4176
+ hidden: boolean;
4177
+ system: boolean;
4178
+ archive: boolean;
4179
+ directory: boolean;
4180
+ };
4181
+ type FilesystemPathInfoQuery = {
4182
+ path: string;
4183
+ };
4184
+ type FilesystemFile = {
4185
+ path: string;
4186
+ offset: number;
4187
+ total_size: number;
4188
+ data?: Buffer | ArrayBuffer | Uint8Array | string;
4189
+ data_hash?: number;
4190
+ processed_byte?: number;
4191
+ };
4192
+ type FilesystemFileRead = {
4193
+ file: FilesystemFile;
4194
+ chunk_len?: number;
4195
+ ui_percentage?: number;
4196
+ };
4197
+ type FilesystemFileWrite = {
4198
+ file: FilesystemFile;
4199
+ overwrite: boolean;
4200
+ append: boolean;
4201
+ ui_percentage?: number;
4202
+ };
4203
+ type FilesystemFileDelete = {
4204
+ path: string;
4205
+ };
4206
+ type FilesystemDir = {
4207
+ path: string;
4208
+ child_dirs?: string;
4209
+ child_files?: string;
4210
+ };
4211
+ type FilesystemDirList = {
4212
+ path: string;
4213
+ depth?: number;
4214
+ };
4215
+ type FilesystemDirMake = {
4216
+ path: string;
4217
+ };
4218
+ type FilesystemDirRemove = {
4219
+ path: string;
4220
+ };
4221
+ type FilesystemFormat = {
4222
+ data: boolean;
4223
+ user: boolean;
4224
+ };
4225
+ type PortfolioUpdate = {};
4226
+ declare enum ProtocolV2FailureType {
4227
+ Failure_InvalidMessage = 1,
4228
+ Failure_UndefinedError = 2,
4229
+ Failure_UsageError = 3,
4230
+ Failure_DataError = 4,
4231
+ Failure_ProcessError = 5
4232
+ }
4233
+ declare enum Enum_ProtocolV2Capability {
4234
+ Capability_Bitcoin = 1,
4235
+ Capability_Bitcoin_like = 2,
4236
+ Capability_Binance = 3,
4237
+ Capability_Cardano = 4,
4238
+ Capability_Crypto = 5,
4239
+ Capability_EOS = 6,
4240
+ Capability_Ethereum = 7,
4241
+ Capability_Lisk = 8,
4242
+ Capability_Monero = 9,
4243
+ Capability_NEM = 10,
4244
+ Capability_Ripple = 11,
4245
+ Capability_Stellar = 12,
4246
+ Capability_Tezos = 13,
4247
+ Capability_U2F = 14,
4248
+ Capability_Shamir = 15,
4249
+ Capability_ShamirGroups = 16,
4250
+ Capability_PassphraseEntry = 17,
4251
+ Capability_AttachToPin = 18,
4252
+ Capability_EthereumTypedData = 1000
4253
+ }
4254
+ type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
3454
4255
  type MessageType = {
3455
4256
  AlephiumGetAddress: AlephiumGetAddress;
3456
4257
  AlephiumAddress: AlephiumAddress;
@@ -3506,6 +4307,7 @@ type MessageType = {
3506
4307
  SignMessage: SignMessage;
3507
4308
  MessageSignature: MessageSignature;
3508
4309
  VerifyMessage: VerifyMessage;
4310
+ CoinJoinRequest: CoinJoinRequest;
3509
4311
  SignTx: SignTx;
3510
4312
  TxRequestDetailsType: TxRequestDetailsType;
3511
4313
  TxRequestSerializedType: TxRequestSerializedType;
@@ -3783,7 +4585,7 @@ type MessageType = {
3783
4585
  BixinBackupDeviceAck: BixinBackupDeviceAck;
3784
4586
  DeviceInfoSettings: DeviceInfoSettings;
3785
4587
  GetDeviceInfo: GetDeviceInfo;
3786
- DeviceInfo: DeviceInfo;
4588
+ DeviceInfo: DeviceInfo | ProtocolV2DeviceInfo;
3787
4589
  ReadSEPublicKey: ReadSEPublicKey;
3788
4590
  SEPublicKey: SEPublicKey;
3789
4591
  WriteSEPublicCert: WriteSEPublicCert;
@@ -4015,13 +4817,104 @@ type MessageType = {
4015
4817
  TronSignMessage: TronSignMessage;
4016
4818
  TronMessageSignature: TronMessageSignature;
4017
4819
  facotry: facotry;
4820
+ experimental_message: experimental_message;
4821
+ experimental_field: experimental_field;
4822
+ TextMemo: TextMemo;
4823
+ RefundMemo: RefundMemo;
4824
+ CoinPurchaseMemo: CoinPurchaseMemo;
4825
+ PaymentRequestMemo: PaymentRequestMemo;
4826
+ TxAckPaymentRequest: TxAckPaymentRequest;
4827
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4828
+ InternalMyAddressRequest: InternalMyAddressRequest;
4829
+ StartSession: StartSession;
4830
+ SetBusy: SetBusy;
4831
+ GetFirmwareHash: GetFirmwareHash;
4832
+ FirmwareHash: FirmwareHash;
4833
+ GetNonce: GetNonce;
4834
+ Nonce: Nonce;
4835
+ WriteSEPrivateKey: WriteSEPrivateKey;
4836
+ SetWallpaper: SetWallpaper;
4837
+ GetWallpaper: GetWallpaper;
4838
+ Wallpaper: Wallpaper;
4839
+ UnlockPath: UnlockPath;
4840
+ UnlockedPathRequest: UnlockedPathRequest;
4841
+ ViewAmount: ViewAmount;
4842
+ ViewDetail: ViewDetail;
4843
+ ViewTip: ViewTip;
4844
+ ViewRawData: ViewRawData;
4845
+ ViewSignPage: ViewSignPage;
4846
+ ViewVerifyPage: ViewVerifyPage;
4847
+ ProtocolInfoRequest: ProtocolInfoRequest;
4848
+ ProtocolInfo: ProtocolInfo;
4849
+ DeviceReboot: DeviceReboot;
4850
+ DeviceSettings: DeviceSettings;
4851
+ DeviceSettingsGet: DeviceSettingsGet;
4852
+ DeviceSettingsSet: DeviceSettingsSet;
4853
+ DeviceSettingsPageShow: DeviceSettingsPageShow;
4854
+ DeviceCertificate: DeviceCertificate;
4855
+ DeviceCertificateWrite: DeviceCertificateWrite;
4856
+ DeviceCertificateRead: DeviceCertificateRead;
4857
+ DeviceCertificateSignature: DeviceCertificateSignature;
4858
+ DeviceCertificateSign: DeviceCertificateSign;
4859
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
4860
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4861
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4862
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4863
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4864
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4865
+ DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
4866
+ DeviceFactoryInfo: DeviceFactoryInfo;
4867
+ DeviceFactoryInfoSet: DeviceFactoryInfoSet;
4868
+ DeviceFactoryInfoGet: DeviceFactoryInfoGet;
4869
+ DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
4870
+ DeviceFactoryTest: DeviceFactoryTest;
4871
+ DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
4872
+ DeviceHardwareInfo: DeviceHardwareInfo;
4873
+ DeviceMainMcuInfo: DeviceMainMcuInfo;
4874
+ DeviceCoprocessorInfo: DeviceCoprocessorInfo;
4875
+ DeviceSEInfo: DeviceSEInfo;
4876
+ DeviceInfoTargets: DeviceInfoTargets;
4877
+ DeviceInfoTypes: DeviceInfoTypes;
4878
+ DeviceInfoGet: DeviceInfoGet;
4879
+ DeviceSessionResume: DeviceSessionResume;
4880
+ DeviceHostPassphrase: DeviceHostPassphrase;
4881
+ DevicePassphraseOnDevice: DevicePassphraseOnDevice;
4882
+ DeviceAttachPinOnDevice: DeviceAttachPinOnDevice;
4883
+ DeviceWalletSelect: DeviceWalletSelect;
4884
+ DeviceSessionOpen: DeviceSessionOpen;
4885
+ DeviceSession: DeviceSession;
4886
+ DeviceSessionAskPin: DeviceSessionAskPin;
4887
+ DeviceStatus: DeviceStatus;
4888
+ DeviceStatusGet: DeviceStatusGet;
4889
+ DevOnboardingSetupStatus: DevOnboardingSetupStatus;
4890
+ DevGetOnboardingStatus: DevGetOnboardingStatus;
4891
+ DevOnboardingStatus: DevOnboardingStatus;
4892
+ FilesystemPermissionFix: FilesystemPermissionFix;
4893
+ FilesystemPathInfo: FilesystemPathInfo;
4894
+ FilesystemPathInfoQuery: FilesystemPathInfoQuery;
4895
+ FilesystemFile: FilesystemFile;
4896
+ FilesystemFileRead: FilesystemFileRead;
4897
+ FilesystemFileWrite: FilesystemFileWrite;
4898
+ FilesystemFileDelete: FilesystemFileDelete;
4899
+ FilesystemDir: FilesystemDir;
4900
+ FilesystemDirList: FilesystemDirList;
4901
+ FilesystemDirMake: FilesystemDirMake;
4902
+ FilesystemDirRemove: FilesystemDirRemove;
4903
+ FilesystemFormat: FilesystemFormat;
4904
+ PortfolioUpdate: PortfolioUpdate;
4018
4905
  };
4019
4906
  type MessageKey = keyof MessageType;
4020
4907
  type MessageResponse<T extends MessageKey> = {
4021
4908
  type: T;
4022
4909
  message: MessageType[T];
4023
4910
  };
4024
- type TypedCall = <T extends MessageKey, R extends MessageKey>(type: T, resType: R, message?: MessageType[T]) => Promise<MessageResponse<R>>;
4911
+ type MessageResponseMap = {
4912
+ [K in MessageKey]: MessageResponse<K>;
4913
+ };
4914
+ type TypedCall = {
4915
+ <T extends MessageKey, R extends readonly MessageKey[]>(type: T, resType: R, message?: MessageType[T]): Promise<MessageResponseMap[R[number]]>;
4916
+ <T extends MessageKey, R extends MessageKey>(type: T, resType: R, message?: MessageType[T]): Promise<MessageResponse<R>>;
4917
+ };
4025
4918
 
4026
4919
  type messages_UintType = UintType;
4027
4920
  type messages_AlephiumGetAddress = AlephiumGetAddress;
@@ -4096,6 +4989,7 @@ type messages_OwnershipId = OwnershipId;
4096
4989
  type messages_SignMessage = SignMessage;
4097
4990
  type messages_MessageSignature = MessageSignature;
4098
4991
  type messages_VerifyMessage = VerifyMessage;
4992
+ type messages_CoinJoinRequest = CoinJoinRequest;
4099
4993
  type messages_SignTx = SignTx;
4100
4994
  type messages_Enum_RequestType = Enum_RequestType;
4101
4995
  declare const messages_Enum_RequestType: typeof Enum_RequestType;
@@ -4730,9 +5624,139 @@ type messages_TronMessageSignature = TronMessageSignature;
4730
5624
  type messages_facotry = facotry;
4731
5625
  type messages_CommandFlags = CommandFlags;
4732
5626
  declare const messages_CommandFlags: typeof CommandFlags;
5627
+ type messages_experimental_message = experimental_message;
5628
+ type messages_experimental_field = experimental_field;
5629
+ type messages_TextMemo = TextMemo;
5630
+ type messages_RefundMemo = RefundMemo;
5631
+ type messages_CoinPurchaseMemo = CoinPurchaseMemo;
5632
+ type messages_PaymentRequestMemo = PaymentRequestMemo;
5633
+ type messages_TxAckPaymentRequest = TxAckPaymentRequest;
5634
+ type messages_EthereumSignTypedDataQR = EthereumSignTypedDataQR;
5635
+ type messages_InternalMyAddressRequest = InternalMyAddressRequest;
5636
+ type messages_StartSession = StartSession;
5637
+ type messages_SetBusy = SetBusy;
5638
+ type messages_GetFirmwareHash = GetFirmwareHash;
5639
+ type messages_FirmwareHash = FirmwareHash;
5640
+ type messages_GetNonce = GetNonce;
5641
+ type messages_Nonce = Nonce;
5642
+ type messages_WriteSEPrivateKey = WriteSEPrivateKey;
5643
+ type messages_WallpaperTarget = WallpaperTarget;
5644
+ declare const messages_WallpaperTarget: typeof WallpaperTarget;
5645
+ type messages_SetWallpaper = SetWallpaper;
5646
+ type messages_GetWallpaper = GetWallpaper;
5647
+ type messages_Wallpaper = Wallpaper;
5648
+ type messages_UnlockPath = UnlockPath;
5649
+ type messages_UnlockedPathRequest = UnlockedPathRequest;
5650
+ type messages_MoneroNetworkType = MoneroNetworkType;
5651
+ declare const messages_MoneroNetworkType: typeof MoneroNetworkType;
5652
+ type messages_ViewAmount = ViewAmount;
5653
+ type messages_ViewDetail = ViewDetail;
5654
+ type messages_ViewTipType = ViewTipType;
5655
+ declare const messages_ViewTipType: typeof ViewTipType;
5656
+ type messages_ViewTip = ViewTip;
5657
+ type messages_ViewRawData = ViewRawData;
5658
+ type messages_ViewSignLayout = ViewSignLayout;
5659
+ declare const messages_ViewSignLayout: typeof ViewSignLayout;
5660
+ type messages_ViewSignPage = ViewSignPage;
5661
+ type messages_ViewVerifyPage = ViewVerifyPage;
5662
+ type messages_ProtocolInfoRequest = ProtocolInfoRequest;
5663
+ type messages_ProtocolInfo = ProtocolInfo;
5664
+ type messages_DeviceErrorCode = DeviceErrorCode;
5665
+ declare const messages_DeviceErrorCode: typeof DeviceErrorCode;
5666
+ type messages_DeviceRebootType = DeviceRebootType;
5667
+ declare const messages_DeviceRebootType: typeof DeviceRebootType;
5668
+ type messages_DeviceReboot = DeviceReboot;
5669
+ type messages_DeviceSettings = DeviceSettings;
5670
+ type messages_DeviceSettingsGet = DeviceSettingsGet;
5671
+ type messages_DeviceSettingsSet = DeviceSettingsSet;
5672
+ type messages_DeviceSettingsPage = DeviceSettingsPage;
5673
+ declare const messages_DeviceSettingsPage: typeof DeviceSettingsPage;
5674
+ type messages_DeviceSettingsPageShow = DeviceSettingsPageShow;
5675
+ type messages_DeviceCertificate = DeviceCertificate;
5676
+ type messages_DeviceCertificateWrite = DeviceCertificateWrite;
5677
+ type messages_DeviceCertificateRead = DeviceCertificateRead;
5678
+ type messages_DeviceCertificateSignature = DeviceCertificateSignature;
5679
+ type messages_DeviceCertificateSign = DeviceCertificateSign;
5680
+ type messages_DeviceFirmwareTargetType = DeviceFirmwareTargetType;
5681
+ declare const messages_DeviceFirmwareTargetType: typeof DeviceFirmwareTargetType;
5682
+ type messages_DeviceFirmwareUpdateTaskStatus = DeviceFirmwareUpdateTaskStatus;
5683
+ declare const messages_DeviceFirmwareUpdateTaskStatus: typeof DeviceFirmwareUpdateTaskStatus;
5684
+ type messages_DeviceFirmwareTarget = DeviceFirmwareTarget;
5685
+ type messages_DeviceFirmwareUpdateRequest = DeviceFirmwareUpdateRequest;
5686
+ type messages_DeviceFirmwareUpdateRecord = DeviceFirmwareUpdateRecord;
5687
+ type messages_DeviceFirmwareUpdateRecordFields = DeviceFirmwareUpdateRecordFields;
5688
+ type messages_DeviceFirmwareUpdateStatusGet = DeviceFirmwareUpdateStatusGet;
5689
+ type messages_DeviceFirmwareUpdateStatus = DeviceFirmwareUpdateStatus;
5690
+ type messages_DeviceFactoryAck = DeviceFactoryAck;
5691
+ declare const messages_DeviceFactoryAck: typeof DeviceFactoryAck;
5692
+ type messages_DeviceFactoryInfoManufactureTime = DeviceFactoryInfoManufactureTime;
5693
+ type messages_DeviceFactoryInfo = DeviceFactoryInfo;
5694
+ type messages_DeviceFactoryInfoSet = DeviceFactoryInfoSet;
5695
+ type messages_DeviceFactoryInfoGet = DeviceFactoryInfoGet;
5696
+ type messages_DeviceFactoryPermanentLock = DeviceFactoryPermanentLock;
5697
+ type messages_DeviceFactoryTest = DeviceFactoryTest;
5698
+ type messages_DeviceType = DeviceType;
5699
+ declare const messages_DeviceType: typeof DeviceType;
5700
+ type messages_DeviceSeType = DeviceSeType;
5701
+ declare const messages_DeviceSeType: typeof DeviceSeType;
5702
+ type messages_DeviceSEState = DeviceSEState;
5703
+ declare const messages_DeviceSEState: typeof DeviceSEState;
5704
+ type messages_DeviceFirmwareImageInfo = DeviceFirmwareImageInfo;
5705
+ type messages_DeviceHardwareInfo = DeviceHardwareInfo;
5706
+ type messages_DeviceMainMcuInfo = DeviceMainMcuInfo;
5707
+ type messages_DeviceCoprocessorInfo = DeviceCoprocessorInfo;
5708
+ type messages_DeviceSEInfo = DeviceSEInfo;
5709
+ type messages_DeviceInfoTargets = DeviceInfoTargets;
5710
+ type messages_DeviceInfoTypes = DeviceInfoTypes;
5711
+ type messages_DeviceInfoGet = DeviceInfoGet;
5712
+ type messages_ProtocolV2DeviceInfo = ProtocolV2DeviceInfo;
5713
+ type messages_DeviceSessionResume = DeviceSessionResume;
5714
+ type messages_DeviceHostPassphrase = DeviceHostPassphrase;
5715
+ type messages_DevicePassphraseOnDevice = DevicePassphraseOnDevice;
5716
+ type messages_DeviceAttachPinOnDevice = DeviceAttachPinOnDevice;
5717
+ type messages_DeviceWalletSelect = DeviceWalletSelect;
5718
+ type messages_DeviceSessionOpen = DeviceSessionOpen;
5719
+ type messages_DeviceSessionOpen_FailureSubCodes = DeviceSessionOpen_FailureSubCodes;
5720
+ declare const messages_DeviceSessionOpen_FailureSubCodes: typeof DeviceSessionOpen_FailureSubCodes;
5721
+ type messages_DeviceSession = DeviceSession;
5722
+ type messages_DeviceSessionAskPin = DeviceSessionAskPin;
5723
+ type messages_DeviceSessionAskPin_FailureSubCodes = DeviceSessionAskPin_FailureSubCodes;
5724
+ declare const messages_DeviceSessionAskPin_FailureSubCodes: typeof DeviceSessionAskPin_FailureSubCodes;
5725
+ type messages_DeviceStatus = DeviceStatus;
5726
+ type messages_DeviceStatusGet = DeviceStatusGet;
5727
+ type messages_DevOnboardingStep = DevOnboardingStep;
5728
+ declare const messages_DevOnboardingStep: typeof DevOnboardingStep;
5729
+ type messages_DevOnboardingPhase = DevOnboardingPhase;
5730
+ declare const messages_DevOnboardingPhase: typeof DevOnboardingPhase;
5731
+ type messages_DevOnboardingSetupKind = DevOnboardingSetupKind;
5732
+ declare const messages_DevOnboardingSetupKind: typeof DevOnboardingSetupKind;
5733
+ type messages_DevOnboardingSetupMethod = DevOnboardingSetupMethod;
5734
+ declare const messages_DevOnboardingSetupMethod: typeof DevOnboardingSetupMethod;
5735
+ type messages_DevOnboardingSetupStatus = DevOnboardingSetupStatus;
5736
+ type messages_DevGetOnboardingStatus = DevGetOnboardingStatus;
5737
+ type messages_DevOnboardingStatus = DevOnboardingStatus;
5738
+ type messages_FilesystemPermissionFix = FilesystemPermissionFix;
5739
+ type messages_FilesystemPathInfo = FilesystemPathInfo;
5740
+ type messages_FilesystemPathInfoQuery = FilesystemPathInfoQuery;
5741
+ type messages_FilesystemFile = FilesystemFile;
5742
+ type messages_FilesystemFileRead = FilesystemFileRead;
5743
+ type messages_FilesystemFileWrite = FilesystemFileWrite;
5744
+ type messages_FilesystemFileDelete = FilesystemFileDelete;
5745
+ type messages_FilesystemDir = FilesystemDir;
5746
+ type messages_FilesystemDirList = FilesystemDirList;
5747
+ type messages_FilesystemDirMake = FilesystemDirMake;
5748
+ type messages_FilesystemDirRemove = FilesystemDirRemove;
5749
+ type messages_FilesystemFormat = FilesystemFormat;
5750
+ type messages_PortfolioUpdate = PortfolioUpdate;
5751
+ type messages_ProtocolV2FailureType = ProtocolV2FailureType;
5752
+ declare const messages_ProtocolV2FailureType: typeof ProtocolV2FailureType;
5753
+ type messages_Enum_ProtocolV2Capability = Enum_ProtocolV2Capability;
5754
+ declare const messages_Enum_ProtocolV2Capability: typeof Enum_ProtocolV2Capability;
5755
+ type messages_ProtocolV2Capability = ProtocolV2Capability;
4733
5756
  type messages_MessageType = MessageType;
4734
5757
  type messages_MessageKey = MessageKey;
4735
5758
  type messages_MessageResponse<T extends MessageKey> = MessageResponse<T>;
5759
+ type messages_MessageResponseMap = MessageResponseMap;
4736
5760
  type messages_TypedCall = TypedCall;
4737
5761
  declare namespace messages {
4738
5762
  export {
@@ -4801,6 +5825,7 @@ declare namespace messages {
4801
5825
  messages_SignMessage as SignMessage,
4802
5826
  messages_MessageSignature as MessageSignature,
4803
5827
  messages_VerifyMessage as VerifyMessage,
5828
+ messages_CoinJoinRequest as CoinJoinRequest,
4804
5829
  messages_SignTx as SignTx,
4805
5830
  messages_Enum_RequestType as Enum_RequestType,
4806
5831
  messages_RequestType as RequestType,
@@ -5380,13 +6405,248 @@ declare namespace messages {
5380
6405
  messages_TronMessageSignature as TronMessageSignature,
5381
6406
  messages_facotry as facotry,
5382
6407
  messages_CommandFlags as CommandFlags,
6408
+ messages_experimental_message as experimental_message,
6409
+ messages_experimental_field as experimental_field,
6410
+ messages_TextMemo as TextMemo,
6411
+ messages_RefundMemo as RefundMemo,
6412
+ messages_CoinPurchaseMemo as CoinPurchaseMemo,
6413
+ messages_PaymentRequestMemo as PaymentRequestMemo,
6414
+ messages_TxAckPaymentRequest as TxAckPaymentRequest,
6415
+ messages_EthereumSignTypedDataQR as EthereumSignTypedDataQR,
6416
+ messages_InternalMyAddressRequest as InternalMyAddressRequest,
6417
+ messages_StartSession as StartSession,
6418
+ messages_SetBusy as SetBusy,
6419
+ messages_GetFirmwareHash as GetFirmwareHash,
6420
+ messages_FirmwareHash as FirmwareHash,
6421
+ messages_GetNonce as GetNonce,
6422
+ messages_Nonce as Nonce,
6423
+ messages_WriteSEPrivateKey as WriteSEPrivateKey,
6424
+ messages_WallpaperTarget as WallpaperTarget,
6425
+ messages_SetWallpaper as SetWallpaper,
6426
+ messages_GetWallpaper as GetWallpaper,
6427
+ messages_Wallpaper as Wallpaper,
6428
+ messages_UnlockPath as UnlockPath,
6429
+ messages_UnlockedPathRequest as UnlockedPathRequest,
6430
+ messages_MoneroNetworkType as MoneroNetworkType,
6431
+ messages_ViewAmount as ViewAmount,
6432
+ messages_ViewDetail as ViewDetail,
6433
+ messages_ViewTipType as ViewTipType,
6434
+ messages_ViewTip as ViewTip,
6435
+ messages_ViewRawData as ViewRawData,
6436
+ messages_ViewSignLayout as ViewSignLayout,
6437
+ messages_ViewSignPage as ViewSignPage,
6438
+ messages_ViewVerifyPage as ViewVerifyPage,
6439
+ messages_ProtocolInfoRequest as ProtocolInfoRequest,
6440
+ messages_ProtocolInfo as ProtocolInfo,
6441
+ messages_DeviceErrorCode as DeviceErrorCode,
6442
+ messages_DeviceRebootType as DeviceRebootType,
6443
+ messages_DeviceReboot as DeviceReboot,
6444
+ messages_DeviceSettings as DeviceSettings,
6445
+ messages_DeviceSettingsGet as DeviceSettingsGet,
6446
+ messages_DeviceSettingsSet as DeviceSettingsSet,
6447
+ messages_DeviceSettingsPage as DeviceSettingsPage,
6448
+ messages_DeviceSettingsPageShow as DeviceSettingsPageShow,
6449
+ messages_DeviceCertificate as DeviceCertificate,
6450
+ messages_DeviceCertificateWrite as DeviceCertificateWrite,
6451
+ messages_DeviceCertificateRead as DeviceCertificateRead,
6452
+ messages_DeviceCertificateSignature as DeviceCertificateSignature,
6453
+ messages_DeviceCertificateSign as DeviceCertificateSign,
6454
+ messages_DeviceFirmwareTargetType as DeviceFirmwareTargetType,
6455
+ messages_DeviceFirmwareUpdateTaskStatus as DeviceFirmwareUpdateTaskStatus,
6456
+ messages_DeviceFirmwareTarget as DeviceFirmwareTarget,
6457
+ messages_DeviceFirmwareUpdateRequest as DeviceFirmwareUpdateRequest,
6458
+ messages_DeviceFirmwareUpdateRecord as DeviceFirmwareUpdateRecord,
6459
+ messages_DeviceFirmwareUpdateRecordFields as DeviceFirmwareUpdateRecordFields,
6460
+ messages_DeviceFirmwareUpdateStatusGet as DeviceFirmwareUpdateStatusGet,
6461
+ messages_DeviceFirmwareUpdateStatus as DeviceFirmwareUpdateStatus,
6462
+ messages_DeviceFactoryAck as DeviceFactoryAck,
6463
+ messages_DeviceFactoryInfoManufactureTime as DeviceFactoryInfoManufactureTime,
6464
+ messages_DeviceFactoryInfo as DeviceFactoryInfo,
6465
+ messages_DeviceFactoryInfoSet as DeviceFactoryInfoSet,
6466
+ messages_DeviceFactoryInfoGet as DeviceFactoryInfoGet,
6467
+ messages_DeviceFactoryPermanentLock as DeviceFactoryPermanentLock,
6468
+ messages_DeviceFactoryTest as DeviceFactoryTest,
6469
+ messages_DeviceType as DeviceType,
6470
+ messages_DeviceSeType as DeviceSeType,
6471
+ messages_DeviceSEState as DeviceSEState,
6472
+ messages_DeviceFirmwareImageInfo as DeviceFirmwareImageInfo,
6473
+ messages_DeviceHardwareInfo as DeviceHardwareInfo,
6474
+ messages_DeviceMainMcuInfo as DeviceMainMcuInfo,
6475
+ messages_DeviceCoprocessorInfo as DeviceCoprocessorInfo,
6476
+ messages_DeviceSEInfo as DeviceSEInfo,
6477
+ messages_DeviceInfoTargets as DeviceInfoTargets,
6478
+ messages_DeviceInfoTypes as DeviceInfoTypes,
6479
+ messages_DeviceInfoGet as DeviceInfoGet,
6480
+ messages_ProtocolV2DeviceInfo as ProtocolV2DeviceInfo,
6481
+ messages_DeviceSessionResume as DeviceSessionResume,
6482
+ messages_DeviceHostPassphrase as DeviceHostPassphrase,
6483
+ messages_DevicePassphraseOnDevice as DevicePassphraseOnDevice,
6484
+ messages_DeviceAttachPinOnDevice as DeviceAttachPinOnDevice,
6485
+ messages_DeviceWalletSelect as DeviceWalletSelect,
6486
+ messages_DeviceSessionOpen as DeviceSessionOpen,
6487
+ messages_DeviceSessionOpen_FailureSubCodes as DeviceSessionOpen_FailureSubCodes,
6488
+ messages_DeviceSession as DeviceSession,
6489
+ messages_DeviceSessionAskPin as DeviceSessionAskPin,
6490
+ messages_DeviceSessionAskPin_FailureSubCodes as DeviceSessionAskPin_FailureSubCodes,
6491
+ messages_DeviceStatus as DeviceStatus,
6492
+ messages_DeviceStatusGet as DeviceStatusGet,
6493
+ messages_DevOnboardingStep as DevOnboardingStep,
6494
+ messages_DevOnboardingPhase as DevOnboardingPhase,
6495
+ messages_DevOnboardingSetupKind as DevOnboardingSetupKind,
6496
+ messages_DevOnboardingSetupMethod as DevOnboardingSetupMethod,
6497
+ messages_DevOnboardingSetupStatus as DevOnboardingSetupStatus,
6498
+ messages_DevGetOnboardingStatus as DevGetOnboardingStatus,
6499
+ messages_DevOnboardingStatus as DevOnboardingStatus,
6500
+ messages_FilesystemPermissionFix as FilesystemPermissionFix,
6501
+ messages_FilesystemPathInfo as FilesystemPathInfo,
6502
+ messages_FilesystemPathInfoQuery as FilesystemPathInfoQuery,
6503
+ messages_FilesystemFile as FilesystemFile,
6504
+ messages_FilesystemFileRead as FilesystemFileRead,
6505
+ messages_FilesystemFileWrite as FilesystemFileWrite,
6506
+ messages_FilesystemFileDelete as FilesystemFileDelete,
6507
+ messages_FilesystemDir as FilesystemDir,
6508
+ messages_FilesystemDirList as FilesystemDirList,
6509
+ messages_FilesystemDirMake as FilesystemDirMake,
6510
+ messages_FilesystemDirRemove as FilesystemDirRemove,
6511
+ messages_FilesystemFormat as FilesystemFormat,
6512
+ messages_PortfolioUpdate as PortfolioUpdate,
6513
+ messages_ProtocolV2FailureType as ProtocolV2FailureType,
6514
+ messages_Enum_ProtocolV2Capability as Enum_ProtocolV2Capability,
6515
+ messages_ProtocolV2Capability as ProtocolV2Capability,
5383
6516
  messages_MessageType as MessageType,
5384
6517
  messages_MessageKey as MessageKey,
5385
6518
  messages_MessageResponse as MessageResponse,
6519
+ messages_MessageResponseMap as MessageResponseMap,
5386
6520
  messages_TypedCall as TypedCall,
5387
6521
  };
5388
6522
  }
5389
6523
 
6524
+ declare class ProtocolV2SequenceCursor {
6525
+ private current;
6526
+ next(): number;
6527
+ }
6528
+
6529
+ type ProtocolV2Schemas = {
6530
+ protocolV1: Root;
6531
+ protocolV2: Root;
6532
+ };
6533
+ type ProtocolV2CallContext = {
6534
+ messageName: string;
6535
+ timeoutMs?: number;
6536
+ highVolume: boolean;
6537
+ generation: number;
6538
+ };
6539
+ type ProtocolLogger = {
6540
+ debug?: (...args: any[]) => void;
6541
+ error?: (...args: any[]) => void;
6542
+ };
6543
+ type ProtocolV2SessionOptions = {
6544
+ schemas: ProtocolV2Schemas;
6545
+ router: number;
6546
+ packetSrc?: number;
6547
+ maxFrameBytes?: number;
6548
+ prepareCall?: (context: ProtocolV2CallContext) => Promise<void> | void;
6549
+ writeFrame: (frame: Uint8Array, context: ProtocolV2CallContext) => Promise<void>;
6550
+ readFrame: (context: ProtocolV2CallContext) => Promise<Uint8Array>;
6551
+ logger?: ProtocolLogger;
6552
+ logPrefix?: string;
6553
+ createTimeoutError?: (name: string, timeoutMs: number) => Error;
6554
+ sequenceCursor?: ProtocolV2SequenceCursor;
6555
+ generation?: number;
6556
+ writeTimeoutMs?: number;
6557
+ };
6558
+ type ProtocolV2CallOptions = {
6559
+ timeoutMs?: number;
6560
+ expectedTypes?: string[];
6561
+ intermediateTypes?: string[];
6562
+ onIntermediateResponse?: (response: MessageFromOneKey) => void;
6563
+ };
6564
+
6565
+ declare function hexToBytes(hex: string): Uint8Array;
6566
+ declare function bytesToHex(bytes: Uint8Array): string;
6567
+ declare function getErrorMessage(error: unknown): string;
6568
+ declare function withProtocolTimeout<T>(promise: Promise<T>, timeoutMs: number | undefined, createTimeoutError: () => Error, onTimeout?: () => void): Promise<T>;
6569
+ declare const PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS = 30000;
6570
+ declare class ProtocolV2Session {
6571
+ private readonly options;
6572
+ private readonly sequenceCursor;
6573
+ private pendingCall;
6574
+ constructor(options: ProtocolV2SessionOptions);
6575
+ call(name: string, data: Record<string, unknown>, callOptions?: ProtocolV2CallOptions): Promise<MessageFromOneKey>;
6576
+ private executeCall;
6577
+ }
6578
+ declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, }: {
6579
+ call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
6580
+ timeoutMs: number;
6581
+ logger?: ProtocolLogger;
6582
+ logPrefix?: string;
6583
+ onBeforeProbe?: () => Promise<void> | void;
6584
+ onProbeFailed?: (error: unknown) => Promise<void> | void;
6585
+ }): Promise<boolean>;
6586
+
6587
+ type ProtocolV2LinkErrorClassification = 'link-fatal' | 'recoverable';
6588
+ interface ProtocolV2LinkAdapter {
6589
+ router: number;
6590
+ maxFrameBytes?: number;
6591
+ generation: number;
6592
+ prepareCall(context: ProtocolV2CallContext): Promise<void> | void;
6593
+ writeFrame(frame: Uint8Array, context: ProtocolV2CallContext): Promise<void>;
6594
+ readFrame(context: ProtocolV2CallContext): Promise<Uint8Array>;
6595
+ reset(reason: string): Promise<void> | void;
6596
+ logger?: ProtocolV2SessionOptions['logger'];
6597
+ logPrefix?: string;
6598
+ createTimeoutError?: ProtocolV2SessionOptions['createTimeoutError'];
6599
+ writeTimeoutMs?: number;
6600
+ }
6601
+ type ProtocolV2LinkManagerOptions<Key> = {
6602
+ getSchemas: () => ProtocolV2Schemas;
6603
+ classifyError: (error: unknown) => ProtocolV2LinkErrorClassification;
6604
+ onLinkInvalidated?: (key: Key, reason: string) => Promise<void> | void;
6605
+ };
6606
+ declare class ProtocolV2LinkManager<Key> {
6607
+ private readonly links;
6608
+ private readonly sequences;
6609
+ private readonly callQueues;
6610
+ private readonly options;
6611
+ constructor(options: ProtocolV2LinkManagerOptions<Key>);
6612
+ call(key: Key, createAdapter: () => ProtocolV2LinkAdapter, name: string, data: Record<string, unknown>, options?: TransportCallOptions): Promise<MessageFromOneKey>;
6613
+ invalidateLink(key: Key, reason: string): Promise<void>;
6614
+ invalidateAllLinks(reason: string): Promise<void>;
6615
+ dispose(reason: string): Promise<void>;
6616
+ private getOrCreateLink;
6617
+ private executeCall;
6618
+ private clearSettledCallQueue;
6619
+ }
6620
+
6621
+ type ProtocolV2UsbTransportBaseOptions = {
6622
+ router: number;
6623
+ maxFrameBytes: number;
6624
+ logPrefix: string;
6625
+ };
6626
+ declare abstract class ProtocolV2UsbTransportBase<Key> {
6627
+ private readonly protocolV2UsbLinks;
6628
+ private readonly protocolV2UsbAssemblers;
6629
+ private readonly protocolV2UsbGenerations;
6630
+ private readonly protocolV2UsbCancellations;
6631
+ private readonly protocolV2UsbOptions;
6632
+ protected constructor(options: ProtocolV2UsbTransportBaseOptions);
6633
+ protected abstract getProtocolV2UsbSchemas(): ProtocolV2Schemas;
6634
+ protected abstract getProtocolV2UsbLogger(): ProtocolV2SessionOptions['logger'];
6635
+ protected abstract writeProtocolV2UsbPacket(key: Key, frame: Uint8Array, context: ProtocolV2CallContext): Promise<void>;
6636
+ protected abstract readProtocolV2UsbPacket(key: Key, context: ProtocolV2CallContext): Promise<Uint8Array>;
6637
+ protected abstract resetProtocolV2UsbNativeLink(key: Key, reason: string): Promise<void>;
6638
+ protected abstract createProtocolV2UsbTimeoutError(name: string, timeoutMs: number): Error;
6639
+ protected onProtocolV2UsbLinkInvalidated(_key: Key, _reason: string): Promise<void> | void;
6640
+ protected rotateProtocolV2UsbGeneration(key: Key, reason: string): Promise<number>;
6641
+ protected callProtocolV2Usb(key: Key, name: string, data: Record<string, unknown>, options?: TransportCallOptions): Promise<MessageFromOneKey>;
6642
+ protected invalidateProtocolV2UsbLink(key: Key, reason: string): Promise<void>;
6643
+ protected invalidateAllProtocolV2UsbLinks(reason: string): Promise<void>;
6644
+ protected disposeProtocolV2UsbLinks(reason: string): Promise<void>;
6645
+ private createProtocolV2UsbAdapter;
6646
+ private getProtocolV2UsbAssembler;
6647
+ private createProtocolV2UsbCancellation;
6648
+ }
6649
+
5390
6650
  declare function info(res: any): {
5391
6651
  version: string;
5392
6652
  configured: boolean;
@@ -5413,20 +6673,113 @@ declare namespace check {
5413
6673
 
5414
6674
  declare const LogBlockCommand: Set<string>;
5415
6675
 
5416
- declare const MESSAGE_TOP_CHAR = 63;
5417
- declare const MESSAGE_HEADER_BYTE = 35;
5418
- declare const HEADER_SIZE: number;
5419
- declare const BUFFER_SIZE = 63;
5420
- declare const COMMON_HEADER_SIZE = 6;
6676
+ /** Protocol V1 USB report marker, ASCII `?`. */
6677
+ declare const PROTOCOL_V1_REPORT_ID = 63;
6678
+ /** Protocol V1 envelope marker, ASCII `#`. */
6679
+ declare const PROTOCOL_V1_HEADER_BYTE = 35;
6680
+ /** Protocol V1 payload bytes per chunk after the report marker. */
6681
+ declare const PROTOCOL_V1_CHUNK_PAYLOAD_SIZE = 63;
6682
+ /** Protocol V1 USB packet length: report marker plus chunk payload. */
6683
+ declare const PROTOCOL_V1_USB_PACKET_SIZE: number;
6684
+ /** Protocol V1 message metadata: two-byte type plus four-byte payload length. */
6685
+ declare const PROTOCOL_V1_MESSAGE_HEADER_SIZE: number;
6686
+ /** Protocol V1 envelope metadata: `##`, message type, and payload length. */
6687
+ declare const PROTOCOL_V1_ENVELOPE_HEADER_SIZE: number;
6688
+ /** Maximum V2 frame length, including header, 4000-byte payload, protobuf overhead, and CRC. */
6689
+ declare const PROTOCOL_V2_FRAME_MAX_BYTES = 4608;
6690
+ /** FilesystemFileWrite chunk size over WebUSB. */
6691
+ declare const PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE = 4000;
6692
+ /** FilesystemFileWrite chunk size over BLE. */
6693
+ declare const PROTOCOL_V2_BLE_FILE_CHUNK_SIZE = 1800;
6694
+ /** BLE FilesystemFileRead chunk size, limited by the Pro2 1024-byte UART TX buffer. */
6695
+ declare const PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE = 900;
6696
+ /** Pro2 BLE/UART RX FIFO must hold a complete Proto Link frame. */
6697
+ declare const PROTOCOL_V2_BLE_FRAME_MAX_BYTES = 2048;
6698
+ /** @deprecated Use the transport-specific WebUSB or BLE file chunk constant. */
6699
+ declare const PROTOCOL_V2_FILE_CHUNK_SIZE = 4000;
6700
+ /**
6701
+ * Protocol V2 routing channel. USB reaches the main MCU directly, while BLE routes
6702
+ * through the BLE coprocessor UART bridge.
6703
+ */
6704
+ declare const PROTOCOL_V2_CHANNEL_USB = 0;
6705
+ declare const PROTOCOL_V2_CHANNEL_BLE_UART = 1;
6706
+ declare const PROTOCOL_V2_CHANNEL_SOCKET = 2;
6707
+ /** packet_src for protobuf commands; firmware routes zero to the protobuf dispatcher. */
6708
+ declare const PROTOCOL_V2_PACKET_SRC_COMMAND = 0;
5421
6709
 
5422
6710
  declare const _default: {
5423
6711
  check: typeof check;
5424
- buildOne: typeof buildOne;
5425
- buildBuffers: (messages: protobuf.Root, name: string, data: Record<string, unknown>) => ByteBuffer[];
5426
- buildEncodeBuffers: (messages: protobuf.Root, name: string, data: Record<string, unknown>) => Buffer[];
5427
- receiveOne: typeof receiveOne;
5428
6712
  parseConfigure: typeof parseConfigure;
5429
- decodeProtocol: typeof decodeProtocol;
6713
+ protocolV2: typeof protocolV2Codec;
6714
+ ProtocolV1: {
6715
+ encodeEnvelope: typeof encodeEnvelopeMessage;
6716
+ encodeMessageChunks: (messages: protobuf.Root, name: string, data: Record<string, unknown>) => Buffer[];
6717
+ encodeTransportPackets: (messages: protobuf.Root, name: string, data: Record<string, unknown>) => ByteBuffer[];
6718
+ decodeFirstChunk: (bytes: ArrayBuffer) => {
6719
+ length: number;
6720
+ typeId: number;
6721
+ restBuffer: ByteBuffer;
6722
+ };
6723
+ decodeMessage: typeof decodeMessage;
6724
+ };
6725
+ ProtocolV2: {
6726
+ isAckFrame: typeof isAckFrame;
6727
+ inspectFrame(schemas: {
6728
+ protocolV1: protobuf.Root;
6729
+ protocolV2: protobuf.Root;
6730
+ }, frame: Uint8Array): {
6731
+ messageName: string;
6732
+ messageTypeId: number;
6733
+ pbPayload: Uint8Array;
6734
+ seq: number;
6735
+ type: string;
6736
+ };
6737
+ encodeFrame(schemas: {
6738
+ protocolV1: protobuf.Root;
6739
+ protocolV2: protobuf.Root;
6740
+ }, name: string, data: Record<string, unknown>, options?: {
6741
+ packetSrc?: number | undefined;
6742
+ router?: number | undefined;
6743
+ seq?: number | undefined;
6744
+ }): Uint8Array;
6745
+ decodeFrame(schemas: {
6746
+ protocolV1: protobuf.Root;
6747
+ protocolV2: protobuf.Root;
6748
+ }, frame: Uint8Array): {
6749
+ message: {
6750
+ [key: string]: any;
6751
+ };
6752
+ messageName: string;
6753
+ messageTypeId: number;
6754
+ pbPayload: Uint8Array;
6755
+ seq: number;
6756
+ type: string;
6757
+ };
6758
+ };
6759
+ PROTOCOL_V2_SYS_MESSAGE_THRESHOLD: number;
6760
+ ProtocolV2FrameAssembler: typeof ProtocolV2FrameAssembler;
6761
+ ProtocolV2LinkManager: typeof ProtocolV2LinkManager;
6762
+ ProtocolV2SequenceCursor: typeof ProtocolV2SequenceCursor;
6763
+ ProtocolV2Session: typeof ProtocolV2Session;
6764
+ ProtocolV2UsbTransportBase: typeof ProtocolV2UsbTransportBase;
6765
+ bytesToHex: typeof bytesToHex;
6766
+ concatUint8Arrays: typeof concatUint8Arrays;
6767
+ createMessageFromName: (messages: protobuf.Root, name: string) => {
6768
+ Message: protobuf.Type;
6769
+ messageTypeId: number;
6770
+ };
6771
+ createMessageFromType: (messages: protobuf.Root, typeId: number) => {
6772
+ Message: protobuf.Type;
6773
+ messageName: string;
6774
+ };
6775
+ encodeProtobuf: (Message: protobuf.Type, data: Record<string, unknown>) => ByteBuffer;
6776
+ decodeProtobuf: (Message: protobuf.Type, data: ByteBuffer) => {
6777
+ [key: string]: any;
6778
+ };
6779
+ getErrorMessage: typeof getErrorMessage;
6780
+ hexToBytes: typeof hexToBytes;
6781
+ probeProtocolV2: typeof probeProtocolV2;
6782
+ withProtocolTimeout: typeof withProtocolTimeout;
5430
6783
  };
5431
6784
 
5432
- export { AcquireInput, Address, AlephiumAddress, AlephiumBytecodeAck, AlephiumBytecodeRequest, AlephiumGetAddress, AlephiumMessageSignature, AlephiumSignMessage, AlephiumSignTx, AlephiumSignedTx, AlephiumTxAck, AlephiumTxRequest, AlgorandAddress, AlgorandGetAddress, AlgorandSignTx, AlgorandSignedTx, AmountUnit, ApplyFlags, ApplySettings, AptosAddress, AptosGetAddress, AptosMessagePayload, AptosMessageSignature, AptosSignMessage, AptosSignSIWAMessage, AptosSignTx, AptosSignedTx, AptosTransactionType, AuthorizeCoinJoin, BIP32Address, BUFFER_SIZE, BackupDevice, BackupType, BatchGetPublickeys, BenfenAddress, BenfenGetAddress, BenfenMessageSignature, BenfenSignMessage, BenfenSignTx, BenfenSignedTx, BenfenTxAck, BenfenTxRequest, BinanceAddress, BinanceCancelMsg, BinanceCoin, BinanceGetAddress, BinanceGetPublicKey, BinanceInputOutput, BinanceOrderMsg, BinanceOrderSide, BinanceOrderType, BinancePublicKey, BinanceSignTx, BinanceSignedTx, BinanceTimeInForce, BinanceTransferMsg, BinanceTxRequest, BixinBackupAck, BixinBackupDevice, BixinBackupDeviceAck, BixinBackupRequest, BixinLoadDevice, BixinMessageSE, BixinOutMessageSE, BixinPinInputOnDevice, BixinRestoreAck, BixinRestoreRequest, BixinSeedOperate, BixinVerifyDeviceAck, BixinVerifyDeviceRequest, BixinWhiteListAck, BixinWhiteListRequest, BlurRequest, ButtonAck, ButtonRequest, ButtonRequestType, COMMON_HEADER_SIZE, Cancel, CancelAuthorization, Capability, CardanoAddress, CardanoAddressParametersType, CardanoAddressType, CardanoAssetGroup, CardanoBlockchainPointerType, CardanoCVoteRegistrationDelegation, CardanoCVoteRegistrationFormat, CardanoCVoteRegistrationParametersType, CardanoCertificateType, CardanoDRep, CardanoDRepType, CardanoDerivationType, CardanoGetAddress, CardanoGetNativeScriptHash, CardanoGetPublicKey, CardanoMessageSignature, CardanoNativeScript, CardanoNativeScriptHash, CardanoNativeScriptHashDisplayFormat, CardanoNativeScriptType, CardanoPoolMetadataType, CardanoPoolOwner, CardanoPoolParametersType, CardanoPoolRelayParameters, CardanoPoolRelayType, CardanoPublicKey, CardanoSignMessage, CardanoSignTxFinished, CardanoSignTxInit, CardanoToken, CardanoTxAuxiliaryData, CardanoTxAuxiliaryDataSupplement, CardanoTxAuxiliaryDataSupplementType, CardanoTxBodyHash, CardanoTxCertificate, CardanoTxCollateralInput, CardanoTxHostAck, CardanoTxInlineDatumChunk, CardanoTxInput, CardanoTxItemAck, CardanoTxMint, CardanoTxOutput, CardanoTxOutputSerializationFormat, CardanoTxReferenceInput, CardanoTxReferenceScriptChunk, CardanoTxRequiredSigner, CardanoTxSigningMode, CardanoTxWithdrawal, CardanoTxWitnessRequest, CardanoTxWitnessResponse, CardanoTxWitnessType, ChangeOutputScriptType, ChangePin, ChangeWipeCode, CipherKeyValue, CipheredKeyValue, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DeviceBackToBoot, DeviceEraseSector, DeviceInfo, DeviceInfoSettings, DnxAddress, DnxComputedKeyImage, DnxGetAddress, DnxInputAck, DnxInputRequest, DnxRTSigsRequest, DnxSignTx, DnxSignedTx, DnxTxKey, DoPreauthorized, ECDHSessionKey, EcdsaPublicKeys, EmmcDir, EmmcDirList, EmmcDirMake, EmmcDirRemove, EmmcFile, EmmcFileDelete, EmmcFileRead, EmmcFileWrite, EmmcFixPermission, EmmcPath, EmmcPathInfo, EndSession, Entropy, EntropyAck, EntropyRequest, Enum_BackupType, Enum_ButtonRequestType, Enum_Capability, Enum_InputScriptType, Enum_KaspaInputScriptType, Enum_KaspaOutputScriptType, Enum_KaspaRequestType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_RequestType, Enum_SafetyCheckLevel, Enum_WordRequestType, EosActionBuyRam, EosActionBuyRamBytes, EosActionCommon, EosActionDelegate, EosActionDeleteAuth, EosActionLinkAuth, EosActionNewAccount, EosActionRefund, EosActionSellRam, EosActionTransfer, EosActionUndelegate, EosActionUnknown, EosActionUnlinkAuth, EosActionUpdateAuth, EosActionVoteProducer, EosAsset, EosAuthorization, EosAuthorizationAccount, EosAuthorizationKey, EosAuthorizationWait, EosGetPublicKey, EosPermissionLevel, EosPublicKey, EosSignTx, EosSignedTx, EosTxActionAck, EosTxActionRequest, EosTxHeader, EthereumAccessList, EthereumAccessListOneKey, EthereumAddress, EthereumAddressOneKey, EthereumAuthorizationOneKey, EthereumAuthorizationSignature, EthereumDataType, EthereumDataTypeOneKey, EthereumDefinitionType, EthereumDefinitions, EthereumFieldType, EthereumFieldTypeOneKey, EthereumGetAddress, EthereumGetAddressOneKey, EthereumGetPublicKey, EthereumGetPublicKeyOneKey, EthereumGnosisSafeTxAck, EthereumGnosisSafeTxOperation, EthereumGnosisSafeTxRequest, EthereumMessageSignature, EthereumMessageSignatureOneKey, EthereumNetworkInfo, EthereumPublicKey, EthereumPublicKeyOneKey, EthereumSignMessage, EthereumSignMessageEIP712, EthereumSignMessageOneKey, EthereumSignTx, EthereumSignTxEIP1559, EthereumSignTxEIP1559OneKey, EthereumSignTxEIP7702OneKey, EthereumSignTxOneKey, EthereumSignTypedData, EthereumSignTypedDataOneKey, EthereumSignTypedHash, EthereumSignTypedHashOneKey, EthereumStructMember, EthereumStructMemberOneKey, EthereumTokenInfo, EthereumTxAck, EthereumTxAckOneKey, EthereumTxRequest, EthereumTxRequestOneKey, EthereumTypedDataSignature, EthereumTypedDataSignatureOneKey, EthereumTypedDataStructAck, EthereumTypedDataStructAckOneKey, EthereumTypedDataStructRequest, EthereumTypedDataStructRequestOneKey, EthereumTypedDataValueAck, EthereumTypedDataValueAckOneKey, EthereumTypedDataValueRequest, EthereumTypedDataValueRequestOneKey, EthereumVerifyMessage, EthereumVerifyMessageOneKey, ExportType, Failure, FailureType, Features, FileInfo, FileInfoList, FilecoinAddress, FilecoinGetAddress, FilecoinSignTx, FilecoinSignedTx, FirmwareErase, FirmwareErase_ex, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetNextU2FCounter, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, HDNodePathType, HDNodeType, HEADER_SIZE, IdentityType, Initialize, InputScriptType, InternalInputScriptType, KaspaAddress, KaspaGetAddress, KaspaInputScriptType, KaspaOutpoint, KaspaOutputScriptType, KaspaRequestType, KaspaSignTx, KaspaSignedTx, KaspaTxAckInput, KaspaTxAckOutput, KaspaTxAckPayloadChunk, KaspaTxAckPrevInput, KaspaTxAckPrevMeta, KaspaTxAckPrevOutput, KaspaTxInputAck, KaspaTxInputRequest, KaspaTxRequest, KaspaTxRequestSignature, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MESSAGE_HEADER_BYTE, MESSAGE_TOP_CHAR, MessageFromOneKey, MessageKey, MessageResponse, MessageSignature, MessageType, messages as Messages, MoneroAccountPublicAddress, MoneroAddress, MoneroExportedKeyImage, MoneroGetAddress, MoneroGetTxKeyAck, MoneroGetTxKeyRequest, MoneroGetWatchKey, MoneroKeyImageExportInitAck, MoneroKeyImageExportInitRequest, MoneroKeyImageSyncFinalAck, MoneroKeyImageSyncFinalRequest, MoneroKeyImageSyncStepAck, MoneroKeyImageSyncStepRequest, MoneroLiveRefreshFinalAck, MoneroLiveRefreshFinalRequest, MoneroLiveRefreshStartAck, MoneroLiveRefreshStartRequest, MoneroLiveRefreshStepAck, MoneroLiveRefreshStepRequest, MoneroMultisigKLRki, MoneroOutputEntry, MoneroRctKeyPublic, MoneroRingCtSig, MoneroSubAddressIndicesList, MoneroTransactionAllInputsSetAck, MoneroTransactionAllInputsSetRequest, MoneroTransactionAllOutSetAck, MoneroTransactionAllOutSetRequest, MoneroTransactionData, MoneroTransactionDestinationEntry, MoneroTransactionFinalAck, MoneroTransactionFinalRequest, MoneroTransactionInitAck, MoneroTransactionInitRequest, MoneroTransactionInputViniAck, MoneroTransactionInputViniRequest, MoneroTransactionInputsPermutationAck, MoneroTransactionInputsPermutationRequest, MoneroTransactionRsigData, MoneroTransactionSetInputAck, MoneroTransactionSetInputRequest, MoneroTransactionSetOutputAck, MoneroTransactionSetOutputRequest, MoneroTransactionSignInputAck, MoneroTransactionSignInputRequest, MoneroTransactionSourceEntry, MoneroTransferDetails, MoneroWatchKey, MultisigRedeemScriptType, NEMAddress, NEMAggregateModification, NEMCosignatoryModification, NEMDecryptMessage, NEMDecryptedMessage, NEMGetAddress, NEMImportanceTransfer, NEMImportanceTransferMode, NEMModificationType, NEMMosaic, NEMMosaicCreation, NEMMosaicDefinition, NEMMosaicLevy, NEMMosaicSupplyChange, NEMProvisionNamespace, NEMSignTx, NEMSignedTx, NEMSupplyChangeType, NEMTransactionCommon, NEMTransfer, NFTWriteData, NFTWriteInfo, NearAddress, NearGetAddress, NearSignTx, NearSignedTx, NeoAddress, NeoGetAddress, NeoSignTx, NeoSignedTx, NervosAddress, NervosGetAddress, NervosSignTx, NervosSignedTx, NervosTxAck, NervosTxRequest, NexaAddress, NexaGetAddress, NexaSignTx, NexaSignedTx, NexaTxInputAck, NexaTxInputRequest, NextU2FCounter, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OneKeyDeviceCommType, OneKeyDeviceInfo, OneKeyDeviceInfoBase, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PassphraseAck, PassphraseRequest, PassphraseState, Path, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RequestType, ResetDevice, ResourceAck, ResourceRequest, ResourceType, ResourceUpdate, ResourceUpload, RippleAddress, RippleGetAddress, RipplePayment, RippleSignTx, RippleSignedTx, SEMessageSignature, SEPublicCert, SEPublicKey, SESignMessage, SafetyCheckLevel, ScdoAddress, ScdoGetAddress, ScdoSignMessage, ScdoSignTx, ScdoSignedMessage, ScdoSignedTx, ScdoTxAck, SdProtect, SdProtectOperationType, SeedRequestType, SelfTest, SetU2FCounter, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SolanaTxATADetails, SolanaTxExtraInfo, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarInvokeHostFunctionOp, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarRequestType, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarSorobanDataAck, StellarSorobanDataRequest, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignData, TonSignDataType, TonSignMessage, TonSignProof, TonSignedData, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TronAddress, TronCancelAllUnfreezeV2Contract, TronContract, TronDelegateResourceContract, TronFreezeBalanceContract, TronFreezeBalanceV2Contract, TronGetAddress, TronMessageSignature, TronMessageType, TronResourceCode, TronSignMessage, TronSignTx, TronSignedTx, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceContract, TronUnfreezeBalanceV2Contract, TronVoteWitnessContract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, TxAck, TxAckInput, TxAckInputWrapper, TxAckOutput, TxAckOutputWrapper, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UintType, UnLockDevice, UnLockDeviceResponse, UpgradeFileHeader, VerifyMessage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPublicCert, ZoomRequest, _default as default, facotry };
6785
+ export { AcquireInput, Address, AlephiumAddress, AlephiumBytecodeAck, AlephiumBytecodeRequest, AlephiumGetAddress, AlephiumMessageSignature, AlephiumSignMessage, AlephiumSignTx, AlephiumSignedTx, AlephiumTxAck, AlephiumTxRequest, AlgorandAddress, AlgorandGetAddress, AlgorandSignTx, AlgorandSignedTx, AmountUnit, ApplyFlags, ApplySettings, AptosAddress, AptosGetAddress, AptosMessagePayload, AptosMessageSignature, AptosSignMessage, AptosSignSIWAMessage, AptosSignTx, AptosSignedTx, AptosTransactionType, AuthorizeCoinJoin, BIP32Address, BackupDevice, BackupType, BatchGetPublickeys, BenfenAddress, BenfenGetAddress, BenfenMessageSignature, BenfenSignMessage, BenfenSignTx, BenfenSignedTx, BenfenTxAck, BenfenTxRequest, BinanceAddress, BinanceCancelMsg, BinanceCoin, BinanceGetAddress, BinanceGetPublicKey, BinanceInputOutput, BinanceOrderMsg, BinanceOrderSide, BinanceOrderType, BinancePublicKey, BinanceSignTx, BinanceSignedTx, BinanceTimeInForce, BinanceTransferMsg, BinanceTxRequest, BixinBackupAck, BixinBackupDevice, BixinBackupDeviceAck, BixinBackupRequest, BixinLoadDevice, BixinMessageSE, BixinOutMessageSE, BixinPinInputOnDevice, BixinRestoreAck, BixinRestoreRequest, BixinSeedOperate, BixinVerifyDeviceAck, BixinVerifyDeviceRequest, BixinWhiteListAck, BixinWhiteListRequest, BlurRequest, ButtonAck, ButtonRequest, ButtonRequestType, Cancel, CancelAuthorization, Capability, CardanoAddress, CardanoAddressParametersType, CardanoAddressType, CardanoAssetGroup, CardanoBlockchainPointerType, CardanoCVoteRegistrationDelegation, CardanoCVoteRegistrationFormat, CardanoCVoteRegistrationParametersType, CardanoCertificateType, CardanoDRep, CardanoDRepType, CardanoDerivationType, CardanoGetAddress, CardanoGetNativeScriptHash, CardanoGetPublicKey, CardanoMessageSignature, CardanoNativeScript, CardanoNativeScriptHash, CardanoNativeScriptHashDisplayFormat, CardanoNativeScriptType, CardanoPoolMetadataType, CardanoPoolOwner, CardanoPoolParametersType, CardanoPoolRelayParameters, CardanoPoolRelayType, CardanoPublicKey, CardanoSignMessage, CardanoSignTxFinished, CardanoSignTxInit, CardanoToken, CardanoTxAuxiliaryData, CardanoTxAuxiliaryDataSupplement, CardanoTxAuxiliaryDataSupplementType, CardanoTxBodyHash, CardanoTxCertificate, CardanoTxCollateralInput, CardanoTxHostAck, CardanoTxInlineDatumChunk, CardanoTxInput, CardanoTxItemAck, CardanoTxMint, CardanoTxOutput, CardanoTxOutputSerializationFormat, CardanoTxReferenceInput, CardanoTxReferenceScriptChunk, CardanoTxRequiredSigner, CardanoTxSigningMode, CardanoTxWithdrawal, CardanoTxWitnessRequest, CardanoTxWitnessResponse, CardanoTxWitnessType, ChangeOutputScriptType, ChangePin, ChangeWipeCode, CipherKeyValue, CipheredKeyValue, CoinJoinRequest, CoinPurchaseMemo, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DevGetOnboardingStatus, DevOnboardingPhase, DevOnboardingSetupKind, DevOnboardingSetupMethod, DevOnboardingSetupStatus, DevOnboardingStatus, DevOnboardingStep, DeviceAttachPinOnDevice, DeviceBackToBoot, DeviceCertificate, DeviceCertificateRead, DeviceCertificateSign, DeviceCertificateSignature, DeviceCertificateWrite, DeviceCoprocessorInfo, DeviceEraseSector, DeviceErrorCode, DeviceFactoryAck, DeviceFactoryInfo, DeviceFactoryInfoGet, DeviceFactoryInfoManufactureTime, DeviceFactoryInfoSet, DeviceFactoryPermanentLock, DeviceFactoryTest, DeviceFirmwareImageInfo, DeviceFirmwareTarget, DeviceFirmwareTargetType, DeviceFirmwareUpdateRecord, DeviceFirmwareUpdateRecordFields, DeviceFirmwareUpdateRequest, DeviceFirmwareUpdateStatus, DeviceFirmwareUpdateStatusGet, DeviceFirmwareUpdateTaskStatus, DeviceHardwareInfo, DeviceHostPassphrase, DeviceInfo, DeviceInfoGet, DeviceInfoSettings, DeviceInfoTargets, DeviceInfoTypes, DeviceMainMcuInfo, DevicePassphraseOnDevice, DeviceReboot, DeviceRebootType, DeviceSEInfo, DeviceSEState, DeviceSeType, DeviceSession, DeviceSessionAskPin, DeviceSessionAskPin_FailureSubCodes, DeviceSessionOpen, DeviceSessionOpen_FailureSubCodes, DeviceSessionResume, DeviceSettings, DeviceSettingsGet, DeviceSettingsPage, DeviceSettingsPageShow, DeviceSettingsSet, DeviceStatus, DeviceStatusGet, DeviceType, DeviceWalletSelect, DnxAddress, DnxComputedKeyImage, DnxGetAddress, DnxInputAck, DnxInputRequest, DnxRTSigsRequest, DnxSignTx, DnxSignedTx, DnxTxKey, DoPreauthorized, ECDHSessionKey, EcdsaPublicKeys, EmmcDir, EmmcDirList, EmmcDirMake, EmmcDirRemove, EmmcFile, EmmcFileDelete, EmmcFileRead, EmmcFileWrite, EmmcFixPermission, EmmcPath, EmmcPathInfo, EndSession, Entropy, EntropyAck, EntropyRequest, Enum_BackupType, Enum_ButtonRequestType, Enum_Capability, Enum_InputScriptType, Enum_KaspaInputScriptType, Enum_KaspaOutputScriptType, Enum_KaspaRequestType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_ProtocolV2Capability, Enum_RequestType, Enum_SafetyCheckLevel, Enum_WordRequestType, EosActionBuyRam, EosActionBuyRamBytes, EosActionCommon, EosActionDelegate, EosActionDeleteAuth, EosActionLinkAuth, EosActionNewAccount, EosActionRefund, EosActionSellRam, EosActionTransfer, EosActionUndelegate, EosActionUnknown, EosActionUnlinkAuth, EosActionUpdateAuth, EosActionVoteProducer, EosAsset, EosAuthorization, EosAuthorizationAccount, EosAuthorizationKey, EosAuthorizationWait, EosGetPublicKey, EosPermissionLevel, EosPublicKey, EosSignTx, EosSignedTx, EosTxActionAck, EosTxActionRequest, EosTxHeader, EthereumAccessList, EthereumAccessListOneKey, EthereumAddress, EthereumAddressOneKey, EthereumAuthorizationOneKey, EthereumAuthorizationSignature, EthereumDataType, EthereumDataTypeOneKey, EthereumDefinitionType, EthereumDefinitions, EthereumFieldType, EthereumFieldTypeOneKey, EthereumGetAddress, EthereumGetAddressOneKey, EthereumGetPublicKey, EthereumGetPublicKeyOneKey, EthereumGnosisSafeTxAck, EthereumGnosisSafeTxOperation, EthereumGnosisSafeTxRequest, EthereumMessageSignature, EthereumMessageSignatureOneKey, EthereumNetworkInfo, EthereumPublicKey, EthereumPublicKeyOneKey, EthereumSignMessage, EthereumSignMessageEIP712, EthereumSignMessageOneKey, EthereumSignTx, EthereumSignTxEIP1559, EthereumSignTxEIP1559OneKey, EthereumSignTxEIP7702OneKey, EthereumSignTxOneKey, EthereumSignTypedData, EthereumSignTypedDataOneKey, EthereumSignTypedDataQR, EthereumSignTypedHash, EthereumSignTypedHashOneKey, EthereumStructMember, EthereumStructMemberOneKey, EthereumTokenInfo, EthereumTxAck, EthereumTxAckOneKey, EthereumTxRequest, EthereumTxRequestOneKey, EthereumTypedDataSignature, EthereumTypedDataSignatureOneKey, EthereumTypedDataStructAck, EthereumTypedDataStructAckOneKey, EthereumTypedDataStructRequest, EthereumTypedDataStructRequestOneKey, EthereumTypedDataValueAck, EthereumTypedDataValueAckOneKey, EthereumTypedDataValueRequest, EthereumTypedDataValueRequestOneKey, EthereumVerifyMessage, EthereumVerifyMessageOneKey, ExportType, Failure, FailureType, Features, FileInfo, FileInfoList, FilecoinAddress, FilecoinGetAddress, FilecoinSignTx, FilecoinSignedTx, FilesystemDir, FilesystemDirList, FilesystemDirMake, FilesystemDirRemove, FilesystemFile, FilesystemFileDelete, FilesystemFileRead, FilesystemFileWrite, FilesystemFormat, FilesystemPathInfo, FilesystemPathInfoQuery, FilesystemPermissionFix, FirmwareErase, FirmwareErase_ex, FirmwareHash, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetFirmwareHash, GetNextU2FCounter, GetNonce, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, GetWallpaper, HDNodePathType, HDNodeType, IdentityType, Initialize, InputScriptType, InternalInputScriptType, InternalMyAddressRequest, KaspaAddress, KaspaGetAddress, KaspaInputScriptType, KaspaOutpoint, KaspaOutputScriptType, KaspaRequestType, KaspaSignTx, KaspaSignedTx, KaspaTxAckInput, KaspaTxAckOutput, KaspaTxAckPayloadChunk, KaspaTxAckPrevInput, KaspaTxAckPrevMeta, KaspaTxAckPrevOutput, KaspaTxInputAck, KaspaTxInputRequest, KaspaTxRequest, KaspaTxRequestSignature, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MessageFromOneKey, MessageKey, MessageResponse, MessageResponseMap, MessageSignature, MessageType, messages as Messages, MoneroAccountPublicAddress, MoneroAddress, MoneroExportedKeyImage, MoneroGetAddress, MoneroGetTxKeyAck, MoneroGetTxKeyRequest, MoneroGetWatchKey, MoneroKeyImageExportInitAck, MoneroKeyImageExportInitRequest, MoneroKeyImageSyncFinalAck, MoneroKeyImageSyncFinalRequest, MoneroKeyImageSyncStepAck, MoneroKeyImageSyncStepRequest, MoneroLiveRefreshFinalAck, MoneroLiveRefreshFinalRequest, MoneroLiveRefreshStartAck, MoneroLiveRefreshStartRequest, MoneroLiveRefreshStepAck, MoneroLiveRefreshStepRequest, MoneroMultisigKLRki, MoneroNetworkType, MoneroOutputEntry, MoneroRctKeyPublic, MoneroRingCtSig, MoneroSubAddressIndicesList, MoneroTransactionAllInputsSetAck, MoneroTransactionAllInputsSetRequest, MoneroTransactionAllOutSetAck, MoneroTransactionAllOutSetRequest, MoneroTransactionData, MoneroTransactionDestinationEntry, MoneroTransactionFinalAck, MoneroTransactionFinalRequest, MoneroTransactionInitAck, MoneroTransactionInitRequest, MoneroTransactionInputViniAck, MoneroTransactionInputViniRequest, MoneroTransactionInputsPermutationAck, MoneroTransactionInputsPermutationRequest, MoneroTransactionRsigData, MoneroTransactionSetInputAck, MoneroTransactionSetInputRequest, MoneroTransactionSetOutputAck, MoneroTransactionSetOutputRequest, MoneroTransactionSignInputAck, MoneroTransactionSignInputRequest, MoneroTransactionSourceEntry, MoneroTransferDetails, MoneroWatchKey, MultisigRedeemScriptType, NEMAddress, NEMAggregateModification, NEMCosignatoryModification, NEMDecryptMessage, NEMDecryptedMessage, NEMGetAddress, NEMImportanceTransfer, NEMImportanceTransferMode, NEMModificationType, NEMMosaic, NEMMosaicCreation, NEMMosaicDefinition, NEMMosaicLevy, NEMMosaicSupplyChange, NEMProvisionNamespace, NEMSignTx, NEMSignedTx, NEMSupplyChangeType, NEMTransactionCommon, NEMTransfer, NFTWriteData, NFTWriteInfo, NearAddress, NearGetAddress, NearSignTx, NearSignedTx, NeoAddress, NeoGetAddress, NeoSignTx, NeoSignedTx, NervosAddress, NervosGetAddress, NervosSignTx, NervosSignedTx, NervosTxAck, NervosTxRequest, NexaAddress, NexaGetAddress, NexaSignTx, NexaSignedTx, NexaTxInputAck, NexaTxInputRequest, NextU2FCounter, Nonce, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OneKeyDeviceCommType, OneKeyDeviceInfo, OneKeyDeviceInfoBase, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PROTOCOL_V1_CHUNK_PAYLOAD_SIZE, PROTOCOL_V1_ENVELOPE_HEADER_SIZE, PROTOCOL_V1_HEADER_BYTE, PROTOCOL_V1_MESSAGE_HEADER_SIZE, PROTOCOL_V1_REPORT_ID, PROTOCOL_V1_USB_PACKET_SIZE, PROTOCOL_V2_BLE_FILE_CHUNK_SIZE, PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE, PROTOCOL_V2_BLE_FRAME_MAX_BYTES, PROTOCOL_V2_CHANNEL_BLE_UART, PROTOCOL_V2_CHANNEL_SOCKET, PROTOCOL_V2_CHANNEL_USB, PROTOCOL_V2_FILE_CHUNK_SIZE, PROTOCOL_V2_FRAME_MAX_BYTES, PROTOCOL_V2_PACKET_SRC_COMMAND, PROTOCOL_V2_SYS_MESSAGE_THRESHOLD, PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE, PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS, PassphraseAck, PassphraseRequest, PassphraseState, Path, PaymentRequestMemo, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PortfolioUpdate, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, ProtocolInfo, ProtocolInfoRequest, ProtocolType, ProtocolV1, ProtocolV2, ProtocolV2CallContext, ProtocolV2CallOptions, ProtocolV2Capability, ProtocolV2DeviceInfo, ProtocolV2FailureType, ProtocolV2FrameAssembler, ProtocolV2LinkAdapter, ProtocolV2LinkErrorClassification, ProtocolV2LinkManager, ProtocolV2LinkManagerOptions, ProtocolV2Schemas, ProtocolV2SequenceCursor, ProtocolV2Session, ProtocolV2SessionOptions, ProtocolV2UsbTransportBase, ProtocolV2UsbTransportBaseOptions, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RefundMemo, RequestType, ResetDevice, ResourceAck, ResourceRequest, ResourceType, ResourceUpdate, ResourceUpload, RippleAddress, RippleGetAddress, RipplePayment, RippleSignTx, RippleSignedTx, SEMessageSignature, SEPublicCert, SEPublicKey, SESignMessage, SafetyCheckLevel, ScdoAddress, ScdoGetAddress, ScdoSignMessage, ScdoSignTx, ScdoSignedMessage, ScdoSignedTx, ScdoTxAck, SdProtect, SdProtectOperationType, SeedRequestType, SelfTest, SetBusy, SetU2FCounter, SetWallpaper, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SolanaTxATADetails, SolanaTxExtraInfo, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StartSession, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarInvokeHostFunctionOp, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarRequestType, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarSorobanDataAck, StellarSorobanDataRequest, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TextMemo, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignData, TonSignDataType, TonSignMessage, TonSignProof, TonSignedData, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TransportCallOptions, TronAddress, TronCancelAllUnfreezeV2Contract, TronContract, TronDelegateResourceContract, TronFreezeBalanceContract, TronFreezeBalanceV2Contract, TronGetAddress, TronMessageSignature, TronMessageType, TronResourceCode, TronSignMessage, TronSignTx, TronSignedTx, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceContract, TronUnfreezeBalanceV2Contract, TronVoteWitnessContract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, TxAck, TxAckInput, TxAckInputWrapper, TxAckOutput, TxAckOutputWrapper, TxAckPaymentRequest, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UintType, UnLockDevice, UnLockDeviceResponse, UnlockPath, UnlockedPathRequest, UpgradeFileHeader, VerifyMessage, ViewAmount, ViewDetail, ViewRawData, ViewSignLayout, ViewSignPage, ViewTip, ViewTipType, ViewVerifyPage, Vote, WL_OperationType, Wallpaper, WallpaperTarget, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPrivateKey, WriteSEPublicCert, ZoomRequest, bytesToHex, concatUint8Arrays, _default as default, experimental_field, experimental_message, facotry, getErrorMessage, hexToBytes, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, withProtocolTimeout };