@wowok/agent-mcp 2.2.13 → 2.2.15

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 (126) hide show
  1. package/README.md +19 -11
  2. package/dist/index.js +44 -100
  3. package/dist/schema/query/index.js +1 -1
  4. package/dist/schema-query/index.d.ts +29 -0
  5. package/dist/schema-query/index.js +149 -0
  6. package/dist/schemas/account_operation.schema.json +255 -0
  7. package/dist/schemas/guard2file.schema.json +71 -0
  8. package/dist/schemas/index.json +139 -0
  9. package/dist/schemas/local_info_operation.schema.json +142 -0
  10. package/dist/schemas/local_mark_operation.schema.json +119 -0
  11. package/dist/schemas/machineNode2file.schema.json +71 -0
  12. package/dist/schemas/messenger_operation.schema.json +1393 -0
  13. package/dist/schemas/onchain_events.schema.json +113 -0
  14. package/dist/schemas/onchain_operations.schema.json +376 -0
  15. package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
  16. package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
  17. package/dist/schemas/onchain_operations_contact.schema.json +853 -0
  18. package/dist/schemas/onchain_operations_demand.schema.json +984 -0
  19. package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
  20. package/dist/schemas/onchain_operations_guard.schema.json +713 -0
  21. package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
  22. package/dist/schemas/onchain_operations_order.schema.json +830 -0
  23. package/dist/schemas/onchain_operations_payment.schema.json +717 -0
  24. package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
  25. package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
  26. package/dist/schemas/onchain_operations_progress.schema.json +751 -0
  27. package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
  28. package/dist/schemas/onchain_operations_reward.schema.json +955 -0
  29. package/dist/schemas/onchain_operations_service.schema.json +1411 -0
  30. package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
  31. package/dist/schemas/onchain_table_data.schema.json +35 -0
  32. package/dist/schemas/query_toolkit.schema.json +32 -0
  33. package/dist/schemas/schema_query.schema.json +33 -0
  34. package/dist/schemas/wip_file.schema.json +27 -0
  35. package/dist/schemas/wowok_buildin_info.schema.json +487 -0
  36. package/package.json +7 -5
  37. package/dist/docs/index.d.ts +0 -3
  38. package/dist/docs/index.js +0 -2
  39. package/dist/docs/loader.d.ts +0 -12
  40. package/dist/docs/loader.js +0 -177
  41. package/dist/docs/search.d.ts +0 -17
  42. package/dist/docs/search.js +0 -325
  43. package/dist/docs/types.d.ts +0 -55
  44. package/dist/docs/types.js +0 -1
  45. package/docs/README.md +0 -249
  46. package/docs/WIP.md +0 -388
  47. package/docs/WTS.md +0 -536
  48. package/docs/docs/account.md +0 -914
  49. package/docs/docs/allocation.md +0 -635
  50. package/docs/docs/arbitration.md +0 -1804
  51. package/docs/docs/arbitration_state_machine.md +0 -270
  52. package/docs/docs/contact.md +0 -709
  53. package/docs/docs/demand.md +0 -948
  54. package/docs/docs/guard.md +0 -1465
  55. package/docs/docs/localinfo.md +0 -432
  56. package/docs/docs/localmark.md +0 -583
  57. package/docs/docs/machine.md +0 -2490
  58. package/docs/docs/messenger.md +0 -2098
  59. package/docs/docs/onchain_events.md +0 -267
  60. package/docs/docs/order.md +0 -1001
  61. package/docs/docs/payment.md +0 -512
  62. package/docs/docs/permission.md +0 -1438
  63. package/docs/docs/personal.md +0 -742
  64. package/docs/docs/progress.md +0 -1748
  65. package/docs/docs/query.md +0 -467
  66. package/docs/docs/repository.md +0 -1043
  67. package/docs/docs/reward.md +0 -833
  68. package/docs/docs/service.md +0 -2130
  69. package/docs/docs/stage-01-introduction.md +0 -243
  70. package/docs/docs/stage-02-trust.md +0 -302
  71. package/docs/docs/stage-03-collaboration.md +0 -337
  72. package/docs/docs/stage-04-transaction.md +0 -277
  73. package/docs/docs/stage-05-business.md +0 -151
  74. package/docs/docs/stage-06-personal.md +0 -203
  75. package/docs/docs/stage-07-query.md +0 -572
  76. package/docs/docs/stage-08-examples.md +0 -184
  77. package/docs/docs/treasury.md +0 -1149
  78. package/docs/docs/wowok_buildin_info.md +0 -740
  79. package/docs/examples/Insurance/Insurance.md +0 -594
  80. package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
  81. package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
  82. package/docs/examples/MyShop/MyShop.md +0 -1353
  83. package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
  84. package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
  85. package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
  86. package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
  87. package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
  88. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
  89. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
  90. package/docs/examples/Travel/Travel.md +0 -1157
  91. package/docs/examples/Travel/Travel_TestResults.md +0 -743
  92. package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
  93. package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
  94. package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
  95. package/docs/skills/WOWOK.md +0 -650
  96. package/docs/skills/onchain_operations/_common.md +0 -406
  97. package/docs/skills/onchain_operations/_index.md +0 -196
  98. package/docs/skills/onchain_operations/allocation.md +0 -28
  99. package/docs/skills/onchain_operations/arbitration.md +0 -106
  100. package/docs/skills/onchain_operations/contact.md +0 -40
  101. package/docs/skills/onchain_operations/demand.md +0 -53
  102. package/docs/skills/onchain_operations/gen_passport.md +0 -23
  103. package/docs/skills/onchain_operations/guard.md +0 -56
  104. package/docs/skills/onchain_operations/machine.md +0 -89
  105. package/docs/skills/onchain_operations/order.md +0 -56
  106. package/docs/skills/onchain_operations/payment.md +0 -24
  107. package/docs/skills/onchain_operations/permission.md +0 -68
  108. package/docs/skills/onchain_operations/personal.md +0 -58
  109. package/docs/skills/onchain_operations/progress.md +0 -38
  110. package/docs/skills/onchain_operations/repository.md +0 -70
  111. package/docs/skills/onchain_operations/reward.md +0 -38
  112. package/docs/skills/onchain_operations/service.md +0 -78
  113. package/docs/skills/onchain_operations/treasury.md +0 -68
  114. package/docs/skills/schema-account_operation.md +0 -402
  115. package/docs/skills/schema-guard2file.md +0 -153
  116. package/docs/skills/schema-local_info_operation.md +0 -160
  117. package/docs/skills/schema-local_mark_operation.md +0 -148
  118. package/docs/skills/schema-machineNode2file.md +0 -155
  119. package/docs/skills/schema-messenger_operation.md +0 -547
  120. package/docs/skills/schema-onchain_events.md +0 -201
  121. package/docs/skills/schema-onchain_table_data.md +0 -334
  122. package/docs/skills/schema-query_toolkit.md +0 -395
  123. package/docs/skills/schema-wip_file.md +0 -240
  124. package/docs/skills/schema-wowok_buildin_info.md +0 -296
  125. package/docs/wip-examples/three_body.html +0 -57
  126. package/docs/wip-examples/three_body.wip +0 -30
