@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.
Files changed (126) hide show
  1. package/dist/index.js +42 -98
  2. package/dist/schema-query/index.d.ts +29 -0
  3. package/dist/schema-query/index.js +149 -0
  4. package/dist/schemas/account_operation.schema.json +255 -0
  5. package/dist/schemas/guard2file.schema.json +71 -0
  6. package/dist/schemas/index.json +139 -0
  7. package/dist/schemas/local_info_operation.schema.json +142 -0
  8. package/dist/schemas/local_mark_operation.schema.json +119 -0
  9. package/dist/schemas/machineNode2file.schema.json +71 -0
  10. package/dist/schemas/messenger_operation.schema.json +1393 -0
  11. package/dist/schemas/onchain_events.schema.json +113 -0
  12. package/dist/schemas/onchain_operations.schema.json +376 -0
  13. package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
  14. package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
  15. package/dist/schemas/onchain_operations_contact.schema.json +853 -0
  16. package/dist/schemas/onchain_operations_demand.schema.json +984 -0
  17. package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
  18. package/dist/schemas/onchain_operations_guard.schema.json +713 -0
  19. package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
  20. package/dist/schemas/onchain_operations_order.schema.json +830 -0
  21. package/dist/schemas/onchain_operations_payment.schema.json +717 -0
  22. package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
  23. package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
  24. package/dist/schemas/onchain_operations_progress.schema.json +751 -0
  25. package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
  26. package/dist/schemas/onchain_operations_reward.schema.json +955 -0
  27. package/dist/schemas/onchain_operations_service.schema.json +1411 -0
  28. package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
  29. package/dist/schemas/onchain_table_data.schema.json +35 -0
  30. package/dist/schemas/operations/guard.json +163 -0
  31. package/dist/schemas/operations/permission.json +22 -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,1003 +0,0 @@
