@wowok/agent-mcp 2.2.8

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 (62) hide show
  1. package/README.md +56 -0
  2. package/dist/index.d.ts +15800 -0
  3. package/dist/index.js +1479 -0
  4. package/dist/schema/call/allocation.d.ts +1430 -0
  5. package/dist/schema/call/allocation.js +24 -0
  6. package/dist/schema/call/arbitration.d.ts +1974 -0
  7. package/dist/schema/call/arbitration.js +92 -0
  8. package/dist/schema/call/base.d.ts +7325 -0
  9. package/dist/schema/call/base.js +138 -0
  10. package/dist/schema/call/contact.d.ts +970 -0
  11. package/dist/schema/call/contact.js +37 -0
  12. package/dist/schema/call/demand.d.ts +1265 -0
  13. package/dist/schema/call/demand.js +47 -0
  14. package/dist/schema/call/guard.d.ts +951 -0
  15. package/dist/schema/call/guard.js +58 -0
  16. package/dist/schema/call/handler.d.ts +38 -0
  17. package/dist/schema/call/handler.js +171 -0
  18. package/dist/schema/call/index.d.ts +18 -0
  19. package/dist/schema/call/index.js +18 -0
  20. package/dist/schema/call/machine.d.ts +3974 -0
  21. package/dist/schema/call/machine.js +152 -0
  22. package/dist/schema/call/order.d.ts +974 -0
  23. package/dist/schema/call/order.js +34 -0
  24. package/dist/schema/call/payment.d.ts +404 -0
  25. package/dist/schema/call/payment.js +17 -0
  26. package/dist/schema/call/permission.d.ts +3017 -0
  27. package/dist/schema/call/permission.js +105 -0
  28. package/dist/schema/call/personal.d.ts +1472 -0
  29. package/dist/schema/call/personal.js +68 -0
  30. package/dist/schema/call/progress.d.ts +725 -0
  31. package/dist/schema/call/progress.js +26 -0
  32. package/dist/schema/call/proof.d.ts +320 -0
  33. package/dist/schema/call/proof.js +27 -0
  34. package/dist/schema/call/repository.d.ts +2358 -0
  35. package/dist/schema/call/repository.js +76 -0
  36. package/dist/schema/call/reward.d.ts +1232 -0
  37. package/dist/schema/call/reward.js +30 -0
  38. package/dist/schema/call/service.d.ts +3494 -0
  39. package/dist/schema/call/service.js +82 -0
  40. package/dist/schema/call/treasury.d.ts +2345 -0
  41. package/dist/schema/call/treasury.js +71 -0
  42. package/dist/schema/common/index.d.ts +843 -0
  43. package/dist/schema/common/index.js +347 -0
  44. package/dist/schema/index.d.ts +7 -0
  45. package/dist/schema/index.js +7 -0
  46. package/dist/schema/local/index.d.ts +17522 -0
  47. package/dist/schema/local/index.js +855 -0
  48. package/dist/schema/local/wip.d.ts +784 -0
  49. package/dist/schema/local/wip.js +187 -0
  50. package/dist/schema/messenger/index.d.ts +4655 -0
  51. package/dist/schema/messenger/index.js +446 -0
  52. package/dist/schema/query/index.d.ts +73445 -0
  53. package/dist/schema/query/index.js +1324 -0
  54. package/dist/schema/utils/guard-parser.d.ts +20 -0
  55. package/dist/schema/utils/guard-parser.js +401 -0
  56. package/dist/schema/utils/guard-query-utils.d.ts +5 -0
  57. package/dist/schema/utils/guard-query-utils.js +22 -0
  58. package/dist/schema/utils/node-parser.d.ts +45 -0
  59. package/dist/schema/utils/node-parser.js +353 -0
  60. package/dist/schema/utils/permission-index-utils.d.ts +2 -0
  61. package/dist/schema/utils/permission-index-utils.js +7 -0
  62. package/package.json +48 -0
