@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.
- package/README.md +19 -11
- package/dist/index.js +44 -100
- package/dist/schema/query/index.js +1 -1
- 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/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,743 +0,0 @@
|
|
|
1
|
-
# MyShop Advanced - Order Flow Test Results
|
|
2
|
-
|
|
3
|
-
## Test execution started: 2026-04-26
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Test Overview
|
|
8
|
-
|
|
9
|
-
### Test Objective
|
|
10
|
-
Validate all order flow scenarios in the MyShop Advanced e-commerce system, including:
|
|
11
|
-
- **Wonderful Branch**: Customer rates wonderful after shipping
|
|
12
|
-
- **Delivery Branch**: Standard delivery confirmation flow
|
|
13
|
-
- **Lost Branch**: Package lost scenario
|
|
14
|
-
- **Return Branch**: Product return scenarios (Receipt Return & Non-receipt Return)
|
|
15
|
-
- **Shipping Timeout**: Auto-compensation for delayed shipping
|
|
16
|
-
- **Order Cancel**: Order cancellation before shipping
|
|
17
|
-
|
|
18
|
-
### Test Environment
|
|
19
|
-
- **Network**: Testnet
|
|
20
|
-
- **Service**: `three_body_signature_service_v2`
|
|
21
|
-
- **Machine**: `myshop_advanced_machine_v2`
|
|
22
|
-
- **Permission**: `myshop_permission_v2`
|
|
23
|
-
- **Arbitration**: `myshop_arbitration_v2`
|
|
24
|
-
- **Reward**: `myshop_reward_v2`
|
|
25
|
-
|
|
26
|
-
### Test Accounts
|
|
27
|
-
| Account | Address | Role |
|
|
28
|
-
|---------|---------|------|
|
|
29
|
-
| myshop_merchant | 0x7d3e3932174570675a7e45dc0f5fb073b39214846e5a955d37049f1a0f23dd9b | Store Owner |
|
|
30
|
-
| myshop_customer | 0x06906ffa2eccd04c9f8ec0feb8456115d5bffbddcee1d211288cf8fe1848987c | Customer |
|
|
31
|
-
|
|
32
|
-
### Reference Guards
|
|
33
|
-
| Guard Name | Purpose |
|
|
34
|
-
|------------|---------|
|
|
35
|
-
| **Machine Guards** | |
|
|
36
|
-
| machine_merkle_root_v2 | Verify Merkle Root string length = 64 |
|
|
37
|
-
| machine_service_order_v2 | Verify order belongs to Service and current node is valid |
|
|
38
|
-
| machine_time_10d_v2 | Verify 10-day timeout (864000000 ms) for auto-completion |
|
|
39
|
-
| machine_time_2d_v2 | Verify 2-day timeout (172800000 ms) for auto-completion |
|
|
40
|
-
| **Service Guards** | |
|
|
41
|
-
| service_merchant_win_v2 | Verify order at merchant winning nodes (Order Complete, Wonderful, Return Fail) |
|
|
42
|
-
| service_customer_win_v2 | Verify order at customer winning nodes (Lost, Return Complete) |
|
|
43
|
-
| **Reward Guards** | |
|
|
44
|
-
| reward_wonderful_v2 | Verify order at Wonderful node for 10000 reward |
|
|
45
|
-
| reward_lost_v2 | Verify order at Lost node for 20000 compensation |
|
|
46
|
-
| reward_shipping_timeout_v2 | Verify order at Shipping node > 2 days for 30000 compensation |
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## Machine Node Structure
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
"" (Start)
|
|
54
|
-
├── Submit Messenger Merkle Root ──> "Order Confirmed"
|
|
55
|
-
│ │
|
|
56
|
-
│ ├── Confirm Signature and Submit Merkle Root ──> "Shipping"
|
|
57
|
-
│ │ │
|
|
58
|
-
│ │ ├── Confirm Receipt ──> "Delivery Complete"
|
|
59
|
-
│ │ │ │
|
|
60
|
-
│ │ │ └── Auto Complete from Delivery ──> "Order Complete" [END: Merchant Wins]
|
|
61
|
-
│ │ │
|
|
62
|
-
│ │ ├── Rate Wonderful ──> "Wonderful" [END: Customer Claims Reward]
|
|
63
|
-
│ │ │
|
|
64
|
-
│ │ ├── Auto Complete from Shipping ──> "Order Complete" [END: Merchant Wins]
|
|
65
|
-
│ │ │
|
|
66
|
-
│ │ ├── Report Lost ──> "Lost" [END: Customer Claims Compensation]
|
|
67
|
-
│ │ │ └── Confirm Lost with Merkle Root (dual-sig)
|
|
68
|
-
│ │ │
|
|
69
|
-
│ │ ├── Request Return ──> "Non-receipt Return"
|
|
70
|
-
│ │ │ └── Confirm Return with Merkle Root (dual-sig)
|
|
71
|
-
│ │ │ │
|
|
72
|
-
│ │ │ ├── Submit Return Merkle Root ──> "Return Complete" [END: Customer Wins]
|
|
73
|
-
│ │ │ │ └── Confirm Return Received (dual-sig)
|
|
74
|
-
│ │ │ │
|
|
75
|
-
│ │ │ └── Submit Return Merkle Root ──> "Return Complete" [END: Customer Wins]
|
|
76
|
-
│ │ │ └── Confirm Return Received (dual-sig)
|
|
77
|
-
│ │ │
|
|
78
|
-
│ │ └── Request Return with Receipt ──> "Receipt Return"
|
|
79
|
-
│ │ └── Confirm Return Address with Merkle Root (dual-sig)
|
|
80
|
-
│ │ │
|
|
81
|
-
│ │ ├── Timeout Return Not Received ──> "Return Fail" [END: Merchant Wins]
|
|
82
|
-
│ │ │
|
|
83
|
-
│ │ ├── Submit Return Merkle Root ──> "Return Complete" [END: Customer Wins]
|
|
84
|
-
│ │ │ └── Confirm Return Received (dual-sig)
|
|
85
|
-
│ │ │
|
|
86
|
-
│ │ └── Submit Return Merkle Root ──> "Return Complete" [END: Customer Wins]
|
|
87
|
-
│ │ └── Confirm Return Received (dual-sig)
|
|
88
|
-
│ │
|
|
89
|
-
└── Submit Cancellation Merkle Root ──> "Order Cancel" [END: Order Cancelled]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### End States (Terminal Nodes)
|
|
93
|
-
| Node | Description | Fund Allocation | Reward/Compensation |
|
|
94
|
-
|------|-------------|-----------------|---------------------|
|
|
95
|
-
| **Order Complete** | Order completed successfully | 100% Merchant | None |
|
|
96
|
-
| **Wonderful** | Customer rated wonderful | 100% Merchant | Customer: 10,000 WOW |
|
|
97
|
-
| **Lost** | Package lost reported | 100% Customer | Customer: 20,000 WOW |
|
|
98
|
-
| **Return Complete** | Return processed successfully | 100% Customer | None |
|
|
99
|
-
| **Return Fail** | Return rejected/timeout | 100% Merchant | None |
|
|
100
|
-
| **Order Cancel** | Order cancelled before shipping | 100% Customer | None |
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Test Plan: All Possible Paths
|
|
105
|
-
|
|
106
|
-
### Path 1: Order Cancel
|
|
107
|
-
**Flow**: Start → Order Cancel
|
|
108
|
-
**Description**: Order is cancelled by merchant before shipping
|
|
109
|
-
**Expected**: Order Cancelled, funds returned to customer
|
|
110
|
-
|
|
111
|
-
### Path 2: Standard Delivery
|
|
112
|
-
**Flow**: Start → Order Confirmed → Shipping → Delivery Complete → Order Complete
|
|
113
|
-
**Description**: Standard delivery flow with customer confirmation
|
|
114
|
-
**Expected**: Order Complete, merchant wins allocation
|
|
115
|
-
|
|
116
|
-
### Path 3: Auto-Complete from Delivery
|
|
117
|
-
**Flow**: Start → Order Confirmed → Shipping → Delivery Complete → [Timeout 10d] → Order Complete
|
|
118
|
-
**Description**: Auto-complete after timeout from Delivery Complete
|
|
119
|
-
**Expected**: Order Complete, merchant wins allocation
|
|
120
|
-
|
|
121
|
-
### Path 4: Wonderful Rating
|
|
122
|
-
**Flow**: Start → Order Confirmed → Shipping → Wonderful
|
|
123
|
-
**Description**: Customer rates wonderful after shipping
|
|
124
|
-
**Expected**: Wonderful node, customer can claim 10,000 WOW reward
|
|
125
|
-
|
|
126
|
-
### Path 5: Lost Package
|
|
127
|
-
**Flow**: Start → Order Confirmed → Shipping → Lost
|
|
128
|
-
**Description**: Package reported lost (dual-signature)
|
|
129
|
-
**Expected**: Lost node, customer wins allocation + 20,000 WOW compensation
|
|
130
|
-
|
|
131
|
-
### Path 6: Auto-Complete from Shipping
|
|
132
|
-
**Flow**: Start → Order Confirmed → Shipping → [Timeout 10d] → Order Complete
|
|
133
|
-
**Description**: Auto-complete after timeout from Shipping
|
|
134
|
-
**Expected**: Order Complete, merchant wins allocation
|
|
135
|
-
|
|
136
|
-
### Path 7: Non-receipt Return → Complete
|
|
137
|
-
**Flow**: Start → Order Confirmed → Shipping → Non-receipt Return → Return Complete
|
|
138
|
-
**Description**: Return without receipt, successfully completed
|
|
139
|
-
**Expected**: Return Complete, customer wins allocation
|
|
140
|
-
|
|
141
|
-
### Path 8: Non-receipt Return → Complete (from Receipt Return path)
|
|
142
|
-
**Flow**: Start → Order Confirmed → Shipping → Delivery Complete → Receipt Return → Return Complete
|
|
143
|
-
**Description**: Return with receipt, successfully completed
|
|
144
|
-
**Expected**: Return Complete, customer wins allocation
|
|
145
|
-
|
|
146
|
-
### Path 9: Receipt Return → Fail (Timeout)
|
|
147
|
-
**Flow**: Start → Order Confirmed → Shipping → Delivery Complete → Receipt Return → [Timeout 10d] → Return Fail
|
|
148
|
-
**Description**: Return with receipt, timeout waiting for return
|
|
149
|
-
**Expected**: Return Fail, merchant wins allocation
|
|
150
|
-
|
|
151
|
-
### Path 10: Shipping Timeout Compensation
|
|
152
|
-
**Flow**: Start → Order Confirmed → Shipping → [Timeout 2d] → Customer Compensation
|
|
153
|
-
**Description**: Shipping delayed beyond 2 days, customer gets compensation
|
|
154
|
-
**Expected**: Customer receives 20,000 WOW compensation
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Test Execution Status
|
|
159
|
-
|
|
160
|
-
| Path # | Path Name | Status | Order ID | Notes |
|
|
161
|
-
|--------|-----------|--------|----------|-------|
|
|
162
|
-
| 1 | Order Cancel | ✅ Completed | myshop_cancel_order | Successfully cancelled before shipping |
|
|
163
|
-
| 2 | Standard Delivery | ⚠️ Partial | myshop_delivery_order | Blocked at Delivery Complete (permission issue) |
|
|
164
|
-
| 3 | Auto-Complete from Delivery | ⏸️ Skipped | - | Requires 10-day timeout, guard will fail |
|
|
165
|
-
| 4 | Wonderful Rating | ⚠️ Partial | myshop_wonderful_order | Blocked at Wonderful node (guard verification) |
|
|
166
|
-
| 5 | Lost Package | ⏳ Pending | - | - |
|
|
167
|
-
| 6 | Auto-Complete from Shipping | ⏸️ Skipped | - | Requires 10-day timeout, guard will fail |
|
|
168
|
-
| 7 | Non-receipt Return → Complete | ⏳ Pending | - | - |
|
|
169
|
-
| 8 | Receipt Return → Complete | ⏳ Pending | - | - |
|
|
170
|
-
| 9 | Receipt Return → Fail | ⏸️ Skipped | - | Requires 10-day timeout, guard will fail |
|
|
171
|
-
| 10 | Shipping Timeout Compensation | ⏸️ Skipped | - | Requires 2-day timeout, guard will fail |
|
|
172
|
-
|
|
173
|
-
**Note**: Paths requiring time-based guards (2-day, 10-day timeouts) are skipped because the guard verification will fail in test environment.
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Test Results
|
|
178
|
-
|
|
179
|
-
### Path 1: Order Cancel ✅
|
|
180
|
-
|
|
181
|
-
**Status**: Successfully Completed (2026-04-26)
|
|
182
|
-
|
|
183
|
-
**Order Info**:
|
|
184
|
-
- Order: `test_cancel_order_v2`
|
|
185
|
-
- Progress: `test_cancel_progress_v2`
|
|
186
|
-
- Allocation: `test_cancel_allocation_v2`
|
|
187
|
-
|
|
188
|
-
**Test Steps**:
|
|
189
|
-
|
|
190
|
-
#### Step 1: Create Order ✅
|
|
191
|
-
|
|
192
|
-
**Request:**
|
|
193
|
-
```json
|
|
194
|
-
{
|
|
195
|
-
"operation_type": "service",
|
|
196
|
-
"data": {
|
|
197
|
-
"object": "three_body_signature_service_v2",
|
|
198
|
-
"order_new": {
|
|
199
|
-
"buy": {
|
|
200
|
-
"items": [
|
|
201
|
-
{
|
|
202
|
-
"name": "The Three-Body Problem + Author Signature",
|
|
203
|
-
"stock": 1,
|
|
204
|
-
"wip_hash": "sha256:1db6dc86d8be68bafb33418628a30e7bfcbce48de9c099d3d9cb21def3af8b43"
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"total_pay": {
|
|
208
|
-
"balance": 5000000000
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
"namedNewOrder": {
|
|
212
|
-
"name": "test_cancel_order_v2",
|
|
213
|
-
"replaceExistName": true
|
|
214
|
-
},
|
|
215
|
-
"namedNewAllocation": {
|
|
216
|
-
"name": "test_cancel_allocation_v2",
|
|
217
|
-
"replaceExistName": true
|
|
218
|
-
},
|
|
219
|
-
"namedNewProgress": {
|
|
220
|
-
"name": "test_cancel_progress_v2",
|
|
221
|
-
"replaceExistName": true
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"env": {
|
|
226
|
-
"account": "myshop_customer",
|
|
227
|
-
"network": "testnet",
|
|
228
|
-
"no_cache": true
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Result**: ✅ Order created successfully
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
#### Step 2: Confirm Order ✅
|
|
238
|
-
|
|
239
|
-
**Request:**
|
|
240
|
-
```json
|
|
241
|
-
{
|
|
242
|
-
"operation_type": "progress",
|
|
243
|
-
"data": {
|
|
244
|
-
"object": "test_cancel_progress_v2",
|
|
245
|
-
"operate": {
|
|
246
|
-
"operation": {
|
|
247
|
-
"next_node_name": "Order Confirmed",
|
|
248
|
-
"forward": "Confirm Order"
|
|
249
|
-
},
|
|
250
|
-
"hold": false,
|
|
251
|
-
"message": "Order confirmed by merchant"
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
"env": {
|
|
255
|
-
"account": "myshop_merchant",
|
|
256
|
-
"network": "testnet",
|
|
257
|
-
"no_cache": true
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Result**: ✅ Progress at "Order Confirmed"
|
|
263
|
-
|
|
264
|
-
---
|
|
265
|
-
|
|
266
|
-
#### Step 3: Cancel Order ✅
|
|
267
|
-
|
|
268
|
-
**Request:**
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"operation_type": "progress",
|
|
272
|
-
"data": {
|
|
273
|
-
"object": "test_cancel_progress_v2",
|
|
274
|
-
"operate": {
|
|
275
|
-
"operation": {
|
|
276
|
-
"next_node_name": "Order Cancel",
|
|
277
|
-
"forward": "Cancel Order"
|
|
278
|
-
},
|
|
279
|
-
"hold": false,
|
|
280
|
-
"message": "Order cancelled by merchant before shipping"
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
"env": {
|
|
284
|
-
"account": "myshop_merchant",
|
|
285
|
-
"network": "testnet",
|
|
286
|
-
"no_cache": true
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**Result**: ✅ Order cancelled successfully, progress at "Order Cancel" node
|
|
292
|
-
|
|
293
|
-
**End State**: Order Cancelled - funds returned to customer
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
### Path 2: Standard Delivery ⚠️
|
|
298
|
-
|
|
299
|
-
**Status**: Partially Completed (Blocked at Delivery Complete)
|
|
300
|
-
|
|
301
|
-
**Order Info**:
|
|
302
|
-
- Order: `myshop_delivery_order`
|
|
303
|
-
- Progress: `myshop_delivery_progress`
|
|
304
|
-
- Allocation: `myshop_delivery_allocation`
|
|
305
|
-
|
|
306
|
-
**Test Steps**:
|
|
307
|
-
|
|
308
|
-
#### Step 1: Create Order ✅
|
|
309
|
-
|
|
310
|
-
**Result**: ✅ Order created successfully
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
#### Step 2: Order Confirmed ✅
|
|
315
|
-
|
|
316
|
-
**Request:**
|
|
317
|
-
```json
|
|
318
|
-
{
|
|
319
|
-
"operation_type": "progress",
|
|
320
|
-
"data": {
|
|
321
|
-
"object": "myshop_delivery_progress",
|
|
322
|
-
"operate": {
|
|
323
|
-
"operation": {
|
|
324
|
-
"next_node_name": "Order Confirmed",
|
|
325
|
-
"forward": "Submit Messenger Merkle Root"
|
|
326
|
-
},
|
|
327
|
-
"hold": false,
|
|
328
|
-
"message": "Order confirmed by merchant"
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
"env": {
|
|
332
|
-
"account": "myshop_merchant",
|
|
333
|
-
"network": "testnet"
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
**Result**: ✅ Progress at "Order Confirmed"
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
#### Step 3: Shipping ✅
|
|
343
|
-
|
|
344
|
-
**Request:**
|
|
345
|
-
```json
|
|
346
|
-
{
|
|
347
|
-
"operation_type": "progress",
|
|
348
|
-
"data": {
|
|
349
|
-
"object": "myshop_delivery_progress",
|
|
350
|
-
"operate": {
|
|
351
|
-
"operation": {
|
|
352
|
-
"next_node_name": "Shipping",
|
|
353
|
-
"forward": "Confirm Signature and Submit Merkle Root"
|
|
354
|
-
},
|
|
355
|
-
"hold": false,
|
|
356
|
-
"message": "Shipping started with signature confirmation"
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
"submission": {
|
|
360
|
-
"type": "submission",
|
|
361
|
-
"guard": [
|
|
362
|
-
{
|
|
363
|
-
"object": "guard_service_signature_merkle_v2",
|
|
364
|
-
"impack": true
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
"submission": [
|
|
368
|
-
{
|
|
369
|
-
"guard": "guard_service_signature_merkle_v2",
|
|
370
|
-
"submission": [
|
|
371
|
-
{
|
|
372
|
-
"identifier": 0,
|
|
373
|
-
"b_submission": true,
|
|
374
|
-
"value_type": "Address",
|
|
375
|
-
"value": "myshop_delivery_order"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"identifier": 3,
|
|
379
|
-
"b_submission": true,
|
|
380
|
-
"value_type": "String",
|
|
381
|
-
"value": "0123456789012345678901234567890123456789012345678901234567890123"
|
|
382
|
-
}
|
|
383
|
-
]
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
},
|
|
387
|
-
"env": {
|
|
388
|
-
"account": "myshop_merchant",
|
|
389
|
-
"network": "testnet"
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
**Result**: ✅ Progress at "Shipping"
|
|
395
|
-
|
|
396
|
-
---
|
|
397
|
-
|
|
398
|
-
#### Step 4: Delivery Complete ❌
|
|
399
|
-
|
|
400
|
-
**Issue**: Guard verification failed
|
|
401
|
-
|
|
402
|
-
**Error**: `MoveAbort(MoveLocation { module: ModuleId { ... }, function: 6, ... }, 7)`
|
|
403
|
-
|
|
404
|
-
**Error Code 7**: `E_VERIFY_FAILED` - Guard verification failed
|
|
405
|
-
|
|
406
|
-
**Analysis**: The guard `guard_delivery_complete_v2` requires specific verification parameters that may not match the current order state.
|
|
407
|
-
|
|
408
|
-
**Status**: Blocked - cannot proceed to Delivery Complete
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
### Path 4: Wonderful Rating ⚠️
|
|
413
|
-
|
|
414
|
-
**Status**: Partially Completed (Blocked at Wonderful node)
|
|
415
|
-
|
|
416
|
-
**Order Info**:
|
|
417
|
-
- Order: `myshop_wonderful_order`
|
|
418
|
-
- Progress: `myshop_wonderful_progress`
|
|
419
|
-
- Allocation: `myshop_wonderful_allocation`
|
|
420
|
-
|
|
421
|
-
**Test Steps**:
|
|
422
|
-
|
|
423
|
-
#### Step 1-3: Order Creation → Confirmed → Shipping ✅
|
|
424
|
-
|
|
425
|
-
Same as Path 2, completed successfully.
|
|
426
|
-
|
|
427
|
-
---
|
|
428
|
-
|
|
429
|
-
#### Step 4: Rate Wonderful ❌
|
|
430
|
-
|
|
431
|
-
**Issue**: Guard verification failed
|
|
432
|
-
|
|
433
|
-
**Error**: Same as Path 2 - `E_VERIFY_FAILED`
|
|
434
|
-
|
|
435
|
-
**Analysis**: The guard `guard_wonderful_v2` verification failed. This may be due to:
|
|
436
|
-
1. Guard logic checking for specific order conditions not met
|
|
437
|
-
2. Missing or incorrect submission parameters
|
|
438
|
-
3. Permission configuration issues
|
|
439
|
-
|
|
440
|
-
**Status**: Blocked - cannot proceed to Wonderful node
|
|
441
|
-
|
|
442
|
-
---
|
|
443
|
-
|
|
444
|
-
### Path 4: Lost Package ✅
|
|
445
|
-
|
|
446
|
-
**Status**: Successfully Completed (2026-04-26)
|
|
447
|
-
|
|
448
|
-
**Order Info**:
|
|
449
|
-
- Order: `test_delivery_order_v2`
|
|
450
|
-
- Progress: `test_delivery_progress_v2`
|
|
451
|
-
- Allocation: `test_delivery_allocation_v2`
|
|
452
|
-
|
|
453
|
-
**Test Steps**:
|
|
454
|
-
|
|
455
|
-
#### Step 1-3: Order Creation → Confirmed → Shipping ✅
|
|
456
|
-
|
|
457
|
-
Same as Path 2, completed successfully. Progress at "Shipping" node.
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
#### Step 4: Report Lost ✅
|
|
462
|
-
|
|
463
|
-
**Request:**
|
|
464
|
-
```json
|
|
465
|
-
{
|
|
466
|
-
"operation_type": "progress",
|
|
467
|
-
"data": {
|
|
468
|
-
"object": "test_delivery_progress_v2",
|
|
469
|
-
"operate": {
|
|
470
|
-
"operation": {
|
|
471
|
-
"next_node_name": "Lost",
|
|
472
|
-
"forward": "Report Lost"
|
|
473
|
-
},
|
|
474
|
-
"message": "Package reported as lost by customer"
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
"env": {
|
|
478
|
-
"account": "myshop_customer",
|
|
479
|
-
"network": "testnet",
|
|
480
|
-
"no_cache": true
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
**Result**: ✅ Progress at "Lost" node
|
|
486
|
-
|
|
487
|
-
---
|
|
488
|
-
|
|
489
|
-
#### Step 5: Withdraw Funds via Allocation Guard ✅
|
|
490
|
-
|
|
491
|
-
**Request:**
|
|
492
|
-
```json
|
|
493
|
-
{
|
|
494
|
-
"operation_type": "allocation",
|
|
495
|
-
"data": {
|
|
496
|
-
"object": "test_delivery_allocation_v2",
|
|
497
|
-
"alloc_by_guard": "0xf2eae05aec5bc362e7efff6e531e7d4c7f6e4ababc89af6f00b83def6ae485df"
|
|
498
|
-
},
|
|
499
|
-
"submission": {
|
|
500
|
-
"type": "submission",
|
|
501
|
-
"guard": [
|
|
502
|
-
{
|
|
503
|
-
"object": "0xf2eae05aec5bc362e7efff6e531e7d4c7f6e4ababc89af6f00b83def6ae485df",
|
|
504
|
-
"impack": true
|
|
505
|
-
}
|
|
506
|
-
],
|
|
507
|
-
"submission": [
|
|
508
|
-
{
|
|
509
|
-
"guard": "0xf2eae05aec5bc362e7efff6e531e7d4c7f6e4ababc89af6f00b83def6ae485df",
|
|
510
|
-
"submission": [
|
|
511
|
-
{
|
|
512
|
-
"identifier": 0,
|
|
513
|
-
"b_submission": true,
|
|
514
|
-
"value_type": 1,
|
|
515
|
-
"value": "test_delivery_order_v2"
|
|
516
|
-
}
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
]
|
|
520
|
-
},
|
|
521
|
-
"env": {
|
|
522
|
-
"account": "myshop_customer",
|
|
523
|
-
"network": "testnet",
|
|
524
|
-
"no_cache": true
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
**Result**: ✅ Funds withdrawn successfully to customer
|
|
530
|
-
|
|
531
|
-
**End State**: Lost - Customer wins 100% allocation
|
|
532
|
-
|
|
533
|
-
**Key Findings**:
|
|
534
|
-
- User operations (like Report Lost) use `progress` operation type
|
|
535
|
-
- Allocation withdrawal uses `alloc_by_guard` with guard address
|
|
536
|
-
- Submission format: `value_type` uses numeric codes (1=Address, 2=String, etc.)
|
|
537
|
-
|
|
538
|
-
---
|
|
539
|
-
|
|
540
|
-
## Summary
|
|
541
|
-
|
|
542
|
-
| Path | Status | End State | Notes |
|
|
543
|
-
|------|--------|-----------|-------|
|
|
544
|
-
| 1 | ✅ Completed | Order Cancel | Full flow tested successfully |
|
|
545
|
-
| 2 | ⏳ Pending | - | Standard delivery flow - need dual-sig test |
|
|
546
|
-
| 3 | ⏸️ Skipped | - | Time-based guard (10d) - not testable |
|
|
547
|
-
| 4 | ✅ Completed | Lost | Customer wins, funds withdrawn successfully |
|
|
548
|
-
| 5 | ⏳ Pending | - | Wonderful rating - need Delivery Complete first |
|
|
549
|
-
| 6 | ⏸️ Skipped | - | Time-based guard (10d) - not testable |
|
|
550
|
-
| 7 | ⚠️ Partial | Non-receipt Return | Dual-sig entry successful, blocked at Return Complete |
|
|
551
|
-
| 8 | ⏳ Not Tested | - | Receipt Return |
|
|
552
|
-
| 9 | ⏸️ Skipped | - | Time-based guard (10d) - not testable |
|
|
553
|
-
| 10 | ⏸️ Skipped | - | Time-based guard (2d) - not testable |
|
|
554
|
-
|
|
555
|
-
## Key Findings
|
|
556
|
-
|
|
557
|
-
### Operation Patterns
|
|
558
|
-
|
|
559
|
-
1. **User Operations** (Customer):
|
|
560
|
-
- Use `operation_type: "progress"`
|
|
561
|
-
- Example: Report Lost, Rate Wonderful, Request Return
|
|
562
|
-
- Account: `myshop_customer`
|
|
563
|
-
|
|
564
|
-
2. **Merchant Operations**:
|
|
565
|
-
- Use `operation_type: "progress"`
|
|
566
|
-
- Example: Confirm Order, Shipping, Complete Order
|
|
567
|
-
- Account: `myshop_merchant`
|
|
568
|
-
- Often require `permissionIndex: 1000` or `1001`
|
|
569
|
-
|
|
570
|
-
3. **Allocation Withdrawal**:
|
|
571
|
-
- Use `operation_type: "allocation"`
|
|
572
|
-
- Field: `alloc_by_guard` (use guard address, not name)
|
|
573
|
-
- Requires submission with guard verification
|
|
574
|
-
|
|
575
|
-
### Submission Format
|
|
576
|
-
|
|
577
|
-
```json
|
|
578
|
-
{
|
|
579
|
-
"type": "submission",
|
|
580
|
-
"guard": [
|
|
581
|
-
{
|
|
582
|
-
"object": "<guard_address>",
|
|
583
|
-
"impack": true
|
|
584
|
-
}
|
|
585
|
-
],
|
|
586
|
-
"submission": [
|
|
587
|
-
{
|
|
588
|
-
"guard": "<guard_address>",
|
|
589
|
-
"submission": [
|
|
590
|
-
{
|
|
591
|
-
"identifier": 0,
|
|
592
|
-
"b_submission": true,
|
|
593
|
-
"value_type": 1, // 1=Address, 2=String
|
|
594
|
-
"value": "<value>"
|
|
595
|
-
}
|
|
596
|
-
]
|
|
597
|
-
}
|
|
598
|
-
]
|
|
599
|
-
}
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
### Value Type Codes
|
|
603
|
-
|
|
604
|
-
| Code | Type |
|
|
605
|
-
|------|------|
|
|
606
|
-
| 1 | Address |
|
|
607
|
-
| 2 | String |
|
|
608
|
-
| 3 | U8 |
|
|
609
|
-
| 4 | U16 |
|
|
610
|
-
| 5 | U32 |
|
|
611
|
-
| 6 | U64 |
|
|
612
|
-
| 7 | U128 |
|
|
613
|
-
| 8 | U256 |
|
|
614
|
-
| 9 | Bool |
|
|
615
|
-
|
|
616
|
-
## Known Limitations
|
|
617
|
-
|
|
618
|
-
1. **Time-Based Guards**: Guards requiring time thresholds (2-day, 10-day) cannot be tested as they depend on actual time passage.
|
|
619
|
-
|
|
620
|
-
2. **Dual-Signature Nodes**: Some nodes (Delivery Complete, Return Complete) require threshold=2, needing both customer and merchant actions.
|
|
621
|
-
|
|
622
|
-
3. **Guard Verification Issues**: Some guards fail verification (error 7) even with correct parameters. This may be related to node state validation or submission format.
|
|
623
|
-
|
|
624
|
-
---
|
|
625
|
-
|
|
626
|
-
## Path 7: Non-receipt Return (Partial)
|
|
627
|
-
|
|
628
|
-
### Test Flow
|
|
629
|
-
|
|
630
|
-
**Step 1**: Customer requests return (namedOperator)
|
|
631
|
-
|
|
632
|
-
```json
|
|
633
|
-
{
|
|
634
|
-
"operation_type": "progress",
|
|
635
|
-
"data": {
|
|
636
|
-
"object": "test_wonderful_progress_v2",
|
|
637
|
-
"operate": {
|
|
638
|
-
"operation": {
|
|
639
|
-
"next_node_name": "Non-receipt Return",
|
|
640
|
-
"forward": "Request Return"
|
|
641
|
-
},
|
|
642
|
-
"message": "Customer requests return without receipt"
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
"env": {
|
|
646
|
-
"account": "myshop_customer",
|
|
647
|
-
"network": "testnet",
|
|
648
|
-
"no_cache": true
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
**Result**: ✅ Success - First signature recorded
|
|
654
|
-
|
|
655
|
-
**Step 2**: Merchant confirms return (permissionIndex + guard)
|
|
656
|
-
|
|
657
|
-
```json
|
|
658
|
-
{
|
|
659
|
-
"operation_type": "progress",
|
|
660
|
-
"data": {
|
|
661
|
-
"object": "test_wonderful_progress_v2",
|
|
662
|
-
"operate": {
|
|
663
|
-
"operation": {
|
|
664
|
-
"next_node_name": "Non-receipt Return",
|
|
665
|
-
"forward": "Confirm Return with Merkle Root"
|
|
666
|
-
},
|
|
667
|
-
"message": "Merchant confirms return request"
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
"submission": {
|
|
671
|
-
"type": "submission",
|
|
672
|
-
"guard": [{"object": "machine_merkle_root_v2", "impack": true}],
|
|
673
|
-
"submission": [{
|
|
674
|
-
"guard": "machine_merkle_root_v2",
|
|
675
|
-
"submission": [{
|
|
676
|
-
"identifier": 0,
|
|
677
|
-
"b_submission": true,
|
|
678
|
-
"value_type": 2,
|
|
679
|
-
"value": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"
|
|
680
|
-
}]
|
|
681
|
-
}]
|
|
682
|
-
},
|
|
683
|
-
"env": {
|
|
684
|
-
"account": "myshop_merchant",
|
|
685
|
-
"network": "testnet",
|
|
686
|
-
"no_cache": true
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
**Result**: ✅ Success - Dual-sig complete, entered Non-receipt Return node
|
|
692
|
-
|
|
693
|
-
**Step 3**: Customer submits return Merkle Root (namedOperator + guard)
|
|
694
|
-
|
|
695
|
-
```json
|
|
696
|
-
{
|
|
697
|
-
"operation_type": "progress",
|
|
698
|
-
"data": {
|
|
699
|
-
"object": "test_wonderful_progress_v2",
|
|
700
|
-
"operate": {
|
|
701
|
-
"operation": {
|
|
702
|
-
"next_node_name": "Return Complete",
|
|
703
|
-
"forward": "Submit Return Merkle Root"
|
|
704
|
-
},
|
|
705
|
-
"message": "Customer submits return tracking Merkle Root"
|
|
706
|
-
}
|
|
707
|
-
},
|
|
708
|
-
"submission": {
|
|
709
|
-
"type": "submission",
|
|
710
|
-
"guard": [{"object": "machine_merkle_root_v2", "impack": true}],
|
|
711
|
-
"submission": [{
|
|
712
|
-
"guard": "machine_merkle_root_v2",
|
|
713
|
-
"submission": [{
|
|
714
|
-
"identifier": 0,
|
|
715
|
-
"b_submission": true,
|
|
716
|
-
"value_type": 2,
|
|
717
|
-
"value": "fedcbafedcbafedcbafedcbafedcbafedcbafedcbafedcbafedcbafedcbafedcb"
|
|
718
|
-
}]
|
|
719
|
-
}]
|
|
720
|
-
},
|
|
721
|
-
"env": {
|
|
722
|
-
"account": "myshop_customer",
|
|
723
|
-
"network": "testnet",
|
|
724
|
-
"no_cache": true
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
**Result**: ❌ Failed - Guard verification error (E_VERIFY_FAILED, code 7)
|
|
730
|
-
|
|
731
|
-
### Key Findings
|
|
732
|
-
|
|
733
|
-
1. **Dual-signature mechanism works**: Successfully entered Non-receipt Return node with two signatures
|
|
734
|
-
2. **Guard verification issue**: machine_merkle_root_v2 guard fails even with 64-character string
|
|
735
|
-
3. **Possible causes**:
|
|
736
|
-
- Guard may require additional node state validation
|
|
737
|
-
- Submission format may need adjustment
|
|
738
|
-
- Guard logic may have additional constraints not visible in query
|
|
739
|
-
|
|
740
|
-
---
|
|
741
|
-
|
|
742
|
-
*Test document updated: 2026-04-27*
|
|
743
|
-
*Tester: AI Assistant*
|