1
- # MyShop E-Commerce Example - Test Results
2
-
3
- This document records the actual execution results of the MyShop example on the test network.
4
-
5
- ## Test Environment
6
- - Network: testnet
7
- - Test Date: 2026-04-23
8
-
9
- ## Key Object Addresses
10
-
11
- | Object Type | Name | Object Address |
12
- |---------|------|---------|
13
- | Permission | myshop_permission_v2 | 0x0e012c5ba54054c6e06eed7b93bc3bba60f6e3b66c80b24abb75140f93909862 |
14
- | Machine | myshop_machine_v2 | 0x923bf3f2868ab0996b996bf3ac2f550f91e2d33a8a5ccbf12b2a9b32bcf16aac |
15
- | Contact | myshop_aftersales_contact_v2 | 0x855af9c1e9062ed7f52fd6097672c8a2646a05663dcb54c7dfb2d7c9777bf53b |
16
- | Guard (Withdraw) | myshop_withdraw_guard_v2 | 0x7fe608af6107967d67b521d5bfbba726961adc167c94e64bbda643230c8c91ea |
17
- | Guard (Refund) | myshop_refund_guard_v2 | 0x6147c72a27cba367d7893899c0a9b662be4aec663b758a31cf3c243775b2bda4 |
18
- | Service | myshop_service_v2 | 0xc02e33863f3ba28a50bc63175dcb5ec97b875a2bef76b3e63b0347f716119755 |
19
- | Order | - | 0x497ea4f7a5bb098802c23deedd8ed7122d6b501979394ce111aa66432d2ba0ca |
20
- | Progress | - | 0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f |
21
- | Allocation | - | 0x248f01d944de8f6712ec06f9b4c54f93fe4132e5323488b2d24c83d7487069de |
22
-
23
- ---
24
-
25
- ## Part 1: Merchant System Setup - Actual Execution Results
26
-
27
- ### Create Merchant Account and Get Test Tokens
28
-
29
- **Create Account:**
30
- ```json
31
- {
32
- "gen": {
33
- "name": "myshop_merchant"
34
- }
35
- }
36
- ```
37
-
38
- **Execution Result:**
39
- ```json
40
- {
41
- "gen": {
42
- "address": "0x73e1bfdf5a31fef3ad36e8fcb1e43919ff60d8bac0df3b698a30275727ba708a",
43
- "name": "myshop_merchant"
44
- }
45
- }
46
- ```
47
-
48
- **Get Test Tokens:**
49
- ```json
50
- {
51
- "faucet": {
52
- "network": "testnet",
53
- "name_or_address": "myshop_merchant"
54
- }
55
- }
56
- ```
57
-
58
- **Execution Result:**
59
- ```json
60
- {
61
- "faucet": {
62
- "name_or_address": "myshop_merchant",
63
- "result": [
64
- {"amount": 1000000000, "id": "0x0e4ed708f741f6316ec8518cc3a5d38f82b393f9c2c379a59c3a05f98fc79d0e", "transferTxDigest": "BnY6tvUHKRFf1VWCMtDTpwM5E2Rv2znWpon94YoZwVWx"},
65
- {"amount": 1000000000, "id": "0x48da5d683a211d3209b410d266d1b8dec631a1ae27103d927f039e01f7a12d61", "transferTxDigest": "BnY6tvUHKRFf1VWCMtDTpwM5E2Rv2znWpon94YoZwVWx"},
66
- {"amount": 1000000000, "id": "0x4d237c6cd6e0bad3dd0baaeb2e93d7e2b3ef1725ff0783d78c4aca35be7fd23d", "transferTxDigest": "BnY6tvUHKRFf1VWCMtDTpwM5E2Rv2znWpon94YoZwVWx"},
67
- {"amount": 1000000000, "id": "0xd98f8d78927a62e46f8e5755922179ae4ccb54e892e92e6067cdfd75493403cd", "transferTxDigest": "BnY6tvUHKRFf1VWCMtDTpwM5E2Rv2znWpon94YoZwVWx"},
68
- {"amount": 1000000000, "id": "0xe5f05d93eb33243a9e78a5d19988669caca88f85a2fe2bddf96bc94aa147ad50", "transferTxDigest": "BnY6tvUHKRFf1VWCMtDTpwM5E2Rv2znWpon94YoZwVWx"}
69
- ],
70
- "network": "testnet"
71
- }
72
- }
73
- ```
74
-
75
- ---
76
-
77
- ### Step 1: Create Permission Object
78
-
79
- **Prompt:**
80
- ```json
81
- {
82
- "operation_type": "permission",
83
- "data": {
84
- "object": {
85
- "name": "myshop_permission_v2",
86
- "tags": ["ecommerce", "toys", "shop"],
87
- "onChain": false
88
- },
89
- "description": "Permission management for MyShop toy store"
90
- },
91
- "env": {
92
- "account": "myshop_merchant",
93
- "network": "testnet"
94
- }
95
- }
96
- ```
97
-
98
- **Execution Result:**
99
- ```json
100
- {
101
- "status": "success",
102
- "objects": [
103
- {
104
- "type": "Permission",
105
- "object": "0x0e012c5ba54054c6e06eed7b93bc3bba60f6e3b66c80b24abb75140f93909862",
106
- "version": "4",
107
- "change": "created"
108
- }
109
- ]
110
- }
111
- ```
112
-
113
- ---
114
-
115
- ### Step 2: Create Machine Object
116
-
117
- **Prompt:**
118
- ```json
119
- {
120
- "operation_type": "machine",
121
- "data": {
122
- "object": {
123
- "name": "myshop_machine_v2",
124
- "permission": "myshop_permission_v2"
125
- },
126
- "description": "Order processing workflow for MyShop toy store"
127
- },
128
- "env": {
129
- "account": "myshop_merchant",
130
- "network": "testnet"
131
- }
132
- }
133
- ```
134
-
135
- **Execution Result:**
136
- ```json
137
- {
138
- "status": "success",
139
- "objects": [
140
- {
141
- "type": "Machine",
142
- "object": "0x923bf3f2868ab0996b996bf3ac2f550f91e2d33a8a5ccbf12b2a9b32bcf16aac",
143
- "version": "3025",
144
- "change": "created"
145
- }
146
- ]
147
- }
148
- ```
149
-
150
- ---
151
-
152
- ### Step 4: Add Workflow Nodes
153
-
154
- **Prompt:**
155
- ```json
156
- {
157
- "operation_type": "machine",
158
- "data": {
159
- "object": "myshop_machine_v2",
160
- "node": {
161
- "op": "add",
162
- "nodes": [
163
- {
164
- "name": "Order Confirmation",
165
- "pairs": [
166
- {
167
- "prev_node": "",
168
- "threshold": 0,
169
- "forwards": [
170
- {
171
- "name": "Confirm Order",
172
- "permissionIndex": 1000,
173
- "weight": 1
174
- },
175
- {
176
- "name": "Cancel Order",
177
- "namedOperator": "",
178
- "weight": 1
179
- }
180
- ]
181
- }
182
- ]
183
- },
184
- {
185
- "name": "Shipping",
186
- "pairs": [
187
- {
188
- "prev_node": "Order Confirmation",
189
- "threshold": 1,
190
- "forwards": [
191
- {
192
- "name": "Ship Goods",
193
- "permissionIndex": 1001,
194
- "weight": 1
195
- }
196
- ]
197
- }
198
- ]
199
- },
200
- {
201
- "name": "In Transit",
202
- "pairs": [
203
- {
204
- "prev_node": "Shipping",
205
- "threshold": 1,
206
- "forwards": [
207
- {
208
- "name": "Confirm Delivery",
209
- "permissionIndex": 1002,
210
- "weight": 1
211
- }
212
- ]
213
- }
214
- ]
215
- },
216
- {
217
- "name": "Completed",
218
- "pairs": [
219
- {
220
- "prev_node": "In Transit",
221
- "threshold": 1,
222
- "forwards": [
223
- {
224
- "name": "Complete Order",
225
- "namedOperator": "",
226
- "weight": 1
227
- }
228
- ]
229
- }
230
- ]
231
- }
232
- ]
233
- }
234
- },
235
- "env": {
236
- "account": "myshop_merchant",
237
- "network": "testnet"
238
- }
239
- }
240
- ```
241
-
242
- **Execution Result:**
243
- ```json
244
- {
245
- "status": "success",
246
- "objects": [
247
- {
248
- "type": "Machine",
249
- "object": "0x923bf3f2868ab0996b996bf3ac2f550f91e2d33a8a5ccbf12b2a9b32bcf16aac",
250
- "version": "3026",
251
- "change": "mutated"
252
- },
253
- {
254
- "type": "TableItem_MachineNode",
255
- "object": "0x365626f8167be817ea88e734c2de101be39c3ca40bf6fabdf08a0a552e7115da",
256
- "version": "3026",
257
- "change": "created"
258
- },
259
- {
260
- "type": "TableItem_MachineNode",
261
- "object": "0x37d8351ff12d2ac9e7b5028f7f4ddf5ede4548a14d9435dae14e2f28f716650f",
262
- "version": "3026",
263
- "change": "created"
264
- },
265
- {
266
- "type": "TableItem_MachineNode",
267
- "object": "0x98541c550f729dc1c9b22990e0554469147a294a7b336ad6b0eb021236921587",
268
- "version": "3026",
269
- "change": "created"
270
- },
271
- {
272
- "type": "TableItem_MachineNode",
273
- "object": "0xe7e82b99cd6f89c7bdae3ad776cadfe6650591d9b5b32fc73513a210ad20afdf",
274
- "version": "3026",
275
- "change": "created"
276
- }
277
- ]
278
- }
279
- ```
280
-
281
- ---
282
-
283
- ### Step 5: Publish Machine
284
-
285
- **Prompt:**
286
- ```json
287
- {
288
- "operation_type": "machine",
289
- "data": {
290
- "object": "0x923bf3f2868ab0996b996bf3ac2f550f91e2d33a8a5ccbf12b2a9b32bcf16aac",
291
- "publish": true
292
- },
293
- "env": {
294
- "account": "myshop_merchant",
295
- "network": "testnet"
296
- }
297
- }
298
- ```
299
-
300
- **Execution Result:**
301
- ```json
302
- {
303
- "status": "success",
304
- "objects": [
305
- {
306
- "type": "Machine",
307
- "object": "0x923bf3f2868ab0996b996bf3ac2f550f91e2d33a8a5ccbf12b2a9b32bcf16aac",
308
- "version": "3027",
309
- "change": "mutated"
310
- }
311
- ]
312
- }
313
- ```
314
-
315
- ---
316
-
317
- ### Step 5.1: Create Contact Object
318
-
319
- **Enable Merchant Messenger:**
320
- ```json
321
- {
322
- "messenger": {
323
- "m": "myshop_merchant_messenger",
324
- "name_or_account": "myshop_merchant"
325
- }
326
- }
327
- ```
328
-
329
- **Execution Result:**
330
- ```json
331
- {
332
- "messenger": {
333
- "name_or_account": "myshop_merchant",
334
- "m": "myshop_merchant_messenger"
335
- }
336
- }
337
- ```
338
-
339
- **Create After-sales Contact:**
340
- ```json
341
- {
342
- "operation_type": "contact",
343
- "data": {
344
- "object": {
345
- "name": "myshop_aftersales_contact_v2",
346
- "permission": "myshop_permission_v2"
347
- },
348
- "description": "MyShop after-sales support contact - we're here to help with orders, shipping, and returns",
349
- "ims": {
350
- "op": "add",
351
- "im": [
352
- {
353
- "at": "myshop_aftersales",
354
- "description": "Primary after-sales support representative"
355
- }
356
- ]
357
- }
358
- },
359
- "env": {
360
- "account": "myshop_merchant",
361
- "network": "testnet"
362
- }
363
- }
364
- ```
365
-
366
- **Execution Result:**
367
- ```json
368
- {
369
- "status": "success",
370
- "objects": [
371
- {
372
- "type": "Contact",
373
- "object": "0x855af9c1e9062ed7f52fd6097672c8a2646a05663dcb54c7dfb2d7c9777bf53b",
374
- "version": "4902",
375
- "change": "created"
376
- }
377
- ]
378
- }
379
- ```
380
-
381
- ---
382
-
383
- ### Step 6: Create Guards
384
-
385
- **Create Withdraw Guard:**
386
- ```json
387
- {
388
- "operation_type": "guard",
389
- "data": {
390
- "namedNew": {
391
- "name": "myshop_withdraw_guard_v2",
392
- "tags": ["ecommerce", "withdraw", "merchant"]
393
- },
394
- "description": "Verify order is completed before merchant can withdraw funds. Submit order object ID.",
395
- "table": [
396
- {
397
- "identifier": 0,
398
- "b_submission": true,
399
- "value_type": "Address",
400
- "name": "order_id"
401
- },
402
- {
403
- "identifier": 1,
404
- "b_submission": false,
405
- "value_type": "String",
406
- "value": "Completed",
407
- "name": "completed_node"
408
- }
409
- ],
410
- "root": {
411
- "type": "node",
412
- "node": {
413
- "type": "logic_equal",
414
- "nodes": [
415
- {
416
- "type": "query",
417
- "query": 1253,
418
- "object": {
419
- "identifier": 0,
420
- "convert_witness": 100
421
- },
422
- "parameters": []
423
- },
424
- {
425
- "type": "identifier",
426
- "identifier": 1
427
- }
428
- ]
429
- }
430
- }
431
- },
432
- "env": {
433
- "account": "myshop_merchant",
434
- "network": "testnet"
435
- }
436
- }
437
- ```
438
-
439
- **Execution Result:**
440
- ```json
441
- {
442
- "status": "success",
443
- "objects": [
444
- {
445
- "type": "Guard",
446
- "object": "0x7fe608af6107967d67b521d5bfbba726961adc167c94e64bbda643230c8c91ea",
447
- "version": "5349",
448
- "change": "created"
449
- }
450
- ]
451
- }
452
- ```
453
-
454
- **Create Refund Guard:**
455
- ```json
456
- {
457
- "operation_type": "guard",
458
- "data": {
459
- "namedNew": {
460
- "name": "myshop_refund_guard_v2",
461
- "tags": ["ecommerce", "refund", "customer"]
462
- },
463
- "description": "Allow refund for orders not yet shipped. Submit order object ID.",
464
- "table": [
465
- {
466
- "identifier": 0,
467
- "b_submission": true,
468
- "value_type": "Address",
469
- "name": "order_id"
470
- },
471
- {
472
- "identifier": 1,
473
- "b_submission": false,
474
- "value_type": "String",
475
- "value": "Order Confirmation",
476
- "name": "confirmation_node"
477
- }
478
- ],
479
- "root": {
480
- "type": "node",
481
- "node": {
482
- "type": "logic_equal",
483
- "nodes": [
484
- {
485
- "type": "query",
486
- "query": 1253,
487
- "object": {
488
- "identifier": 0,
489
- "convert_witness": 100
490
- },
491
- "parameters": []
492
- },
493
- {
494
- "type": "identifier",
495
- "identifier": 1
496
- }
497
- ]
498
- }
499
- }
500
- },
501
- "env": {
502
- "account": "myshop_merchant",
503
- "network": "testnet"
504
- }
505
- }
506
- ```
507
-
508
- **Execution Result:**
509
- ```json
510
- {
511
- "status": "success",
512
- "objects": [
513
- {
514
- "type": "Guard",
515
- "object": "0x6147c72a27cba367d7893899c0a9b662be4aec663b758a31cf3c243775b2bda4",
516
- "version": "5557",
517
- "change": "created"
518
- }
519
- ]
520
- }
521
- ```
522
-
523
- ---
524
-
525
- ### Step 7: Create Service
526
-
527
- **Prompt:**
528
- ```json
529
- {
530
- "operation_type": "service",
531
- "data": {
532
- "object": {
533
- "name": "myshop_service_v2",
534
- "type_parameter": "0x2::wow::WOW",
535
- "permission": "myshop_permission_v2",
536
- "tags": ["ecommerce", "toys", "store"],
537
- "onChain": false
538
- },
539
- "description": "MyShop - Top quality toys for children",
540
- "location": "Online Store",
541
- "machine": "myshop_machine_v2",
542
- "order_allocators": {
543
- "description": "Order revenue allocation - merchant withdraw after completion",
544
- "threshold": 0,
545
- "allocators": [
546
- {
547
- "guard": "myshop_withdraw_guard_v2",
548
- "sharing": [
549
- {
550
- "who": { "Signer": "signer" },
551
- "sharing": 10000,
552
- "mode": "Rate"
553
- }
554
- ]
555
- },
556
- {
557
- "guard": "myshop_refund_guard_v2",
558
- "sharing": [
559
- {
560
- "who": { "GuardIdentifier": 0 },
561
- "sharing": 10000,
562
- "mode": "Rate"
563
- }
564
- ]
565
- }
566
- ]
567
- },
568
- "sales": {
569
- "op": "add",
570
- "sales": [
571
- {
572
- "name": "Play Purse Set 35PCS",
573
- "price": 3000000000,
574
- "stock": 100,
575
- "suspension": false,
576
- "wip": "",
577
- "wip_hash": ""
578
- },
579
- {
580
- "name": "Little Girls Purse with Accessories",
581
- "price": 5000000000,
582
- "stock": 50,
583
- "suspension": false,
584
- "wip": "",
585
- "wip_hash": ""
586
- },
587
- {
588
- "name": "Tree House Building Set",
589
- "price": 2000000000,
590
- "stock": 75,
591
- "suspension": false,
592
- "wip": "",
593
- "wip_hash": ""
594
- }
595
- ]
596
- },
597
- "um": "myshop_aftersales_contact_v2",
598
- "publish": true
599
- },
600
- "env": {
601
- "account": "myshop_merchant",
602
- "network": "testnet"
603
- }
604
- }
605
- ```
606
-
607
- **Execution Result:**
608
- ```json
609
- {
610
- "status": "success",
611
- "objects": [
612
- {
613
- "type": "Service",
614
- "object": "0xc02e33863f3ba28a50bc63175dcb5ec97b875a2bef76b3e63b0347f716119755",
615
- "version": "6201",
616
- "change": "created"
617
- }
618
- ]
619
- }
620
- ```
621
-
622
- ---
623
-
624
- ## Part 2: Customer Order Flow - Actual Execution Results
625
-
626
- ### Create Customer Account and Get Test Tokens
627
-
628
- **Create Customer Account:**
629
- ```json
630
- {
631
- "gen": {
632
- "name": "myshop_customer"
633
- }
634
- }
635
- ```
636
-
637
- **Execution Result:**
638
- ```json
639
- {
640
- "gen": {
641
- "address": "0x6e958763a706cf15bf6634b2081f34558cf0630c550d05f10617cf5cb46dd94d",
642
- "name": "myshop_customer"
643
- }
644
- }
645
- ```
646
-
647
- **Get Test Tokens:**
648
- ```json
649
- {
650
- "faucet": {
651
- "network": "testnet",
652
- "name_or_address": "myshop_customer"
653
- }
654
- }
655
- ```
656
-
657
- **Execution Result:**
658
- ```json
659
- {
660
- "faucet": {
661
- "name_or_address": "myshop_customer",
662
- "result": [
663
- {"amount": 1000000000, "id": "0x0254c8997c90a19e4babeea92f3994e0c2795367ffe2f6d3b6951bd1d7161867", "transferTxDigest": "2NeYkqnGPT314LHV8sWF2SJiBDXCrrZkJ3DnFXu18J4T"},
664
- {"amount": 1000000000, "id": "0x1fa57c6c53425f35193fafa3d6c627fa86e7afae57ccf61720f300b63b909b3d", "transferTxDigest": "2NeYkqnGPT314LHV8sWF2SJiBDXCrrZkJ3DnFXu18J4T"},
665
- {"amount": 1000000000, "id": "0x831360612991b2f21b5a6d52abf2f73312699a1af8c98defb0436d307179c42c", "transferTxDigest": "2NeYkqnGPT314LHV8sWF2SJiBDXCrrZkJ3DnFXu18J4T"},
666
- {"amount": 1000000000, "id": "0xb6e2ed2bef2472058a56a078c454eae200b5b1d5c94e3960b10a326b46c70025", "transferTxDigest": "2NeYkqnGPT314LHV8sWF2SJiBDXCrrZkJ3DnFXu18J4T"},
667
- {"amount": 1000000000, "id": "0xdb08fa88b37da303bf85cdd13fa63980c5e2ac4a411ffae959eb6196679192ad", "transferTxDigest": "2NeYkqnGPT314LHV8sWF2SJiBDXCrrZkJ3DnFXu18J4T"}
668
- ],
669
- "network": "testnet"
670
- }
671
- }
672
- ```
673
-
674
- ---
675
-
676
- ### Step 2: Create Order
677
-
678
- **Prompt:**
679
- ```json
680
- {
681
- "operation_type": "service",
682
- "data": {
683
- "object": "myshop_service_v2",
684
- "order_new": {
685
- "buy": {
686
- "items": [
687
- {
688
- "name": "Play Purse Set 35PCS",
689
- "stock": 1,
690
- "wip_hash": ""
691
- }
692
- ],
693
- "total_pay": {
694
- "balance": 3000000000
695
- }
696
- },
697
- }
698
- },
699
- "env": {
700
- "account": "myshop_customer",
701
- "network": "testnet"
702
- }
703
- }
704
- ```
705
-
706
- **Execution Result:**
707
- ```json
708
- {
709
- "status": "success",
710
- "objects": [
711
- {
712
- "type": "Order",
713
- "object": "0x497ea4f7a5bb098802c23deedd8ed7122d6b501979394ce111aa66432d2ba0ca",
714
- "version": "6809",
715
- "change": "created"
716
- },
717
- {
718
- "type": "Progress",
719
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
720
- "version": "6809",
721
- "change": "created"
722
- },
723
- {
724
- "type": "Allocation",
725
- "object": "0x248f01d944de8f6712ec06f9b4c54f93fe4132e5323488b2d24c83d7487069de",
726
- "version": "6809",
727
- "change": "created"
728
- }
729
- ]
730
- }
731
- ```
732
-
733
- ---
734
-
735
- ### Step 5: Merchant Confirms Order
736
-
737
- **Prompt:**
738
- ```json
739
- {
740
- "operation_type": "progress",
741
- "data": {
742
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
743
- "operate": {
744
- "operation": {
745
- "next_node_name": "Order Confirmation",
746
- "forward": "Confirm Order"
747
- },
748
- "hold": false,
749
- "message": "Order confirmed by merchant"
750
- }
751
- },
752
- "env": {
753
- "account": "myshop_merchant",
754
- "network": "testnet",
755
- "no_cache": true
756
- }
757
- }
758
- ```
759
-
760
- **Execution Result:**
761
- ```json
762
- {
763
- "status": "success",
764
- "objects": [
765
- {
766
- "type": "Progress",
767
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
768
- "version": "7967",
769
- "change": "mutated"
770
- }
771
- ]
772
- }
773
- ```
774
-
775
- ---
776
-
777
- ### Step 6: Merchant Ships Goods
778
-
779
- **Prompt:**
780
- ```json
781
- {
782
- "operation_type": "progress",
783
- "data": {
784
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
785
- "operate": {
786
- "operation": {
787
- "next_node_name": "Shipping",
788
- "forward": "Ship Goods"
789
- },
790
- "hold": false,
791
- "message": "Goods shipped via express delivery"
792
- }
793
- },
794
- "env": {
795
- "account": "myshop_merchant",
796
- "network": "testnet",
797
- "no_cache": true
798
- }
799
- }
800
- ```
801
-
802
- **Execution Result:**
803
- ```json
804
- {
805
- "status": "success",
806
- "objects": [
807
- {
808
- "type": "Progress",
809
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
810
- "version": "9468",
811
- "change": "mutated"
812
- }
813
- ]
814
- }
815
- ```
816
-
817
- ---
818
-
819
- ### Step 7: Confirm Delivery
820
-
821
- **Prompt:**
822
- ```json
823
- {
824
- "operation_type": "progress",
825
- "data": {
826
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
827
- "operate": {
828
- "operation": {
829
- "next_node_name": "In Transit",
830
- "forward": "Confirm Delivery"
831
- },
832
- "hold": false,
833
- "message": "Goods delivered"
834
- }
835
- },
836
- "env": {
837
- "account": "myshop_merchant",
838
- "network": "testnet",
839
- "no_cache": true
840
- }
841
- }
842
- ```
843
-
844
- **Execution Result:**
845
- ```json
846
- {
847
- "status": "success",
848
- "objects": [
849
- {
850
- "type": "Progress",
851
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
852
- "version": "9672",
853
- "change": "mutated"
854
- }
855
- ]
856
- }
857
- ```
858
-
859
- ---
860
-
861
- ### Step 8: Customer Completes Order
862
-
863
- **Prompt:**
864
- ```json
865
- {
866
- "operation_type": "progress",
867
- "data": {
868
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
869
- "operate": {
870
- "operation": {
871
- "next_node_name": "Completed",
872
- "forward": "Complete Order"
873
- },
874
- "hold": false,
875
- "message": "Order received and completed"
876
- }
877
- },
878
- "env": {
879
- "account": "myshop_customer",
880
- "network": "testnet",
881
- "no_cache": true
882
- }
883
- }
884
- ```
885
-
886
- **Execution Result:**
887
- ```json
888
- {
889
- "status": "success",
890
- "objects": [
891
- {
892
- "type": "Progress",
893
- "object": "0xf7ecd7bae7bfdea1f0d98c95d1a8880e9a762f26f371ce2bc76e88fc8734472f",
894
- "version": "9881",
895
- "change": "mutated"
896
- }
897
- ]
898
- }
899
- ```
900
-
901
- ---
902
-
903
- ### Step 9: Merchant Withdraws Funds
904
-
905
- **9.1 Activate Allocation:**
906
- ```json
907
- {
908
- "operation_type": "allocation",
909
- "data": {
910
- "object": "0x248f01d944de8f6712ec06f9b4c54f93fe4132e5323488b2d24c83d7487069de",
911
- "alloc_by_guard": "0x7fe608af6107967d67b521d5bfbba726961adc167c94e64bbda643230c8c91ea"
912
- },
913
- "submission": {
914
- "type": "submission",
915
- "guard": [
916
- {
917
- "object": "0x7fe608af6107967d67b521d5bfbba726961adc167c94e64bbda643230c8c91ea",
918
- "impack": true
919
- }
920
- ],
921
- "submission": [
922
- {
923
- "guard": "0x7fe608af6107967d67b521d5bfbba726961adc167c94e64bbda643230c8c91ea",
924
- "submission": [
925
- {
926
- "identifier": 0,
927
- "b_submission": true,
928
- "value_type": "Address",
929
- "value": "0x497ea4f7a5bb098802c23deedd8ed7122d6b501979394ce111aa66432d2ba0ca"
930
- }
931
- ]
932
- }
933
- ]
934
- },
935
- "env": {
936
- "account": "myshop_merchant",
937
- "network": "testnet",
938
- "no_cache": true
939
- }
940
- }
941
- ```
942
-
943
- **Execution Result:**
944
- ```json
945
- {
946
- "status": "success"
947
- }
948
- ```
949
-
950
- **9.2 Withdraw:**
951
- ```json
952
- {
953
- "operation_type": "service",
954
- "data": {
955
- "object": "myshop_service_v2",
956
- "owner_receive": "recently"
957
- },
958
- "env": {
959
- "account": "myshop_merchant",
960
- "network": "testnet",
961
- "no_cache": true
962
- }
963
- }
964
- ```
965
-
966
- **Execution Result:**
967
- ```json
968
- {
969
- "status": "success",
970
- "objects": [
971
- {
972
- "type": "Service",
973
- "object": "0xc02e33863f3ba28a50bc63175dcb5ec97b875a2bef76b3e63b0347f716119755",
974
- "change": "mutated"
975
- }
976
- ]
977
- }
978
- ```
979
-
980
- ---
981
-
982
- ## Test Summary
983
-
984
- All test steps have been successfully completed:
985
-
986
- 1. ✅ Merchant account creation and test token acquisition
987
- 2. ✅ Permission object creation
988
- 3. ✅ Machine object creation and workflow node addition
989
- 4. ✅ Machine publication
990
- 5. ✅ Contact object creation
991
- 6. ✅ Guards creation (withdraw and refund)
992
- 7. ✅ Service creation and publication
993
- 8. ✅ Customer account creation and test token acquisition
994
- 9. ✅ Order creation
995
- 10. ✅ Order flow: Confirm → Ship → Deliver → Complete
996
- 11. ✅ Merchant withdrawal
997
-
998
- All object addresses and transaction details have been recorded in this document.
999
-
1000
- ## Key Findings
1001
-
1002
- - Use `env.no_cache: true` to avoid validation errors caused by caching
1003
- - Progress operations require the Progress object ID, not the Order object ID