@@ -0,0 +1,4655 @@
1
+ import { z } from "zod";
2
+ export declare const MessageStatusSchema: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
3
+ export declare const MessageDirectionSchema: z.ZodEnum<["sent", "received"]>;
4
+ export declare const MessageTypeSchema: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
5
+ export declare const MessageContentTypeSchema: z.ZodEnum<["text", "zip", "wts", "wip"]>;
6
+ export declare const MessageTimeFieldSchema: z.ZodEnum<["createdAt", "receivedAt", "serverTimestamp"]>;
7
+ export declare const RangeTypeSchema: z.ZodEnum<["time", "messageId", "seqIndex"]>;
8
+ export declare const ZipMetadataSchema: z.ZodObject<{
9
+ fileName: z.ZodString;
10
+ fileSize: z.ZodNumber;
11
+ fileHash: z.ZodString;
12
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
13
+ localCachePath: z.ZodOptional<z.ZodString>;
14
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ fileName: string;
17
+ fileSize: number;
18
+ fileHash: string;
19
+ contentType: "text" | "wip" | "zip" | "wts";
20
+ localCachePath?: string | undefined;
21
+ downloadedAt?: number | undefined;
22
+ }, {
23
+ fileName: string;
24
+ fileSize: number;
25
+ fileHash: string;
26
+ contentType: "text" | "wip" | "zip" | "wts";
27
+ localCachePath?: string | undefined;
28
+ downloadedAt?: number | undefined;
29
+ }>;
30
+ export declare const MessageSchema: z.ZodObject<{
31
+ messageId: z.ZodString;
32
+ fromAddress: z.ZodString;
33
+ toAddress: z.ZodString;
34
+ plaintextHash: z.ZodString;
35
+ plaintext: z.ZodOptional<z.ZodString>;
36
+ guardAddress: z.ZodOptional<z.ZodString>;
37
+ passportAddress: z.ZodOptional<z.ZodString>;
38
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
39
+ direction: z.ZodEnum<["sent", "received"]>;
40
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
41
+ msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
42
+ leafIndex: z.ZodOptional<z.ZodNumber>;
43
+ prevRoot: z.ZodOptional<z.ZodString>;
44
+ newRoot: z.ZodOptional<z.ZodString>;
45
+ serverSignature: z.ZodOptional<z.ZodString>;
46
+ serverTimestamp: z.ZodOptional<z.ZodNumber>;
47
+ serverPublicKey: z.ZodOptional<z.ZodString>;
48
+ arkConfirmed: z.ZodOptional<z.ZodObject<{
49
+ recipient: z.ZodString;
50
+ recipientPublicKey: z.ZodString;
51
+ signature: z.ZodString;
52
+ timestamp: z.ZodNumber;
53
+ }, "strip", z.ZodTypeAny, {
54
+ signature: string;
55
+ recipient: string;
56
+ recipientPublicKey: string;
57
+ timestamp: number;
58
+ }, {
59
+ signature: string;
60
+ recipient: string;
61
+ recipientPublicKey: string;
62
+ timestamp: number;
63
+ }>>;
64
+ createdAt: z.ZodNumber;
65
+ receivedAt: z.ZodOptional<z.ZodNumber>;
66
+ zipMetadata: z.ZodOptional<z.ZodObject<{
67
+ fileName: z.ZodString;
68
+ fileSize: z.ZodNumber;
69
+ fileHash: z.ZodString;
70
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
71
+ localCachePath: z.ZodOptional<z.ZodString>;
72
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ fileName: string;
75
+ fileSize: number;
76
+ fileHash: string;
77
+ contentType: "text" | "wip" | "zip" | "wts";
78
+ localCachePath?: string | undefined;
79
+ downloadedAt?: number | undefined;
80
+ }, {
81
+ fileName: string;
82
+ fileSize: number;
83
+ fileHash: string;
84
+ contentType: "text" | "wip" | "zip" | "wts";
85
+ localCachePath?: string | undefined;
86
+ downloadedAt?: number | undefined;
87
+ }>>;
88
+ proof: z.ZodOptional<z.ZodString>;
89
+ decryptError: z.ZodOptional<z.ZodString>;
90
+ decryptAttempts: z.ZodOptional<z.ZodNumber>;
91
+ lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
92
+ viewedAt: z.ZodOptional<z.ZodNumber>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
95
+ createdAt: number;
96
+ messageId: string;
97
+ fromAddress: string;
98
+ toAddress: string;
99
+ plaintextHash: string;
100
+ direction: "received" | "sent";
101
+ msgType: 1 | 3;
102
+ proof?: string | undefined;
103
+ receivedAt?: number | undefined;
104
+ serverTimestamp?: number | undefined;
105
+ plaintext?: string | undefined;
106
+ guardAddress?: string | undefined;
107
+ passportAddress?: string | undefined;
108
+ lastReceivedLeafIndex?: number | undefined;
109
+ leafIndex?: number | undefined;
110
+ prevRoot?: string | undefined;
111
+ newRoot?: string | undefined;
112
+ serverSignature?: string | undefined;
113
+ serverPublicKey?: string | undefined;
114
+ arkConfirmed?: {
115
+ signature: string;
116
+ recipient: string;
117
+ recipientPublicKey: string;
118
+ timestamp: number;
119
+ } | undefined;
120
+ zipMetadata?: {
121
+ fileName: string;
122
+ fileSize: number;
123
+ fileHash: string;
124
+ contentType: "text" | "wip" | "zip" | "wts";
125
+ localCachePath?: string | undefined;
126
+ downloadedAt?: number | undefined;
127
+ } | undefined;
128
+ decryptError?: string | undefined;
129
+ decryptAttempts?: number | undefined;
130
+ lastDecryptAttemptAt?: number | undefined;
131
+ viewedAt?: number | undefined;
132
+ }, {
133
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
134
+ createdAt: number;
135
+ messageId: string;
136
+ fromAddress: string;
137
+ toAddress: string;
138
+ plaintextHash: string;
139
+ direction: "received" | "sent";
140
+ msgType: 1 | 3;
141
+ proof?: string | undefined;
142
+ receivedAt?: number | undefined;
143
+ serverTimestamp?: number | undefined;
144
+ plaintext?: string | undefined;
145
+ guardAddress?: string | undefined;
146
+ passportAddress?: string | undefined;
147
+ lastReceivedLeafIndex?: number | undefined;
148
+ leafIndex?: number | undefined;
149
+ prevRoot?: string | undefined;
150
+ newRoot?: string | undefined;
151
+ serverSignature?: string | undefined;
152
+ serverPublicKey?: string | undefined;
153
+ arkConfirmed?: {
154
+ signature: string;
155
+ recipient: string;
156
+ recipientPublicKey: string;
157
+ timestamp: number;
158
+ } | undefined;
159
+ zipMetadata?: {
160
+ fileName: string;
161
+ fileSize: number;
162
+ fileHash: string;
163
+ contentType: "text" | "wip" | "zip" | "wts";
164
+ localCachePath?: string | undefined;
165
+ downloadedAt?: number | undefined;
166
+ } | undefined;
167
+ decryptError?: string | undefined;
168
+ decryptAttempts?: number | undefined;
169
+ lastDecryptAttemptAt?: number | undefined;
170
+ viewedAt?: number | undefined;
171
+ }>;
172
+ export declare const ConversationInfoSchema: z.ZodObject<{
173
+ peerAddress: z.ZodString;
174
+ lastMessageAt: z.ZodNumber;
175
+ messageCount: z.ZodNumber;
176
+ unreadCount: z.ZodNumber;
177
+ lastMessagePreview: z.ZodOptional<z.ZodString>;
178
+ previewMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
179
+ messageId: z.ZodString;
180
+ fromAddress: z.ZodString;
181
+ toAddress: z.ZodString;
182
+ plaintextHash: z.ZodString;
183
+ plaintext: z.ZodOptional<z.ZodString>;
184
+ guardAddress: z.ZodOptional<z.ZodString>;
185
+ passportAddress: z.ZodOptional<z.ZodString>;
186
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
187
+ direction: z.ZodEnum<["sent", "received"]>;
188
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
189
+ msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
190
+ leafIndex: z.ZodOptional<z.ZodNumber>;
191
+ prevRoot: z.ZodOptional<z.ZodString>;
192
+ newRoot: z.ZodOptional<z.ZodString>;
193
+ serverSignature: z.ZodOptional<z.ZodString>;
194
+ serverTimestamp: z.ZodOptional<z.ZodNumber>;
195
+ serverPublicKey: z.ZodOptional<z.ZodString>;
196
+ arkConfirmed: z.ZodOptional<z.ZodObject<{
197
+ recipient: z.ZodString;
198
+ recipientPublicKey: z.ZodString;
199
+ signature: z.ZodString;
200
+ timestamp: z.ZodNumber;
201
+ }, "strip", z.ZodTypeAny, {
202
+ signature: string;
203
+ recipient: string;
204
+ recipientPublicKey: string;
205
+ timestamp: number;
206
+ }, {
207
+ signature: string;
208
+ recipient: string;
209
+ recipientPublicKey: string;
210
+ timestamp: number;
211
+ }>>;
212
+ createdAt: z.ZodNumber;
213
+ receivedAt: z.ZodOptional<z.ZodNumber>;
214
+ zipMetadata: z.ZodOptional<z.ZodObject<{
215
+ fileName: z.ZodString;
216
+ fileSize: z.ZodNumber;
217
+ fileHash: z.ZodString;
218
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
219
+ localCachePath: z.ZodOptional<z.ZodString>;
220
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ fileName: string;
223
+ fileSize: number;
224
+ fileHash: string;
225
+ contentType: "text" | "wip" | "zip" | "wts";
226
+ localCachePath?: string | undefined;
227
+ downloadedAt?: number | undefined;
228
+ }, {
229
+ fileName: string;
230
+ fileSize: number;
231
+ fileHash: string;
232
+ contentType: "text" | "wip" | "zip" | "wts";
233
+ localCachePath?: string | undefined;
234
+ downloadedAt?: number | undefined;
235
+ }>>;
236
+ proof: z.ZodOptional<z.ZodString>;
237
+ decryptError: z.ZodOptional<z.ZodString>;
238
+ decryptAttempts: z.ZodOptional<z.ZodNumber>;
239
+ lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
240
+ viewedAt: z.ZodOptional<z.ZodNumber>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
243
+ createdAt: number;
244
+ messageId: string;
245
+ fromAddress: string;
246
+ toAddress: string;
247
+ plaintextHash: string;
248
+ direction: "received" | "sent";
249
+ msgType: 1 | 3;
250
+ proof?: string | undefined;
251
+ receivedAt?: number | undefined;
252
+ serverTimestamp?: number | undefined;
253
+ plaintext?: string | undefined;
254
+ guardAddress?: string | undefined;
255
+ passportAddress?: string | undefined;
256
+ lastReceivedLeafIndex?: number | undefined;
257
+ leafIndex?: number | undefined;
258
+ prevRoot?: string | undefined;
259
+ newRoot?: string | undefined;
260
+ serverSignature?: string | undefined;
261
+ serverPublicKey?: string | undefined;
262
+ arkConfirmed?: {
263
+ signature: string;
264
+ recipient: string;
265
+ recipientPublicKey: string;
266
+ timestamp: number;
267
+ } | undefined;
268
+ zipMetadata?: {
269
+ fileName: string;
270
+ fileSize: number;
271
+ fileHash: string;
272
+ contentType: "text" | "wip" | "zip" | "wts";
273
+ localCachePath?: string | undefined;
274
+ downloadedAt?: number | undefined;
275
+ } | undefined;
276
+ decryptError?: string | undefined;
277
+ decryptAttempts?: number | undefined;
278
+ lastDecryptAttemptAt?: number | undefined;
279
+ viewedAt?: number | undefined;
280
+ }, {
281
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
282
+ createdAt: number;
283
+ messageId: string;
284
+ fromAddress: string;
285
+ toAddress: string;
286
+ plaintextHash: string;
287
+ direction: "received" | "sent";
288
+ msgType: 1 | 3;
289
+ proof?: string | undefined;
290
+ receivedAt?: number | undefined;
291
+ serverTimestamp?: number | undefined;
292
+ plaintext?: string | undefined;
293
+ guardAddress?: string | undefined;
294
+ passportAddress?: string | undefined;
295
+ lastReceivedLeafIndex?: number | undefined;
296
+ leafIndex?: number | undefined;
297
+ prevRoot?: string | undefined;
298
+ newRoot?: string | undefined;
299
+ serverSignature?: string | undefined;
300
+ serverPublicKey?: string | undefined;
301
+ arkConfirmed?: {
302
+ signature: string;
303
+ recipient: string;
304
+ recipientPublicKey: string;
305
+ timestamp: number;
306
+ } | undefined;
307
+ zipMetadata?: {
308
+ fileName: string;
309
+ fileSize: number;
310
+ fileHash: string;
311
+ contentType: "text" | "wip" | "zip" | "wts";
312
+ localCachePath?: string | undefined;
313
+ downloadedAt?: number | undefined;
314
+ } | undefined;
315
+ decryptError?: string | undefined;
316
+ decryptAttempts?: number | undefined;
317
+ lastDecryptAttemptAt?: number | undefined;
318
+ viewedAt?: number | undefined;
319
+ }>, "many">>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ peerAddress: string;
322
+ lastMessageAt: number;
323
+ messageCount: number;
324
+ unreadCount: number;
325
+ lastMessagePreview?: string | undefined;
326
+ previewMessages?: {
327
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
328
+ createdAt: number;
329
+ messageId: string;
330
+ fromAddress: string;
331
+ toAddress: string;
332
+ plaintextHash: string;
333
+ direction: "received" | "sent";
334
+ msgType: 1 | 3;
335
+ proof?: string | undefined;
336
+ receivedAt?: number | undefined;
337
+ serverTimestamp?: number | undefined;
338
+ plaintext?: string | undefined;
339
+ guardAddress?: string | undefined;
340
+ passportAddress?: string | undefined;
341
+ lastReceivedLeafIndex?: number | undefined;
342
+ leafIndex?: number | undefined;
343
+ prevRoot?: string | undefined;
344
+ newRoot?: string | undefined;
345
+ serverSignature?: string | undefined;
346
+ serverPublicKey?: string | undefined;
347
+ arkConfirmed?: {
348
+ signature: string;
349
+ recipient: string;
350
+ recipientPublicKey: string;
351
+ timestamp: number;
352
+ } | undefined;
353
+ zipMetadata?: {
354
+ fileName: string;
355
+ fileSize: number;
356
+ fileHash: string;
357
+ contentType: "text" | "wip" | "zip" | "wts";
358
+ localCachePath?: string | undefined;
359
+ downloadedAt?: number | undefined;
360
+ } | undefined;
361
+ decryptError?: string | undefined;
362
+ decryptAttempts?: number | undefined;
363
+ lastDecryptAttemptAt?: number | undefined;
364
+ viewedAt?: number | undefined;
365
+ }[] | undefined;
366
+ }, {
367
+ peerAddress: string;
368
+ lastMessageAt: number;
369
+ messageCount: number;
370
+ unreadCount: number;
371
+ lastMessagePreview?: string | undefined;
372
+ previewMessages?: {
373
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
374
+ createdAt: number;
375
+ messageId: string;
376
+ fromAddress: string;
377
+ toAddress: string;
378
+ plaintextHash: string;
379
+ direction: "received" | "sent";
380
+ msgType: 1 | 3;
381
+ proof?: string | undefined;
382
+ receivedAt?: number | undefined;
383
+ serverTimestamp?: number | undefined;
384
+ plaintext?: string | undefined;
385
+ guardAddress?: string | undefined;
386
+ passportAddress?: string | undefined;
387
+ lastReceivedLeafIndex?: number | undefined;
388
+ leafIndex?: number | undefined;
389
+ prevRoot?: string | undefined;
390
+ newRoot?: string | undefined;
391
+ serverSignature?: string | undefined;
392
+ serverPublicKey?: string | undefined;
393
+ arkConfirmed?: {
394
+ signature: string;
395
+ recipient: string;
396
+ recipientPublicKey: string;
397
+ timestamp: number;
398
+ } | undefined;
399
+ zipMetadata?: {
400
+ fileName: string;
401
+ fileSize: number;
402
+ fileHash: string;
403
+ contentType: "text" | "wip" | "zip" | "wts";
404
+ localCachePath?: string | undefined;
405
+ downloadedAt?: number | undefined;
406
+ } | undefined;
407
+ decryptError?: string | undefined;
408
+ decryptAttempts?: number | undefined;
409
+ lastDecryptAttemptAt?: number | undefined;
410
+ viewedAt?: number | undefined;
411
+ }[] | undefined;
412
+ }>;
413
+ export declare const ConversationsFilterSchema: z.ZodObject<{
414
+ account: z.ZodOptional<z.ZodString>;
415
+ unreadOnly: z.ZodOptional<z.ZodBoolean>;
416
+ startTime: z.ZodOptional<z.ZodNumber>;
417
+ endTime: z.ZodOptional<z.ZodNumber>;
418
+ previewMessageCount: z.ZodOptional<z.ZodNumber>;
419
+ sortBy: z.ZodOptional<z.ZodEnum<["lastMessageAt", "unreadCount", "messageCount"]>>;
420
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
421
+ skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ account?: string | undefined;
424
+ unreadOnly?: boolean | undefined;
425
+ startTime?: number | undefined;
426
+ endTime?: number | undefined;
427
+ previewMessageCount?: number | undefined;
428
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
429
+ sortOrder?: "asc" | "desc" | undefined;
430
+ skipAutoMarkViewed?: boolean | undefined;
431
+ }, {
432
+ account?: string | undefined;
433
+ unreadOnly?: boolean | undefined;
434
+ startTime?: number | undefined;
435
+ endTime?: number | undefined;
436
+ previewMessageCount?: number | undefined;
437
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
438
+ sortOrder?: "asc" | "desc" | undefined;
439
+ skipAutoMarkViewed?: boolean | undefined;
440
+ }>;
441
+ export declare const MessageFilterSchema: z.ZodObject<{
442
+ account: z.ZodOptional<z.ZodString>;
443
+ direction: z.ZodOptional<z.ZodEnum<["sent", "received"]>>;
444
+ status: z.ZodOptional<z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>>;
445
+ peerAddress: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
446
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
447
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
448
+ }, "strict", z.ZodTypeAny, {
449
+ name_or_address?: string | undefined;
450
+ local_mark_first?: boolean | undefined;
451
+ }, {
452
+ name_or_address?: string | undefined;
453
+ local_mark_first?: boolean | undefined;
454
+ }>]>>;
455
+ msgType: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>>;
456
+ contentType: z.ZodOptional<z.ZodEnum<["text", "zip", "wts", "wip"]>>;
457
+ decryptedOnly: z.ZodOptional<z.ZodBoolean>;
458
+ confirmedOnly: z.ZodOptional<z.ZodBoolean>;
459
+ keyword: z.ZodOptional<z.ZodString>;
460
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
461
+ limit: z.ZodOptional<z.ZodNumber>;
462
+ offset: z.ZodOptional<z.ZodNumber>;
463
+ timeField: z.ZodOptional<z.ZodEnum<["createdAt", "receivedAt", "serverTimestamp"]>>;
464
+ startTime: z.ZodOptional<z.ZodNumber>;
465
+ endTime: z.ZodOptional<z.ZodNumber>;
466
+ createdAtStart: z.ZodOptional<z.ZodNumber>;
467
+ createdAtEnd: z.ZodOptional<z.ZodNumber>;
468
+ receivedAtStart: z.ZodOptional<z.ZodNumber>;
469
+ receivedAtEnd: z.ZodOptional<z.ZodNumber>;
470
+ serverTimestampStart: z.ZodOptional<z.ZodNumber>;
471
+ serverTimestampEnd: z.ZodOptional<z.ZodNumber>;
472
+ arkConfirmedOnly: z.ZodOptional<z.ZodBoolean>;
473
+ arkTimestampStart: z.ZodOptional<z.ZodNumber>;
474
+ arkTimestampEnd: z.ZodOptional<z.ZodNumber>;
475
+ proofedOnly: z.ZodOptional<z.ZodBoolean>;
476
+ hasLastReceivedIndexOnly: z.ZodOptional<z.ZodBoolean>;
477
+ lastReceivedIndexMin: z.ZodOptional<z.ZodNumber>;
478
+ lastReceivedIndexMax: z.ZodOptional<z.ZodNumber>;
479
+ listFilterMode: z.ZodOptional<z.ZodEnum<["friends", "guard", "stranger", "any"]>>;
480
+ customListFilter: z.ZodOptional<z.ZodObject<{
481
+ includeAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
482
+ excludeAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
483
+ relation: z.ZodOptional<z.ZodEnum<["union", "intersection"]>>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ includeAddresses?: string[] | undefined;
486
+ excludeAddresses?: string[] | undefined;
487
+ relation?: "union" | "intersection" | undefined;
488
+ }, {
489
+ includeAddresses?: string[] | undefined;
490
+ excludeAddresses?: string[] | undefined;
491
+ relation?: "union" | "intersection" | undefined;
492
+ }>>;
493
+ viewed: z.ZodOptional<z.ZodBoolean>;
494
+ viewedAtStart: z.ZodOptional<z.ZodNumber>;
495
+ viewedAtEnd: z.ZodOptional<z.ZodNumber>;
496
+ skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
497
+ }, "strip", z.ZodTypeAny, {
498
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
499
+ limit?: number | undefined;
500
+ account?: string | undefined;
501
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
502
+ direction?: "received" | "sent" | undefined;
503
+ msgType?: 1 | 3 | undefined;
504
+ peerAddress?: string | {
505
+ name_or_address?: string | undefined;
506
+ local_mark_first?: boolean | undefined;
507
+ } | undefined;
508
+ startTime?: number | undefined;
509
+ endTime?: number | undefined;
510
+ sortOrder?: "asc" | "desc" | undefined;
511
+ skipAutoMarkViewed?: boolean | undefined;
512
+ decryptedOnly?: boolean | undefined;
513
+ confirmedOnly?: boolean | undefined;
514
+ keyword?: string | undefined;
515
+ offset?: number | undefined;
516
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
517
+ createdAtStart?: number | undefined;
518
+ createdAtEnd?: number | undefined;
519
+ receivedAtStart?: number | undefined;
520
+ receivedAtEnd?: number | undefined;
521
+ serverTimestampStart?: number | undefined;
522
+ serverTimestampEnd?: number | undefined;
523
+ arkConfirmedOnly?: boolean | undefined;
524
+ arkTimestampStart?: number | undefined;
525
+ arkTimestampEnd?: number | undefined;
526
+ proofedOnly?: boolean | undefined;
527
+ hasLastReceivedIndexOnly?: boolean | undefined;
528
+ lastReceivedIndexMin?: number | undefined;
529
+ lastReceivedIndexMax?: number | undefined;
530
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
531
+ customListFilter?: {
532
+ includeAddresses?: string[] | undefined;
533
+ excludeAddresses?: string[] | undefined;
534
+ relation?: "union" | "intersection" | undefined;
535
+ } | undefined;
536
+ viewed?: boolean | undefined;
537
+ viewedAtStart?: number | undefined;
538
+ viewedAtEnd?: number | undefined;
539
+ }, {
540
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
541
+ limit?: number | undefined;
542
+ account?: string | undefined;
543
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
544
+ direction?: "received" | "sent" | undefined;
545
+ msgType?: 1 | 3 | undefined;
546
+ peerAddress?: string | {
547
+ name_or_address?: string | undefined;
548
+ local_mark_first?: boolean | undefined;
549
+ } | undefined;
550
+ startTime?: number | undefined;
551
+ endTime?: number | undefined;
552
+ sortOrder?: "asc" | "desc" | undefined;
553
+ skipAutoMarkViewed?: boolean | undefined;
554
+ decryptedOnly?: boolean | undefined;
555
+ confirmedOnly?: boolean | undefined;
556
+ keyword?: string | undefined;
557
+ offset?: number | undefined;
558
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
559
+ createdAtStart?: number | undefined;
560
+ createdAtEnd?: number | undefined;
561
+ receivedAtStart?: number | undefined;
562
+ receivedAtEnd?: number | undefined;
563
+ serverTimestampStart?: number | undefined;
564
+ serverTimestampEnd?: number | undefined;
565
+ arkConfirmedOnly?: boolean | undefined;
566
+ arkTimestampStart?: number | undefined;
567
+ arkTimestampEnd?: number | undefined;
568
+ proofedOnly?: boolean | undefined;
569
+ hasLastReceivedIndexOnly?: boolean | undefined;
570
+ lastReceivedIndexMin?: number | undefined;
571
+ lastReceivedIndexMax?: number | undefined;
572
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
573
+ customListFilter?: {
574
+ includeAddresses?: string[] | undefined;
575
+ excludeAddresses?: string[] | undefined;
576
+ relation?: "union" | "intersection" | undefined;
577
+ } | undefined;
578
+ viewed?: boolean | undefined;
579
+ viewedAtStart?: number | undefined;
580
+ viewedAtEnd?: number | undefined;
581
+ }>;
582
+ export declare const SendMessageOptionsSchema: z.ZodObject<{
583
+ guardAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
584
+ passportAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
585
+ force: z.ZodOptional<z.ZodBoolean>;
586
+ new_messenger_name: z.ZodOptional<z.ZodString>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ guardAddress?: string | undefined;
589
+ passportAddress?: string | undefined;
590
+ force?: boolean | undefined;
591
+ new_messenger_name?: string | undefined;
592
+ }, {
593
+ guardAddress?: string | undefined;
594
+ passportAddress?: string | undefined;
595
+ force?: boolean | undefined;
596
+ new_messenger_name?: string | undefined;
597
+ }>;
598
+ export declare const SendFileOptionsSchema: z.ZodObject<{
599
+ fileName: z.ZodOptional<z.ZodString>;
600
+ contentType: z.ZodOptional<z.ZodEnum<["wts", "wip", "zip"]>>;
601
+ guardAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
602
+ passportAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
603
+ force: z.ZodOptional<z.ZodBoolean>;
604
+ new_messenger_name: z.ZodOptional<z.ZodString>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ fileName?: string | undefined;
607
+ contentType?: "wip" | "zip" | "wts" | undefined;
608
+ guardAddress?: string | undefined;
609
+ passportAddress?: string | undefined;
610
+ force?: boolean | undefined;
611
+ new_messenger_name?: string | undefined;
612
+ }, {
613
+ fileName?: string | undefined;
614
+ contentType?: "wip" | "zip" | "wts" | undefined;
615
+ guardAddress?: string | undefined;
616
+ passportAddress?: string | undefined;
617
+ force?: boolean | undefined;
618
+ new_messenger_name?: string | undefined;
619
+ }>;
620
+ export declare const SendMessageResultSchema: z.ZodObject<{
621
+ messageId: z.ZodString;
622
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
623
+ merkleData: z.ZodOptional<z.ZodObject<{
624
+ leafIndex: z.ZodNumber;
625
+ prevRoot: z.ZodString;
626
+ newRoot: z.ZodString;
627
+ serverSignature: z.ZodString;
628
+ serverTimestamp: z.ZodNumber;
629
+ serverPublicKey: z.ZodString;
630
+ }, "strip", z.ZodTypeAny, {
631
+ serverTimestamp: number;
632
+ leafIndex: number;
633
+ prevRoot: string;
634
+ newRoot: string;
635
+ serverSignature: string;
636
+ serverPublicKey: string;
637
+ }, {
638
+ serverTimestamp: number;
639
+ leafIndex: number;
640
+ prevRoot: string;
641
+ newRoot: string;
642
+ serverSignature: string;
643
+ serverPublicKey: string;
644
+ }>>;
645
+ guardList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
646
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
649
+ messageId: string;
650
+ lastReceivedLeafIndex?: number | undefined;
651
+ merkleData?: {
652
+ serverTimestamp: number;
653
+ leafIndex: number;
654
+ prevRoot: string;
655
+ newRoot: string;
656
+ serverSignature: string;
657
+ serverPublicKey: string;
658
+ } | undefined;
659
+ guardList?: string[] | undefined;
660
+ }, {
661
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
662
+ messageId: string;
663
+ lastReceivedLeafIndex?: number | undefined;
664
+ merkleData?: {
665
+ serverTimestamp: number;
666
+ leafIndex: number;
667
+ prevRoot: string;
668
+ newRoot: string;
669
+ serverSignature: string;
670
+ serverPublicKey: string;
671
+ } | undefined;
672
+ guardList?: string[] | undefined;
673
+ }>;
674
+ export declare const TimeRangeSchema: z.ZodObject<{} & {
675
+ type: z.ZodLiteral<"time">;
676
+ start: z.ZodNumber;
677
+ end: z.ZodNumber;
678
+ }, "strip", z.ZodTypeAny, {
679
+ type: "time";
680
+ start: number;
681
+ end: number;
682
+ }, {
683
+ type: "time";
684
+ start: number;
685
+ end: number;
686
+ }>;
687
+ export declare const MessageIdRangeSchema: z.ZodObject<{} & {
688
+ type: z.ZodLiteral<"messageId">;
689
+ start: z.ZodString;
690
+ end: z.ZodString;
691
+ }, "strip", z.ZodTypeAny, {
692
+ type: "messageId";
693
+ start: string;
694
+ end: string;
695
+ }, {
696
+ type: "messageId";
697
+ start: string;
698
+ end: string;
699
+ }>;
700
+ export declare const SeqIndexRangeSchema: z.ZodObject<{} & {
701
+ type: z.ZodLiteral<"seqIndex">;
702
+ start: z.ZodNumber;
703
+ end: z.ZodNumber;
704
+ }, "strip", z.ZodTypeAny, {
705
+ type: "seqIndex";
706
+ start: number;
707
+ end: number;
708
+ }, {
709
+ type: "seqIndex";
710
+ start: number;
711
+ end: number;
712
+ }>;
713
+ export declare const WtsRangeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{} & {
714
+ type: z.ZodLiteral<"time">;
715
+ start: z.ZodNumber;
716
+ end: z.ZodNumber;
717
+ }, "strip", z.ZodTypeAny, {
718
+ type: "time";
719
+ start: number;
720
+ end: number;
721
+ }, {
722
+ type: "time";
723
+ start: number;
724
+ end: number;
725
+ }>, z.ZodObject<{} & {
726
+ type: z.ZodLiteral<"messageId">;
727
+ start: z.ZodString;
728
+ end: z.ZodString;
729
+ }, "strip", z.ZodTypeAny, {
730
+ type: "messageId";
731
+ start: string;
732
+ end: string;
733
+ }, {
734
+ type: "messageId";
735
+ start: string;
736
+ end: string;
737
+ }>, z.ZodObject<{} & {
738
+ type: z.ZodLiteral<"seqIndex">;
739
+ start: z.ZodNumber;
740
+ end: z.ZodNumber;
741
+ }, "strip", z.ZodTypeAny, {
742
+ type: "seqIndex";
743
+ start: number;
744
+ end: number;
745
+ }, {
746
+ type: "seqIndex";
747
+ start: number;
748
+ end: number;
749
+ }>]>;
750
+ export declare const WtsGenerationParamsSchema: z.ZodObject<{
751
+ myAccount: z.ZodEffects<z.ZodString, string, string>;
752
+ peerAccount: z.ZodUnion<[z.ZodString, z.ZodObject<{
753
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
754
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
755
+ }, "strict", z.ZodTypeAny, {
756
+ name_or_address?: string | undefined;
757
+ local_mark_first?: boolean | undefined;
758
+ }, {
759
+ name_or_address?: string | undefined;
760
+ local_mark_first?: boolean | undefined;
761
+ }>]>;
762
+ range: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{} & {
763
+ type: z.ZodLiteral<"time">;
764
+ start: z.ZodNumber;
765
+ end: z.ZodNumber;
766
+ }, "strip", z.ZodTypeAny, {
767
+ type: "time";
768
+ start: number;
769
+ end: number;
770
+ }, {
771
+ type: "time";
772
+ start: number;
773
+ end: number;
774
+ }>, z.ZodObject<{} & {
775
+ type: z.ZodLiteral<"messageId">;
776
+ start: z.ZodString;
777
+ end: z.ZodString;
778
+ }, "strip", z.ZodTypeAny, {
779
+ type: "messageId";
780
+ start: string;
781
+ end: string;
782
+ }, {
783
+ type: "messageId";
784
+ start: string;
785
+ end: string;
786
+ }>, z.ZodObject<{} & {
787
+ type: z.ZodLiteral<"seqIndex">;
788
+ start: z.ZodNumber;
789
+ end: z.ZodNumber;
790
+ }, "strip", z.ZodTypeAny, {
791
+ type: "seqIndex";
792
+ start: number;
793
+ end: number;
794
+ }, {
795
+ type: "seqIndex";
796
+ start: number;
797
+ end: number;
798
+ }>]>>;
799
+ excludePlaintext: z.ZodOptional<z.ZodBoolean>;
800
+ outputDir: z.ZodString;
801
+ }, "strip", z.ZodTypeAny, {
802
+ myAccount: string;
803
+ peerAccount: string | {
804
+ name_or_address?: string | undefined;
805
+ local_mark_first?: boolean | undefined;
806
+ };
807
+ outputDir: string;
808
+ range?: {
809
+ type: "time";
810
+ start: number;
811
+ end: number;
812
+ } | {
813
+ type: "messageId";
814
+ start: string;
815
+ end: string;
816
+ } | {
817
+ type: "seqIndex";
818
+ start: number;
819
+ end: number;
820
+ } | undefined;
821
+ excludePlaintext?: boolean | undefined;
822
+ }, {
823
+ myAccount: string;
824
+ peerAccount: string | {
825
+ name_or_address?: string | undefined;
826
+ local_mark_first?: boolean | undefined;
827
+ };
828
+ outputDir: string;
829
+ range?: {
830
+ type: "time";
831
+ start: number;
832
+ end: number;
833
+ } | {
834
+ type: "messageId";
835
+ start: string;
836
+ end: string;
837
+ } | {
838
+ type: "seqIndex";
839
+ start: number;
840
+ end: number;
841
+ } | undefined;
842
+ excludePlaintext?: boolean | undefined;
843
+ }>;
844
+ export declare const WtsFileResultSchema: z.ZodObject<{
845
+ files: z.ZodArray<z.ZodString, "many">;
846
+ totalMessageCount: z.ZodNumber;
847
+ timeRange: z.ZodObject<{
848
+ start: z.ZodNumber;
849
+ end: z.ZodNumber;
850
+ }, "strip", z.ZodTypeAny, {
851
+ start: number;
852
+ end: number;
853
+ }, {
854
+ start: number;
855
+ end: number;
856
+ }>;
857
+ }, "strip", z.ZodTypeAny, {
858
+ files: string[];
859
+ totalMessageCount: number;
860
+ timeRange: {
861
+ start: number;
862
+ end: number;
863
+ };
864
+ }, {
865
+ files: string[];
866
+ totalMessageCount: number;
867
+ timeRange: {
868
+ start: number;
869
+ end: number;
870
+ };
871
+ }>;
872
+ export declare const WtsSignatureVerificationSchema: z.ZodObject<{
873
+ publicKey: z.ZodString;
874
+ address: z.ZodOptional<z.ZodString>;
875
+ valid: z.ZodBoolean;
876
+ }, "strip", z.ZodTypeAny, {
877
+ valid: boolean;
878
+ publicKey: string;
879
+ address?: string | undefined;
880
+ }, {
881
+ valid: boolean;
882
+ publicKey: string;
883
+ address?: string | undefined;
884
+ }>;
885
+ export declare const WtsVerificationResultSchema: z.ZodObject<{
886
+ valid: z.ZodBoolean;
887
+ error: z.ZodOptional<z.ZodString>;
888
+ hashValid: z.ZodOptional<z.ZodBoolean>;
889
+ hasSignature: z.ZodOptional<z.ZodBoolean>;
890
+ signatureValid: z.ZodOptional<z.ZodBoolean>;
891
+ signatures: z.ZodOptional<z.ZodArray<z.ZodObject<{
892
+ publicKey: z.ZodString;
893
+ address: z.ZodOptional<z.ZodString>;
894
+ valid: z.ZodBoolean;
895
+ }, "strip", z.ZodTypeAny, {
896
+ valid: boolean;
897
+ publicKey: string;
898
+ address?: string | undefined;
899
+ }, {
900
+ valid: boolean;
901
+ publicKey: string;
902
+ address?: string | undefined;
903
+ }>, "many">>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ valid: boolean;
906
+ error?: string | undefined;
907
+ hashValid?: boolean | undefined;
908
+ signatureValid?: boolean | undefined;
909
+ hasSignature?: boolean | undefined;
910
+ signatures?: {
911
+ valid: boolean;
912
+ publicKey: string;
913
+ address?: string | undefined;
914
+ }[] | undefined;
915
+ }, {
916
+ valid: boolean;
917
+ error?: string | undefined;
918
+ hashValid?: boolean | undefined;
919
+ signatureValid?: boolean | undefined;
920
+ hasSignature?: boolean | undefined;
921
+ signatures?: {
922
+ valid: boolean;
923
+ publicKey: string;
924
+ address?: string | undefined;
925
+ }[] | undefined;
926
+ }>;
927
+ export declare const WtsToHtmlOptionsSchema: z.ZodObject<{
928
+ title: z.ZodOptional<z.ZodString>;
929
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
930
+ outputPath: z.ZodOptional<z.ZodString>;
931
+ }, "strip", z.ZodTypeAny, {
932
+ title?: string | undefined;
933
+ theme?: "light" | "dark" | undefined;
934
+ outputPath?: string | undefined;
935
+ }, {
936
+ title?: string | undefined;
937
+ theme?: "light" | "dark" | undefined;
938
+ outputPath?: string | undefined;
939
+ }>;
940
+ export declare const AddressExistenceSchema: z.ZodObject<{
941
+ address: z.ZodString;
942
+ exists: z.ZodBoolean;
943
+ }, "strip", z.ZodTypeAny, {
944
+ address: string;
945
+ exists: boolean;
946
+ }, {
947
+ address: string;
948
+ exists: boolean;
949
+ }>;
950
+ export declare const GuardListItemSchema: z.ZodObject<{
951
+ guardAddress: z.ZodString;
952
+ passportValiditySeconds: z.ZodNumber;
953
+ }, "strip", z.ZodTypeAny, {
954
+ guardAddress: string;
955
+ passportValiditySeconds: number;
956
+ }, {
957
+ guardAddress: string;
958
+ passportValiditySeconds: number;
959
+ }>;
960
+ export declare const ListOperationResponseSchema: z.ZodObject<{
961
+ success: z.ZodBoolean;
962
+ operation: z.ZodString;
963
+ modifiedCount: z.ZodNumber;
964
+ currentCount: z.ZodNumber;
965
+ maxCount: z.ZodNumber;
966
+ invalidAddresses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
967
+ existResults: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
968
+ address: z.ZodString;
969
+ exists: z.ZodBoolean;
970
+ }, "strip", z.ZodTypeAny, {
971
+ address: string;
972
+ exists: boolean;
973
+ }, {
974
+ address: string;
975
+ exists: boolean;
976
+ }>, "many">>>;
977
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
978
+ currentList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
979
+ currentGuardList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
980
+ guardAddress: z.ZodString;
981
+ passportValiditySeconds: z.ZodNumber;
982
+ }, "strip", z.ZodTypeAny, {
983
+ guardAddress: string;
984
+ passportValiditySeconds: number;
985
+ }, {
986
+ guardAddress: string;
987
+ passportValiditySeconds: number;
988
+ }>, "many">>>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ success: boolean;
991
+ operation: string;
992
+ modifiedCount: number;
993
+ currentCount: number;
994
+ maxCount: number;
995
+ message?: string | null | undefined;
996
+ invalidAddresses?: string[] | null | undefined;
997
+ existResults?: {
998
+ address: string;
999
+ exists: boolean;
1000
+ }[] | null | undefined;
1001
+ currentList?: string[] | null | undefined;
1002
+ currentGuardList?: {
1003
+ guardAddress: string;
1004
+ passportValiditySeconds: number;
1005
+ }[] | null | undefined;
1006
+ }, {
1007
+ success: boolean;
1008
+ operation: string;
1009
+ modifiedCount: number;
1010
+ currentCount: number;
1011
+ maxCount: number;
1012
+ message?: string | null | undefined;
1013
+ invalidAddresses?: string[] | null | undefined;
1014
+ existResults?: {
1015
+ address: string;
1016
+ exists: boolean;
1017
+ }[] | null | undefined;
1018
+ currentList?: string[] | null | undefined;
1019
+ currentGuardList?: {
1020
+ guardAddress: string;
1021
+ passportValiditySeconds: number;
1022
+ }[] | null | undefined;
1023
+ }>;
1024
+ export declare const BlacklistOperationSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1025
+ op: z.ZodLiteral<"add">;
1026
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1027
+ entities: z.ZodArray<z.ZodObject<{
1028
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1029
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1030
+ }, "strict", z.ZodTypeAny, {
1031
+ name_or_address?: string | undefined;
1032
+ local_mark_first?: boolean | undefined;
1033
+ }, {
1034
+ name_or_address?: string | undefined;
1035
+ local_mark_first?: boolean | undefined;
1036
+ }>, "many">;
1037
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1038
+ }, "strict", z.ZodTypeAny, {
1039
+ entities: {
1040
+ name_or_address?: string | undefined;
1041
+ local_mark_first?: boolean | undefined;
1042
+ }[];
1043
+ check_all_founded?: boolean | undefined;
1044
+ }, {
1045
+ entities: {
1046
+ name_or_address?: string | undefined;
1047
+ local_mark_first?: boolean | undefined;
1048
+ }[];
1049
+ check_all_founded?: boolean | undefined;
1050
+ }>]>;
1051
+ }, "strip", z.ZodTypeAny, {
1052
+ op: "add";
1053
+ users: {
1054
+ entities: {
1055
+ name_or_address?: string | undefined;
1056
+ local_mark_first?: boolean | undefined;
1057
+ }[];
1058
+ check_all_founded?: boolean | undefined;
1059
+ } | string[];
1060
+ }, {
1061
+ op: "add";
1062
+ users: {
1063
+ entities: {
1064
+ name_or_address?: string | undefined;
1065
+ local_mark_first?: boolean | undefined;
1066
+ }[];
1067
+ check_all_founded?: boolean | undefined;
1068
+ } | string[];
1069
+ }>, z.ZodObject<{
1070
+ op: z.ZodLiteral<"remove">;
1071
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1072
+ entities: z.ZodArray<z.ZodObject<{
1073
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1074
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1075
+ }, "strict", z.ZodTypeAny, {
1076
+ name_or_address?: string | undefined;
1077
+ local_mark_first?: boolean | undefined;
1078
+ }, {
1079
+ name_or_address?: string | undefined;
1080
+ local_mark_first?: boolean | undefined;
1081
+ }>, "many">;
1082
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1083
+ }, "strict", z.ZodTypeAny, {
1084
+ entities: {
1085
+ name_or_address?: string | undefined;
1086
+ local_mark_first?: boolean | undefined;
1087
+ }[];
1088
+ check_all_founded?: boolean | undefined;
1089
+ }, {
1090
+ entities: {
1091
+ name_or_address?: string | undefined;
1092
+ local_mark_first?: boolean | undefined;
1093
+ }[];
1094
+ check_all_founded?: boolean | undefined;
1095
+ }>]>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ op: "remove";
1098
+ users: {
1099
+ entities: {
1100
+ name_or_address?: string | undefined;
1101
+ local_mark_first?: boolean | undefined;
1102
+ }[];
1103
+ check_all_founded?: boolean | undefined;
1104
+ } | string[];
1105
+ }, {
1106
+ op: "remove";
1107
+ users: {
1108
+ entities: {
1109
+ name_or_address?: string | undefined;
1110
+ local_mark_first?: boolean | undefined;
1111
+ }[];
1112
+ check_all_founded?: boolean | undefined;
1113
+ } | string[];
1114
+ }>, z.ZodObject<{
1115
+ op: z.ZodLiteral<"clear">;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ op: "clear";
1118
+ }, {
1119
+ op: "clear";
1120
+ }>, z.ZodObject<{
1121
+ op: z.ZodLiteral<"get">;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ op: "get";
1124
+ }, {
1125
+ op: "get";
1126
+ }>, z.ZodObject<{
1127
+ op: z.ZodLiteral<"exist">;
1128
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1129
+ entities: z.ZodArray<z.ZodObject<{
1130
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1131
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1132
+ }, "strict", z.ZodTypeAny, {
1133
+ name_or_address?: string | undefined;
1134
+ local_mark_first?: boolean | undefined;
1135
+ }, {
1136
+ name_or_address?: string | undefined;
1137
+ local_mark_first?: boolean | undefined;
1138
+ }>, "many">;
1139
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1140
+ }, "strict", z.ZodTypeAny, {
1141
+ entities: {
1142
+ name_or_address?: string | undefined;
1143
+ local_mark_first?: boolean | undefined;
1144
+ }[];
1145
+ check_all_founded?: boolean | undefined;
1146
+ }, {
1147
+ entities: {
1148
+ name_or_address?: string | undefined;
1149
+ local_mark_first?: boolean | undefined;
1150
+ }[];
1151
+ check_all_founded?: boolean | undefined;
1152
+ }>]>;
1153
+ }, "strip", z.ZodTypeAny, {
1154
+ op: "exist";
1155
+ users: {
1156
+ entities: {
1157
+ name_or_address?: string | undefined;
1158
+ local_mark_first?: boolean | undefined;
1159
+ }[];
1160
+ check_all_founded?: boolean | undefined;
1161
+ } | string[];
1162
+ }, {
1163
+ op: "exist";
1164
+ users: {
1165
+ entities: {
1166
+ name_or_address?: string | undefined;
1167
+ local_mark_first?: boolean | undefined;
1168
+ }[];
1169
+ check_all_founded?: boolean | undefined;
1170
+ } | string[];
1171
+ }>]>;
1172
+ export declare const FriendslistOperationSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1173
+ op: z.ZodLiteral<"add">;
1174
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1175
+ entities: z.ZodArray<z.ZodObject<{
1176
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1177
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1178
+ }, "strict", z.ZodTypeAny, {
1179
+ name_or_address?: string | undefined;
1180
+ local_mark_first?: boolean | undefined;
1181
+ }, {
1182
+ name_or_address?: string | undefined;
1183
+ local_mark_first?: boolean | undefined;
1184
+ }>, "many">;
1185
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1186
+ }, "strict", z.ZodTypeAny, {
1187
+ entities: {
1188
+ name_or_address?: string | undefined;
1189
+ local_mark_first?: boolean | undefined;
1190
+ }[];
1191
+ check_all_founded?: boolean | undefined;
1192
+ }, {
1193
+ entities: {
1194
+ name_or_address?: string | undefined;
1195
+ local_mark_first?: boolean | undefined;
1196
+ }[];
1197
+ check_all_founded?: boolean | undefined;
1198
+ }>]>;
1199
+ }, "strip", z.ZodTypeAny, {
1200
+ op: "add";
1201
+ users: {
1202
+ entities: {
1203
+ name_or_address?: string | undefined;
1204
+ local_mark_first?: boolean | undefined;
1205
+ }[];
1206
+ check_all_founded?: boolean | undefined;
1207
+ } | string[];
1208
+ }, {
1209
+ op: "add";
1210
+ users: {
1211
+ entities: {
1212
+ name_or_address?: string | undefined;
1213
+ local_mark_first?: boolean | undefined;
1214
+ }[];
1215
+ check_all_founded?: boolean | undefined;
1216
+ } | string[];
1217
+ }>, z.ZodObject<{
1218
+ op: z.ZodLiteral<"remove">;
1219
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1220
+ entities: z.ZodArray<z.ZodObject<{
1221
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1222
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1223
+ }, "strict", z.ZodTypeAny, {
1224
+ name_or_address?: string | undefined;
1225
+ local_mark_first?: boolean | undefined;
1226
+ }, {
1227
+ name_or_address?: string | undefined;
1228
+ local_mark_first?: boolean | undefined;
1229
+ }>, "many">;
1230
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1231
+ }, "strict", z.ZodTypeAny, {
1232
+ entities: {
1233
+ name_or_address?: string | undefined;
1234
+ local_mark_first?: boolean | undefined;
1235
+ }[];
1236
+ check_all_founded?: boolean | undefined;
1237
+ }, {
1238
+ entities: {
1239
+ name_or_address?: string | undefined;
1240
+ local_mark_first?: boolean | undefined;
1241
+ }[];
1242
+ check_all_founded?: boolean | undefined;
1243
+ }>]>;
1244
+ }, "strip", z.ZodTypeAny, {
1245
+ op: "remove";
1246
+ users: {
1247
+ entities: {
1248
+ name_or_address?: string | undefined;
1249
+ local_mark_first?: boolean | undefined;
1250
+ }[];
1251
+ check_all_founded?: boolean | undefined;
1252
+ } | string[];
1253
+ }, {
1254
+ op: "remove";
1255
+ users: {
1256
+ entities: {
1257
+ name_or_address?: string | undefined;
1258
+ local_mark_first?: boolean | undefined;
1259
+ }[];
1260
+ check_all_founded?: boolean | undefined;
1261
+ } | string[];
1262
+ }>, z.ZodObject<{
1263
+ op: z.ZodLiteral<"clear">;
1264
+ }, "strip", z.ZodTypeAny, {
1265
+ op: "clear";
1266
+ }, {
1267
+ op: "clear";
1268
+ }>, z.ZodObject<{
1269
+ op: z.ZodLiteral<"get">;
1270
+ }, "strip", z.ZodTypeAny, {
1271
+ op: "get";
1272
+ }, {
1273
+ op: "get";
1274
+ }>, z.ZodObject<{
1275
+ op: z.ZodLiteral<"exist">;
1276
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
1277
+ entities: z.ZodArray<z.ZodObject<{
1278
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1279
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1280
+ }, "strict", z.ZodTypeAny, {
1281
+ name_or_address?: string | undefined;
1282
+ local_mark_first?: boolean | undefined;
1283
+ }, {
1284
+ name_or_address?: string | undefined;
1285
+ local_mark_first?: boolean | undefined;
1286
+ }>, "many">;
1287
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
1288
+ }, "strict", z.ZodTypeAny, {
1289
+ entities: {
1290
+ name_or_address?: string | undefined;
1291
+ local_mark_first?: boolean | undefined;
1292
+ }[];
1293
+ check_all_founded?: boolean | undefined;
1294
+ }, {
1295
+ entities: {
1296
+ name_or_address?: string | undefined;
1297
+ local_mark_first?: boolean | undefined;
1298
+ }[];
1299
+ check_all_founded?: boolean | undefined;
1300
+ }>]>;
1301
+ }, "strip", z.ZodTypeAny, {
1302
+ op: "exist";
1303
+ users: {
1304
+ entities: {
1305
+ name_or_address?: string | undefined;
1306
+ local_mark_first?: boolean | undefined;
1307
+ }[];
1308
+ check_all_founded?: boolean | undefined;
1309
+ } | string[];
1310
+ }, {
1311
+ op: "exist";
1312
+ users: {
1313
+ entities: {
1314
+ name_or_address?: string | undefined;
1315
+ local_mark_first?: boolean | undefined;
1316
+ }[];
1317
+ check_all_founded?: boolean | undefined;
1318
+ } | string[];
1319
+ }>]>;
1320
+ export declare const GuardParamSchema: z.ZodObject<{
1321
+ guard: z.ZodEffects<z.ZodString, string, string>;
1322
+ passportValiditySeconds: z.ZodNumber;
1323
+ }, "strip", z.ZodTypeAny, {
1324
+ guard: string;
1325
+ passportValiditySeconds: number;
1326
+ }, {
1327
+ guard: string;
1328
+ passportValiditySeconds: number;
1329
+ }>;
1330
+ export declare const GuardlistOperationSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1331
+ op: z.ZodLiteral<"add">;
1332
+ guards: z.ZodArray<z.ZodObject<{
1333
+ guard: z.ZodEffects<z.ZodString, string, string>;
1334
+ passportValiditySeconds: z.ZodNumber;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ guard: string;
1337
+ passportValiditySeconds: number;
1338
+ }, {
1339
+ guard: string;
1340
+ passportValiditySeconds: number;
1341
+ }>, "many">;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ op: "add";
1344
+ guards: {
1345
+ guard: string;
1346
+ passportValiditySeconds: number;
1347
+ }[];
1348
+ }, {
1349
+ op: "add";
1350
+ guards: {
1351
+ guard: string;
1352
+ passportValiditySeconds: number;
1353
+ }[];
1354
+ }>, z.ZodObject<{
1355
+ op: z.ZodLiteral<"remove">;
1356
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1357
+ }, "strip", z.ZodTypeAny, {
1358
+ op: "remove";
1359
+ guards: string[];
1360
+ }, {
1361
+ op: "remove";
1362
+ guards: string[];
1363
+ }>, z.ZodObject<{
1364
+ op: z.ZodLiteral<"get">;
1365
+ }, "strip", z.ZodTypeAny, {
1366
+ op: "get";
1367
+ }, {
1368
+ op: "get";
1369
+ }>]>;
1370
+ export declare const SettingsOperationSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1371
+ op: z.ZodLiteral<"get">;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ op: "get";
1374
+ }, {
1375
+ op: "get";
1376
+ }>, z.ZodObject<{
1377
+ op: z.ZodLiteral<"set">;
1378
+ allowStrangerMessages: z.ZodOptional<z.ZodBoolean>;
1379
+ maxInboxSize: z.ZodOptional<z.ZodNumber>;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ op: "set";
1382
+ allowStrangerMessages?: boolean | undefined;
1383
+ maxInboxSize?: number | undefined;
1384
+ }, {
1385
+ op: "set";
1386
+ allowStrangerMessages?: boolean | undefined;
1387
+ maxInboxSize?: number | undefined;
1388
+ }>]>;
1389
+ export declare const GetSettingsResponseSchema: z.ZodObject<{
1390
+ allowStrangerMessages: z.ZodOptional<z.ZodBoolean>;
1391
+ maxInboxSize: z.ZodOptional<z.ZodNumber>;
1392
+ minUserInboxSize: z.ZodNumber;
1393
+ maxUserInboxSize: z.ZodNumber;
1394
+ defaultAllowStrangerMessages: z.ZodBoolean;
1395
+ }, "strip", z.ZodTypeAny, {
1396
+ minUserInboxSize: number;
1397
+ maxUserInboxSize: number;
1398
+ defaultAllowStrangerMessages: boolean;
1399
+ allowStrangerMessages?: boolean | undefined;
1400
+ maxInboxSize?: number | undefined;
1401
+ }, {
1402
+ minUserInboxSize: number;
1403
+ maxUserInboxSize: number;
1404
+ defaultAllowStrangerMessages: boolean;
1405
+ allowStrangerMessages?: boolean | undefined;
1406
+ maxInboxSize?: number | undefined;
1407
+ }>;
1408
+ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
1409
+ operation: z.ZodLiteral<"watch_conversations">;
1410
+ filter: z.ZodOptional<z.ZodObject<{
1411
+ account: z.ZodOptional<z.ZodString>;
1412
+ unreadOnly: z.ZodOptional<z.ZodBoolean>;
1413
+ startTime: z.ZodOptional<z.ZodNumber>;
1414
+ endTime: z.ZodOptional<z.ZodNumber>;
1415
+ previewMessageCount: z.ZodOptional<z.ZodNumber>;
1416
+ sortBy: z.ZodOptional<z.ZodEnum<["lastMessageAt", "unreadCount", "messageCount"]>>;
1417
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
1418
+ skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ account?: string | undefined;
1421
+ unreadOnly?: boolean | undefined;
1422
+ startTime?: number | undefined;
1423
+ endTime?: number | undefined;
1424
+ previewMessageCount?: number | undefined;
1425
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
1426
+ sortOrder?: "asc" | "desc" | undefined;
1427
+ skipAutoMarkViewed?: boolean | undefined;
1428
+ }, {
1429
+ account?: string | undefined;
1430
+ unreadOnly?: boolean | undefined;
1431
+ startTime?: number | undefined;
1432
+ endTime?: number | undefined;
1433
+ previewMessageCount?: number | undefined;
1434
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
1435
+ sortOrder?: "asc" | "desc" | undefined;
1436
+ skipAutoMarkViewed?: boolean | undefined;
1437
+ }>>;
1438
+ }, "strip", z.ZodTypeAny, {
1439
+ operation: "watch_conversations";
1440
+ filter?: {
1441
+ account?: string | undefined;
1442
+ unreadOnly?: boolean | undefined;
1443
+ startTime?: number | undefined;
1444
+ endTime?: number | undefined;
1445
+ previewMessageCount?: number | undefined;
1446
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
1447
+ sortOrder?: "asc" | "desc" | undefined;
1448
+ skipAutoMarkViewed?: boolean | undefined;
1449
+ } | undefined;
1450
+ }, {
1451
+ operation: "watch_conversations";
1452
+ filter?: {
1453
+ account?: string | undefined;
1454
+ unreadOnly?: boolean | undefined;
1455
+ startTime?: number | undefined;
1456
+ endTime?: number | undefined;
1457
+ previewMessageCount?: number | undefined;
1458
+ sortBy?: "lastMessageAt" | "messageCount" | "unreadCount" | undefined;
1459
+ sortOrder?: "asc" | "desc" | undefined;
1460
+ skipAutoMarkViewed?: boolean | undefined;
1461
+ } | undefined;
1462
+ }>, z.ZodObject<{
1463
+ operation: z.ZodLiteral<"send_message">;
1464
+ from: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1465
+ to: z.ZodUnion<[z.ZodString, z.ZodObject<{
1466
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1467
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1468
+ }, "strict", z.ZodTypeAny, {
1469
+ name_or_address?: string | undefined;
1470
+ local_mark_first?: boolean | undefined;
1471
+ }, {
1472
+ name_or_address?: string | undefined;
1473
+ local_mark_first?: boolean | undefined;
1474
+ }>]>;
1475
+ content: z.ZodString;
1476
+ options: z.ZodOptional<z.ZodObject<{
1477
+ guardAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1478
+ passportAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1479
+ force: z.ZodOptional<z.ZodBoolean>;
1480
+ new_messenger_name: z.ZodOptional<z.ZodString>;
1481
+ }, "strip", z.ZodTypeAny, {
1482
+ guardAddress?: string | undefined;
1483
+ passportAddress?: string | undefined;
1484
+ force?: boolean | undefined;
1485
+ new_messenger_name?: string | undefined;
1486
+ }, {
1487
+ guardAddress?: string | undefined;
1488
+ passportAddress?: string | undefined;
1489
+ force?: boolean | undefined;
1490
+ new_messenger_name?: string | undefined;
1491
+ }>>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ content: string;
1494
+ operation: "send_message";
1495
+ to: string | {
1496
+ name_or_address?: string | undefined;
1497
+ local_mark_first?: boolean | undefined;
1498
+ };
1499
+ options?: {
1500
+ guardAddress?: string | undefined;
1501
+ passportAddress?: string | undefined;
1502
+ force?: boolean | undefined;
1503
+ new_messenger_name?: string | undefined;
1504
+ } | undefined;
1505
+ from?: string | undefined;
1506
+ }, {
1507
+ content: string;
1508
+ operation: "send_message";
1509
+ to: string | {
1510
+ name_or_address?: string | undefined;
1511
+ local_mark_first?: boolean | undefined;
1512
+ };
1513
+ options?: {
1514
+ guardAddress?: string | undefined;
1515
+ passportAddress?: string | undefined;
1516
+ force?: boolean | undefined;
1517
+ new_messenger_name?: string | undefined;
1518
+ } | undefined;
1519
+ from?: string | undefined;
1520
+ }>, z.ZodObject<{
1521
+ operation: z.ZodLiteral<"send_file">;
1522
+ from: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1523
+ to: z.ZodUnion<[z.ZodString, z.ZodObject<{
1524
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1525
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1526
+ }, "strict", z.ZodTypeAny, {
1527
+ name_or_address?: string | undefined;
1528
+ local_mark_first?: boolean | undefined;
1529
+ }, {
1530
+ name_or_address?: string | undefined;
1531
+ local_mark_first?: boolean | undefined;
1532
+ }>]>;
1533
+ filePath: z.ZodString;
1534
+ options: z.ZodOptional<z.ZodObject<{
1535
+ fileName: z.ZodOptional<z.ZodString>;
1536
+ contentType: z.ZodOptional<z.ZodEnum<["wts", "wip", "zip"]>>;
1537
+ guardAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1538
+ passportAddress: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1539
+ force: z.ZodOptional<z.ZodBoolean>;
1540
+ new_messenger_name: z.ZodOptional<z.ZodString>;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ fileName?: string | undefined;
1543
+ contentType?: "wip" | "zip" | "wts" | undefined;
1544
+ guardAddress?: string | undefined;
1545
+ passportAddress?: string | undefined;
1546
+ force?: boolean | undefined;
1547
+ new_messenger_name?: string | undefined;
1548
+ }, {
1549
+ fileName?: string | undefined;
1550
+ contentType?: "wip" | "zip" | "wts" | undefined;
1551
+ guardAddress?: string | undefined;
1552
+ passportAddress?: string | undefined;
1553
+ force?: boolean | undefined;
1554
+ new_messenger_name?: string | undefined;
1555
+ }>>;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ filePath: string;
1558
+ operation: "send_file";
1559
+ to: string | {
1560
+ name_or_address?: string | undefined;
1561
+ local_mark_first?: boolean | undefined;
1562
+ };
1563
+ options?: {
1564
+ fileName?: string | undefined;
1565
+ contentType?: "wip" | "zip" | "wts" | undefined;
1566
+ guardAddress?: string | undefined;
1567
+ passportAddress?: string | undefined;
1568
+ force?: boolean | undefined;
1569
+ new_messenger_name?: string | undefined;
1570
+ } | undefined;
1571
+ from?: string | undefined;
1572
+ }, {
1573
+ filePath: string;
1574
+ operation: "send_file";
1575
+ to: string | {
1576
+ name_or_address?: string | undefined;
1577
+ local_mark_first?: boolean | undefined;
1578
+ };
1579
+ options?: {
1580
+ fileName?: string | undefined;
1581
+ contentType?: "wip" | "zip" | "wts" | undefined;
1582
+ guardAddress?: string | undefined;
1583
+ passportAddress?: string | undefined;
1584
+ force?: boolean | undefined;
1585
+ new_messenger_name?: string | undefined;
1586
+ } | undefined;
1587
+ from?: string | undefined;
1588
+ }>, z.ZodObject<{
1589
+ operation: z.ZodLiteral<"watch_messages">;
1590
+ filter: z.ZodOptional<z.ZodObject<{
1591
+ account: z.ZodOptional<z.ZodString>;
1592
+ direction: z.ZodOptional<z.ZodEnum<["sent", "received"]>>;
1593
+ status: z.ZodOptional<z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>>;
1594
+ peerAddress: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1595
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1596
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
1597
+ }, "strict", z.ZodTypeAny, {
1598
+ name_or_address?: string | undefined;
1599
+ local_mark_first?: boolean | undefined;
1600
+ }, {
1601
+ name_or_address?: string | undefined;
1602
+ local_mark_first?: boolean | undefined;
1603
+ }>]>>;
1604
+ msgType: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>>;
1605
+ contentType: z.ZodOptional<z.ZodEnum<["text", "zip", "wts", "wip"]>>;
1606
+ decryptedOnly: z.ZodOptional<z.ZodBoolean>;
1607
+ confirmedOnly: z.ZodOptional<z.ZodBoolean>;
1608
+ keyword: z.ZodOptional<z.ZodString>;
1609
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
1610
+ limit: z.ZodOptional<z.ZodNumber>;
1611
+ offset: z.ZodOptional<z.ZodNumber>;
1612
+ timeField: z.ZodOptional<z.ZodEnum<["createdAt", "receivedAt", "serverTimestamp"]>>;
1613
+ startTime: z.ZodOptional<z.ZodNumber>;
1614
+ endTime: z.ZodOptional<z.ZodNumber>;
1615
+ createdAtStart: z.ZodOptional<z.ZodNumber>;
1616
+ createdAtEnd: z.ZodOptional<z.ZodNumber>;
1617
+ receivedAtStart: z.ZodOptional<z.ZodNumber>;
1618
+ receivedAtEnd: z.ZodOptional<z.ZodNumber>;
1619
+ serverTimestampStart: z.ZodOptional<z.ZodNumber>;
1620
+ serverTimestampEnd: z.ZodOptional<z.ZodNumber>;
1621
+ arkConfirmedOnly: z.ZodOptional<z.ZodBoolean>;
1622
+ arkTimestampStart: z.ZodOptional<z.ZodNumber>;
1623
+ arkTimestampEnd: z.ZodOptional<z.ZodNumber>;
1624
+ proofedOnly: z.ZodOptional<z.ZodBoolean>;
1625
+ hasLastReceivedIndexOnly: z.ZodOptional<z.ZodBoolean>;
1626
+ lastReceivedIndexMin: z.ZodOptional<z.ZodNumber>;
1627
+ lastReceivedIndexMax: z.ZodOptional<z.ZodNumber>;
1628
+ listFilterMode: z.ZodOptional<z.ZodEnum<["friends", "guard", "stranger", "any"]>>;
1629
+ customListFilter: z.ZodOptional<z.ZodObject<{
1630
+ includeAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1631
+ excludeAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1632
+ relation: z.ZodOptional<z.ZodEnum<["union", "intersection"]>>;
1633
+ }, "strip", z.ZodTypeAny, {
1634
+ includeAddresses?: string[] | undefined;
1635
+ excludeAddresses?: string[] | undefined;
1636
+ relation?: "union" | "intersection" | undefined;
1637
+ }, {
1638
+ includeAddresses?: string[] | undefined;
1639
+ excludeAddresses?: string[] | undefined;
1640
+ relation?: "union" | "intersection" | undefined;
1641
+ }>>;
1642
+ viewed: z.ZodOptional<z.ZodBoolean>;
1643
+ viewedAtStart: z.ZodOptional<z.ZodNumber>;
1644
+ viewedAtEnd: z.ZodOptional<z.ZodNumber>;
1645
+ skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
1646
+ }, "strip", z.ZodTypeAny, {
1647
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1648
+ limit?: number | undefined;
1649
+ account?: string | undefined;
1650
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1651
+ direction?: "received" | "sent" | undefined;
1652
+ msgType?: 1 | 3 | undefined;
1653
+ peerAddress?: string | {
1654
+ name_or_address?: string | undefined;
1655
+ local_mark_first?: boolean | undefined;
1656
+ } | undefined;
1657
+ startTime?: number | undefined;
1658
+ endTime?: number | undefined;
1659
+ sortOrder?: "asc" | "desc" | undefined;
1660
+ skipAutoMarkViewed?: boolean | undefined;
1661
+ decryptedOnly?: boolean | undefined;
1662
+ confirmedOnly?: boolean | undefined;
1663
+ keyword?: string | undefined;
1664
+ offset?: number | undefined;
1665
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
1666
+ createdAtStart?: number | undefined;
1667
+ createdAtEnd?: number | undefined;
1668
+ receivedAtStart?: number | undefined;
1669
+ receivedAtEnd?: number | undefined;
1670
+ serverTimestampStart?: number | undefined;
1671
+ serverTimestampEnd?: number | undefined;
1672
+ arkConfirmedOnly?: boolean | undefined;
1673
+ arkTimestampStart?: number | undefined;
1674
+ arkTimestampEnd?: number | undefined;
1675
+ proofedOnly?: boolean | undefined;
1676
+ hasLastReceivedIndexOnly?: boolean | undefined;
1677
+ lastReceivedIndexMin?: number | undefined;
1678
+ lastReceivedIndexMax?: number | undefined;
1679
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
1680
+ customListFilter?: {
1681
+ includeAddresses?: string[] | undefined;
1682
+ excludeAddresses?: string[] | undefined;
1683
+ relation?: "union" | "intersection" | undefined;
1684
+ } | undefined;
1685
+ viewed?: boolean | undefined;
1686
+ viewedAtStart?: number | undefined;
1687
+ viewedAtEnd?: number | undefined;
1688
+ }, {
1689
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1690
+ limit?: number | undefined;
1691
+ account?: string | undefined;
1692
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1693
+ direction?: "received" | "sent" | undefined;
1694
+ msgType?: 1 | 3 | undefined;
1695
+ peerAddress?: string | {
1696
+ name_or_address?: string | undefined;
1697
+ local_mark_first?: boolean | undefined;
1698
+ } | undefined;
1699
+ startTime?: number | undefined;
1700
+ endTime?: number | undefined;
1701
+ sortOrder?: "asc" | "desc" | undefined;
1702
+ skipAutoMarkViewed?: boolean | undefined;
1703
+ decryptedOnly?: boolean | undefined;
1704
+ confirmedOnly?: boolean | undefined;
1705
+ keyword?: string | undefined;
1706
+ offset?: number | undefined;
1707
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
1708
+ createdAtStart?: number | undefined;
1709
+ createdAtEnd?: number | undefined;
1710
+ receivedAtStart?: number | undefined;
1711
+ receivedAtEnd?: number | undefined;
1712
+ serverTimestampStart?: number | undefined;
1713
+ serverTimestampEnd?: number | undefined;
1714
+ arkConfirmedOnly?: boolean | undefined;
1715
+ arkTimestampStart?: number | undefined;
1716
+ arkTimestampEnd?: number | undefined;
1717
+ proofedOnly?: boolean | undefined;
1718
+ hasLastReceivedIndexOnly?: boolean | undefined;
1719
+ lastReceivedIndexMin?: number | undefined;
1720
+ lastReceivedIndexMax?: number | undefined;
1721
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
1722
+ customListFilter?: {
1723
+ includeAddresses?: string[] | undefined;
1724
+ excludeAddresses?: string[] | undefined;
1725
+ relation?: "union" | "intersection" | undefined;
1726
+ } | undefined;
1727
+ viewed?: boolean | undefined;
1728
+ viewedAtStart?: number | undefined;
1729
+ viewedAtEnd?: number | undefined;
1730
+ }>>;
1731
+ }, "strip", z.ZodTypeAny, {
1732
+ operation: "watch_messages";
1733
+ filter?: {
1734
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1735
+ limit?: number | undefined;
1736
+ account?: string | undefined;
1737
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1738
+ direction?: "received" | "sent" | undefined;
1739
+ msgType?: 1 | 3 | undefined;
1740
+ peerAddress?: string | {
1741
+ name_or_address?: string | undefined;
1742
+ local_mark_first?: boolean | undefined;
1743
+ } | undefined;
1744
+ startTime?: number | undefined;
1745
+ endTime?: number | undefined;
1746
+ sortOrder?: "asc" | "desc" | undefined;
1747
+ skipAutoMarkViewed?: boolean | undefined;
1748
+ decryptedOnly?: boolean | undefined;
1749
+ confirmedOnly?: boolean | undefined;
1750
+ keyword?: string | undefined;
1751
+ offset?: number | undefined;
1752
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
1753
+ createdAtStart?: number | undefined;
1754
+ createdAtEnd?: number | undefined;
1755
+ receivedAtStart?: number | undefined;
1756
+ receivedAtEnd?: number | undefined;
1757
+ serverTimestampStart?: number | undefined;
1758
+ serverTimestampEnd?: number | undefined;
1759
+ arkConfirmedOnly?: boolean | undefined;
1760
+ arkTimestampStart?: number | undefined;
1761
+ arkTimestampEnd?: number | undefined;
1762
+ proofedOnly?: boolean | undefined;
1763
+ hasLastReceivedIndexOnly?: boolean | undefined;
1764
+ lastReceivedIndexMin?: number | undefined;
1765
+ lastReceivedIndexMax?: number | undefined;
1766
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
1767
+ customListFilter?: {
1768
+ includeAddresses?: string[] | undefined;
1769
+ excludeAddresses?: string[] | undefined;
1770
+ relation?: "union" | "intersection" | undefined;
1771
+ } | undefined;
1772
+ viewed?: boolean | undefined;
1773
+ viewedAtStart?: number | undefined;
1774
+ viewedAtEnd?: number | undefined;
1775
+ } | undefined;
1776
+ }, {
1777
+ operation: "watch_messages";
1778
+ filter?: {
1779
+ status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1780
+ limit?: number | undefined;
1781
+ account?: string | undefined;
1782
+ contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1783
+ direction?: "received" | "sent" | undefined;
1784
+ msgType?: 1 | 3 | undefined;
1785
+ peerAddress?: string | {
1786
+ name_or_address?: string | undefined;
1787
+ local_mark_first?: boolean | undefined;
1788
+ } | undefined;
1789
+ startTime?: number | undefined;
1790
+ endTime?: number | undefined;
1791
+ sortOrder?: "asc" | "desc" | undefined;
1792
+ skipAutoMarkViewed?: boolean | undefined;
1793
+ decryptedOnly?: boolean | undefined;
1794
+ confirmedOnly?: boolean | undefined;
1795
+ keyword?: string | undefined;
1796
+ offset?: number | undefined;
1797
+ timeField?: "createdAt" | "receivedAt" | "serverTimestamp" | undefined;
1798
+ createdAtStart?: number | undefined;
1799
+ createdAtEnd?: number | undefined;
1800
+ receivedAtStart?: number | undefined;
1801
+ receivedAtEnd?: number | undefined;
1802
+ serverTimestampStart?: number | undefined;
1803
+ serverTimestampEnd?: number | undefined;
1804
+ arkConfirmedOnly?: boolean | undefined;
1805
+ arkTimestampStart?: number | undefined;
1806
+ arkTimestampEnd?: number | undefined;
1807
+ proofedOnly?: boolean | undefined;
1808
+ hasLastReceivedIndexOnly?: boolean | undefined;
1809
+ lastReceivedIndexMin?: number | undefined;
1810
+ lastReceivedIndexMax?: number | undefined;
1811
+ listFilterMode?: "guard" | "friends" | "stranger" | "any" | undefined;
1812
+ customListFilter?: {
1813
+ includeAddresses?: string[] | undefined;
1814
+ excludeAddresses?: string[] | undefined;
1815
+ relation?: "union" | "intersection" | undefined;
1816
+ } | undefined;
1817
+ viewed?: boolean | undefined;
1818
+ viewedAtStart?: number | undefined;
1819
+ viewedAtEnd?: number | undefined;
1820
+ } | undefined;
1821
+ }>, z.ZodObject<{
1822
+ operation: z.ZodLiteral<"extract_zip_messages">;
1823
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1824
+ messages: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1825
+ messageId: z.ZodString;
1826
+ fromAddress: z.ZodString;
1827
+ toAddress: z.ZodString;
1828
+ plaintextHash: z.ZodString;
1829
+ plaintext: z.ZodOptional<z.ZodString>;
1830
+ guardAddress: z.ZodOptional<z.ZodString>;
1831
+ passportAddress: z.ZodOptional<z.ZodString>;
1832
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
1833
+ direction: z.ZodEnum<["sent", "received"]>;
1834
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
1835
+ msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
1836
+ leafIndex: z.ZodOptional<z.ZodNumber>;
1837
+ prevRoot: z.ZodOptional<z.ZodString>;
1838
+ newRoot: z.ZodOptional<z.ZodString>;
1839
+ serverSignature: z.ZodOptional<z.ZodString>;
1840
+ serverTimestamp: z.ZodOptional<z.ZodNumber>;
1841
+ serverPublicKey: z.ZodOptional<z.ZodString>;
1842
+ arkConfirmed: z.ZodOptional<z.ZodObject<{
1843
+ recipient: z.ZodString;
1844
+ recipientPublicKey: z.ZodString;
1845
+ signature: z.ZodString;
1846
+ timestamp: z.ZodNumber;
1847
+ }, "strip", z.ZodTypeAny, {
1848
+ signature: string;
1849
+ recipient: string;
1850
+ recipientPublicKey: string;
1851
+ timestamp: number;
1852
+ }, {
1853
+ signature: string;
1854
+ recipient: string;
1855
+ recipientPublicKey: string;
1856
+ timestamp: number;
1857
+ }>>;
1858
+ createdAt: z.ZodNumber;
1859
+ receivedAt: z.ZodOptional<z.ZodNumber>;
1860
+ zipMetadata: z.ZodOptional<z.ZodObject<{
1861
+ fileName: z.ZodString;
1862
+ fileSize: z.ZodNumber;
1863
+ fileHash: z.ZodString;
1864
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
1865
+ localCachePath: z.ZodOptional<z.ZodString>;
1866
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
1867
+ }, "strip", z.ZodTypeAny, {
1868
+ fileName: string;
1869
+ fileSize: number;
1870
+ fileHash: string;
1871
+ contentType: "text" | "wip" | "zip" | "wts";
1872
+ localCachePath?: string | undefined;
1873
+ downloadedAt?: number | undefined;
1874
+ }, {
1875
+ fileName: string;
1876
+ fileSize: number;
1877
+ fileHash: string;
1878
+ contentType: "text" | "wip" | "zip" | "wts";
1879
+ localCachePath?: string | undefined;
1880
+ downloadedAt?: number | undefined;
1881
+ }>>;
1882
+ proof: z.ZodOptional<z.ZodString>;
1883
+ decryptError: z.ZodOptional<z.ZodString>;
1884
+ decryptAttempts: z.ZodOptional<z.ZodNumber>;
1885
+ lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
1886
+ viewedAt: z.ZodOptional<z.ZodNumber>;
1887
+ }, "strip", z.ZodTypeAny, {
1888
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
1889
+ createdAt: number;
1890
+ messageId: string;
1891
+ fromAddress: string;
1892
+ toAddress: string;
1893
+ plaintextHash: string;
1894
+ direction: "received" | "sent";
1895
+ msgType: 1 | 3;
1896
+ proof?: string | undefined;
1897
+ receivedAt?: number | undefined;
1898
+ serverTimestamp?: number | undefined;
1899
+ plaintext?: string | undefined;
1900
+ guardAddress?: string | undefined;
1901
+ passportAddress?: string | undefined;
1902
+ lastReceivedLeafIndex?: number | undefined;
1903
+ leafIndex?: number | undefined;
1904
+ prevRoot?: string | undefined;
1905
+ newRoot?: string | undefined;
1906
+ serverSignature?: string | undefined;
1907
+ serverPublicKey?: string | undefined;
1908
+ arkConfirmed?: {
1909
+ signature: string;
1910
+ recipient: string;
1911
+ recipientPublicKey: string;
1912
+ timestamp: number;
1913
+ } | undefined;
1914
+ zipMetadata?: {
1915
+ fileName: string;
1916
+ fileSize: number;
1917
+ fileHash: string;
1918
+ contentType: "text" | "wip" | "zip" | "wts";
1919
+ localCachePath?: string | undefined;
1920
+ downloadedAt?: number | undefined;
1921
+ } | undefined;
1922
+ decryptError?: string | undefined;
1923
+ decryptAttempts?: number | undefined;
1924
+ lastDecryptAttemptAt?: number | undefined;
1925
+ viewedAt?: number | undefined;
1926
+ }, {
1927
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
1928
+ createdAt: number;
1929
+ messageId: string;
1930
+ fromAddress: string;
1931
+ toAddress: string;
1932
+ plaintextHash: string;
1933
+ direction: "received" | "sent";
1934
+ msgType: 1 | 3;
1935
+ proof?: string | undefined;
1936
+ receivedAt?: number | undefined;
1937
+ serverTimestamp?: number | undefined;
1938
+ plaintext?: string | undefined;
1939
+ guardAddress?: string | undefined;
1940
+ passportAddress?: string | undefined;
1941
+ lastReceivedLeafIndex?: number | undefined;
1942
+ leafIndex?: number | undefined;
1943
+ prevRoot?: string | undefined;
1944
+ newRoot?: string | undefined;
1945
+ serverSignature?: string | undefined;
1946
+ serverPublicKey?: string | undefined;
1947
+ arkConfirmed?: {
1948
+ signature: string;
1949
+ recipient: string;
1950
+ recipientPublicKey: string;
1951
+ timestamp: number;
1952
+ } | undefined;
1953
+ zipMetadata?: {
1954
+ fileName: string;
1955
+ fileSize: number;
1956
+ fileHash: string;
1957
+ contentType: "text" | "wip" | "zip" | "wts";
1958
+ localCachePath?: string | undefined;
1959
+ downloadedAt?: number | undefined;
1960
+ } | undefined;
1961
+ decryptError?: string | undefined;
1962
+ decryptAttempts?: number | undefined;
1963
+ lastDecryptAttemptAt?: number | undefined;
1964
+ viewedAt?: number | undefined;
1965
+ }>]>, "many">;
1966
+ outputDir: z.ZodString;
1967
+ }, "strip", z.ZodTypeAny, {
1968
+ operation: "extract_zip_messages";
1969
+ outputDir: string;
1970
+ messages: (string | {
1971
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
1972
+ createdAt: number;
1973
+ messageId: string;
1974
+ fromAddress: string;
1975
+ toAddress: string;
1976
+ plaintextHash: string;
1977
+ direction: "received" | "sent";
1978
+ msgType: 1 | 3;
1979
+ proof?: string | undefined;
1980
+ receivedAt?: number | undefined;
1981
+ serverTimestamp?: number | undefined;
1982
+ plaintext?: string | undefined;
1983
+ guardAddress?: string | undefined;
1984
+ passportAddress?: string | undefined;
1985
+ lastReceivedLeafIndex?: number | undefined;
1986
+ leafIndex?: number | undefined;
1987
+ prevRoot?: string | undefined;
1988
+ newRoot?: string | undefined;
1989
+ serverSignature?: string | undefined;
1990
+ serverPublicKey?: string | undefined;
1991
+ arkConfirmed?: {
1992
+ signature: string;
1993
+ recipient: string;
1994
+ recipientPublicKey: string;
1995
+ timestamp: number;
1996
+ } | undefined;
1997
+ zipMetadata?: {
1998
+ fileName: string;
1999
+ fileSize: number;
2000
+ fileHash: string;
2001
+ contentType: "text" | "wip" | "zip" | "wts";
2002
+ localCachePath?: string | undefined;
2003
+ downloadedAt?: number | undefined;
2004
+ } | undefined;
2005
+ decryptError?: string | undefined;
2006
+ decryptAttempts?: number | undefined;
2007
+ lastDecryptAttemptAt?: number | undefined;
2008
+ viewedAt?: number | undefined;
2009
+ })[];
2010
+ account?: string | undefined;
2011
+ }, {
2012
+ operation: "extract_zip_messages";
2013
+ outputDir: string;
2014
+ messages: (string | {
2015
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
2016
+ createdAt: number;
2017
+ messageId: string;
2018
+ fromAddress: string;
2019
+ toAddress: string;
2020
+ plaintextHash: string;
2021
+ direction: "received" | "sent";
2022
+ msgType: 1 | 3;
2023
+ proof?: string | undefined;
2024
+ receivedAt?: number | undefined;
2025
+ serverTimestamp?: number | undefined;
2026
+ plaintext?: string | undefined;
2027
+ guardAddress?: string | undefined;
2028
+ passportAddress?: string | undefined;
2029
+ lastReceivedLeafIndex?: number | undefined;
2030
+ leafIndex?: number | undefined;
2031
+ prevRoot?: string | undefined;
2032
+ newRoot?: string | undefined;
2033
+ serverSignature?: string | undefined;
2034
+ serverPublicKey?: string | undefined;
2035
+ arkConfirmed?: {
2036
+ signature: string;
2037
+ recipient: string;
2038
+ recipientPublicKey: string;
2039
+ timestamp: number;
2040
+ } | undefined;
2041
+ zipMetadata?: {
2042
+ fileName: string;
2043
+ fileSize: number;
2044
+ fileHash: string;
2045
+ contentType: "text" | "wip" | "zip" | "wts";
2046
+ localCachePath?: string | undefined;
2047
+ downloadedAt?: number | undefined;
2048
+ } | undefined;
2049
+ decryptError?: string | undefined;
2050
+ decryptAttempts?: number | undefined;
2051
+ lastDecryptAttemptAt?: number | undefined;
2052
+ viewedAt?: number | undefined;
2053
+ })[];
2054
+ account?: string | undefined;
2055
+ }>, z.ZodObject<{
2056
+ operation: z.ZodLiteral<"generate_wts">;
2057
+ params: z.ZodObject<{
2058
+ myAccount: z.ZodEffects<z.ZodString, string, string>;
2059
+ peerAccount: z.ZodUnion<[z.ZodString, z.ZodObject<{
2060
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2061
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2062
+ }, "strict", z.ZodTypeAny, {
2063
+ name_or_address?: string | undefined;
2064
+ local_mark_first?: boolean | undefined;
2065
+ }, {
2066
+ name_or_address?: string | undefined;
2067
+ local_mark_first?: boolean | undefined;
2068
+ }>]>;
2069
+ range: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{} & {
2070
+ type: z.ZodLiteral<"time">;
2071
+ start: z.ZodNumber;
2072
+ end: z.ZodNumber;
2073
+ }, "strip", z.ZodTypeAny, {
2074
+ type: "time";
2075
+ start: number;
2076
+ end: number;
2077
+ }, {
2078
+ type: "time";
2079
+ start: number;
2080
+ end: number;
2081
+ }>, z.ZodObject<{} & {
2082
+ type: z.ZodLiteral<"messageId">;
2083
+ start: z.ZodString;
2084
+ end: z.ZodString;
2085
+ }, "strip", z.ZodTypeAny, {
2086
+ type: "messageId";
2087
+ start: string;
2088
+ end: string;
2089
+ }, {
2090
+ type: "messageId";
2091
+ start: string;
2092
+ end: string;
2093
+ }>, z.ZodObject<{} & {
2094
+ type: z.ZodLiteral<"seqIndex">;
2095
+ start: z.ZodNumber;
2096
+ end: z.ZodNumber;
2097
+ }, "strip", z.ZodTypeAny, {
2098
+ type: "seqIndex";
2099
+ start: number;
2100
+ end: number;
2101
+ }, {
2102
+ type: "seqIndex";
2103
+ start: number;
2104
+ end: number;
2105
+ }>]>>;
2106
+ excludePlaintext: z.ZodOptional<z.ZodBoolean>;
2107
+ outputDir: z.ZodString;
2108
+ }, "strip", z.ZodTypeAny, {
2109
+ myAccount: string;
2110
+ peerAccount: string | {
2111
+ name_or_address?: string | undefined;
2112
+ local_mark_first?: boolean | undefined;
2113
+ };
2114
+ outputDir: string;
2115
+ range?: {
2116
+ type: "time";
2117
+ start: number;
2118
+ end: number;
2119
+ } | {
2120
+ type: "messageId";
2121
+ start: string;
2122
+ end: string;
2123
+ } | {
2124
+ type: "seqIndex";
2125
+ start: number;
2126
+ end: number;
2127
+ } | undefined;
2128
+ excludePlaintext?: boolean | undefined;
2129
+ }, {
2130
+ myAccount: string;
2131
+ peerAccount: string | {
2132
+ name_or_address?: string | undefined;
2133
+ local_mark_first?: boolean | undefined;
2134
+ };
2135
+ outputDir: string;
2136
+ range?: {
2137
+ type: "time";
2138
+ start: number;
2139
+ end: number;
2140
+ } | {
2141
+ type: "messageId";
2142
+ start: string;
2143
+ end: string;
2144
+ } | {
2145
+ type: "seqIndex";
2146
+ start: number;
2147
+ end: number;
2148
+ } | undefined;
2149
+ excludePlaintext?: boolean | undefined;
2150
+ }>;
2151
+ }, "strip", z.ZodTypeAny, {
2152
+ params: {
2153
+ myAccount: string;
2154
+ peerAccount: string | {
2155
+ name_or_address?: string | undefined;
2156
+ local_mark_first?: boolean | undefined;
2157
+ };
2158
+ outputDir: string;
2159
+ range?: {
2160
+ type: "time";
2161
+ start: number;
2162
+ end: number;
2163
+ } | {
2164
+ type: "messageId";
2165
+ start: string;
2166
+ end: string;
2167
+ } | {
2168
+ type: "seqIndex";
2169
+ start: number;
2170
+ end: number;
2171
+ } | undefined;
2172
+ excludePlaintext?: boolean | undefined;
2173
+ };
2174
+ operation: "generate_wts";
2175
+ }, {
2176
+ params: {
2177
+ myAccount: string;
2178
+ peerAccount: string | {
2179
+ name_or_address?: string | undefined;
2180
+ local_mark_first?: boolean | undefined;
2181
+ };
2182
+ outputDir: string;
2183
+ range?: {
2184
+ type: "time";
2185
+ start: number;
2186
+ end: number;
2187
+ } | {
2188
+ type: "messageId";
2189
+ start: string;
2190
+ end: string;
2191
+ } | {
2192
+ type: "seqIndex";
2193
+ start: number;
2194
+ end: number;
2195
+ } | undefined;
2196
+ excludePlaintext?: boolean | undefined;
2197
+ };
2198
+ operation: "generate_wts";
2199
+ }>, z.ZodObject<{
2200
+ operation: z.ZodLiteral<"verify_wts">;
2201
+ wtsFilePath: z.ZodString;
2202
+ }, "strip", z.ZodTypeAny, {
2203
+ operation: "verify_wts";
2204
+ wtsFilePath: string;
2205
+ }, {
2206
+ operation: "verify_wts";
2207
+ wtsFilePath: string;
2208
+ }>, z.ZodObject<{
2209
+ operation: z.ZodLiteral<"sign_wts">;
2210
+ wtsFilePath: z.ZodString;
2211
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2212
+ outputPath: z.ZodOptional<z.ZodString>;
2213
+ }, "strip", z.ZodTypeAny, {
2214
+ operation: "sign_wts";
2215
+ wtsFilePath: string;
2216
+ account?: string | undefined;
2217
+ outputPath?: string | undefined;
2218
+ }, {
2219
+ operation: "sign_wts";
2220
+ wtsFilePath: string;
2221
+ account?: string | undefined;
2222
+ outputPath?: string | undefined;
2223
+ }>, z.ZodObject<{
2224
+ operation: z.ZodLiteral<"wts2html">;
2225
+ wtsPath: z.ZodString;
2226
+ options: z.ZodOptional<z.ZodObject<{
2227
+ title: z.ZodOptional<z.ZodString>;
2228
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
2229
+ outputPath: z.ZodOptional<z.ZodString>;
2230
+ }, "strip", z.ZodTypeAny, {
2231
+ title?: string | undefined;
2232
+ theme?: "light" | "dark" | undefined;
2233
+ outputPath?: string | undefined;
2234
+ }, {
2235
+ title?: string | undefined;
2236
+ theme?: "light" | "dark" | undefined;
2237
+ outputPath?: string | undefined;
2238
+ }>>;
2239
+ }, "strip", z.ZodTypeAny, {
2240
+ operation: "wts2html";
2241
+ wtsPath: string;
2242
+ options?: {
2243
+ title?: string | undefined;
2244
+ theme?: "light" | "dark" | undefined;
2245
+ outputPath?: string | undefined;
2246
+ } | undefined;
2247
+ }, {
2248
+ operation: "wts2html";
2249
+ wtsPath: string;
2250
+ options?: {
2251
+ title?: string | undefined;
2252
+ theme?: "light" | "dark" | undefined;
2253
+ outputPath?: string | undefined;
2254
+ } | undefined;
2255
+ }>, z.ZodObject<{
2256
+ operation: z.ZodLiteral<"proof_message">;
2257
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2258
+ messageId: z.ZodString;
2259
+ network: z.ZodOptional<z.ZodEnum<[import("wowok").ENTRYPOINT.Localnet, import("wowok").ENTRYPOINT.Testnet]>>;
2260
+ }, "strip", z.ZodTypeAny, {
2261
+ operation: "proof_message";
2262
+ messageId: string;
2263
+ network?: import("wowok").ENTRYPOINT | undefined;
2264
+ account?: string | undefined;
2265
+ }, {
2266
+ operation: "proof_message";
2267
+ messageId: string;
2268
+ network?: import("wowok").ENTRYPOINT | undefined;
2269
+ account?: string | undefined;
2270
+ }>, z.ZodObject<{
2271
+ operation: z.ZodLiteral<"blacklist">;
2272
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2273
+ blacklist: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
2274
+ op: z.ZodLiteral<"add">;
2275
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2276
+ entities: z.ZodArray<z.ZodObject<{
2277
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2278
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2279
+ }, "strict", z.ZodTypeAny, {
2280
+ name_or_address?: string | undefined;
2281
+ local_mark_first?: boolean | undefined;
2282
+ }, {
2283
+ name_or_address?: string | undefined;
2284
+ local_mark_first?: boolean | undefined;
2285
+ }>, "many">;
2286
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2287
+ }, "strict", z.ZodTypeAny, {
2288
+ entities: {
2289
+ name_or_address?: string | undefined;
2290
+ local_mark_first?: boolean | undefined;
2291
+ }[];
2292
+ check_all_founded?: boolean | undefined;
2293
+ }, {
2294
+ entities: {
2295
+ name_or_address?: string | undefined;
2296
+ local_mark_first?: boolean | undefined;
2297
+ }[];
2298
+ check_all_founded?: boolean | undefined;
2299
+ }>]>;
2300
+ }, "strip", z.ZodTypeAny, {
2301
+ op: "add";
2302
+ users: {
2303
+ entities: {
2304
+ name_or_address?: string | undefined;
2305
+ local_mark_first?: boolean | undefined;
2306
+ }[];
2307
+ check_all_founded?: boolean | undefined;
2308
+ } | string[];
2309
+ }, {
2310
+ op: "add";
2311
+ users: {
2312
+ entities: {
2313
+ name_or_address?: string | undefined;
2314
+ local_mark_first?: boolean | undefined;
2315
+ }[];
2316
+ check_all_founded?: boolean | undefined;
2317
+ } | string[];
2318
+ }>, z.ZodObject<{
2319
+ op: z.ZodLiteral<"remove">;
2320
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2321
+ entities: z.ZodArray<z.ZodObject<{
2322
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2323
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2324
+ }, "strict", z.ZodTypeAny, {
2325
+ name_or_address?: string | undefined;
2326
+ local_mark_first?: boolean | undefined;
2327
+ }, {
2328
+ name_or_address?: string | undefined;
2329
+ local_mark_first?: boolean | undefined;
2330
+ }>, "many">;
2331
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2332
+ }, "strict", z.ZodTypeAny, {
2333
+ entities: {
2334
+ name_or_address?: string | undefined;
2335
+ local_mark_first?: boolean | undefined;
2336
+ }[];
2337
+ check_all_founded?: boolean | undefined;
2338
+ }, {
2339
+ entities: {
2340
+ name_or_address?: string | undefined;
2341
+ local_mark_first?: boolean | undefined;
2342
+ }[];
2343
+ check_all_founded?: boolean | undefined;
2344
+ }>]>;
2345
+ }, "strip", z.ZodTypeAny, {
2346
+ op: "remove";
2347
+ users: {
2348
+ entities: {
2349
+ name_or_address?: string | undefined;
2350
+ local_mark_first?: boolean | undefined;
2351
+ }[];
2352
+ check_all_founded?: boolean | undefined;
2353
+ } | string[];
2354
+ }, {
2355
+ op: "remove";
2356
+ users: {
2357
+ entities: {
2358
+ name_or_address?: string | undefined;
2359
+ local_mark_first?: boolean | undefined;
2360
+ }[];
2361
+ check_all_founded?: boolean | undefined;
2362
+ } | string[];
2363
+ }>, z.ZodObject<{
2364
+ op: z.ZodLiteral<"clear">;
2365
+ }, "strip", z.ZodTypeAny, {
2366
+ op: "clear";
2367
+ }, {
2368
+ op: "clear";
2369
+ }>, z.ZodObject<{
2370
+ op: z.ZodLiteral<"get">;
2371
+ }, "strip", z.ZodTypeAny, {
2372
+ op: "get";
2373
+ }, {
2374
+ op: "get";
2375
+ }>, z.ZodObject<{
2376
+ op: z.ZodLiteral<"exist">;
2377
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2378
+ entities: z.ZodArray<z.ZodObject<{
2379
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2380
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2381
+ }, "strict", z.ZodTypeAny, {
2382
+ name_or_address?: string | undefined;
2383
+ local_mark_first?: boolean | undefined;
2384
+ }, {
2385
+ name_or_address?: string | undefined;
2386
+ local_mark_first?: boolean | undefined;
2387
+ }>, "many">;
2388
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2389
+ }, "strict", z.ZodTypeAny, {
2390
+ entities: {
2391
+ name_or_address?: string | undefined;
2392
+ local_mark_first?: boolean | undefined;
2393
+ }[];
2394
+ check_all_founded?: boolean | undefined;
2395
+ }, {
2396
+ entities: {
2397
+ name_or_address?: string | undefined;
2398
+ local_mark_first?: boolean | undefined;
2399
+ }[];
2400
+ check_all_founded?: boolean | undefined;
2401
+ }>]>;
2402
+ }, "strip", z.ZodTypeAny, {
2403
+ op: "exist";
2404
+ users: {
2405
+ entities: {
2406
+ name_or_address?: string | undefined;
2407
+ local_mark_first?: boolean | undefined;
2408
+ }[];
2409
+ check_all_founded?: boolean | undefined;
2410
+ } | string[];
2411
+ }, {
2412
+ op: "exist";
2413
+ users: {
2414
+ entities: {
2415
+ name_or_address?: string | undefined;
2416
+ local_mark_first?: boolean | undefined;
2417
+ }[];
2418
+ check_all_founded?: boolean | undefined;
2419
+ } | string[];
2420
+ }>]>;
2421
+ }, "strip", z.ZodTypeAny, {
2422
+ operation: "blacklist";
2423
+ blacklist: {
2424
+ op: "add";
2425
+ users: {
2426
+ entities: {
2427
+ name_or_address?: string | undefined;
2428
+ local_mark_first?: boolean | undefined;
2429
+ }[];
2430
+ check_all_founded?: boolean | undefined;
2431
+ } | string[];
2432
+ } | {
2433
+ op: "remove";
2434
+ users: {
2435
+ entities: {
2436
+ name_or_address?: string | undefined;
2437
+ local_mark_first?: boolean | undefined;
2438
+ }[];
2439
+ check_all_founded?: boolean | undefined;
2440
+ } | string[];
2441
+ } | {
2442
+ op: "clear";
2443
+ } | {
2444
+ op: "get";
2445
+ } | {
2446
+ op: "exist";
2447
+ users: {
2448
+ entities: {
2449
+ name_or_address?: string | undefined;
2450
+ local_mark_first?: boolean | undefined;
2451
+ }[];
2452
+ check_all_founded?: boolean | undefined;
2453
+ } | string[];
2454
+ };
2455
+ account?: string | undefined;
2456
+ }, {
2457
+ operation: "blacklist";
2458
+ blacklist: {
2459
+ op: "add";
2460
+ users: {
2461
+ entities: {
2462
+ name_or_address?: string | undefined;
2463
+ local_mark_first?: boolean | undefined;
2464
+ }[];
2465
+ check_all_founded?: boolean | undefined;
2466
+ } | string[];
2467
+ } | {
2468
+ op: "remove";
2469
+ users: {
2470
+ entities: {
2471
+ name_or_address?: string | undefined;
2472
+ local_mark_first?: boolean | undefined;
2473
+ }[];
2474
+ check_all_founded?: boolean | undefined;
2475
+ } | string[];
2476
+ } | {
2477
+ op: "clear";
2478
+ } | {
2479
+ op: "get";
2480
+ } | {
2481
+ op: "exist";
2482
+ users: {
2483
+ entities: {
2484
+ name_or_address?: string | undefined;
2485
+ local_mark_first?: boolean | undefined;
2486
+ }[];
2487
+ check_all_founded?: boolean | undefined;
2488
+ } | string[];
2489
+ };
2490
+ account?: string | undefined;
2491
+ }>, z.ZodObject<{
2492
+ operation: z.ZodLiteral<"friendslist">;
2493
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2494
+ friendslist: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
2495
+ op: z.ZodLiteral<"add">;
2496
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2497
+ entities: z.ZodArray<z.ZodObject<{
2498
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2499
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2500
+ }, "strict", z.ZodTypeAny, {
2501
+ name_or_address?: string | undefined;
2502
+ local_mark_first?: boolean | undefined;
2503
+ }, {
2504
+ name_or_address?: string | undefined;
2505
+ local_mark_first?: boolean | undefined;
2506
+ }>, "many">;
2507
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2508
+ }, "strict", z.ZodTypeAny, {
2509
+ entities: {
2510
+ name_or_address?: string | undefined;
2511
+ local_mark_first?: boolean | undefined;
2512
+ }[];
2513
+ check_all_founded?: boolean | undefined;
2514
+ }, {
2515
+ entities: {
2516
+ name_or_address?: string | undefined;
2517
+ local_mark_first?: boolean | undefined;
2518
+ }[];
2519
+ check_all_founded?: boolean | undefined;
2520
+ }>]>;
2521
+ }, "strip", z.ZodTypeAny, {
2522
+ op: "add";
2523
+ users: {
2524
+ entities: {
2525
+ name_or_address?: string | undefined;
2526
+ local_mark_first?: boolean | undefined;
2527
+ }[];
2528
+ check_all_founded?: boolean | undefined;
2529
+ } | string[];
2530
+ }, {
2531
+ op: "add";
2532
+ users: {
2533
+ entities: {
2534
+ name_or_address?: string | undefined;
2535
+ local_mark_first?: boolean | undefined;
2536
+ }[];
2537
+ check_all_founded?: boolean | undefined;
2538
+ } | string[];
2539
+ }>, z.ZodObject<{
2540
+ op: z.ZodLiteral<"remove">;
2541
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2542
+ entities: z.ZodArray<z.ZodObject<{
2543
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2544
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2545
+ }, "strict", z.ZodTypeAny, {
2546
+ name_or_address?: string | undefined;
2547
+ local_mark_first?: boolean | undefined;
2548
+ }, {
2549
+ name_or_address?: string | undefined;
2550
+ local_mark_first?: boolean | undefined;
2551
+ }>, "many">;
2552
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2553
+ }, "strict", z.ZodTypeAny, {
2554
+ entities: {
2555
+ name_or_address?: string | undefined;
2556
+ local_mark_first?: boolean | undefined;
2557
+ }[];
2558
+ check_all_founded?: boolean | undefined;
2559
+ }, {
2560
+ entities: {
2561
+ name_or_address?: string | undefined;
2562
+ local_mark_first?: boolean | undefined;
2563
+ }[];
2564
+ check_all_founded?: boolean | undefined;
2565
+ }>]>;
2566
+ }, "strip", z.ZodTypeAny, {
2567
+ op: "remove";
2568
+ users: {
2569
+ entities: {
2570
+ name_or_address?: string | undefined;
2571
+ local_mark_first?: boolean | undefined;
2572
+ }[];
2573
+ check_all_founded?: boolean | undefined;
2574
+ } | string[];
2575
+ }, {
2576
+ op: "remove";
2577
+ users: {
2578
+ entities: {
2579
+ name_or_address?: string | undefined;
2580
+ local_mark_first?: boolean | undefined;
2581
+ }[];
2582
+ check_all_founded?: boolean | undefined;
2583
+ } | string[];
2584
+ }>, z.ZodObject<{
2585
+ op: z.ZodLiteral<"clear">;
2586
+ }, "strip", z.ZodTypeAny, {
2587
+ op: "clear";
2588
+ }, {
2589
+ op: "clear";
2590
+ }>, z.ZodObject<{
2591
+ op: z.ZodLiteral<"get">;
2592
+ }, "strip", z.ZodTypeAny, {
2593
+ op: "get";
2594
+ }, {
2595
+ op: "get";
2596
+ }>, z.ZodObject<{
2597
+ op: z.ZodLiteral<"exist">;
2598
+ users: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
2599
+ entities: z.ZodArray<z.ZodObject<{
2600
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2601
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2602
+ }, "strict", z.ZodTypeAny, {
2603
+ name_or_address?: string | undefined;
2604
+ local_mark_first?: boolean | undefined;
2605
+ }, {
2606
+ name_or_address?: string | undefined;
2607
+ local_mark_first?: boolean | undefined;
2608
+ }>, "many">;
2609
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
2610
+ }, "strict", z.ZodTypeAny, {
2611
+ entities: {
2612
+ name_or_address?: string | undefined;
2613
+ local_mark_first?: boolean | undefined;
2614
+ }[];
2615
+ check_all_founded?: boolean | undefined;
2616
+ }, {
2617
+ entities: {
2618
+ name_or_address?: string | undefined;
2619
+ local_mark_first?: boolean | undefined;
2620
+ }[];
2621
+ check_all_founded?: boolean | undefined;
2622
+ }>]>;
2623
+ }, "strip", z.ZodTypeAny, {
2624
+ op: "exist";
2625
+ users: {
2626
+ entities: {
2627
+ name_or_address?: string | undefined;
2628
+ local_mark_first?: boolean | undefined;
2629
+ }[];
2630
+ check_all_founded?: boolean | undefined;
2631
+ } | string[];
2632
+ }, {
2633
+ op: "exist";
2634
+ users: {
2635
+ entities: {
2636
+ name_or_address?: string | undefined;
2637
+ local_mark_first?: boolean | undefined;
2638
+ }[];
2639
+ check_all_founded?: boolean | undefined;
2640
+ } | string[];
2641
+ }>]>;
2642
+ }, "strip", z.ZodTypeAny, {
2643
+ operation: "friendslist";
2644
+ friendslist: {
2645
+ op: "add";
2646
+ users: {
2647
+ entities: {
2648
+ name_or_address?: string | undefined;
2649
+ local_mark_first?: boolean | undefined;
2650
+ }[];
2651
+ check_all_founded?: boolean | undefined;
2652
+ } | string[];
2653
+ } | {
2654
+ op: "remove";
2655
+ users: {
2656
+ entities: {
2657
+ name_or_address?: string | undefined;
2658
+ local_mark_first?: boolean | undefined;
2659
+ }[];
2660
+ check_all_founded?: boolean | undefined;
2661
+ } | string[];
2662
+ } | {
2663
+ op: "clear";
2664
+ } | {
2665
+ op: "get";
2666
+ } | {
2667
+ op: "exist";
2668
+ users: {
2669
+ entities: {
2670
+ name_or_address?: string | undefined;
2671
+ local_mark_first?: boolean | undefined;
2672
+ }[];
2673
+ check_all_founded?: boolean | undefined;
2674
+ } | string[];
2675
+ };
2676
+ account?: string | undefined;
2677
+ }, {
2678
+ operation: "friendslist";
2679
+ friendslist: {
2680
+ op: "add";
2681
+ users: {
2682
+ entities: {
2683
+ name_or_address?: string | undefined;
2684
+ local_mark_first?: boolean | undefined;
2685
+ }[];
2686
+ check_all_founded?: boolean | undefined;
2687
+ } | string[];
2688
+ } | {
2689
+ op: "remove";
2690
+ users: {
2691
+ entities: {
2692
+ name_or_address?: string | undefined;
2693
+ local_mark_first?: boolean | undefined;
2694
+ }[];
2695
+ check_all_founded?: boolean | undefined;
2696
+ } | string[];
2697
+ } | {
2698
+ op: "clear";
2699
+ } | {
2700
+ op: "get";
2701
+ } | {
2702
+ op: "exist";
2703
+ users: {
2704
+ entities: {
2705
+ name_or_address?: string | undefined;
2706
+ local_mark_first?: boolean | undefined;
2707
+ }[];
2708
+ check_all_founded?: boolean | undefined;
2709
+ } | string[];
2710
+ };
2711
+ account?: string | undefined;
2712
+ }>, z.ZodObject<{
2713
+ operation: z.ZodLiteral<"guardlist">;
2714
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2715
+ guardlist: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
2716
+ op: z.ZodLiteral<"add">;
2717
+ guards: z.ZodArray<z.ZodObject<{
2718
+ guard: z.ZodEffects<z.ZodString, string, string>;
2719
+ passportValiditySeconds: z.ZodNumber;
2720
+ }, "strip", z.ZodTypeAny, {
2721
+ guard: string;
2722
+ passportValiditySeconds: number;
2723
+ }, {
2724
+ guard: string;
2725
+ passportValiditySeconds: number;
2726
+ }>, "many">;
2727
+ }, "strip", z.ZodTypeAny, {
2728
+ op: "add";
2729
+ guards: {
2730
+ guard: string;
2731
+ passportValiditySeconds: number;
2732
+ }[];
2733
+ }, {
2734
+ op: "add";
2735
+ guards: {
2736
+ guard: string;
2737
+ passportValiditySeconds: number;
2738
+ }[];
2739
+ }>, z.ZodObject<{
2740
+ op: z.ZodLiteral<"remove">;
2741
+ guards: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2742
+ }, "strip", z.ZodTypeAny, {
2743
+ op: "remove";
2744
+ guards: string[];
2745
+ }, {
2746
+ op: "remove";
2747
+ guards: string[];
2748
+ }>, z.ZodObject<{
2749
+ op: z.ZodLiteral<"get">;
2750
+ }, "strip", z.ZodTypeAny, {
2751
+ op: "get";
2752
+ }, {
2753
+ op: "get";
2754
+ }>]>;
2755
+ }, "strip", z.ZodTypeAny, {
2756
+ operation: "guardlist";
2757
+ guardlist: {
2758
+ op: "add";
2759
+ guards: {
2760
+ guard: string;
2761
+ passportValiditySeconds: number;
2762
+ }[];
2763
+ } | {
2764
+ op: "remove";
2765
+ guards: string[];
2766
+ } | {
2767
+ op: "get";
2768
+ };
2769
+ account?: string | undefined;
2770
+ }, {
2771
+ operation: "guardlist";
2772
+ guardlist: {
2773
+ op: "add";
2774
+ guards: {
2775
+ guard: string;
2776
+ passportValiditySeconds: number;
2777
+ }[];
2778
+ } | {
2779
+ op: "remove";
2780
+ guards: string[];
2781
+ } | {
2782
+ op: "get";
2783
+ };
2784
+ account?: string | undefined;
2785
+ }>, z.ZodObject<{
2786
+ operation: z.ZodLiteral<"settings">;
2787
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2788
+ settings: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
2789
+ op: z.ZodLiteral<"get">;
2790
+ }, "strip", z.ZodTypeAny, {
2791
+ op: "get";
2792
+ }, {
2793
+ op: "get";
2794
+ }>, z.ZodObject<{
2795
+ op: z.ZodLiteral<"set">;
2796
+ allowStrangerMessages: z.ZodOptional<z.ZodBoolean>;
2797
+ maxInboxSize: z.ZodOptional<z.ZodNumber>;
2798
+ }, "strip", z.ZodTypeAny, {
2799
+ op: "set";
2800
+ allowStrangerMessages?: boolean | undefined;
2801
+ maxInboxSize?: number | undefined;
2802
+ }, {
2803
+ op: "set";
2804
+ allowStrangerMessages?: boolean | undefined;
2805
+ maxInboxSize?: number | undefined;
2806
+ }>]>;
2807
+ }, "strip", z.ZodTypeAny, {
2808
+ operation: "settings";
2809
+ settings: {
2810
+ op: "get";
2811
+ } | {
2812
+ op: "set";
2813
+ allowStrangerMessages?: boolean | undefined;
2814
+ maxInboxSize?: number | undefined;
2815
+ };
2816
+ account?: string | undefined;
2817
+ }, {
2818
+ operation: "settings";
2819
+ settings: {
2820
+ op: "get";
2821
+ } | {
2822
+ op: "set";
2823
+ allowStrangerMessages?: boolean | undefined;
2824
+ maxInboxSize?: number | undefined;
2825
+ };
2826
+ account?: string | undefined;
2827
+ }>, z.ZodObject<{
2828
+ operation: z.ZodLiteral<"mark_messages_as_viewed">;
2829
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2830
+ messageIds: z.ZodArray<z.ZodString, "many">;
2831
+ }, "strip", z.ZodTypeAny, {
2832
+ operation: "mark_messages_as_viewed";
2833
+ messageIds: string[];
2834
+ account?: string | undefined;
2835
+ }, {
2836
+ operation: "mark_messages_as_viewed";
2837
+ messageIds: string[];
2838
+ account?: string | undefined;
2839
+ }>, z.ZodObject<{
2840
+ operation: z.ZodLiteral<"mark_conversation_as_viewed">;
2841
+ account: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2842
+ peerAddress: z.ZodUnion<[z.ZodString, z.ZodObject<{
2843
+ name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2844
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
2845
+ }, "strict", z.ZodTypeAny, {
2846
+ name_or_address?: string | undefined;
2847
+ local_mark_first?: boolean | undefined;
2848
+ }, {
2849
+ name_or_address?: string | undefined;
2850
+ local_mark_first?: boolean | undefined;
2851
+ }>]>;
2852
+ }, "strip", z.ZodTypeAny, {
2853
+ operation: "mark_conversation_as_viewed";
2854
+ peerAddress: string | {
2855
+ name_or_address?: string | undefined;
2856
+ local_mark_first?: boolean | undefined;
2857
+ };
2858
+ account?: string | undefined;
2859
+ }, {
2860
+ operation: "mark_conversation_as_viewed";
2861
+ peerAddress: string | {
2862
+ name_or_address?: string | undefined;
2863
+ local_mark_first?: boolean | undefined;
2864
+ };
2865
+ account?: string | undefined;
2866
+ }>]>;
2867
+ export declare const MessengerOperationOutputSchema: z.ZodObject<{
2868
+ result: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
2869
+ operation: z.ZodLiteral<"watch_conversations">;
2870
+ result: z.ZodArray<z.ZodObject<{
2871
+ peerAddress: z.ZodString;
2872
+ lastMessageAt: z.ZodNumber;
2873
+ messageCount: z.ZodNumber;
2874
+ unreadCount: z.ZodNumber;
2875
+ lastMessagePreview: z.ZodOptional<z.ZodString>;
2876
+ previewMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
2877
+ messageId: z.ZodString;
2878
+ fromAddress: z.ZodString;
2879
+ toAddress: z.ZodString;
2880
+ plaintextHash: z.ZodString;
2881
+ plaintext: z.ZodOptional<z.ZodString>;
2882
+ guardAddress: z.ZodOptional<z.ZodString>;
2883
+ passportAddress: z.ZodOptional<z.ZodString>;
2884
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
2885
+ direction: z.ZodEnum<["sent", "received"]>;
2886
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
2887
+ msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
2888
+ leafIndex: z.ZodOptional<z.ZodNumber>;
2889
+ prevRoot: z.ZodOptional<z.ZodString>;
2890
+ newRoot: z.ZodOptional<z.ZodString>;
2891
+ serverSignature: z.ZodOptional<z.ZodString>;
2892
+ serverTimestamp: z.ZodOptional<z.ZodNumber>;
2893
+ serverPublicKey: z.ZodOptional<z.ZodString>;
2894
+ arkConfirmed: z.ZodOptional<z.ZodObject<{
2895
+ recipient: z.ZodString;
2896
+ recipientPublicKey: z.ZodString;
2897
+ signature: z.ZodString;
2898
+ timestamp: z.ZodNumber;
2899
+ }, "strip", z.ZodTypeAny, {
2900
+ signature: string;
2901
+ recipient: string;
2902
+ recipientPublicKey: string;
2903
+ timestamp: number;
2904
+ }, {
2905
+ signature: string;
2906
+ recipient: string;
2907
+ recipientPublicKey: string;
2908
+ timestamp: number;
2909
+ }>>;
2910
+ createdAt: z.ZodNumber;
2911
+ receivedAt: z.ZodOptional<z.ZodNumber>;
2912
+ zipMetadata: z.ZodOptional<z.ZodObject<{
2913
+ fileName: z.ZodString;
2914
+ fileSize: z.ZodNumber;
2915
+ fileHash: z.ZodString;
2916
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
2917
+ localCachePath: z.ZodOptional<z.ZodString>;
2918
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
2919
+ }, "strip", z.ZodTypeAny, {
2920
+ fileName: string;
2921
+ fileSize: number;
2922
+ fileHash: string;
2923
+ contentType: "text" | "wip" | "zip" | "wts";
2924
+ localCachePath?: string | undefined;
2925
+ downloadedAt?: number | undefined;
2926
+ }, {
2927
+ fileName: string;
2928
+ fileSize: number;
2929
+ fileHash: string;
2930
+ contentType: "text" | "wip" | "zip" | "wts";
2931
+ localCachePath?: string | undefined;
2932
+ downloadedAt?: number | undefined;
2933
+ }>>;
2934
+ proof: z.ZodOptional<z.ZodString>;
2935
+ decryptError: z.ZodOptional<z.ZodString>;
2936
+ decryptAttempts: z.ZodOptional<z.ZodNumber>;
2937
+ lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
2938
+ viewedAt: z.ZodOptional<z.ZodNumber>;
2939
+ }, "strip", z.ZodTypeAny, {
2940
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
2941
+ createdAt: number;
2942
+ messageId: string;
2943
+ fromAddress: string;
2944
+ toAddress: string;
2945
+ plaintextHash: string;
2946
+ direction: "received" | "sent";
2947
+ msgType: 1 | 3;
2948
+ proof?: string | undefined;
2949
+ receivedAt?: number | undefined;
2950
+ serverTimestamp?: number | undefined;
2951
+ plaintext?: string | undefined;
2952
+ guardAddress?: string | undefined;
2953
+ passportAddress?: string | undefined;
2954
+ lastReceivedLeafIndex?: number | undefined;
2955
+ leafIndex?: number | undefined;
2956
+ prevRoot?: string | undefined;
2957
+ newRoot?: string | undefined;
2958
+ serverSignature?: string | undefined;
2959
+ serverPublicKey?: string | undefined;
2960
+ arkConfirmed?: {
2961
+ signature: string;
2962
+ recipient: string;
2963
+ recipientPublicKey: string;
2964
+ timestamp: number;
2965
+ } | undefined;
2966
+ zipMetadata?: {
2967
+ fileName: string;
2968
+ fileSize: number;
2969
+ fileHash: string;
2970
+ contentType: "text" | "wip" | "zip" | "wts";
2971
+ localCachePath?: string | undefined;
2972
+ downloadedAt?: number | undefined;
2973
+ } | undefined;
2974
+ decryptError?: string | undefined;
2975
+ decryptAttempts?: number | undefined;
2976
+ lastDecryptAttemptAt?: number | undefined;
2977
+ viewedAt?: number | undefined;
2978
+ }, {
2979
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
2980
+ createdAt: number;
2981
+ messageId: string;
2982
+ fromAddress: string;
2983
+ toAddress: string;
2984
+ plaintextHash: string;
2985
+ direction: "received" | "sent";
2986
+ msgType: 1 | 3;
2987
+ proof?: string | undefined;
2988
+ receivedAt?: number | undefined;
2989
+ serverTimestamp?: number | undefined;
2990
+ plaintext?: string | undefined;
2991
+ guardAddress?: string | undefined;
2992
+ passportAddress?: string | undefined;
2993
+ lastReceivedLeafIndex?: number | undefined;
2994
+ leafIndex?: number | undefined;
2995
+ prevRoot?: string | undefined;
2996
+ newRoot?: string | undefined;
2997
+ serverSignature?: string | undefined;
2998
+ serverPublicKey?: string | undefined;
2999
+ arkConfirmed?: {
3000
+ signature: string;
3001
+ recipient: string;
3002
+ recipientPublicKey: string;
3003
+ timestamp: number;
3004
+ } | undefined;
3005
+ zipMetadata?: {
3006
+ fileName: string;
3007
+ fileSize: number;
3008
+ fileHash: string;
3009
+ contentType: "text" | "wip" | "zip" | "wts";
3010
+ localCachePath?: string | undefined;
3011
+ downloadedAt?: number | undefined;
3012
+ } | undefined;
3013
+ decryptError?: string | undefined;
3014
+ decryptAttempts?: number | undefined;
3015
+ lastDecryptAttemptAt?: number | undefined;
3016
+ viewedAt?: number | undefined;
3017
+ }>, "many">>;
3018
+ }, "strip", z.ZodTypeAny, {
3019
+ peerAddress: string;
3020
+ lastMessageAt: number;
3021
+ messageCount: number;
3022
+ unreadCount: number;
3023
+ lastMessagePreview?: string | undefined;
3024
+ previewMessages?: {
3025
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3026
+ createdAt: number;
3027
+ messageId: string;
3028
+ fromAddress: string;
3029
+ toAddress: string;
3030
+ plaintextHash: string;
3031
+ direction: "received" | "sent";
3032
+ msgType: 1 | 3;
3033
+ proof?: string | undefined;
3034
+ receivedAt?: number | undefined;
3035
+ serverTimestamp?: number | undefined;
3036
+ plaintext?: string | undefined;
3037
+ guardAddress?: string | undefined;
3038
+ passportAddress?: string | undefined;
3039
+ lastReceivedLeafIndex?: number | undefined;
3040
+ leafIndex?: number | undefined;
3041
+ prevRoot?: string | undefined;
3042
+ newRoot?: string | undefined;
3043
+ serverSignature?: string | undefined;
3044
+ serverPublicKey?: string | undefined;
3045
+ arkConfirmed?: {
3046
+ signature: string;
3047
+ recipient: string;
3048
+ recipientPublicKey: string;
3049
+ timestamp: number;
3050
+ } | undefined;
3051
+ zipMetadata?: {
3052
+ fileName: string;
3053
+ fileSize: number;
3054
+ fileHash: string;
3055
+ contentType: "text" | "wip" | "zip" | "wts";
3056
+ localCachePath?: string | undefined;
3057
+ downloadedAt?: number | undefined;
3058
+ } | undefined;
3059
+ decryptError?: string | undefined;
3060
+ decryptAttempts?: number | undefined;
3061
+ lastDecryptAttemptAt?: number | undefined;
3062
+ viewedAt?: number | undefined;
3063
+ }[] | undefined;
3064
+ }, {
3065
+ peerAddress: string;
3066
+ lastMessageAt: number;
3067
+ messageCount: number;
3068
+ unreadCount: number;
3069
+ lastMessagePreview?: string | undefined;
3070
+ previewMessages?: {
3071
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3072
+ createdAt: number;
3073
+ messageId: string;
3074
+ fromAddress: string;
3075
+ toAddress: string;
3076
+ plaintextHash: string;
3077
+ direction: "received" | "sent";
3078
+ msgType: 1 | 3;
3079
+ proof?: string | undefined;
3080
+ receivedAt?: number | undefined;
3081
+ serverTimestamp?: number | undefined;
3082
+ plaintext?: string | undefined;
3083
+ guardAddress?: string | undefined;
3084
+ passportAddress?: string | undefined;
3085
+ lastReceivedLeafIndex?: number | undefined;
3086
+ leafIndex?: number | undefined;
3087
+ prevRoot?: string | undefined;
3088
+ newRoot?: string | undefined;
3089
+ serverSignature?: string | undefined;
3090
+ serverPublicKey?: string | undefined;
3091
+ arkConfirmed?: {
3092
+ signature: string;
3093
+ recipient: string;
3094
+ recipientPublicKey: string;
3095
+ timestamp: number;
3096
+ } | undefined;
3097
+ zipMetadata?: {
3098
+ fileName: string;
3099
+ fileSize: number;
3100
+ fileHash: string;
3101
+ contentType: "text" | "wip" | "zip" | "wts";
3102
+ localCachePath?: string | undefined;
3103
+ downloadedAt?: number | undefined;
3104
+ } | undefined;
3105
+ decryptError?: string | undefined;
3106
+ decryptAttempts?: number | undefined;
3107
+ lastDecryptAttemptAt?: number | undefined;
3108
+ viewedAt?: number | undefined;
3109
+ }[] | undefined;
3110
+ }>, "many">;
3111
+ }, "strip", z.ZodTypeAny, {
3112
+ result: {
3113
+ peerAddress: string;
3114
+ lastMessageAt: number;
3115
+ messageCount: number;
3116
+ unreadCount: number;
3117
+ lastMessagePreview?: string | undefined;
3118
+ previewMessages?: {
3119
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3120
+ createdAt: number;
3121
+ messageId: string;
3122
+ fromAddress: string;
3123
+ toAddress: string;
3124
+ plaintextHash: string;
3125
+ direction: "received" | "sent";
3126
+ msgType: 1 | 3;
3127
+ proof?: string | undefined;
3128
+ receivedAt?: number | undefined;
3129
+ serverTimestamp?: number | undefined;
3130
+ plaintext?: string | undefined;
3131
+ guardAddress?: string | undefined;
3132
+ passportAddress?: string | undefined;
3133
+ lastReceivedLeafIndex?: number | undefined;
3134
+ leafIndex?: number | undefined;
3135
+ prevRoot?: string | undefined;
3136
+ newRoot?: string | undefined;
3137
+ serverSignature?: string | undefined;
3138
+ serverPublicKey?: string | undefined;
3139
+ arkConfirmed?: {
3140
+ signature: string;
3141
+ recipient: string;
3142
+ recipientPublicKey: string;
3143
+ timestamp: number;
3144
+ } | undefined;
3145
+ zipMetadata?: {
3146
+ fileName: string;
3147
+ fileSize: number;
3148
+ fileHash: string;
3149
+ contentType: "text" | "wip" | "zip" | "wts";
3150
+ localCachePath?: string | undefined;
3151
+ downloadedAt?: number | undefined;
3152
+ } | undefined;
3153
+ decryptError?: string | undefined;
3154
+ decryptAttempts?: number | undefined;
3155
+ lastDecryptAttemptAt?: number | undefined;
3156
+ viewedAt?: number | undefined;
3157
+ }[] | undefined;
3158
+ }[];
3159
+ operation: "watch_conversations";
3160
+ }, {
3161
+ result: {
3162
+ peerAddress: string;
3163
+ lastMessageAt: number;
3164
+ messageCount: number;
3165
+ unreadCount: number;
3166
+ lastMessagePreview?: string | undefined;
3167
+ previewMessages?: {
3168
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3169
+ createdAt: number;
3170
+ messageId: string;
3171
+ fromAddress: string;
3172
+ toAddress: string;
3173
+ plaintextHash: string;
3174
+ direction: "received" | "sent";
3175
+ msgType: 1 | 3;
3176
+ proof?: string | undefined;
3177
+ receivedAt?: number | undefined;
3178
+ serverTimestamp?: number | undefined;
3179
+ plaintext?: string | undefined;
3180
+ guardAddress?: string | undefined;
3181
+ passportAddress?: string | undefined;
3182
+ lastReceivedLeafIndex?: number | undefined;
3183
+ leafIndex?: number | undefined;
3184
+ prevRoot?: string | undefined;
3185
+ newRoot?: string | undefined;
3186
+ serverSignature?: string | undefined;
3187
+ serverPublicKey?: string | undefined;
3188
+ arkConfirmed?: {
3189
+ signature: string;
3190
+ recipient: string;
3191
+ recipientPublicKey: string;
3192
+ timestamp: number;
3193
+ } | undefined;
3194
+ zipMetadata?: {
3195
+ fileName: string;
3196
+ fileSize: number;
3197
+ fileHash: string;
3198
+ contentType: "text" | "wip" | "zip" | "wts";
3199
+ localCachePath?: string | undefined;
3200
+ downloadedAt?: number | undefined;
3201
+ } | undefined;
3202
+ decryptError?: string | undefined;
3203
+ decryptAttempts?: number | undefined;
3204
+ lastDecryptAttemptAt?: number | undefined;
3205
+ viewedAt?: number | undefined;
3206
+ }[] | undefined;
3207
+ }[];
3208
+ operation: "watch_conversations";
3209
+ }>, z.ZodObject<{
3210
+ operation: z.ZodLiteral<"send_message">;
3211
+ result: z.ZodObject<{
3212
+ messageId: z.ZodString;
3213
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
3214
+ merkleData: z.ZodOptional<z.ZodObject<{
3215
+ leafIndex: z.ZodNumber;
3216
+ prevRoot: z.ZodString;
3217
+ newRoot: z.ZodString;
3218
+ serverSignature: z.ZodString;
3219
+ serverTimestamp: z.ZodNumber;
3220
+ serverPublicKey: z.ZodString;
3221
+ }, "strip", z.ZodTypeAny, {
3222
+ serverTimestamp: number;
3223
+ leafIndex: number;
3224
+ prevRoot: string;
3225
+ newRoot: string;
3226
+ serverSignature: string;
3227
+ serverPublicKey: string;
3228
+ }, {
3229
+ serverTimestamp: number;
3230
+ leafIndex: number;
3231
+ prevRoot: string;
3232
+ newRoot: string;
3233
+ serverSignature: string;
3234
+ serverPublicKey: string;
3235
+ }>>;
3236
+ guardList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3237
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
3238
+ }, "strip", z.ZodTypeAny, {
3239
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3240
+ messageId: string;
3241
+ lastReceivedLeafIndex?: number | undefined;
3242
+ merkleData?: {
3243
+ serverTimestamp: number;
3244
+ leafIndex: number;
3245
+ prevRoot: string;
3246
+ newRoot: string;
3247
+ serverSignature: string;
3248
+ serverPublicKey: string;
3249
+ } | undefined;
3250
+ guardList?: string[] | undefined;
3251
+ }, {
3252
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3253
+ messageId: string;
3254
+ lastReceivedLeafIndex?: number | undefined;
3255
+ merkleData?: {
3256
+ serverTimestamp: number;
3257
+ leafIndex: number;
3258
+ prevRoot: string;
3259
+ newRoot: string;
3260
+ serverSignature: string;
3261
+ serverPublicKey: string;
3262
+ } | undefined;
3263
+ guardList?: string[] | undefined;
3264
+ }>;
3265
+ }, "strip", z.ZodTypeAny, {
3266
+ result: {
3267
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3268
+ messageId: string;
3269
+ lastReceivedLeafIndex?: number | undefined;
3270
+ merkleData?: {
3271
+ serverTimestamp: number;
3272
+ leafIndex: number;
3273
+ prevRoot: string;
3274
+ newRoot: string;
3275
+ serverSignature: string;
3276
+ serverPublicKey: string;
3277
+ } | undefined;
3278
+ guardList?: string[] | undefined;
3279
+ };
3280
+ operation: "send_message";
3281
+ }, {
3282
+ result: {
3283
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3284
+ messageId: string;
3285
+ lastReceivedLeafIndex?: number | undefined;
3286
+ merkleData?: {
3287
+ serverTimestamp: number;
3288
+ leafIndex: number;
3289
+ prevRoot: string;
3290
+ newRoot: string;
3291
+ serverSignature: string;
3292
+ serverPublicKey: string;
3293
+ } | undefined;
3294
+ guardList?: string[] | undefined;
3295
+ };
3296
+ operation: "send_message";
3297
+ }>, z.ZodObject<{
3298
+ operation: z.ZodLiteral<"send_file">;
3299
+ result: z.ZodObject<{
3300
+ messageId: z.ZodString;
3301
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
3302
+ merkleData: z.ZodOptional<z.ZodObject<{
3303
+ leafIndex: z.ZodNumber;
3304
+ prevRoot: z.ZodString;
3305
+ newRoot: z.ZodString;
3306
+ serverSignature: z.ZodString;
3307
+ serverTimestamp: z.ZodNumber;
3308
+ serverPublicKey: z.ZodString;
3309
+ }, "strip", z.ZodTypeAny, {
3310
+ serverTimestamp: number;
3311
+ leafIndex: number;
3312
+ prevRoot: string;
3313
+ newRoot: string;
3314
+ serverSignature: string;
3315
+ serverPublicKey: string;
3316
+ }, {
3317
+ serverTimestamp: number;
3318
+ leafIndex: number;
3319
+ prevRoot: string;
3320
+ newRoot: string;
3321
+ serverSignature: string;
3322
+ serverPublicKey: string;
3323
+ }>>;
3324
+ guardList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3325
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
3326
+ }, "strip", z.ZodTypeAny, {
3327
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3328
+ messageId: string;
3329
+ lastReceivedLeafIndex?: number | undefined;
3330
+ merkleData?: {
3331
+ serverTimestamp: number;
3332
+ leafIndex: number;
3333
+ prevRoot: string;
3334
+ newRoot: string;
3335
+ serverSignature: string;
3336
+ serverPublicKey: string;
3337
+ } | undefined;
3338
+ guardList?: string[] | undefined;
3339
+ }, {
3340
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3341
+ messageId: string;
3342
+ lastReceivedLeafIndex?: number | undefined;
3343
+ merkleData?: {
3344
+ serverTimestamp: number;
3345
+ leafIndex: number;
3346
+ prevRoot: string;
3347
+ newRoot: string;
3348
+ serverSignature: string;
3349
+ serverPublicKey: string;
3350
+ } | undefined;
3351
+ guardList?: string[] | undefined;
3352
+ }>;
3353
+ }, "strip", z.ZodTypeAny, {
3354
+ result: {
3355
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3356
+ messageId: string;
3357
+ lastReceivedLeafIndex?: number | undefined;
3358
+ merkleData?: {
3359
+ serverTimestamp: number;
3360
+ leafIndex: number;
3361
+ prevRoot: string;
3362
+ newRoot: string;
3363
+ serverSignature: string;
3364
+ serverPublicKey: string;
3365
+ } | undefined;
3366
+ guardList?: string[] | undefined;
3367
+ };
3368
+ operation: "send_file";
3369
+ }, {
3370
+ result: {
3371
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3372
+ messageId: string;
3373
+ lastReceivedLeafIndex?: number | undefined;
3374
+ merkleData?: {
3375
+ serverTimestamp: number;
3376
+ leafIndex: number;
3377
+ prevRoot: string;
3378
+ newRoot: string;
3379
+ serverSignature: string;
3380
+ serverPublicKey: string;
3381
+ } | undefined;
3382
+ guardList?: string[] | undefined;
3383
+ };
3384
+ operation: "send_file";
3385
+ }>, z.ZodObject<{
3386
+ operation: z.ZodLiteral<"watch_messages">;
3387
+ result: z.ZodArray<z.ZodObject<{
3388
+ messageId: z.ZodString;
3389
+ fromAddress: z.ZodString;
3390
+ toAddress: z.ZodString;
3391
+ plaintextHash: z.ZodString;
3392
+ plaintext: z.ZodOptional<z.ZodString>;
3393
+ guardAddress: z.ZodOptional<z.ZodString>;
3394
+ passportAddress: z.ZodOptional<z.ZodString>;
3395
+ lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
3396
+ direction: z.ZodEnum<["sent", "received"]>;
3397
+ status: z.ZodEnum<["pending", "confirmed", "read", "failed", "rejected", "decrypted", "decrypt_failed"]>;
3398
+ msgType: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<3>]>;
3399
+ leafIndex: z.ZodOptional<z.ZodNumber>;
3400
+ prevRoot: z.ZodOptional<z.ZodString>;
3401
+ newRoot: z.ZodOptional<z.ZodString>;
3402
+ serverSignature: z.ZodOptional<z.ZodString>;
3403
+ serverTimestamp: z.ZodOptional<z.ZodNumber>;
3404
+ serverPublicKey: z.ZodOptional<z.ZodString>;
3405
+ arkConfirmed: z.ZodOptional<z.ZodObject<{
3406
+ recipient: z.ZodString;
3407
+ recipientPublicKey: z.ZodString;
3408
+ signature: z.ZodString;
3409
+ timestamp: z.ZodNumber;
3410
+ }, "strip", z.ZodTypeAny, {
3411
+ signature: string;
3412
+ recipient: string;
3413
+ recipientPublicKey: string;
3414
+ timestamp: number;
3415
+ }, {
3416
+ signature: string;
3417
+ recipient: string;
3418
+ recipientPublicKey: string;
3419
+ timestamp: number;
3420
+ }>>;
3421
+ createdAt: z.ZodNumber;
3422
+ receivedAt: z.ZodOptional<z.ZodNumber>;
3423
+ zipMetadata: z.ZodOptional<z.ZodObject<{
3424
+ fileName: z.ZodString;
3425
+ fileSize: z.ZodNumber;
3426
+ fileHash: z.ZodString;
3427
+ contentType: z.ZodEnum<["text", "zip", "wts", "wip"]>;
3428
+ localCachePath: z.ZodOptional<z.ZodString>;
3429
+ downloadedAt: z.ZodOptional<z.ZodNumber>;
3430
+ }, "strip", z.ZodTypeAny, {
3431
+ fileName: string;
3432
+ fileSize: number;
3433
+ fileHash: string;
3434
+ contentType: "text" | "wip" | "zip" | "wts";
3435
+ localCachePath?: string | undefined;
3436
+ downloadedAt?: number | undefined;
3437
+ }, {
3438
+ fileName: string;
3439
+ fileSize: number;
3440
+ fileHash: string;
3441
+ contentType: "text" | "wip" | "zip" | "wts";
3442
+ localCachePath?: string | undefined;
3443
+ downloadedAt?: number | undefined;
3444
+ }>>;
3445
+ proof: z.ZodOptional<z.ZodString>;
3446
+ decryptError: z.ZodOptional<z.ZodString>;
3447
+ decryptAttempts: z.ZodOptional<z.ZodNumber>;
3448
+ lastDecryptAttemptAt: z.ZodOptional<z.ZodNumber>;
3449
+ viewedAt: z.ZodOptional<z.ZodNumber>;
3450
+ }, "strip", z.ZodTypeAny, {
3451
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3452
+ createdAt: number;
3453
+ messageId: string;
3454
+ fromAddress: string;
3455
+ toAddress: string;
3456
+ plaintextHash: string;
3457
+ direction: "received" | "sent";
3458
+ msgType: 1 | 3;
3459
+ proof?: string | undefined;
3460
+ receivedAt?: number | undefined;
3461
+ serverTimestamp?: number | undefined;
3462
+ plaintext?: string | undefined;
3463
+ guardAddress?: string | undefined;
3464
+ passportAddress?: string | undefined;
3465
+ lastReceivedLeafIndex?: number | undefined;
3466
+ leafIndex?: number | undefined;
3467
+ prevRoot?: string | undefined;
3468
+ newRoot?: string | undefined;
3469
+ serverSignature?: string | undefined;
3470
+ serverPublicKey?: string | undefined;
3471
+ arkConfirmed?: {
3472
+ signature: string;
3473
+ recipient: string;
3474
+ recipientPublicKey: string;
3475
+ timestamp: number;
3476
+ } | undefined;
3477
+ zipMetadata?: {
3478
+ fileName: string;
3479
+ fileSize: number;
3480
+ fileHash: string;
3481
+ contentType: "text" | "wip" | "zip" | "wts";
3482
+ localCachePath?: string | undefined;
3483
+ downloadedAt?: number | undefined;
3484
+ } | undefined;
3485
+ decryptError?: string | undefined;
3486
+ decryptAttempts?: number | undefined;
3487
+ lastDecryptAttemptAt?: number | undefined;
3488
+ viewedAt?: number | undefined;
3489
+ }, {
3490
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3491
+ createdAt: number;
3492
+ messageId: string;
3493
+ fromAddress: string;
3494
+ toAddress: string;
3495
+ plaintextHash: string;
3496
+ direction: "received" | "sent";
3497
+ msgType: 1 | 3;
3498
+ proof?: string | undefined;
3499
+ receivedAt?: number | undefined;
3500
+ serverTimestamp?: number | undefined;
3501
+ plaintext?: string | undefined;
3502
+ guardAddress?: string | undefined;
3503
+ passportAddress?: string | undefined;
3504
+ lastReceivedLeafIndex?: number | undefined;
3505
+ leafIndex?: number | undefined;
3506
+ prevRoot?: string | undefined;
3507
+ newRoot?: string | undefined;
3508
+ serverSignature?: string | undefined;
3509
+ serverPublicKey?: string | undefined;
3510
+ arkConfirmed?: {
3511
+ signature: string;
3512
+ recipient: string;
3513
+ recipientPublicKey: string;
3514
+ timestamp: number;
3515
+ } | undefined;
3516
+ zipMetadata?: {
3517
+ fileName: string;
3518
+ fileSize: number;
3519
+ fileHash: string;
3520
+ contentType: "text" | "wip" | "zip" | "wts";
3521
+ localCachePath?: string | undefined;
3522
+ downloadedAt?: number | undefined;
3523
+ } | undefined;
3524
+ decryptError?: string | undefined;
3525
+ decryptAttempts?: number | undefined;
3526
+ lastDecryptAttemptAt?: number | undefined;
3527
+ viewedAt?: number | undefined;
3528
+ }>, "many">;
3529
+ }, "strip", z.ZodTypeAny, {
3530
+ result: {
3531
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3532
+ createdAt: number;
3533
+ messageId: string;
3534
+ fromAddress: string;
3535
+ toAddress: string;
3536
+ plaintextHash: string;
3537
+ direction: "received" | "sent";
3538
+ msgType: 1 | 3;
3539
+ proof?: string | undefined;
3540
+ receivedAt?: number | undefined;
3541
+ serverTimestamp?: number | undefined;
3542
+ plaintext?: string | undefined;
3543
+ guardAddress?: string | undefined;
3544
+ passportAddress?: string | undefined;
3545
+ lastReceivedLeafIndex?: number | undefined;
3546
+ leafIndex?: number | undefined;
3547
+ prevRoot?: string | undefined;
3548
+ newRoot?: string | undefined;
3549
+ serverSignature?: string | undefined;
3550
+ serverPublicKey?: string | undefined;
3551
+ arkConfirmed?: {
3552
+ signature: string;
3553
+ recipient: string;
3554
+ recipientPublicKey: string;
3555
+ timestamp: number;
3556
+ } | undefined;
3557
+ zipMetadata?: {
3558
+ fileName: string;
3559
+ fileSize: number;
3560
+ fileHash: string;
3561
+ contentType: "text" | "wip" | "zip" | "wts";
3562
+ localCachePath?: string | undefined;
3563
+ downloadedAt?: number | undefined;
3564
+ } | undefined;
3565
+ decryptError?: string | undefined;
3566
+ decryptAttempts?: number | undefined;
3567
+ lastDecryptAttemptAt?: number | undefined;
3568
+ viewedAt?: number | undefined;
3569
+ }[];
3570
+ operation: "watch_messages";
3571
+ }, {
3572
+ result: {
3573
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
3574
+ createdAt: number;
3575
+ messageId: string;
3576
+ fromAddress: string;
3577
+ toAddress: string;
3578
+ plaintextHash: string;
3579
+ direction: "received" | "sent";
3580
+ msgType: 1 | 3;
3581
+ proof?: string | undefined;
3582
+ receivedAt?: number | undefined;
3583
+ serverTimestamp?: number | undefined;
3584
+ plaintext?: string | undefined;
3585
+ guardAddress?: string | undefined;
3586
+ passportAddress?: string | undefined;
3587
+ lastReceivedLeafIndex?: number | undefined;
3588
+ leafIndex?: number | undefined;
3589
+ prevRoot?: string | undefined;
3590
+ newRoot?: string | undefined;
3591
+ serverSignature?: string | undefined;
3592
+ serverPublicKey?: string | undefined;
3593
+ arkConfirmed?: {
3594
+ signature: string;
3595
+ recipient: string;
3596
+ recipientPublicKey: string;
3597
+ timestamp: number;
3598
+ } | undefined;
3599
+ zipMetadata?: {
3600
+ fileName: string;
3601
+ fileSize: number;
3602
+ fileHash: string;
3603
+ contentType: "text" | "wip" | "zip" | "wts";
3604
+ localCachePath?: string | undefined;
3605
+ downloadedAt?: number | undefined;
3606
+ } | undefined;
3607
+ decryptError?: string | undefined;
3608
+ decryptAttempts?: number | undefined;
3609
+ lastDecryptAttemptAt?: number | undefined;
3610
+ viewedAt?: number | undefined;
3611
+ }[];
3612
+ operation: "watch_messages";
3613
+ }>, z.ZodObject<{
3614
+ operation: z.ZodLiteral<"extract_zip_messages">;
3615
+ result: z.ZodArray<z.ZodString, "many">;
3616
+ }, "strip", z.ZodTypeAny, {
3617
+ result: string[];
3618
+ operation: "extract_zip_messages";
3619
+ }, {
3620
+ result: string[];
3621
+ operation: "extract_zip_messages";
3622
+ }>, z.ZodObject<{
3623
+ operation: z.ZodLiteral<"generate_wts">;
3624
+ result: z.ZodObject<{
3625
+ files: z.ZodArray<z.ZodString, "many">;
3626
+ totalMessageCount: z.ZodNumber;
3627
+ timeRange: z.ZodObject<{
3628
+ start: z.ZodNumber;
3629
+ end: z.ZodNumber;
3630
+ }, "strip", z.ZodTypeAny, {
3631
+ start: number;
3632
+ end: number;
3633
+ }, {
3634
+ start: number;
3635
+ end: number;
3636
+ }>;
3637
+ }, "strip", z.ZodTypeAny, {
3638
+ files: string[];
3639
+ totalMessageCount: number;
3640
+ timeRange: {
3641
+ start: number;
3642
+ end: number;
3643
+ };
3644
+ }, {
3645
+ files: string[];
3646
+ totalMessageCount: number;
3647
+ timeRange: {
3648
+ start: number;
3649
+ end: number;
3650
+ };
3651
+ }>;
3652
+ }, "strip", z.ZodTypeAny, {
3653
+ result: {
3654
+ files: string[];
3655
+ totalMessageCount: number;
3656
+ timeRange: {
3657
+ start: number;
3658
+ end: number;
3659
+ };
3660
+ };
3661
+ operation: "generate_wts";
3662
+ }, {
3663
+ result: {
3664
+ files: string[];
3665
+ totalMessageCount: number;
3666
+ timeRange: {
3667
+ start: number;
3668
+ end: number;
3669
+ };
3670
+ };
3671
+ operation: "generate_wts";
3672
+ }>, z.ZodObject<{
3673
+ operation: z.ZodLiteral<"verify_wts">;
3674
+ result: z.ZodObject<{
3675
+ valid: z.ZodBoolean;
3676
+ error: z.ZodOptional<z.ZodString>;
3677
+ hashValid: z.ZodOptional<z.ZodBoolean>;
3678
+ hasSignature: z.ZodOptional<z.ZodBoolean>;
3679
+ signatureValid: z.ZodOptional<z.ZodBoolean>;
3680
+ signatures: z.ZodOptional<z.ZodArray<z.ZodObject<{
3681
+ publicKey: z.ZodString;
3682
+ address: z.ZodOptional<z.ZodString>;
3683
+ valid: z.ZodBoolean;
3684
+ }, "strip", z.ZodTypeAny, {
3685
+ valid: boolean;
3686
+ publicKey: string;
3687
+ address?: string | undefined;
3688
+ }, {
3689
+ valid: boolean;
3690
+ publicKey: string;
3691
+ address?: string | undefined;
3692
+ }>, "many">>;
3693
+ }, "strip", z.ZodTypeAny, {
3694
+ valid: boolean;
3695
+ error?: string | undefined;
3696
+ hashValid?: boolean | undefined;
3697
+ signatureValid?: boolean | undefined;
3698
+ hasSignature?: boolean | undefined;
3699
+ signatures?: {
3700
+ valid: boolean;
3701
+ publicKey: string;
3702
+ address?: string | undefined;
3703
+ }[] | undefined;
3704
+ }, {
3705
+ valid: boolean;
3706
+ error?: string | undefined;
3707
+ hashValid?: boolean | undefined;
3708
+ signatureValid?: boolean | undefined;
3709
+ hasSignature?: boolean | undefined;
3710
+ signatures?: {
3711
+ valid: boolean;
3712
+ publicKey: string;
3713
+ address?: string | undefined;
3714
+ }[] | undefined;
3715
+ }>;
3716
+ }, "strip", z.ZodTypeAny, {
3717
+ result: {
3718
+ valid: boolean;
3719
+ error?: string | undefined;
3720
+ hashValid?: boolean | undefined;
3721
+ signatureValid?: boolean | undefined;
3722
+ hasSignature?: boolean | undefined;
3723
+ signatures?: {
3724
+ valid: boolean;
3725
+ publicKey: string;
3726
+ address?: string | undefined;
3727
+ }[] | undefined;
3728
+ };
3729
+ operation: "verify_wts";
3730
+ }, {
3731
+ result: {
3732
+ valid: boolean;
3733
+ error?: string | undefined;
3734
+ hashValid?: boolean | undefined;
3735
+ signatureValid?: boolean | undefined;
3736
+ hasSignature?: boolean | undefined;
3737
+ signatures?: {
3738
+ valid: boolean;
3739
+ publicKey: string;
3740
+ address?: string | undefined;
3741
+ }[] | undefined;
3742
+ };
3743
+ operation: "verify_wts";
3744
+ }>, z.ZodObject<{
3745
+ operation: z.ZodLiteral<"sign_wts">;
3746
+ result: z.ZodString;
3747
+ }, "strip", z.ZodTypeAny, {
3748
+ result: string;
3749
+ operation: "sign_wts";
3750
+ }, {
3751
+ result: string;
3752
+ operation: "sign_wts";
3753
+ }>, z.ZodObject<{
3754
+ operation: z.ZodLiteral<"wts2html">;
3755
+ result: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
3756
+ }, "strip", z.ZodTypeAny, {
3757
+ result: string | string[];
3758
+ operation: "wts2html";
3759
+ }, {
3760
+ result: string | string[];
3761
+ operation: "wts2html";
3762
+ }>, z.ZodObject<{
3763
+ operation: z.ZodLiteral<"proof_message">;
3764
+ result: z.ZodObject<{
3765
+ proofAddress: z.ZodString;
3766
+ }, "strip", z.ZodTypeAny, {
3767
+ proofAddress: string;
3768
+ }, {
3769
+ proofAddress: string;
3770
+ }>;
3771
+ }, "strip", z.ZodTypeAny, {
3772
+ result: {
3773
+ proofAddress: string;
3774
+ };
3775
+ operation: "proof_message";
3776
+ }, {
3777
+ result: {
3778
+ proofAddress: string;
3779
+ };
3780
+ operation: "proof_message";
3781
+ }>, z.ZodObject<{
3782
+ operation: z.ZodLiteral<"blacklist">;
3783
+ op: z.ZodEnum<["add", "remove", "clear", "get", "exist"]>;
3784
+ result: z.ZodUnion<[z.ZodObject<{
3785
+ success: z.ZodBoolean;
3786
+ operation: z.ZodString;
3787
+ modifiedCount: z.ZodNumber;
3788
+ currentCount: z.ZodNumber;
3789
+ maxCount: z.ZodNumber;
3790
+ invalidAddresses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
3791
+ existResults: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
3792
+ address: z.ZodString;
3793
+ exists: z.ZodBoolean;
3794
+ }, "strip", z.ZodTypeAny, {
3795
+ address: string;
3796
+ exists: boolean;
3797
+ }, {
3798
+ address: string;
3799
+ exists: boolean;
3800
+ }>, "many">>>;
3801
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3802
+ currentList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
3803
+ currentGuardList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
3804
+ guardAddress: z.ZodString;
3805
+ passportValiditySeconds: z.ZodNumber;
3806
+ }, "strip", z.ZodTypeAny, {
3807
+ guardAddress: string;
3808
+ passportValiditySeconds: number;
3809
+ }, {
3810
+ guardAddress: string;
3811
+ passportValiditySeconds: number;
3812
+ }>, "many">>>;
3813
+ }, "strip", z.ZodTypeAny, {
3814
+ success: boolean;
3815
+ operation: string;
3816
+ modifiedCount: number;
3817
+ currentCount: number;
3818
+ maxCount: number;
3819
+ message?: string | null | undefined;
3820
+ invalidAddresses?: string[] | null | undefined;
3821
+ existResults?: {
3822
+ address: string;
3823
+ exists: boolean;
3824
+ }[] | null | undefined;
3825
+ currentList?: string[] | null | undefined;
3826
+ currentGuardList?: {
3827
+ guardAddress: string;
3828
+ passportValiditySeconds: number;
3829
+ }[] | null | undefined;
3830
+ }, {
3831
+ success: boolean;
3832
+ operation: string;
3833
+ modifiedCount: number;
3834
+ currentCount: number;
3835
+ maxCount: number;
3836
+ message?: string | null | undefined;
3837
+ invalidAddresses?: string[] | null | undefined;
3838
+ existResults?: {
3839
+ address: string;
3840
+ exists: boolean;
3841
+ }[] | null | undefined;
3842
+ currentList?: string[] | null | undefined;
3843
+ currentGuardList?: {
3844
+ guardAddress: string;
3845
+ passportValiditySeconds: number;
3846
+ }[] | null | undefined;
3847
+ }>, z.ZodArray<z.ZodString, "many">]>;
3848
+ }, "strip", z.ZodTypeAny, {
3849
+ result: string[] | {
3850
+ success: boolean;
3851
+ operation: string;
3852
+ modifiedCount: number;
3853
+ currentCount: number;
3854
+ maxCount: number;
3855
+ message?: string | null | undefined;
3856
+ invalidAddresses?: string[] | null | undefined;
3857
+ existResults?: {
3858
+ address: string;
3859
+ exists: boolean;
3860
+ }[] | null | undefined;
3861
+ currentList?: string[] | null | undefined;
3862
+ currentGuardList?: {
3863
+ guardAddress: string;
3864
+ passportValiditySeconds: number;
3865
+ }[] | null | undefined;
3866
+ };
3867
+ op: "get" | "add" | "remove" | "clear" | "exist";
3868
+ operation: "blacklist";
3869
+ }, {
3870
+ result: string[] | {
3871
+ success: boolean;
3872
+ operation: string;
3873
+ modifiedCount: number;
3874
+ currentCount: number;
3875
+ maxCount: number;
3876
+ message?: string | null | undefined;
3877
+ invalidAddresses?: string[] | null | undefined;
3878
+ existResults?: {
3879
+ address: string;
3880
+ exists: boolean;
3881
+ }[] | null | undefined;
3882
+ currentList?: string[] | null | undefined;
3883
+ currentGuardList?: {
3884
+ guardAddress: string;
3885
+ passportValiditySeconds: number;
3886
+ }[] | null | undefined;
3887
+ };
3888
+ op: "get" | "add" | "remove" | "clear" | "exist";
3889
+ operation: "blacklist";
3890
+ }>, z.ZodObject<{
3891
+ operation: z.ZodLiteral<"friendslist">;
3892
+ op: z.ZodEnum<["add", "remove", "clear", "get", "exist"]>;
3893
+ result: z.ZodUnion<[z.ZodObject<{
3894
+ success: z.ZodBoolean;
3895
+ operation: z.ZodString;
3896
+ modifiedCount: z.ZodNumber;
3897
+ currentCount: z.ZodNumber;
3898
+ maxCount: z.ZodNumber;
3899
+ invalidAddresses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
3900
+ existResults: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
3901
+ address: z.ZodString;
3902
+ exists: z.ZodBoolean;
3903
+ }, "strip", z.ZodTypeAny, {
3904
+ address: string;
3905
+ exists: boolean;
3906
+ }, {
3907
+ address: string;
3908
+ exists: boolean;
3909
+ }>, "many">>>;
3910
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3911
+ currentList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
3912
+ currentGuardList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
3913
+ guardAddress: z.ZodString;
3914
+ passportValiditySeconds: z.ZodNumber;
3915
+ }, "strip", z.ZodTypeAny, {
3916
+ guardAddress: string;
3917
+ passportValiditySeconds: number;
3918
+ }, {
3919
+ guardAddress: string;
3920
+ passportValiditySeconds: number;
3921
+ }>, "many">>>;
3922
+ }, "strip", z.ZodTypeAny, {
3923
+ success: boolean;
3924
+ operation: string;
3925
+ modifiedCount: number;
3926
+ currentCount: number;
3927
+ maxCount: number;
3928
+ message?: string | null | undefined;
3929
+ invalidAddresses?: string[] | null | undefined;
3930
+ existResults?: {
3931
+ address: string;
3932
+ exists: boolean;
3933
+ }[] | null | undefined;
3934
+ currentList?: string[] | null | undefined;
3935
+ currentGuardList?: {
3936
+ guardAddress: string;
3937
+ passportValiditySeconds: number;
3938
+ }[] | null | undefined;
3939
+ }, {
3940
+ success: boolean;
3941
+ operation: string;
3942
+ modifiedCount: number;
3943
+ currentCount: number;
3944
+ maxCount: number;
3945
+ message?: string | null | undefined;
3946
+ invalidAddresses?: string[] | null | undefined;
3947
+ existResults?: {
3948
+ address: string;
3949
+ exists: boolean;
3950
+ }[] | null | undefined;
3951
+ currentList?: string[] | null | undefined;
3952
+ currentGuardList?: {
3953
+ guardAddress: string;
3954
+ passportValiditySeconds: number;
3955
+ }[] | null | undefined;
3956
+ }>, z.ZodArray<z.ZodString, "many">]>;
3957
+ }, "strip", z.ZodTypeAny, {
3958
+ result: string[] | {
3959
+ success: boolean;
3960
+ operation: string;
3961
+ modifiedCount: number;
3962
+ currentCount: number;
3963
+ maxCount: number;
3964
+ message?: string | null | undefined;
3965
+ invalidAddresses?: string[] | null | undefined;
3966
+ existResults?: {
3967
+ address: string;
3968
+ exists: boolean;
3969
+ }[] | null | undefined;
3970
+ currentList?: string[] | null | undefined;
3971
+ currentGuardList?: {
3972
+ guardAddress: string;
3973
+ passportValiditySeconds: number;
3974
+ }[] | null | undefined;
3975
+ };
3976
+ op: "get" | "add" | "remove" | "clear" | "exist";
3977
+ operation: "friendslist";
3978
+ }, {
3979
+ result: string[] | {
3980
+ success: boolean;
3981
+ operation: string;
3982
+ modifiedCount: number;
3983
+ currentCount: number;
3984
+ maxCount: number;
3985
+ message?: string | null | undefined;
3986
+ invalidAddresses?: string[] | null | undefined;
3987
+ existResults?: {
3988
+ address: string;
3989
+ exists: boolean;
3990
+ }[] | null | undefined;
3991
+ currentList?: string[] | null | undefined;
3992
+ currentGuardList?: {
3993
+ guardAddress: string;
3994
+ passportValiditySeconds: number;
3995
+ }[] | null | undefined;
3996
+ };
3997
+ op: "get" | "add" | "remove" | "clear" | "exist";
3998
+ operation: "friendslist";
3999
+ }>, z.ZodObject<{
4000
+ operation: z.ZodLiteral<"guardlist">;
4001
+ op: z.ZodEnum<["add", "remove", "get"]>;
4002
+ result: z.ZodObject<{
4003
+ success: z.ZodBoolean;
4004
+ operation: z.ZodString;
4005
+ modifiedCount: z.ZodNumber;
4006
+ currentCount: z.ZodNumber;
4007
+ maxCount: z.ZodNumber;
4008
+ invalidAddresses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
4009
+ existResults: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
4010
+ address: z.ZodString;
4011
+ exists: z.ZodBoolean;
4012
+ }, "strip", z.ZodTypeAny, {
4013
+ address: string;
4014
+ exists: boolean;
4015
+ }, {
4016
+ address: string;
4017
+ exists: boolean;
4018
+ }>, "many">>>;
4019
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
4020
+ currentList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
4021
+ currentGuardList: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
4022
+ guardAddress: z.ZodString;
4023
+ passportValiditySeconds: z.ZodNumber;
4024
+ }, "strip", z.ZodTypeAny, {
4025
+ guardAddress: string;
4026
+ passportValiditySeconds: number;
4027
+ }, {
4028
+ guardAddress: string;
4029
+ passportValiditySeconds: number;
4030
+ }>, "many">>>;
4031
+ }, "strip", z.ZodTypeAny, {
4032
+ success: boolean;
4033
+ operation: string;
4034
+ modifiedCount: number;
4035
+ currentCount: number;
4036
+ maxCount: number;
4037
+ message?: string | null | undefined;
4038
+ invalidAddresses?: string[] | null | undefined;
4039
+ existResults?: {
4040
+ address: string;
4041
+ exists: boolean;
4042
+ }[] | null | undefined;
4043
+ currentList?: string[] | null | undefined;
4044
+ currentGuardList?: {
4045
+ guardAddress: string;
4046
+ passportValiditySeconds: number;
4047
+ }[] | null | undefined;
4048
+ }, {
4049
+ success: boolean;
4050
+ operation: string;
4051
+ modifiedCount: number;
4052
+ currentCount: number;
4053
+ maxCount: number;
4054
+ message?: string | null | undefined;
4055
+ invalidAddresses?: string[] | null | undefined;
4056
+ existResults?: {
4057
+ address: string;
4058
+ exists: boolean;
4059
+ }[] | null | undefined;
4060
+ currentList?: string[] | null | undefined;
4061
+ currentGuardList?: {
4062
+ guardAddress: string;
4063
+ passportValiditySeconds: number;
4064
+ }[] | null | undefined;
4065
+ }>;
4066
+ }, "strip", z.ZodTypeAny, {
4067
+ result: {
4068
+ success: boolean;
4069
+ operation: string;
4070
+ modifiedCount: number;
4071
+ currentCount: number;
4072
+ maxCount: number;
4073
+ message?: string | null | undefined;
4074
+ invalidAddresses?: string[] | null | undefined;
4075
+ existResults?: {
4076
+ address: string;
4077
+ exists: boolean;
4078
+ }[] | null | undefined;
4079
+ currentList?: string[] | null | undefined;
4080
+ currentGuardList?: {
4081
+ guardAddress: string;
4082
+ passportValiditySeconds: number;
4083
+ }[] | null | undefined;
4084
+ };
4085
+ op: "get" | "add" | "remove";
4086
+ operation: "guardlist";
4087
+ }, {
4088
+ result: {
4089
+ success: boolean;
4090
+ operation: string;
4091
+ modifiedCount: number;
4092
+ currentCount: number;
4093
+ maxCount: number;
4094
+ message?: string | null | undefined;
4095
+ invalidAddresses?: string[] | null | undefined;
4096
+ existResults?: {
4097
+ address: string;
4098
+ exists: boolean;
4099
+ }[] | null | undefined;
4100
+ currentList?: string[] | null | undefined;
4101
+ currentGuardList?: {
4102
+ guardAddress: string;
4103
+ passportValiditySeconds: number;
4104
+ }[] | null | undefined;
4105
+ };
4106
+ op: "get" | "add" | "remove";
4107
+ operation: "guardlist";
4108
+ }>, z.ZodObject<{
4109
+ operation: z.ZodLiteral<"settings">;
4110
+ op: z.ZodEnum<["get", "set"]>;
4111
+ result: z.ZodUnion<[z.ZodObject<{
4112
+ allowStrangerMessages: z.ZodOptional<z.ZodBoolean>;
4113
+ maxInboxSize: z.ZodOptional<z.ZodNumber>;
4114
+ minUserInboxSize: z.ZodNumber;
4115
+ maxUserInboxSize: z.ZodNumber;
4116
+ defaultAllowStrangerMessages: z.ZodBoolean;
4117
+ }, "strip", z.ZodTypeAny, {
4118
+ minUserInboxSize: number;
4119
+ maxUserInboxSize: number;
4120
+ defaultAllowStrangerMessages: boolean;
4121
+ allowStrangerMessages?: boolean | undefined;
4122
+ maxInboxSize?: number | undefined;
4123
+ }, {
4124
+ minUserInboxSize: number;
4125
+ maxUserInboxSize: number;
4126
+ defaultAllowStrangerMessages: boolean;
4127
+ allowStrangerMessages?: boolean | undefined;
4128
+ maxInboxSize?: number | undefined;
4129
+ }>, z.ZodBoolean]>;
4130
+ }, "strip", z.ZodTypeAny, {
4131
+ result: boolean | {
4132
+ minUserInboxSize: number;
4133
+ maxUserInboxSize: number;
4134
+ defaultAllowStrangerMessages: boolean;
4135
+ allowStrangerMessages?: boolean | undefined;
4136
+ maxInboxSize?: number | undefined;
4137
+ };
4138
+ op: "set" | "get";
4139
+ operation: "settings";
4140
+ }, {
4141
+ result: boolean | {
4142
+ minUserInboxSize: number;
4143
+ maxUserInboxSize: number;
4144
+ defaultAllowStrangerMessages: boolean;
4145
+ allowStrangerMessages?: boolean | undefined;
4146
+ maxInboxSize?: number | undefined;
4147
+ };
4148
+ op: "set" | "get";
4149
+ operation: "settings";
4150
+ }>, z.ZodObject<{
4151
+ operation: z.ZodLiteral<"mark_messages_as_viewed">;
4152
+ result: z.ZodNumber;
4153
+ }, "strip", z.ZodTypeAny, {
4154
+ result: number;
4155
+ operation: "mark_messages_as_viewed";
4156
+ }, {
4157
+ result: number;
4158
+ operation: "mark_messages_as_viewed";
4159
+ }>, z.ZodObject<{
4160
+ operation: z.ZodLiteral<"mark_conversation_as_viewed">;
4161
+ result: z.ZodNumber;
4162
+ }, "strip", z.ZodTypeAny, {
4163
+ result: number;
4164
+ operation: "mark_conversation_as_viewed";
4165
+ }, {
4166
+ result: number;
4167
+ operation: "mark_conversation_as_viewed";
4168
+ }>]>;
4169
+ }, "strip", z.ZodTypeAny, {
4170
+ result: {
4171
+ result: {
4172
+ peerAddress: string;
4173
+ lastMessageAt: number;
4174
+ messageCount: number;
4175
+ unreadCount: number;
4176
+ lastMessagePreview?: string | undefined;
4177
+ previewMessages?: {
4178
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4179
+ createdAt: number;
4180
+ messageId: string;
4181
+ fromAddress: string;
4182
+ toAddress: string;
4183
+ plaintextHash: string;
4184
+ direction: "received" | "sent";
4185
+ msgType: 1 | 3;
4186
+ proof?: string | undefined;
4187
+ receivedAt?: number | undefined;
4188
+ serverTimestamp?: number | undefined;
4189
+ plaintext?: string | undefined;
4190
+ guardAddress?: string | undefined;
4191
+ passportAddress?: string | undefined;
4192
+ lastReceivedLeafIndex?: number | undefined;
4193
+ leafIndex?: number | undefined;
4194
+ prevRoot?: string | undefined;
4195
+ newRoot?: string | undefined;
4196
+ serverSignature?: string | undefined;
4197
+ serverPublicKey?: string | undefined;
4198
+ arkConfirmed?: {
4199
+ signature: string;
4200
+ recipient: string;
4201
+ recipientPublicKey: string;
4202
+ timestamp: number;
4203
+ } | undefined;
4204
+ zipMetadata?: {
4205
+ fileName: string;
4206
+ fileSize: number;
4207
+ fileHash: string;
4208
+ contentType: "text" | "wip" | "zip" | "wts";
4209
+ localCachePath?: string | undefined;
4210
+ downloadedAt?: number | undefined;
4211
+ } | undefined;
4212
+ decryptError?: string | undefined;
4213
+ decryptAttempts?: number | undefined;
4214
+ lastDecryptAttemptAt?: number | undefined;
4215
+ viewedAt?: number | undefined;
4216
+ }[] | undefined;
4217
+ }[];
4218
+ operation: "watch_conversations";
4219
+ } | {
4220
+ result: {
4221
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4222
+ messageId: string;
4223
+ lastReceivedLeafIndex?: number | undefined;
4224
+ merkleData?: {
4225
+ serverTimestamp: number;
4226
+ leafIndex: number;
4227
+ prevRoot: string;
4228
+ newRoot: string;
4229
+ serverSignature: string;
4230
+ serverPublicKey: string;
4231
+ } | undefined;
4232
+ guardList?: string[] | undefined;
4233
+ };
4234
+ operation: "send_message";
4235
+ } | {
4236
+ result: {
4237
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4238
+ messageId: string;
4239
+ lastReceivedLeafIndex?: number | undefined;
4240
+ merkleData?: {
4241
+ serverTimestamp: number;
4242
+ leafIndex: number;
4243
+ prevRoot: string;
4244
+ newRoot: string;
4245
+ serverSignature: string;
4246
+ serverPublicKey: string;
4247
+ } | undefined;
4248
+ guardList?: string[] | undefined;
4249
+ };
4250
+ operation: "send_file";
4251
+ } | {
4252
+ result: {
4253
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4254
+ createdAt: number;
4255
+ messageId: string;
4256
+ fromAddress: string;
4257
+ toAddress: string;
4258
+ plaintextHash: string;
4259
+ direction: "received" | "sent";
4260
+ msgType: 1 | 3;
4261
+ proof?: string | undefined;
4262
+ receivedAt?: number | undefined;
4263
+ serverTimestamp?: number | undefined;
4264
+ plaintext?: string | undefined;
4265
+ guardAddress?: string | undefined;
4266
+ passportAddress?: string | undefined;
4267
+ lastReceivedLeafIndex?: number | undefined;
4268
+ leafIndex?: number | undefined;
4269
+ prevRoot?: string | undefined;
4270
+ newRoot?: string | undefined;
4271
+ serverSignature?: string | undefined;
4272
+ serverPublicKey?: string | undefined;
4273
+ arkConfirmed?: {
4274
+ signature: string;
4275
+ recipient: string;
4276
+ recipientPublicKey: string;
4277
+ timestamp: number;
4278
+ } | undefined;
4279
+ zipMetadata?: {
4280
+ fileName: string;
4281
+ fileSize: number;
4282
+ fileHash: string;
4283
+ contentType: "text" | "wip" | "zip" | "wts";
4284
+ localCachePath?: string | undefined;
4285
+ downloadedAt?: number | undefined;
4286
+ } | undefined;
4287
+ decryptError?: string | undefined;
4288
+ decryptAttempts?: number | undefined;
4289
+ lastDecryptAttemptAt?: number | undefined;
4290
+ viewedAt?: number | undefined;
4291
+ }[];
4292
+ operation: "watch_messages";
4293
+ } | {
4294
+ result: string[];
4295
+ operation: "extract_zip_messages";
4296
+ } | {
4297
+ result: {
4298
+ files: string[];
4299
+ totalMessageCount: number;
4300
+ timeRange: {
4301
+ start: number;
4302
+ end: number;
4303
+ };
4304
+ };
4305
+ operation: "generate_wts";
4306
+ } | {
4307
+ result: {
4308
+ valid: boolean;
4309
+ error?: string | undefined;
4310
+ hashValid?: boolean | undefined;
4311
+ signatureValid?: boolean | undefined;
4312
+ hasSignature?: boolean | undefined;
4313
+ signatures?: {
4314
+ valid: boolean;
4315
+ publicKey: string;
4316
+ address?: string | undefined;
4317
+ }[] | undefined;
4318
+ };
4319
+ operation: "verify_wts";
4320
+ } | {
4321
+ result: string;
4322
+ operation: "sign_wts";
4323
+ } | {
4324
+ result: string | string[];
4325
+ operation: "wts2html";
4326
+ } | {
4327
+ result: {
4328
+ proofAddress: string;
4329
+ };
4330
+ operation: "proof_message";
4331
+ } | {
4332
+ result: string[] | {
4333
+ success: boolean;
4334
+ operation: string;
4335
+ modifiedCount: number;
4336
+ currentCount: number;
4337
+ maxCount: number;
4338
+ message?: string | null | undefined;
4339
+ invalidAddresses?: string[] | null | undefined;
4340
+ existResults?: {
4341
+ address: string;
4342
+ exists: boolean;
4343
+ }[] | null | undefined;
4344
+ currentList?: string[] | null | undefined;
4345
+ currentGuardList?: {
4346
+ guardAddress: string;
4347
+ passportValiditySeconds: number;
4348
+ }[] | null | undefined;
4349
+ };
4350
+ op: "get" | "add" | "remove" | "clear" | "exist";
4351
+ operation: "blacklist";
4352
+ } | {
4353
+ result: string[] | {
4354
+ success: boolean;
4355
+ operation: string;
4356
+ modifiedCount: number;
4357
+ currentCount: number;
4358
+ maxCount: number;
4359
+ message?: string | null | undefined;
4360
+ invalidAddresses?: string[] | null | undefined;
4361
+ existResults?: {
4362
+ address: string;
4363
+ exists: boolean;
4364
+ }[] | null | undefined;
4365
+ currentList?: string[] | null | undefined;
4366
+ currentGuardList?: {
4367
+ guardAddress: string;
4368
+ passportValiditySeconds: number;
4369
+ }[] | null | undefined;
4370
+ };
4371
+ op: "get" | "add" | "remove" | "clear" | "exist";
4372
+ operation: "friendslist";
4373
+ } | {
4374
+ result: {
4375
+ success: boolean;
4376
+ operation: string;
4377
+ modifiedCount: number;
4378
+ currentCount: number;
4379
+ maxCount: number;
4380
+ message?: string | null | undefined;
4381
+ invalidAddresses?: string[] | null | undefined;
4382
+ existResults?: {
4383
+ address: string;
4384
+ exists: boolean;
4385
+ }[] | null | undefined;
4386
+ currentList?: string[] | null | undefined;
4387
+ currentGuardList?: {
4388
+ guardAddress: string;
4389
+ passportValiditySeconds: number;
4390
+ }[] | null | undefined;
4391
+ };
4392
+ op: "get" | "add" | "remove";
4393
+ operation: "guardlist";
4394
+ } | {
4395
+ result: boolean | {
4396
+ minUserInboxSize: number;
4397
+ maxUserInboxSize: number;
4398
+ defaultAllowStrangerMessages: boolean;
4399
+ allowStrangerMessages?: boolean | undefined;
4400
+ maxInboxSize?: number | undefined;
4401
+ };
4402
+ op: "set" | "get";
4403
+ operation: "settings";
4404
+ } | {
4405
+ result: number;
4406
+ operation: "mark_messages_as_viewed";
4407
+ } | {
4408
+ result: number;
4409
+ operation: "mark_conversation_as_viewed";
4410
+ };
4411
+ }, {
4412
+ result: {
4413
+ result: {
4414
+ peerAddress: string;
4415
+ lastMessageAt: number;
4416
+ messageCount: number;
4417
+ unreadCount: number;
4418
+ lastMessagePreview?: string | undefined;
4419
+ previewMessages?: {
4420
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4421
+ createdAt: number;
4422
+ messageId: string;
4423
+ fromAddress: string;
4424
+ toAddress: string;
4425
+ plaintextHash: string;
4426
+ direction: "received" | "sent";
4427
+ msgType: 1 | 3;
4428
+ proof?: string | undefined;
4429
+ receivedAt?: number | undefined;
4430
+ serverTimestamp?: number | undefined;
4431
+ plaintext?: string | undefined;
4432
+ guardAddress?: string | undefined;
4433
+ passportAddress?: string | undefined;
4434
+ lastReceivedLeafIndex?: number | undefined;
4435
+ leafIndex?: number | undefined;
4436
+ prevRoot?: string | undefined;
4437
+ newRoot?: string | undefined;
4438
+ serverSignature?: string | undefined;
4439
+ serverPublicKey?: string | undefined;
4440
+ arkConfirmed?: {
4441
+ signature: string;
4442
+ recipient: string;
4443
+ recipientPublicKey: string;
4444
+ timestamp: number;
4445
+ } | undefined;
4446
+ zipMetadata?: {
4447
+ fileName: string;
4448
+ fileSize: number;
4449
+ fileHash: string;
4450
+ contentType: "text" | "wip" | "zip" | "wts";
4451
+ localCachePath?: string | undefined;
4452
+ downloadedAt?: number | undefined;
4453
+ } | undefined;
4454
+ decryptError?: string | undefined;
4455
+ decryptAttempts?: number | undefined;
4456
+ lastDecryptAttemptAt?: number | undefined;
4457
+ viewedAt?: number | undefined;
4458
+ }[] | undefined;
4459
+ }[];
4460
+ operation: "watch_conversations";
4461
+ } | {
4462
+ result: {
4463
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4464
+ messageId: string;
4465
+ lastReceivedLeafIndex?: number | undefined;
4466
+ merkleData?: {
4467
+ serverTimestamp: number;
4468
+ leafIndex: number;
4469
+ prevRoot: string;
4470
+ newRoot: string;
4471
+ serverSignature: string;
4472
+ serverPublicKey: string;
4473
+ } | undefined;
4474
+ guardList?: string[] | undefined;
4475
+ };
4476
+ operation: "send_message";
4477
+ } | {
4478
+ result: {
4479
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4480
+ messageId: string;
4481
+ lastReceivedLeafIndex?: number | undefined;
4482
+ merkleData?: {
4483
+ serverTimestamp: number;
4484
+ leafIndex: number;
4485
+ prevRoot: string;
4486
+ newRoot: string;
4487
+ serverSignature: string;
4488
+ serverPublicKey: string;
4489
+ } | undefined;
4490
+ guardList?: string[] | undefined;
4491
+ };
4492
+ operation: "send_file";
4493
+ } | {
4494
+ result: {
4495
+ status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
4496
+ createdAt: number;
4497
+ messageId: string;
4498
+ fromAddress: string;
4499
+ toAddress: string;
4500
+ plaintextHash: string;
4501
+ direction: "received" | "sent";
4502
+ msgType: 1 | 3;
4503
+ proof?: string | undefined;
4504
+ receivedAt?: number | undefined;
4505
+ serverTimestamp?: number | undefined;
4506
+ plaintext?: string | undefined;
4507
+ guardAddress?: string | undefined;
4508
+ passportAddress?: string | undefined;
4509
+ lastReceivedLeafIndex?: number | undefined;
4510
+ leafIndex?: number | undefined;
4511
+ prevRoot?: string | undefined;
4512
+ newRoot?: string | undefined;
4513
+ serverSignature?: string | undefined;
4514
+ serverPublicKey?: string | undefined;
4515
+ arkConfirmed?: {
4516
+ signature: string;
4517
+ recipient: string;
4518
+ recipientPublicKey: string;
4519
+ timestamp: number;
4520
+ } | undefined;
4521
+ zipMetadata?: {
4522
+ fileName: string;
4523
+ fileSize: number;
4524
+ fileHash: string;
4525
+ contentType: "text" | "wip" | "zip" | "wts";
4526
+ localCachePath?: string | undefined;
4527
+ downloadedAt?: number | undefined;
4528
+ } | undefined;
4529
+ decryptError?: string | undefined;
4530
+ decryptAttempts?: number | undefined;
4531
+ lastDecryptAttemptAt?: number | undefined;
4532
+ viewedAt?: number | undefined;
4533
+ }[];
4534
+ operation: "watch_messages";
4535
+ } | {
4536
+ result: string[];
4537
+ operation: "extract_zip_messages";
4538
+ } | {
4539
+ result: {
4540
+ files: string[];
4541
+ totalMessageCount: number;
4542
+ timeRange: {
4543
+ start: number;
4544
+ end: number;
4545
+ };
4546
+ };
4547
+ operation: "generate_wts";
4548
+ } | {
4549
+ result: {
4550
+ valid: boolean;
4551
+ error?: string | undefined;
4552
+ hashValid?: boolean | undefined;
4553
+ signatureValid?: boolean | undefined;
4554
+ hasSignature?: boolean | undefined;
4555
+ signatures?: {
4556
+ valid: boolean;
4557
+ publicKey: string;
4558
+ address?: string | undefined;
4559
+ }[] | undefined;
4560
+ };
4561
+ operation: "verify_wts";
4562
+ } | {
4563
+ result: string;
4564
+ operation: "sign_wts";
4565
+ } | {
4566
+ result: string | string[];
4567
+ operation: "wts2html";
4568
+ } | {
4569
+ result: {
4570
+ proofAddress: string;
4571
+ };
4572
+ operation: "proof_message";
4573
+ } | {
4574
+ result: string[] | {
4575
+ success: boolean;
4576
+ operation: string;
4577
+ modifiedCount: number;
4578
+ currentCount: number;
4579
+ maxCount: number;
4580
+ message?: string | null | undefined;
4581
+ invalidAddresses?: string[] | null | undefined;
4582
+ existResults?: {
4583
+ address: string;
4584
+ exists: boolean;
4585
+ }[] | null | undefined;
4586
+ currentList?: string[] | null | undefined;
4587
+ currentGuardList?: {
4588
+ guardAddress: string;
4589
+ passportValiditySeconds: number;
4590
+ }[] | null | undefined;
4591
+ };
4592
+ op: "get" | "add" | "remove" | "clear" | "exist";
4593
+ operation: "blacklist";
4594
+ } | {
4595
+ result: string[] | {
4596
+ success: boolean;
4597
+ operation: string;
4598
+ modifiedCount: number;
4599
+ currentCount: number;
4600
+ maxCount: number;
4601
+ message?: string | null | undefined;
4602
+ invalidAddresses?: string[] | null | undefined;
4603
+ existResults?: {
4604
+ address: string;
4605
+ exists: boolean;
4606
+ }[] | null | undefined;
4607
+ currentList?: string[] | null | undefined;
4608
+ currentGuardList?: {
4609
+ guardAddress: string;
4610
+ passportValiditySeconds: number;
4611
+ }[] | null | undefined;
4612
+ };
4613
+ op: "get" | "add" | "remove" | "clear" | "exist";
4614
+ operation: "friendslist";
4615
+ } | {
4616
+ result: {
4617
+ success: boolean;
4618
+ operation: string;
4619
+ modifiedCount: number;
4620
+ currentCount: number;
4621
+ maxCount: number;
4622
+ message?: string | null | undefined;
4623
+ invalidAddresses?: string[] | null | undefined;
4624
+ existResults?: {
4625
+ address: string;
4626
+ exists: boolean;
4627
+ }[] | null | undefined;
4628
+ currentList?: string[] | null | undefined;
4629
+ currentGuardList?: {
4630
+ guardAddress: string;
4631
+ passportValiditySeconds: number;
4632
+ }[] | null | undefined;
4633
+ };
4634
+ op: "get" | "add" | "remove";
4635
+ operation: "guardlist";
4636
+ } | {
4637
+ result: boolean | {
4638
+ minUserInboxSize: number;
4639
+ maxUserInboxSize: number;
4640
+ defaultAllowStrangerMessages: boolean;
4641
+ allowStrangerMessages?: boolean | undefined;
4642
+ maxInboxSize?: number | undefined;
4643
+ };
4644
+ op: "set" | "get";
4645
+ operation: "settings";
4646
+ } | {
4647
+ result: number;
4648
+ operation: "mark_messages_as_viewed";
4649
+ } | {
4650
+ result: number;
4651
+ operation: "mark_conversation_as_viewed";
4652
+ };
4653
+ }>;
4654
+ export type MessengerOperationInput = z.infer<typeof MessengerOperationInputSchema>;
4655
+ export type MessengerOperationOutput = z.infer<typeof MessengerOperationOutputSchema>;