@wowok/agent-mcp 2.2.13 → 2.2.14
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.
- package/dist/index.js +42 -98
- package/dist/schema-query/index.d.ts +29 -0
- package/dist/schema-query/index.js +149 -0
- package/dist/schemas/account_operation.schema.json +255 -0
- package/dist/schemas/guard2file.schema.json +71 -0
- package/dist/schemas/index.json +139 -0
- package/dist/schemas/local_info_operation.schema.json +142 -0
- package/dist/schemas/local_mark_operation.schema.json +119 -0
- package/dist/schemas/machineNode2file.schema.json +71 -0
- package/dist/schemas/messenger_operation.schema.json +1393 -0
- package/dist/schemas/onchain_events.schema.json +113 -0
- package/dist/schemas/onchain_operations.schema.json +376 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
- package/dist/schemas/onchain_operations_contact.schema.json +853 -0
- package/dist/schemas/onchain_operations_demand.schema.json +984 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
- package/dist/schemas/onchain_operations_guard.schema.json +713 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
- package/dist/schemas/onchain_operations_order.schema.json +830 -0
- package/dist/schemas/onchain_operations_payment.schema.json +717 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
- package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
- package/dist/schemas/onchain_operations_progress.schema.json +751 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
- package/dist/schemas/onchain_operations_reward.schema.json +955 -0
- package/dist/schemas/onchain_operations_service.schema.json +1411 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
- package/dist/schemas/onchain_table_data.schema.json +35 -0
- package/dist/schemas/operations/guard.json +163 -0
- package/dist/schemas/operations/permission.json +22 -0
- package/dist/schemas/query_toolkit.schema.json +32 -0
- package/dist/schemas/schema_query.schema.json +33 -0
- package/dist/schemas/wip_file.schema.json +27 -0
- package/dist/schemas/wowok_buildin_info.schema.json +487 -0
- package/package.json +7 -5
- package/dist/docs/index.d.ts +0 -3
- package/dist/docs/index.js +0 -2
- package/dist/docs/loader.d.ts +0 -12
- package/dist/docs/loader.js +0 -177
- package/dist/docs/search.d.ts +0 -17
- package/dist/docs/search.js +0 -325
- package/dist/docs/types.d.ts +0 -55
- package/dist/docs/types.js +0 -1
- package/docs/README.md +0 -249
- package/docs/WIP.md +0 -388
- package/docs/WTS.md +0 -536
- package/docs/docs/account.md +0 -914
- package/docs/docs/allocation.md +0 -635
- package/docs/docs/arbitration.md +0 -1804
- package/docs/docs/arbitration_state_machine.md +0 -270
- package/docs/docs/contact.md +0 -709
- package/docs/docs/demand.md +0 -948
- package/docs/docs/guard.md +0 -1465
- package/docs/docs/localinfo.md +0 -432
- package/docs/docs/localmark.md +0 -583
- package/docs/docs/machine.md +0 -2490
- package/docs/docs/messenger.md +0 -2098
- package/docs/docs/onchain_events.md +0 -267
- package/docs/docs/order.md +0 -1001
- package/docs/docs/payment.md +0 -512
- package/docs/docs/permission.md +0 -1438
- package/docs/docs/personal.md +0 -742
- package/docs/docs/progress.md +0 -1748
- package/docs/docs/query.md +0 -467
- package/docs/docs/repository.md +0 -1043
- package/docs/docs/reward.md +0 -833
- package/docs/docs/service.md +0 -2130
- package/docs/docs/stage-01-introduction.md +0 -243
- package/docs/docs/stage-02-trust.md +0 -302
- package/docs/docs/stage-03-collaboration.md +0 -337
- package/docs/docs/stage-04-transaction.md +0 -277
- package/docs/docs/stage-05-business.md +0 -151
- package/docs/docs/stage-06-personal.md +0 -203
- package/docs/docs/stage-07-query.md +0 -572
- package/docs/docs/stage-08-examples.md +0 -184
- package/docs/docs/treasury.md +0 -1149
- package/docs/docs/wowok_buildin_info.md +0 -740
- package/docs/examples/Insurance/Insurance.md +0 -594
- package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/docs/examples/MyShop/MyShop.md +0 -1353
- package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/docs/examples/Travel/Travel.md +0 -1157
- package/docs/examples/Travel/Travel_TestResults.md +0 -743
- package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
- package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
- package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
- package/docs/skills/WOWOK.md +0 -650
- package/docs/skills/onchain_operations/_common.md +0 -406
- package/docs/skills/onchain_operations/_index.md +0 -196
- package/docs/skills/onchain_operations/allocation.md +0 -28
- package/docs/skills/onchain_operations/arbitration.md +0 -106
- package/docs/skills/onchain_operations/contact.md +0 -40
- package/docs/skills/onchain_operations/demand.md +0 -53
- package/docs/skills/onchain_operations/gen_passport.md +0 -23
- package/docs/skills/onchain_operations/guard.md +0 -56
- package/docs/skills/onchain_operations/machine.md +0 -89
- package/docs/skills/onchain_operations/order.md +0 -56
- package/docs/skills/onchain_operations/payment.md +0 -24
- package/docs/skills/onchain_operations/permission.md +0 -68
- package/docs/skills/onchain_operations/personal.md +0 -58
- package/docs/skills/onchain_operations/progress.md +0 -38
- package/docs/skills/onchain_operations/repository.md +0 -70
- package/docs/skills/onchain_operations/reward.md +0 -38
- package/docs/skills/onchain_operations/service.md +0 -78
- package/docs/skills/onchain_operations/treasury.md +0 -68
- package/docs/skills/schema-account_operation.md +0 -402
- package/docs/skills/schema-guard2file.md +0 -153
- package/docs/skills/schema-local_info_operation.md +0 -160
- package/docs/skills/schema-local_mark_operation.md +0 -148
- package/docs/skills/schema-machineNode2file.md +0 -155
- package/docs/skills/schema-messenger_operation.md +0 -547
- package/docs/skills/schema-onchain_events.md +0 -201
- package/docs/skills/schema-onchain_table_data.md +0 -334
- package/docs/skills/schema-query_toolkit.md +0 -395
- package/docs/skills/schema-wip_file.md +0 -240
- package/docs/skills/schema-wowok_buildin_info.md +0 -296
- package/docs/wip-examples/three_body.html +0 -57
- package/docs/wip-examples/three_body.wip +0 -30
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
# Schema: messenger_operation
|
|
2
|
-
|
|
3
|
-
> WoWok encrypted messenger operations: watch conversations (with unread filtering, preview messages), send message, send file, watch messages (with viewed status filtering), extract zip messages, generate WTS, verify WTS, sign WTS, WTS to HTML, proof message on-chain, manage blacklist, friendslist, guardlist, settings, mark messages as viewed, and mark conversation as viewed.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Top-Level Structure
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
MessengerOperation {
|
|
11
|
-
operation: string; // One of 16 operation types (see below)
|
|
12
|
-
// Operation-specific fields
|
|
13
|
-
...
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Operation Types
|
|
20
|
-
|
|
21
|
-
### watch_conversations
|
|
22
|
-
|
|
23
|
-
Watch conversations with unread filtering and preview messages.
|
|
24
|
-
|
|
25
|
-
```typescript
|
|
26
|
-
WatchConversations {
|
|
27
|
-
operation: "watch_conversations";
|
|
28
|
-
filter?: ConversationsFilter;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ConversationsFilter {
|
|
32
|
-
account?: string; // Account name or address. Empty = default
|
|
33
|
-
unreadOnly?: boolean; // Only return conversations with unread messages
|
|
34
|
-
startTime?: number; // Filter by lastMessageAt >= value (ms)
|
|
35
|
-
endTime?: number; // Filter by lastMessageAt <= value (ms)
|
|
36
|
-
previewMessageCount?: number; // Number of preview messages (default: 2)
|
|
37
|
-
sortBy?: "lastMessageAt" | "unreadCount" | "messageCount";
|
|
38
|
-
sortOrder?: "asc" | "desc";
|
|
39
|
-
skipAutoMarkViewed?: boolean; // Don't auto-mark preview messages as viewed
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Result**:
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
ConversationInfo[] {
|
|
47
|
-
peerAddress: string; // Peer address
|
|
48
|
-
lastMessageAt: number; // Last message time
|
|
49
|
-
messageCount: number; // Total message count
|
|
50
|
-
unreadCount: number; // Unviewed message count
|
|
51
|
-
lastMessagePreview?: string; // Last message preview text
|
|
52
|
-
previewMessages?: Message[]; // Preview messages
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
### send_message
|
|
59
|
-
|
|
60
|
-
Send encrypted message to a peer.
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
SendMessage {
|
|
64
|
-
operation: "send_message";
|
|
65
|
-
from?: string; // Sender account. Empty = default
|
|
66
|
-
to: string | { name_or_address?: string; local_mark_first?: boolean };
|
|
67
|
-
content: string; // Message content (max 10000 chars)
|
|
68
|
-
options?: SendMessageOptions;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
SendMessageOptions {
|
|
72
|
-
guardAddress?: string; // Guard address for verification
|
|
73
|
-
passportAddress?: string; // Passport address
|
|
74
|
-
force?: boolean; // Force send even with pending Guard messages
|
|
75
|
-
new_messenger_name?: string; // New messenger name for recipient
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Result**:
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
SendMessageResult {
|
|
83
|
-
messageId: string;
|
|
84
|
-
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
85
|
-
merkleData?: {
|
|
86
|
-
leafIndex: number;
|
|
87
|
-
prevRoot: string;
|
|
88
|
-
newRoot: string;
|
|
89
|
-
serverSignature: string;
|
|
90
|
-
serverTimestamp: number;
|
|
91
|
-
serverPublicKey: string;
|
|
92
|
-
};
|
|
93
|
-
guardList?: string[]; // Only on error
|
|
94
|
-
lastReceivedLeafIndex?: number;
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
### send_file
|
|
101
|
-
|
|
102
|
-
Send file as encrypted ZIP message.
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
SendFile {
|
|
106
|
-
operation: "send_file";
|
|
107
|
-
from?: string; // Sender account. Empty = default
|
|
108
|
-
to: string | { name_or_address?: string; local_mark_first?: boolean };
|
|
109
|
-
filePath: string; // Local file path
|
|
110
|
-
options?: SendFileOptions;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
SendFileOptions {
|
|
114
|
-
fileName?: string; // Custom file name
|
|
115
|
-
contentType?: "wts" | "wip" | "zip";
|
|
116
|
-
guardAddress?: string;
|
|
117
|
-
passportAddress?: string;
|
|
118
|
-
force?: boolean;
|
|
119
|
-
new_messenger_name?: string;
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Result**: `SendMessageResult`
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
### watch_messages
|
|
128
|
-
|
|
129
|
-
Watch messages with viewed status filtering.
|
|
130
|
-
|
|
131
|
-
```typescript
|
|
132
|
-
WatchMessages {
|
|
133
|
-
operation: "watch_messages";
|
|
134
|
-
filter?: MessageFilter;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
MessageFilter {
|
|
138
|
-
account?: string; // Account to filter for
|
|
139
|
-
direction?: "sent" | "received";
|
|
140
|
-
status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
141
|
-
peerAddress?: string | { name_or_address?: string; local_mark_first?: boolean };
|
|
142
|
-
msgType?: 1 | 3;
|
|
143
|
-
contentType?: "text" | "zip" | "wts" | "wip";
|
|
144
|
-
decryptedOnly?: boolean;
|
|
145
|
-
confirmedOnly?: boolean;
|
|
146
|
-
keyword?: string; // Search in plaintext
|
|
147
|
-
sortOrder?: "asc" | "desc";
|
|
148
|
-
limit?: number;
|
|
149
|
-
offset?: number;
|
|
150
|
-
timeField?: "createdAt" | "receivedAt" | "serverTimestamp";
|
|
151
|
-
startTime?: number;
|
|
152
|
-
endTime?: number;
|
|
153
|
-
createdAtStart?: number;
|
|
154
|
-
createdAtEnd?: number;
|
|
155
|
-
receivedAtStart?: number;
|
|
156
|
-
receivedAtEnd?: number;
|
|
157
|
-
serverTimestampStart?: number;
|
|
158
|
-
serverTimestampEnd?: number;
|
|
159
|
-
arkConfirmedOnly?: boolean;
|
|
160
|
-
arkTimestampStart?: number;
|
|
161
|
-
arkTimestampEnd?: number;
|
|
162
|
-
proofedOnly?: boolean;
|
|
163
|
-
hasLastReceivedIndexOnly?: boolean;
|
|
164
|
-
lastReceivedIndexMin?: number;
|
|
165
|
-
lastReceivedIndexMax?: number;
|
|
166
|
-
listFilterMode?: "friends" | "guard" | "stranger" | "any";
|
|
167
|
-
customListFilter?: {
|
|
168
|
-
includeAddresses?: string[];
|
|
169
|
-
excludeAddresses?: string[];
|
|
170
|
-
relation?: "union" | "intersection";
|
|
171
|
-
};
|
|
172
|
-
viewed?: boolean; // true = viewed only, false = unviewed only
|
|
173
|
-
viewedAtStart?: number;
|
|
174
|
-
viewedAtEnd?: number;
|
|
175
|
-
skipAutoMarkViewed?: boolean;
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**Result**:
|
|
180
|
-
|
|
181
|
-
```typescript
|
|
182
|
-
Message[] {
|
|
183
|
-
messageId: string;
|
|
184
|
-
fromAddress: string;
|
|
185
|
-
toAddress: string;
|
|
186
|
-
plaintextHash: string;
|
|
187
|
-
plaintext?: string; // Decrypted plaintext
|
|
188
|
-
guardAddress?: string;
|
|
189
|
-
passportAddress?: string;
|
|
190
|
-
lastReceivedLeafIndex?: number;
|
|
191
|
-
direction: "sent" | "received";
|
|
192
|
-
status: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed";
|
|
193
|
-
msgType: 1 | 3;
|
|
194
|
-
leafIndex?: number;
|
|
195
|
-
prevRoot?: string;
|
|
196
|
-
newRoot?: string;
|
|
197
|
-
serverSignature?: string;
|
|
198
|
-
serverTimestamp?: number;
|
|
199
|
-
serverPublicKey?: string;
|
|
200
|
-
arkConfirmed?: {
|
|
201
|
-
recipient: string;
|
|
202
|
-
recipientPublicKey: string;
|
|
203
|
-
signature: string;
|
|
204
|
-
timestamp: number;
|
|
205
|
-
};
|
|
206
|
-
createdAt: number;
|
|
207
|
-
receivedAt?: number;
|
|
208
|
-
zipMetadata?: {
|
|
209
|
-
fileName: string;
|
|
210
|
-
fileSize: number;
|
|
211
|
-
fileHash: string;
|
|
212
|
-
contentType: "text" | "zip" | "wts" | "wip";
|
|
213
|
-
localCachePath?: string;
|
|
214
|
-
downloadedAt?: number;
|
|
215
|
-
};
|
|
216
|
-
proof?: string; // On-chain proof object address
|
|
217
|
-
decryptError?: string;
|
|
218
|
-
decryptAttempts?: number;
|
|
219
|
-
lastDecryptAttemptAt?: number;
|
|
220
|
-
viewedAt?: number; // Timestamp when viewed
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
### extract_zip_messages
|
|
227
|
-
|
|
228
|
-
Extract ZIP files from messages.
|
|
229
|
-
|
|
230
|
-
```typescript
|
|
231
|
-
ExtractZipMessages {
|
|
232
|
-
operation: "extract_zip_messages";
|
|
233
|
-
account?: string; // Account. Empty = default
|
|
234
|
-
messages: (string | Message)[]; // Message IDs or Message objects
|
|
235
|
-
outputDir: string; // Output directory path
|
|
236
|
-
}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**Result**: `string[]` (extracted file paths)
|
|
240
|
-
|
|
241
|
-
---
|
|
242
|
-
|
|
243
|
-
### generate_wts
|
|
244
|
-
|
|
245
|
-
Generate WTS (Witness Transcript) from message history.
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
GenerateWts {
|
|
249
|
-
operation: "generate_wts";
|
|
250
|
-
params: {
|
|
251
|
-
myAccount: string; // My account name or address
|
|
252
|
-
peerAccount: string | { name_or_address?: string; local_mark_first?: boolean };
|
|
253
|
-
range?: WtsRange;
|
|
254
|
-
excludePlaintext?: boolean;
|
|
255
|
-
outputDir: string;
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
WtsRange =
|
|
260
|
-
| { type: "time"; start: number; end: number }
|
|
261
|
-
| { type: "messageId"; start: string; end: string }
|
|
262
|
-
| { type: "seqIndex"; start: number; end: number };
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**Result**:
|
|
266
|
-
|
|
267
|
-
```typescript
|
|
268
|
-
WtsFileResult {
|
|
269
|
-
files: string[]; // Generated WTS file paths
|
|
270
|
-
totalMessageCount: number;
|
|
271
|
-
timeRange: { start: number; end: number };
|
|
272
|
-
}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
### verify_wts
|
|
278
|
-
|
|
279
|
-
Verify WTS file integrity and signatures.
|
|
280
|
-
|
|
281
|
-
```typescript
|
|
282
|
-
VerifyWts {
|
|
283
|
-
operation: "verify_wts";
|
|
284
|
-
wtsFilePath: string; // WTS file path
|
|
285
|
-
}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**Result**:
|
|
289
|
-
|
|
290
|
-
```typescript
|
|
291
|
-
WtsVerificationResult {
|
|
292
|
-
valid: boolean;
|
|
293
|
-
error?: string;
|
|
294
|
-
hashValid: boolean;
|
|
295
|
-
hasSignature: boolean;
|
|
296
|
-
signatureValid?: boolean;
|
|
297
|
-
signatures?: {
|
|
298
|
-
publicKey: string;
|
|
299
|
-
address?: string;
|
|
300
|
-
valid: boolean;
|
|
301
|
-
}[];
|
|
302
|
-
}
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
### sign_wts
|
|
308
|
-
|
|
309
|
-
Sign WTS file.
|
|
310
|
-
|
|
311
|
-
```typescript
|
|
312
|
-
SignWts {
|
|
313
|
-
operation: "sign_wts";
|
|
314
|
-
wtsFilePath: string;
|
|
315
|
-
account?: string; // Signing account. Empty = default
|
|
316
|
-
outputPath?: string; // Output path (default: signed_*.wts)
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
**Result**: `string` (signed file path)
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
### wts2html
|
|
325
|
-
|
|
326
|
-
Convert WTS to HTML.
|
|
327
|
-
|
|
328
|
-
```typescript
|
|
329
|
-
Wts2Html {
|
|
330
|
-
operation: "wts2html";
|
|
331
|
-
wtsPath: string; // WTS file or directory path
|
|
332
|
-
options?: {
|
|
333
|
-
title?: string; // HTML page title
|
|
334
|
-
theme?: "light" | "dark";
|
|
335
|
-
outputPath?: string; // Output file/directory path
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
**Result**: `string | string[]` (HTML string or file paths)
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
### proof_message
|
|
345
|
-
|
|
346
|
-
Proof message on-chain.
|
|
347
|
-
|
|
348
|
-
```typescript
|
|
349
|
-
ProofMessage {
|
|
350
|
-
operation: "proof_message";
|
|
351
|
-
account?: string; // Account. Empty = default
|
|
352
|
-
messageId: string; // Message ID to proof
|
|
353
|
-
network?: "localnet" | "testnet";
|
|
354
|
-
}
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**Result**:
|
|
358
|
-
|
|
359
|
-
```typescript
|
|
360
|
-
{
|
|
361
|
-
proofAddress: string; // Proof object address on blockchain
|
|
362
|
-
}
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
### blacklist
|
|
368
|
-
|
|
369
|
-
Manage blacklist.
|
|
370
|
-
|
|
371
|
-
```typescript
|
|
372
|
-
BlacklistOperation {
|
|
373
|
-
operation: "blacklist";
|
|
374
|
-
account?: string; // Account. Empty = default
|
|
375
|
-
blacklist: {
|
|
376
|
-
op: "add" | "remove" | "clear" | "get" | "exist";
|
|
377
|
-
users?: (string | { name_or_address?: string; local_mark_first?: boolean })[];
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
**Result**:
|
|
383
|
-
|
|
384
|
-
```typescript
|
|
385
|
-
BlacklistResult {
|
|
386
|
-
success: boolean;
|
|
387
|
-
operation: "add" | "remove" | "clear" | "get" | "exist";
|
|
388
|
-
modifiedCount: number;
|
|
389
|
-
currentCount: number;
|
|
390
|
-
maxCount: number;
|
|
391
|
-
invalidAddresses?: string[];
|
|
392
|
-
existResults?: { address: string; exists: boolean }[];
|
|
393
|
-
message?: string;
|
|
394
|
-
currentList?: string[];
|
|
395
|
-
}
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
### friendslist
|
|
401
|
-
|
|
402
|
-
Manage friends list.
|
|
403
|
-
|
|
404
|
-
```typescript
|
|
405
|
-
FriendslistOperation {
|
|
406
|
-
operation: "friendslist";
|
|
407
|
-
account?: string; // Account. Empty = default
|
|
408
|
-
friendslist: {
|
|
409
|
-
op: "add" | "remove" | "clear" | "get" | "exist";
|
|
410
|
-
users?: (string | { name_or_address?: string; local_mark_first?: boolean })[];
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
**Result**:
|
|
416
|
-
|
|
417
|
-
```typescript
|
|
418
|
-
FriendslistResult {
|
|
419
|
-
success: boolean;
|
|
420
|
-
operation: "add" | "remove" | "clear" | "get" | "exist";
|
|
421
|
-
modifiedCount: number;
|
|
422
|
-
currentCount: number;
|
|
423
|
-
maxCount: number;
|
|
424
|
-
invalidAddresses?: string[];
|
|
425
|
-
existResults?: { address: string; exists: boolean }[];
|
|
426
|
-
message?: string;
|
|
427
|
-
currentList?: string[];
|
|
428
|
-
}
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
---
|
|
432
|
-
|
|
433
|
-
### guardlist
|
|
434
|
-
|
|
435
|
-
Manage guard list.
|
|
436
|
-
|
|
437
|
-
```typescript
|
|
438
|
-
GuardlistOperation {
|
|
439
|
-
operation: "guardlist";
|
|
440
|
-
account?: string; // Account. Empty = default
|
|
441
|
-
guardlist: {
|
|
442
|
-
op: "add" | "remove" | "get";
|
|
443
|
-
guards?: GuardParam[]; // For add op (1-10 items)
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
GuardParam {
|
|
448
|
-
guard: string; // Guard address or name
|
|
449
|
-
passportValiditySeconds: number; // 10s to 10 years
|
|
450
|
-
}
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
**Result**:
|
|
454
|
-
|
|
455
|
-
```typescript
|
|
456
|
-
GuardlistResult {
|
|
457
|
-
success: boolean;
|
|
458
|
-
operation: "add" | "remove" | "get";
|
|
459
|
-
modifiedCount: number;
|
|
460
|
-
currentCount: number;
|
|
461
|
-
maxCount: number;
|
|
462
|
-
invalidAddresses?: string[];
|
|
463
|
-
existResults?: { address: string; exists: boolean }[];
|
|
464
|
-
message?: string;
|
|
465
|
-
currentGuardList?: {
|
|
466
|
-
guardAddress: string;
|
|
467
|
-
passportValiditySeconds: number;
|
|
468
|
-
}[];
|
|
469
|
-
}
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
|
|
474
|
-
### settings
|
|
475
|
-
|
|
476
|
-
Manage messenger settings.
|
|
477
|
-
|
|
478
|
-
```typescript
|
|
479
|
-
SettingsOperation {
|
|
480
|
-
operation: "settings";
|
|
481
|
-
account?: string; // Account. Empty = default
|
|
482
|
-
settings: {
|
|
483
|
-
op: "get" | "set";
|
|
484
|
-
allowStrangerMessages?: boolean;
|
|
485
|
-
maxInboxSize?: number; // Minimum 1
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
**Result**:
|
|
491
|
-
|
|
492
|
-
```typescript
|
|
493
|
-
SettingsResult =
|
|
494
|
-
| { // For "get" operation
|
|
495
|
-
allowStrangerMessages?: boolean;
|
|
496
|
-
maxInboxSize?: number;
|
|
497
|
-
minUserInboxSize: number;
|
|
498
|
-
maxUserInboxSize: number;
|
|
499
|
-
defaultAllowStrangerMessages: boolean;
|
|
500
|
-
}
|
|
501
|
-
| boolean; // For "set" operation
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
---
|
|
505
|
-
|
|
506
|
-
### mark_messages_as_viewed
|
|
507
|
-
|
|
508
|
-
Mark specific messages as viewed.
|
|
509
|
-
|
|
510
|
-
```typescript
|
|
511
|
-
MarkMessagesAsViewed {
|
|
512
|
-
operation: "mark_messages_as_viewed";
|
|
513
|
-
account?: string; // Account. Empty = default
|
|
514
|
-
messageIds: string[]; // 1-1000 message IDs
|
|
515
|
-
}
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
**Result**: `number` (count of messages marked as viewed)
|
|
519
|
-
|
|
520
|
-
---
|
|
521
|
-
|
|
522
|
-
### mark_conversation_as_viewed
|
|
523
|
-
|
|
524
|
-
Mark all messages in a conversation as viewed.
|
|
525
|
-
|
|
526
|
-
```typescript
|
|
527
|
-
MarkConversationAsViewed {
|
|
528
|
-
operation: "mark_conversation_as_viewed";
|
|
529
|
-
account?: string; // Account. Empty = default
|
|
530
|
-
peerAddress: string | { name_or_address?: string; local_mark_first?: boolean };
|
|
531
|
-
}
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
**Result**: `number` (count of messages marked as viewed)
|
|
535
|
-
|
|
536
|
-
---
|
|
537
|
-
|
|
538
|
-
## Output Structure
|
|
539
|
-
|
|
540
|
-
```typescript
|
|
541
|
-
MessengerOperationOutput {
|
|
542
|
-
result: {
|
|
543
|
-
operation: string; // The operation type
|
|
544
|
-
result: OperationResult; // Operation-specific result
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
```
|