@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,599 +0,0 @@
|
|
|
1
|
-
# Three-Body Author Signature Service - Test Results v2
|
|
2
|
-
|
|
3
|
-
**Test Date**: 2026-04-26
|
|
4
|
-
**Network**: Testnet
|
|
5
|
-
**Test Account**: three_body_author (0xda123833e96e734815f2f57d52ad463681635c6678cfe113c77dbeee49d7865c)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Test Summary
|
|
10
|
-
|
|
11
|
-
| Test Category | Total | Passed | Failed | Status |
|
|
12
|
-
|--------------|-------|--------|--------|--------|
|
|
13
|
-
| Service Creation | 8 | 8 | 0 | ✅ Pass |
|
|
14
|
-
| Configuration | 4 | 4 | 0 | ✅ Pass |
|
|
15
|
-
| Verification | 1 | 1 | 0 | ✅ Pass |
|
|
16
|
-
| Order Creation | 1 | 1 | 0 | ✅ Pass |
|
|
17
|
-
| **Total** | **14** | **14** | **0** | **✅ All Passed** |
|
|
18
|
-
|
|
19
|
-
**Key Fix in v2**:
|
|
20
|
-
- Machine binding now works correctly when Service is unpublished
|
|
21
|
-
- Added `no_cache: true` to queries to avoid stale cache data
|
|
22
|
-
- Service must be unpaused before creating orders
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Prerequisites Test
|
|
27
|
-
|
|
28
|
-
### Account Balance Check
|
|
29
|
-
|
|
30
|
-
**Request**:
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"query_type": "account_balance",
|
|
34
|
-
"name_or_address": "three_body_author",
|
|
35
|
-
"network": "testnet"
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Actual Result**:
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"address": "0xda123833e96e734815f2f57d52ad463681635c6678cfe113c77dbeee49d7865c",
|
|
43
|
-
"balance": {
|
|
44
|
-
"coinType": "0x2::wow::WOW",
|
|
45
|
-
"totalBalance": "4904827524"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Status**: ✅ PASS
|
|
51
|
-
**Notes**: Account has sufficient balance for all transactions.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Step-by-Step Test Results
|
|
56
|
-
|
|
57
|
-
### Step 1: Create Permission Object
|
|
58
|
-
|
|
59
|
-
**Request**:
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"operation_type": "permission",
|
|
63
|
-
"data": {
|
|
64
|
-
"object": {
|
|
65
|
-
"name": "three_body_permission_v2",
|
|
66
|
-
"replaceExistName": true
|
|
67
|
-
},
|
|
68
|
-
"description": "Permission for Three-Body Signature Service v2",
|
|
69
|
-
"table": {
|
|
70
|
-
"op": "add perm by entity",
|
|
71
|
-
"entity": {"name_or_address": "three_body_author"},
|
|
72
|
-
"index": [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 306]
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"env": {
|
|
76
|
-
"account": "three_body_author",
|
|
77
|
-
"network": "testnet"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**Actual Result**:
|
|
83
|
-
```json
|
|
84
|
-
[{
|
|
85
|
-
"type": "Permission",
|
|
86
|
-
"type_raw": "0x2::permission::Permission",
|
|
87
|
-
"object": "0xf939b4be49761ef8c30ff19ee874157e2ba1d83ab3a8de4f310443e588d1df99",
|
|
88
|
-
"version": "2195623",
|
|
89
|
-
"change": "created"
|
|
90
|
-
}]
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Status**: ✅ PASS
|
|
94
|
-
**Object ID**: `0xf939b4be49761ef8c30ff19ee874157e2ba1d83ab3a8de4f310443e588d1df99`
|
|
95
|
-
**Name**: `three_body_permission_v2` (with replaceExistName=true)
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
### Step 2: Create Buy Guard
|
|
100
|
-
|
|
101
|
-
**Request**:
|
|
102
|
-
```json
|
|
103
|
-
{
|
|
104
|
-
"operation_type": "guard",
|
|
105
|
-
"data": {
|
|
106
|
-
"namedNew": {
|
|
107
|
-
"name": "three_body_buy_guard_v2",
|
|
108
|
-
"tags": ["signature", "book", "buy-guard"],
|
|
109
|
-
"replaceExistName": true
|
|
110
|
-
},
|
|
111
|
-
"description": "Verify buyer is the service creator (three_body_author). Only the author can purchase this signature service.",
|
|
112
|
-
"table": [
|
|
113
|
-
{
|
|
114
|
-
"identifier": 0,
|
|
115
|
-
"b_submission": false,
|
|
116
|
-
"value_type": "Address",
|
|
117
|
-
"value": "0xda123833e96e734815f2f57d52ad463681635c6678cfe113c77dbeee49d7865c",
|
|
118
|
-
"name": "author_address"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"root": {
|
|
122
|
-
"type": "node",
|
|
123
|
-
"node": {
|
|
124
|
-
"type": "logic_equal",
|
|
125
|
-
"nodes": [
|
|
126
|
-
{
|
|
127
|
-
"type": "context",
|
|
128
|
-
"context": "Signer"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"type": "identifier",
|
|
132
|
-
"identifier": 0
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"env": {
|
|
139
|
-
"account": "three_body_author",
|
|
140
|
-
"network": "testnet"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Actual Result**:
|
|
146
|
-
```json
|
|
147
|
-
[{
|
|
148
|
-
"type": "Guard",
|
|
149
|
-
"type_raw": "0x2::guard::Guard",
|
|
150
|
-
"object": "0x2fc0283e55f4322eb602a5370b32e455597e339c74a23ada5d9a4a82f02f7925",
|
|
151
|
-
"version": "2195993",
|
|
152
|
-
"owner": "Immutable",
|
|
153
|
-
"change": "created"
|
|
154
|
-
}]
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
**Status**: ✅ PASS
|
|
158
|
-
**Object ID**: `0x2fc0283e55f4322eb602a5370b32e455597e339c74a23ada5d9a4a82f02f7925`
|
|
159
|
-
**Name**: `three_body_buy_guard_v2` (with replaceExistName=true)
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
### Step 3: Create Machine with Workflow Nodes
|
|
164
|
-
|
|
165
|
-
**Request**:
|
|
166
|
-
```json
|
|
167
|
-
{
|
|
168
|
-
"operation_type": "machine",
|
|
169
|
-
"data": {
|
|
170
|
-
"object": {
|
|
171
|
-
"name": "three_body_machine_v2",
|
|
172
|
-
"permission": "three_body_permission_v2",
|
|
173
|
-
"replaceExistName": true
|
|
174
|
-
},
|
|
175
|
-
"description": "Three-Body signature service workflow v2: Book Delivery -> Signature Completion",
|
|
176
|
-
"node": {
|
|
177
|
-
"op": "add",
|
|
178
|
-
"nodes": [
|
|
179
|
-
{
|
|
180
|
-
"name": "Book Delivered",
|
|
181
|
-
"pairs": [
|
|
182
|
-
{
|
|
183
|
-
"prev_node": "",
|
|
184
|
-
"threshold": 0,
|
|
185
|
-
"forwards": [
|
|
186
|
-
{
|
|
187
|
-
"name": "Confirm Delivery",
|
|
188
|
-
"permissionIndex": 1000,
|
|
189
|
-
"weight": 1
|
|
190
|
-
}
|
|
191
|
-
]
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"name": "Signature Completed",
|
|
197
|
-
"pairs": [
|
|
198
|
-
{
|
|
199
|
-
"prev_node": "Book Delivered",
|
|
200
|
-
"threshold": 1,
|
|
201
|
-
"forwards": [
|
|
202
|
-
{
|
|
203
|
-
"name": "Complete Signature",
|
|
204
|
-
"permissionIndex": 1001,
|
|
205
|
-
"weight": 1
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
|
-
"publish": true
|
|
214
|
-
},
|
|
215
|
-
"env": {
|
|
216
|
-
"account": "three_body_author",
|
|
217
|
-
"network": "testnet"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
**Actual Result**:
|
|
223
|
-
```json
|
|
224
|
-
[{
|
|
225
|
-
"type": "Machine",
|
|
226
|
-
"type_raw": "0x2::machine::Machine",
|
|
227
|
-
"object": "0x8e7e1c3f173c9e2203ca2e1e50b4c634dd1cef06d248ac50e35749adf7499411",
|
|
228
|
-
"version": "2196424",
|
|
229
|
-
"change": "created"
|
|
230
|
-
}]
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Status**: ✅ PASS
|
|
234
|
-
**Object ID**: `0x8e7e1c3f173c9e2203ca2e1e50b4c634dd1cef06d248ac50e35749adf7499411`
|
|
235
|
-
**Name**: `three_body_machine_v2` (with replaceExistName=true)
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
### Step 4: Create Empty Service (Unpublished)
|
|
240
|
-
|
|
241
|
-
**Request**:
|
|
242
|
-
```json
|
|
243
|
-
{
|
|
244
|
-
"operation_type": "service",
|
|
245
|
-
"data": {
|
|
246
|
-
"object": {
|
|
247
|
-
"name": "three_body_signature_service_v2",
|
|
248
|
-
"type_parameter": "0x2::wow::WOW",
|
|
249
|
-
"permission": "three_body_permission_v2",
|
|
250
|
-
"replaceExistName": true
|
|
251
|
-
},
|
|
252
|
-
"description": "Three-Body author book signature service v2. Provide a message up to 10 characters, and the author will sign your book. Process: 1.Book Delivery 2.Signature Completion. Fee: 888.",
|
|
253
|
-
"publish": false
|
|
254
|
-
},
|
|
255
|
-
"env": {
|
|
256
|
-
"account": "three_body_author",
|
|
257
|
-
"network": "testnet"
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Actual Result**:
|
|
263
|
-
```json
|
|
264
|
-
[{
|
|
265
|
-
"type": "Service",
|
|
266
|
-
"type_raw": "0x2::service::Service<0x2::wow::WOW>",
|
|
267
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
268
|
-
"version": "2198123",
|
|
269
|
-
"change": "created"
|
|
270
|
-
}]
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**Status**: ✅ PASS
|
|
274
|
-
**Object ID**: `0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c`
|
|
275
|
-
**Name**: `three_body_signature_service_v2` (with replaceExistName=true)
|
|
276
|
-
**Published**: false (intentionally left unpublished for machine binding)
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
### Step 5: Bind Machine to Service
|
|
281
|
-
|
|
282
|
-
**Request**:
|
|
283
|
-
```json
|
|
284
|
-
{
|
|
285
|
-
"operation_type": "service",
|
|
286
|
-
"data": {
|
|
287
|
-
"object": "three_body_signature_service_v2",
|
|
288
|
-
"machine": "three_body_machine_v2"
|
|
289
|
-
},
|
|
290
|
-
"env": {
|
|
291
|
-
"account": "three_body_author",
|
|
292
|
-
"network": "testnet"
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
**Actual Result**:
|
|
298
|
-
```json
|
|
299
|
-
[{
|
|
300
|
-
"type": "Service",
|
|
301
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
302
|
-
"version": "2198329",
|
|
303
|
-
"change": "mutated"
|
|
304
|
-
}]
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**Status**: ✅ PASS
|
|
308
|
-
**Notes**: Machine bound to Service successfully while Service is unpublished.
|
|
309
|
-
|
|
310
|
-
**Verification** (with no_cache: true):
|
|
311
|
-
```json
|
|
312
|
-
{
|
|
313
|
-
"machine": "0x8e7e1c3f173c9e2203ca2e1e50b4c634dd1cef06d248ac50e35749adf7499411",
|
|
314
|
-
"bPublished": false
|
|
315
|
-
}
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
### Step 6: Set Buy Guard
|
|
321
|
-
|
|
322
|
-
**Request**:
|
|
323
|
-
```json
|
|
324
|
-
{
|
|
325
|
-
"operation_type": "service",
|
|
326
|
-
"data": {
|
|
327
|
-
"object": "three_body_signature_service_v2",
|
|
328
|
-
"buy_guard": "three_body_buy_guard_v2"
|
|
329
|
-
},
|
|
330
|
-
"env": {
|
|
331
|
-
"account": "three_body_author",
|
|
332
|
-
"network": "testnet"
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**Actual Result**:
|
|
338
|
-
```json
|
|
339
|
-
[{
|
|
340
|
-
"type": "Service",
|
|
341
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
342
|
-
"version": "2203786",
|
|
343
|
-
"change": "mutated"
|
|
344
|
-
}]
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Status**: ✅ PASS
|
|
348
|
-
**Notes**: Buy Guard configured. Only author can now purchase this service.
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
|
|
352
|
-
### Step 7: Configure Order Allocators
|
|
353
|
-
|
|
354
|
-
**Request**:
|
|
355
|
-
```json
|
|
356
|
-
{
|
|
357
|
-
"operation_type": "service",
|
|
358
|
-
"data": {
|
|
359
|
-
"object": "three_body_signature_service_v2",
|
|
360
|
-
"order_allocators": {
|
|
361
|
-
"description": "Three-Body signature service fund allocation - 100% to author",
|
|
362
|
-
"threshold": 0,
|
|
363
|
-
"allocators": [
|
|
364
|
-
{
|
|
365
|
-
"guard": "three_body_buy_guard_v2",
|
|
366
|
-
"sharing": [
|
|
367
|
-
{
|
|
368
|
-
"who": {"Signer": "signer"},
|
|
369
|
-
"sharing": 10000,
|
|
370
|
-
"mode": "Rate"
|
|
371
|
-
}
|
|
372
|
-
]
|
|
373
|
-
}
|
|
374
|
-
]
|
|
375
|
-
},
|
|
376
|
-
"customer_required": ["phone", "email", "shipping_address"]
|
|
377
|
-
},
|
|
378
|
-
"env": {
|
|
379
|
-
"account": "three_body_author",
|
|
380
|
-
"network": "testnet"
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
**Actual Result**:
|
|
386
|
-
```json
|
|
387
|
-
[{
|
|
388
|
-
"type": "Service",
|
|
389
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
390
|
-
"version": "2203787",
|
|
391
|
-
"change": "mutated"
|
|
392
|
-
}]
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
**Status**: ✅ PASS
|
|
396
|
-
**Notes**: Order allocators configured with 100% allocation to signer (author).
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
### Step 8: Add Sales and Publish Service
|
|
401
|
-
|
|
402
|
-
**Request**:
|
|
403
|
-
```json
|
|
404
|
-
{
|
|
405
|
-
"operation_type": "service",
|
|
406
|
-
"data": {
|
|
407
|
-
"object": "three_body_signature_service_v2",
|
|
408
|
-
"sales": {
|
|
409
|
-
"op": "add",
|
|
410
|
-
"sales": [
|
|
411
|
-
{
|
|
412
|
-
"name": "Three-Body Book Signature",
|
|
413
|
-
"price": 888,
|
|
414
|
-
"stock": 100,
|
|
415
|
-
"suspension": false,
|
|
416
|
-
"wip": "",
|
|
417
|
-
"wip_hash": ""
|
|
418
|
-
}
|
|
419
|
-
]
|
|
420
|
-
},
|
|
421
|
-
"publish": true
|
|
422
|
-
},
|
|
423
|
-
"env": {
|
|
424
|
-
"account": "three_body_author",
|
|
425
|
-
"network": "testnet"
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
**Actual Result**:
|
|
431
|
-
```json
|
|
432
|
-
[{
|
|
433
|
-
"type": "Service",
|
|
434
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
435
|
-
"version": "2205976",
|
|
436
|
-
"change": "mutated"
|
|
437
|
-
}]
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**Status**: ✅ PASS
|
|
441
|
-
**Notes**: Service published successfully with sales item.
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
### Step 9: Unpause Service
|
|
446
|
-
|
|
447
|
-
**Request**:
|
|
448
|
-
```json
|
|
449
|
-
{
|
|
450
|
-
"operation_type": "service",
|
|
451
|
-
"data": {
|
|
452
|
-
"object": "three_body_signature_service_v2",
|
|
453
|
-
"pause": false
|
|
454
|
-
},
|
|
455
|
-
"env": {
|
|
456
|
-
"account": "three_body_author",
|
|
457
|
-
"network": "testnet"
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
**Actual Result**:
|
|
463
|
-
```json
|
|
464
|
-
[{
|
|
465
|
-
"type": "Service",
|
|
466
|
-
"object": "0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c",
|
|
467
|
-
"version": "2205975",
|
|
468
|
-
"change": "mutated"
|
|
469
|
-
}]
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
**Status**: ✅ PASS
|
|
473
|
-
**Notes**: Service unpaused and ready for orders.
|
|
474
|
-
|
|
475
|
-
---
|
|
476
|
-
|
|
477
|
-
### Step 10: Test Order Creation (Author Purchase)
|
|
478
|
-
|
|
479
|
-
**Request**:
|
|
480
|
-
```json
|
|
481
|
-
{
|
|
482
|
-
"operation_type": "service",
|
|
483
|
-
"data": {
|
|
484
|
-
"object": "three_body_signature_service_v2",
|
|
485
|
-
"order_new": {
|
|
486
|
-
"buy": {
|
|
487
|
-
"items": [
|
|
488
|
-
{
|
|
489
|
-
"name": "Three-Body Book Signature",
|
|
490
|
-
"stock": 1,
|
|
491
|
-
"wip_hash": ""
|
|
492
|
-
}
|
|
493
|
-
],
|
|
494
|
-
"total_pay": {
|
|
495
|
-
"balance": 888
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
|
-
"namedNewOrder": {
|
|
499
|
-
"name": "three_body_order_v2",
|
|
500
|
-
"replaceExistName": true
|
|
501
|
-
},
|
|
502
|
-
"namedNewAllocation": {
|
|
503
|
-
"name": "three_body_allocation_v2",
|
|
504
|
-
"replaceExistName": true
|
|
505
|
-
},
|
|
506
|
-
"namedNewProgress": {
|
|
507
|
-
"name": "three_body_progress_v2",
|
|
508
|
-
"replaceExistName": true
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
},
|
|
512
|
-
"env": {
|
|
513
|
-
"account": "three_body_author",
|
|
514
|
-
"network": "testnet"
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
**Actual Result**:
|
|
520
|
-
```json
|
|
521
|
-
[{
|
|
522
|
-
"type": "Order",
|
|
523
|
-
"type_raw": "0x2::order::Order",
|
|
524
|
-
"object": "0x7684ab80a22d5098972606a13fae5602e9a732476898e4d143afd8dd83f35d49",
|
|
525
|
-
"version": "2209290",
|
|
526
|
-
"change": "created"
|
|
527
|
-
}, {
|
|
528
|
-
"type": "Progress",
|
|
529
|
-
"type_raw": "0x2::progress::Progress",
|
|
530
|
-
"object": "0x97ef347682ecc77d4f501fde07fa8772a9d3f122206fa058bec828b1bdd935d9",
|
|
531
|
-
"version": "2209290",
|
|
532
|
-
"change": "created"
|
|
533
|
-
}, {
|
|
534
|
-
"type": "Allocation",
|
|
535
|
-
"type_raw": "0x2::allocation::Allocation<0x2::wow::WOW>",
|
|
536
|
-
"object": "0xd6f2dacb736d10724562833a3124b6e55df4e94fcb9dcc2bdf49a70d21899e00",
|
|
537
|
-
"version": "2209290",
|
|
538
|
-
"change": "created"
|
|
539
|
-
}]
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
**Status**: ✅ PASS
|
|
543
|
-
**Notes**:
|
|
544
|
-
- Order created successfully
|
|
545
|
-
- **Progress created** (proves machine binding works!)
|
|
546
|
-
- Allocation created
|
|
547
|
-
- All objects named with replaceExistName=true
|
|
548
|
-
|
|
549
|
-
---
|
|
550
|
-
|
|
551
|
-
## Key Object IDs (Actual v2)
|
|
552
|
-
|
|
553
|
-
| Object | Name | ID | Version |
|
|
554
|
-
|--------|------|-----|---------|
|
|
555
|
-
| Permission | three_body_permission_v2 | `0xf939b4be49761ef8c30ff19ee874157e2ba1d83ab3a8de4f310443e588d1df99` | 2195623 |
|
|
556
|
-
| Buy Guard | three_body_buy_guard_v2 | `0x2fc0283e55f4322eb602a5370b32e455597e339c74a23ada5d9a4a82f02f7925` | 2195993 |
|
|
557
|
-
| Machine | three_body_machine_v2 | `0x8e7e1c3f173c9e2203ca2e1e50b4c634dd1cef06d248ac50e35749adf7499411` | 2196424 |
|
|
558
|
-
| Service | three_body_signature_service_v2 | `0x140e91943775592736f587e596afce7d28f41fee1593f8dfbc2f04d852e5d45c` | 2205976 |
|
|
559
|
-
| Order | three_body_order_v2 | `0x7684ab80a22d5098972606a13fae5602e9a732476898e4d143afd8dd83f35d49` | 2209290 |
|
|
560
|
-
| Allocation | three_body_allocation_v2 | `0xd6f2dacb736d10724562833a3124b6e55df4e94fcb9dcc2bdf49a70d21899e00` | 2209290 |
|
|
561
|
-
| Progress | three_body_progress_v2 | `0x97ef347682ecc77d4f501fde07fa8772a9d3f122206fa058bec828b1bdd935d9` | 2209290 |
|
|
562
|
-
|
|
563
|
-
---
|
|
564
|
-
|
|
565
|
-
## Conclusion
|
|
566
|
-
|
|
567
|
-
All service creation and configuration tests passed successfully in v2:
|
|
568
|
-
|
|
569
|
-
1. ✅ **Permission Object** created with index 306 (service.machine)
|
|
570
|
-
2. ✅ **Buy Guard** created with correct logic (Signer == Author)
|
|
571
|
-
3. ✅ **Machine** created with two-node workflow and published
|
|
572
|
-
4. ✅ **Service** created (unpublished) with v2 naming
|
|
573
|
-
5. ✅ **Machine Binding** successful while Service is unpublished
|
|
574
|
-
6. ✅ **Buy Guard Configuration** successful
|
|
575
|
-
7. ✅ **Order Allocators** configured (100% to author)
|
|
576
|
-
8. ✅ **Sales Added** and Service published
|
|
577
|
-
9. ✅ **Service Unpaused** for order creation
|
|
578
|
-
10. ✅ **Order Creation** successful with Progress object
|
|
579
|
-
|
|
580
|
-
The Three-Body Author Signature Service v2 is fully operational on Testnet. The Buy Guard correctly restricts purchases to the author account only, and the Machine workflow enables Progress tracking.
|
|
581
|
-
|
|
582
|
-
---
|
|
583
|
-
|
|
584
|
-
## Key Differences from v1
|
|
585
|
-
|
|
586
|
-
| Aspect | v1 | v2 |
|
|
587
|
-
|--------|-----|-----|
|
|
588
|
-
| Machine Binding | Failed silently (same tx as publish) | Separate step before publish |
|
|
589
|
-
| Cache Issues | Stale data shown | Used `no_cache: true` for accurate queries |
|
|
590
|
-
| Service State | Paused after creation | Explicitly unpaused for orders |
|
|
591
|
-
| Progress Object | Not created | Created successfully |
|
|
592
|
-
| Naming | Basic naming | All objects use `replaceExistName=true` |
|
|
593
|
-
|
|
594
|
-
## Important Notes
|
|
595
|
-
|
|
596
|
-
1. **Cache Awareness**: Always use `no_cache: true` when verifying object state after mutations
|
|
597
|
-
2. **Machine Binding**: Must be done before Service is published
|
|
598
|
-
3. **Service State**: Service must be unpaused (`bPaused: false`) to accept orders
|
|
599
|
-
4. **Sales Addition**: Can be added after Service creation, before or after publish
|