@wowok/agent-mcp 2.2.11 → 2.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/docs/index.d.ts +3 -0
  2. package/dist/docs/index.js +2 -0
  3. package/dist/docs/loader.d.ts +12 -0
  4. package/dist/docs/loader.js +177 -0
  5. package/dist/docs/search.d.ts +17 -0
  6. package/dist/docs/search.js +325 -0
  7. package/dist/docs/types.d.ts +55 -0
  8. package/dist/docs/types.js +1 -0
  9. package/dist/index.d.ts +12 -0
  10. package/dist/index.js +146 -39
  11. package/docs/README.md +249 -0
  12. package/docs/WIP.md +388 -0
  13. package/docs/WTS.md +536 -0
  14. package/docs/docs/account.md +914 -0
  15. package/docs/docs/allocation.md +635 -0
  16. package/docs/docs/arbitration.md +1804 -0
  17. package/docs/docs/arbitration_state_machine.md +270 -0
  18. package/docs/docs/contact.md +709 -0
  19. package/docs/docs/demand.md +948 -0
  20. package/docs/docs/guard.md +1465 -0
  21. package/docs/docs/localinfo.md +432 -0
  22. package/docs/docs/localmark.md +583 -0
  23. package/docs/docs/machine.md +2490 -0
  24. package/docs/docs/messenger.md +2098 -0
  25. package/docs/docs/onchain_events.md +267 -0
  26. package/docs/docs/order.md +1001 -0
  27. package/docs/docs/payment.md +512 -0
  28. package/docs/docs/permission.md +1438 -0
  29. package/docs/docs/personal.md +742 -0
  30. package/docs/docs/progress.md +1748 -0
  31. package/docs/docs/query.md +467 -0
  32. package/docs/docs/repository.md +1043 -0
  33. package/docs/docs/reward.md +833 -0
  34. package/docs/docs/service.md +2130 -0
  35. package/docs/docs/stage-01-introduction.md +243 -0
  36. package/docs/docs/stage-02-trust.md +302 -0
  37. package/docs/docs/stage-03-collaboration.md +337 -0
  38. package/docs/docs/stage-04-transaction.md +277 -0
  39. package/docs/docs/stage-05-business.md +151 -0
  40. package/docs/docs/stage-06-personal.md +203 -0
  41. package/docs/docs/stage-07-query.md +572 -0
  42. package/docs/docs/stage-08-examples.md +184 -0
  43. package/docs/docs/treasury.md +1149 -0
  44. package/docs/docs/wowok_buildin_info.md +740 -0
  45. package/docs/examples/Insurance/Insurance.md +594 -0
  46. package/docs/examples/Insurance/Insurance_TestResults.md +481 -0
  47. package/docs/examples/Insurance/insurance_complete_guard_v1.json +50 -0
  48. package/docs/examples/MyShop/MyShop.md +1353 -0
  49. package/docs/examples/MyShop/MyShop_TestResults.md +1003 -0
  50. package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +1898 -0
  51. package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +1297 -0
  52. package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +743 -0
  53. package/docs/examples/MyShop_Advanced/machine_nodes.json +222 -0
  54. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +776 -0
  55. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +599 -0
  56. package/docs/examples/Travel/Travel.md +1157 -0
  57. package/docs/examples/Travel/Travel_TestResults.md +743 -0
  58. package/docs/examples/Travel/calc-weather-timestamps.js +8 -0
  59. package/docs/examples/Travel/travel_machine_v2_export.json +104 -0
  60. package/docs/examples/Travel/weather_check_guard_v1.json +51 -0
  61. package/docs/skills/WOWOK.md +650 -0
  62. package/docs/skills/onchain_operations/_common.md +406 -0
  63. package/docs/skills/onchain_operations/_index.md +196 -0
  64. package/docs/skills/onchain_operations/allocation.md +28 -0
  65. package/docs/skills/onchain_operations/arbitration.md +106 -0
  66. package/docs/skills/onchain_operations/contact.md +40 -0
  67. package/docs/skills/onchain_operations/demand.md +53 -0
  68. package/docs/skills/onchain_operations/gen_passport.md +23 -0
  69. package/docs/skills/onchain_operations/guard.md +56 -0
  70. package/docs/skills/onchain_operations/machine.md +89 -0
  71. package/docs/skills/onchain_operations/order.md +56 -0
  72. package/docs/skills/onchain_operations/payment.md +24 -0
  73. package/docs/skills/onchain_operations/permission.md +68 -0
  74. package/docs/skills/onchain_operations/personal.md +58 -0
  75. package/docs/skills/onchain_operations/progress.md +38 -0
  76. package/docs/skills/onchain_operations/repository.md +70 -0
  77. package/docs/skills/onchain_operations/reward.md +38 -0
  78. package/docs/skills/onchain_operations/service.md +78 -0
  79. package/docs/skills/onchain_operations/treasury.md +68 -0
  80. package/docs/skills/schema-account_operation.md +402 -0
  81. package/docs/skills/schema-guard2file.md +153 -0
  82. package/docs/skills/schema-local_info_operation.md +160 -0
  83. package/docs/skills/schema-local_mark_operation.md +148 -0
  84. package/docs/skills/schema-machineNode2file.md +155 -0
  85. package/docs/skills/schema-messenger_operation.md +547 -0
  86. package/docs/skills/schema-onchain_events.md +201 -0
  87. package/docs/skills/schema-onchain_table_data.md +334 -0
  88. package/docs/skills/schema-query_toolkit.md +395 -0
  89. package/docs/skills/schema-wip_file.md +240 -0
  90. package/docs/skills/schema-wowok_buildin_info.md +296 -0
  91. package/docs/wip-examples/three_body.html +57 -0
  92. package/docs/wip-examples/three_body.wip +30 -0
  93. package/package.json +3 -2
@@ -0,0 +1,1003 @@
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