@@ -1,201 +0,0 @@
1
- # On-Chain Events Tool Schema
2
-
3
- > **Tool Name**: `onchain_events`
4
- > **Description**: Watch on-chain WOWOK events by type. Supports arbitration events, new order events, progress events, demand presentation events, demand feedback events, and new entity registration events. Use pagination cursor for fetching large result sets.
5
-
6
- ---
7
-
8
- ## Tool Schema
9
-
10
- ```typescript
11
- onchain_events: OnchainEventsInput
12
- ```
13
-
14
- ---
15
-
16
- ## Input Schema
17
-
18
- ```typescript
19
- OnchainEventsInput {
20
- type: EventType, // REQUIRED - Event type to query
21
- cursor?: EventCursor | null, // OPTIONAL - Pagination cursor for fetching next page
22
- limit?: number | null, // OPTIONAL - Maximum number of events to return per query
23
- order?: "ascending" | "descending" | null, // OPTIONAL - Sort order
24
- no_cache?: boolean, // OPTIONAL - Whether to bypass cache
25
- network?: "localnet" | "testnet" // OPTIONAL - Network to query
26
- }
27
- ```
28
-
29
- ---
30
-
31
- ## Sub Schemas
32
-
33
- ### EventType
34
-
35
- ```typescript
36
- EventType =
37
- | "ArbEvent" // Arbitration events
38
- | "NewOrderEvent" // New order events
39
- | "ProgressEvent" // Progress events
40
- | "DemandPresentEvent" // Demand presentation events
41
- | "DemandFeedbackEvent" // Demand feedback events
42
- | "NewEntityEvent" // New entity registration events
43
- ```
44
-
45
- ### EventCursor
46
-
47
- ```typescript
48
- EventCursor {
49
- eventSeq: string, // Event sequence number
50
- txDigest: string // Transaction digest
51
- }
52
- ```
53
-
54
- ---
55
-
56
- ## Output Schema
57
-
58
- ```typescript
59
- OnchainEventsResult {
60
- result: EventAnswer | null // Event query result or null if no data
61
- }
62
-
63
- EventAnswer {
64
- data: EventBase[], // Event object data array
65
- hasNextPage: boolean, // Whether there is a next page
66
- nextCursor?: EventCursor | null, // Next page cursor
67
- cache_expire?: number | "INFINITE" // Cache expiration time
68
- }
69
- ```
70
-
71
- ---
72
-
73
- ## Event Type Schemas
74
-
75
- ### EventBase
76
-
77
- Base schema for all event types.
78
-
79
- ```typescript
80
- EventBase {
81
- id: EventCursor, // Event identifier
82
- sender: string, // Event sender ID
83
- type: EventType | string, // Event type
84
- type_raw: string, // Raw event type
85
- time: string // Event occurrence time
86
- }
87
- ```
88
-
89
- ### ArbEvent
90
-
91
- Arbitration event schema.
92
-
93
- ```typescript
94
- ArbEvent extends EventBase {
95
- arb: string, // Arbitration object ID
96
- arbitration: string, // Arbitration object ID (alias)
97
- order: string, // Order object ID
98
- status: ArbStatus // Arbitration status
99
- }
100
-
101
- ArbStatus =
102
- | "voting" // Voting in progress
103
- | "completed" // Completed
104
- | "cancelled" // Cancelled
105
- ```
106
-
107
- ### NewOrderEvent
108
-
109
- New order event schema.
110
-
111
- ```typescript
112
- NewOrderEvent extends EventBase {
113
- order: string, // Order object ID
114
- service: string, // Service object ID
115
- progress?: string | null, // Progress object ID
116
- discount?: string | null, // Discount object ID
117
- allocation?: string | null, // Allocation object ID
118
- amount: BalanceType // Order amount
119
- }
120
- ```
121
-
122
- ### ProgressEvent
123
-
124
- Progress event schema.
125
-
126
- ```typescript
127
- ProgressEvent extends EventBase {
128
- progress: string, // Progress object ID
129
- machine: string, // Machine object ID
130
- task?: string | null, // Task object ID
131
- node: string, // Current node name
132
- forward?: string | null, // Forward operation name
133
- hold?: boolean | null // Whether it is a hold operation
134
- }
135
- ```
136
-
137
- ### DemandPresentEvent
138
-
139
- Demand presentation event schema.
140
-
141
- ```typescript
142
- DemandPresentEvent extends EventBase {
143
- demand: string, // Demand object ID
144
- service?: string | null, // Service object ID
145
- recommend: string // Recommendation letter
146
- }
147
- ```
148
-
149
- ### DemandFeedbackEvent
150
-
151
- Demand feedback event schema.
152
-
153
- ```typescript
154
- DemandFeedbackEvent extends EventBase {
155
- demand: string, // Demand object ID
156
- service?: string | null, // Service object ID
157
- feedback: string, // Feedback content
158
- acceptance_score?: number | null // Acceptance score
159
- }
160
- ```
161
-
162
- ### NewEntityEvent
163
-
164
- New entity registration event schema.
165
-
166
- ```typescript
167
- NewEntityEvent extends EventBase {
168
- address: string, // User ID
169
- resource: string, // ID mark object ID owned by user
170
- referrer?: string | null // Referrer ID
171
- }
172
- ```
173
-
174
- ---
175
-
176
- ## Event Type Selection Guide
177
-
178
- | Event Type | Use Case | Key Fields |
179
- |------------|----------|------------|
180
- | `ArbEvent` | Monitor arbitration status changes | `arb`, `order`, `status` |
181
- | `NewOrderEvent` | Track new orders created | `order`, `service`, `amount` |
182
- | `ProgressEvent` | Monitor workflow progress | `progress`, `machine`, `node` |
183
- | `DemandPresentEvent` | Track demand presentations | `demand`, `service`, `recommend` |
184
- | `DemandFeedbackEvent` | Monitor demand feedback | `demand`, `feedback`, `acceptance_score` |
185
- | `NewEntityEvent` | Track new user registrations | `address`, `resource`, `referrer` |
186
-
187
- ---
188
-
189
- ## Pagination Guide
190
-
191
- 1. **First Query**: Set `cursor` to `null` to get the first page
192
- 2. **Subsequent Queries**: Use `nextCursor` from previous response
193
- 3. **Check `hasNextPage`**: Stop when `hasNextPage` is `false`
194
-
195
- ---
196
-
197
- ## Complete Event Union Type
198
-
199
- ```typescript
200
- Event = ArbEvent | NewOrderEvent | ProgressEvent | DemandPresentEvent | DemandFeedbackEvent | NewEntityEvent
201
- ```
@@ -1,334 +0,0 @@
1
- # Schema: onchain_table_data
2
-
3
- > **Tool Name**: `onchain_table_data`
4
- > **Description**: Query dynamic table data of on-chain objects — supports paginated table queries and specific table item lookups. Each table item belongs to a parent object type and has a specific meaning.
5
- >
6
- > This tool was split from `query_toolkit` to handle the unique characteristics of dynamic table queries — objects have fixed size, but their table data can grow dynamically.
7
-
8
- ---
9
-
10
- ## Top-Level Structure
11
-
12
- ```typescript
13
- // Discriminated union by query_type — exactly ONE query per call
14
- OnchainTableData = {
15
- query_type: "onchain_table" | "onchain_table_item_repository_data" |
16
- "onchain_table_item_permission_perm" | "onchain_table_item_entity_registrar" |
17
- "onchain_table_item_entity_linker" | "onchain_table_item_reward_record" |
18
- "onchain_table_item_demand_presenter" | "onchain_table_item_treasury_history" |
19
- "onchain_table_item_machine_node" | "onchain_table_item_progress_history" |
20
- "onchain_table_item_address_mark" | "onchain_table_item_generic";
21
- // ... query-specific parameters (see below)
22
- }
23
- ```
24
-
25
- ---
26
-
27
- ## Common Parameters (All Queries)
28
-
29
- | Parameter | Type | Description |
30
- |-----------|------|-------------|
31
- | `no_cache` | `boolean` (optional) | Set to `true` to bypass cache and fetch fresh on-chain data |
32
- | `network` | `"localnet" \| "testnet"` (optional) | Network to query; defaults to the configured default network |
33
-
34
- ---
35
-
36
- ## Common Parameters (Paginated Queries)
37
-
38
- | Parameter | Type | Applies To | Description |
39
- |-----------|------|-----------|-------------|
40
- | `cursor` | `string \| null` (optional) | onchain_table | Pagination cursor from previous page's `nextCursor` |
41
- | `limit` | `number \| null` (optional) | onchain_table | Max items per page |
42
-
43
- ---
44
-
45
- ## Query Types
46
-
47
- ### 1. onchain_table
48
-
49
- Paginated query of ANY object's dynamic fields table. Returns all entries with keys, types, and object IDs. Use to explore all sub-items of an object.
50
-
51
- **Parent**: Any object
52
-
53
- ```typescript
54
- {
55
- query_type: "onchain_table";
56
- parent: string; // Parent object ID whose dynamic fields table to query
57
- cursor?: string | null; // Pagination cursor from previous page's nextCursor
58
- limit?: number | null; // Max items per page
59
- no_cache?: boolean;
60
- network?: "localnet" | "testnet";
61
- }
62
- ```
63
-
64
- **Result**: `TableAnswer | undefined`
65
-
66
- ```typescript
67
- TableAnswer {
68
- items: TableItem[];
69
- hasNextPage: boolean;
70
- nextCursor?: string | null;
71
- }
72
-
73
- TableItem {
74
- object: string; // Object ID of the table item
75
- type: string; // Type of the table item
76
- version: number; // Version of the table item
77
- key: { // Key of the dynamic field entry
78
- type: string; // Key type (e.g., "address", "string", "u64")
79
- value: string; // Key value
80
- };
81
- }
82
- ```
83
-
84
- ---
85
-
86
- ### 2. onchain_table_item_repository_data
87
-
88
- Query a record from a Repository's on-chain key-value database.
89
-
90
- **Parent**: Repository | **Key**: name + entity (address or number)
91
-
92
- ```typescript
93
- {
94
- query_type: "onchain_table_item_repository_data";
95
- parent: string; // Parent Repository object ID
96
- name: string; // Name/key of the record to retrieve
97
- entity: string | number; // Entity ID or address that owns/identifies the record
98
- no_cache?: boolean;
99
- network?: "localnet" | "testnet";
100
- }
101
- ```
102
-
103
- **Result**: `TableItem_RepositoryData | undefined`
104
-
105
- ---
106
-
107
- ### 3. onchain_table_item_permission_perm
108
-
109
- Query a permission entry from a Permission object's access control table. Returns the permission list (perm[]) granted to that user/guard.
110
-
111
- **Parent**: Permission | **Key**: user address or Guard ID
112
-
113
- ```typescript
114
- {
115
- query_type: "onchain_table_item_permission_perm";
116
- parent: string; // Parent Permission object ID
117
- address: string; // User address or Guard ID whose permissions to check
118
- no_cache?: boolean;
119
- network?: "localnet" | "testnet";
120
- }
121
- ```
122
-
123
- **Result**: `TableItem_PermissionPerm | undefined`
124
-
125
- ```typescript
126
- TableItem_PermissionPerm {
127
- object: string;
128
- type: string;
129
- type_raw: string;
130
- owner: object;
131
- version: string;
132
- previousTransaction: string;
133
- address: string; // The entity address
134
- perm: number[]; // List of permission indexes granted
135
- }
136
- ```
137
-
138
- ---
139
-
140
- ### 4. onchain_table_item_entity_registrar
141
-
142
- Query an entity's registration record from the GLOBAL EntityRegistrar. Returns registration info: description, referrer, records, mark_object.
143
-
144
- **Parent**: System EntityRegistrar | **Key**: user address
145
-
146
- ```typescript
147
- {
148
- query_type: "onchain_table_item_entity_registrar";
149
- address: string; // User address to look up in the global EntityRegistrar
150
- no_cache?: boolean;
151
- network?: "localnet" | "testnet";
152
- }
153
- ```
154
-
155
- **Result**: `TableItem_EntityRegistrar | undefined`
156
-
157
- ---
158
-
159
- ### 5. onchain_table_item_entity_linker
160
-
161
- Query community votes/endorsements for an entity from the GLOBAL EntityLinker. Returns vote records (likes/dislikes) showing community trust.
162
-
163
- **Parent**: System EntityLinker | **Key**: entity address
164
-
165
- ```typescript
166
- {
167
- query_type: "onchain_table_item_entity_linker";
168
- address: string; // Entity address whose community votes to query
169
- no_cache?: boolean;
170
- network?: "localnet" | "testnet";
171
- }
172
- ```
173
-
174
- **Result**: `TableItem_EntityLinker | undefined`
175
-
176
- ---
177
-
178
- ### 6. onchain_table_item_reward_record
179
-
180
- Query a reward claim record from a Reward object's distribution table. Returns claim history: guard used, total claimed, per-claim details.
181
-
182
- **Parent**: Reward | **Key**: recipient address
183
-
184
- ```typescript
185
- {
186
- query_type: "onchain_table_item_reward_record";
187
- parent: string; // Parent Reward object ID
188
- address: string; // User address that claimed the reward
189
- no_cache?: boolean;
190
- network?: "localnet" | "testnet";
191
- }
192
- ```
193
-
194
- **Result**: `TableItem_RewardRecord | undefined`
195
-
196
- ---
197
-
198
- ### 7. onchain_table_item_demand_presenter
199
-
200
- Query a demand submission from a Demand object's presenter table. Returns submission details: recommendation, service, feedback, acceptance score.
201
-
202
- **Parent**: Demand | **Key**: presenter address
203
-
204
- ```typescript
205
- {
206
- query_type: "onchain_table_item_demand_presenter";
207
- parent: string; // Parent Demand object ID
208
- address: string; // Presenter address that submitted the demand
209
- no_cache?: boolean;
210
- network?: "localnet" | "testnet";
211
- }
212
- ```
213
-
214
- **Result**: `TableItem_DemandPresenter | undefined`
215
-
216
- ---
217
-
218
- ### 8. onchain_table_item_treasury_history
219
-
220
- Query a payment record from a Treasury's history table. Returns payment details: operation type, signer, amount, external guard.
221
-
222
- **Parent**: Treasury | **Key**: payment ID (address)
223
-
224
- ```typescript
225
- {
226
- query_type: "onchain_table_item_treasury_history";
227
- parent: string; // Parent Treasury object ID
228
- address: string; // Payment ID whose treasury record to look up
229
- no_cache?: boolean;
230
- network?: "localnet" | "testnet";
231
- }
232
- ```
233
-
234
- **Result**: `TableItem_TreasuryHistory | undefined`
235
-
236
- ---
237
-
238
- ### 9. onchain_table_item_machine_node
239
-
240
- Query a workflow node definition from a Machine object's node table. Returns node configuration: pairs, forwards, guards, thresholds.
241
-
242
- **Parent**: Machine | **Key**: node name (string)
243
-
244
- ```typescript
245
- {
246
- query_type: "onchain_table_item_machine_node";
247
- parent: string; // Parent Machine object ID
248
- key: string; // Node name (string key) in the Machine's workflow definition
249
- no_cache?: boolean;
250
- network?: "localnet" | "testnet";
251
- }
252
- ```
253
-
254
- **Result**: `TableItem_MachineNode | undefined`
255
-
256
- ---
257
-
258
- ### 10. onchain_table_item_progress_history
259
-
260
- Query a progress step record from a Progress object's history table. Returns step details: node, next_node, session state, time.
261
-
262
- **Parent**: Progress | **Key**: sequence number (u64)
263
-
264
- ```typescript
265
- {
266
- query_type: "onchain_table_item_progress_history";
267
- parent: string; // Parent Progress object ID
268
- u64: number | string; // Sequence number (u64) of the progress step to query
269
- no_cache?: boolean;
270
- network?: "localnet" | "testnet";
271
- }
272
- ```
273
-
274
- **Result**: `TableItem_ProgressHistory | undefined`
275
-
276
- ---
277
-
278
- ### 11. onchain_table_item_address_mark
279
-
280
- Query a PUBLIC on-chain name/tag mark from an AddressMark object's table. Unlike local marks, these are published on-chain. Returns public labels: entity, name, tags[].
281
-
282
- **Parent**: AddressMark | **Key**: address
283
-
284
- ```typescript
285
- {
286
- query_type: "onchain_table_item_address_mark";
287
- parent: string; // Parent AddressMark object ID
288
- address: string; // Address whose PUBLIC on-chain name/tags to look up
289
- no_cache?: boolean;
290
- network?: "localnet" | "testnet";
291
- }
292
- ```
293
-
294
- **Result**: `TableItem_AddressMark | undefined`
295
-
296
- ---
297
-
298
- ### 12. onchain_table_item_generic
299
-
300
- Query a generic table item from ANY object's dynamic fields. Supports arbitrary key types and values for non-WoWok objects or custom queries. Use for general-purpose table lookups.
301
-
302
- **Parent**: Any object | **Key**: arbitrary (key_type + key_value)
303
-
304
- ```typescript
305
- {
306
- query_type: "onchain_table_item_generic";
307
- parent: string; // Parent object ID whose dynamic field to query
308
- key_type: string; // Type of the key (e.g., "address", "u64", "string", "0x2::object::ID")
309
- key_value: any; // Value of the key — must match key_type format
310
- no_cache?: boolean;
311
- network?: "localnet" | "testnet";
312
- }
313
- ```
314
-
315
- **Result**: `ObjectBase | undefined`
316
-
317
- ---
318
-
319
- ## Output Schema
320
-
321
- All queries return results wrapped in a unified `z.object({ result: ... })` structure with strict schema validation:
322
-
323
- ```typescript
324
- OnchainTableDataResult {
325
- result: {
326
- query_type: string; // Echoes the requested query_type
327
- result: TableAnswer | TableItem_* | undefined; // Query-specific result
328
- }
329
- }
330
- ```
331
-
332
- The output schema validates all 12 query types with their specific return types. Each query's `result` field is strictly typed:
333
- - `onchain_table` returns `TableAnswer | undefined` (items[], nextCursor, hasNextPage)
334
- - All `onchain_table_item_*` queries return their specific `TableItem_* | undefined`