@wowok/agent-mcp 2.2.13 → 2.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +19 -11
  2. package/dist/index.js +44 -100
  3. package/dist/schema/query/index.js +1 -1
  4. package/dist/schema-query/index.d.ts +29 -0
  5. package/dist/schema-query/index.js +149 -0
  6. package/dist/schemas/account_operation.schema.json +255 -0
  7. package/dist/schemas/guard2file.schema.json +71 -0
  8. package/dist/schemas/index.json +139 -0
  9. package/dist/schemas/local_info_operation.schema.json +142 -0
  10. package/dist/schemas/local_mark_operation.schema.json +119 -0
  11. package/dist/schemas/machineNode2file.schema.json +71 -0
  12. package/dist/schemas/messenger_operation.schema.json +1393 -0
  13. package/dist/schemas/onchain_events.schema.json +113 -0
  14. package/dist/schemas/onchain_operations.schema.json +376 -0
  15. package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
  16. package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
  17. package/dist/schemas/onchain_operations_contact.schema.json +853 -0
  18. package/dist/schemas/onchain_operations_demand.schema.json +984 -0
  19. package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
  20. package/dist/schemas/onchain_operations_guard.schema.json +713 -0
  21. package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
  22. package/dist/schemas/onchain_operations_order.schema.json +830 -0
  23. package/dist/schemas/onchain_operations_payment.schema.json +717 -0
  24. package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
  25. package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
  26. package/dist/schemas/onchain_operations_progress.schema.json +751 -0
  27. package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
  28. package/dist/schemas/onchain_operations_reward.schema.json +955 -0
  29. package/dist/schemas/onchain_operations_service.schema.json +1411 -0
  30. package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
  31. package/dist/schemas/onchain_table_data.schema.json +35 -0
  32. package/dist/schemas/query_toolkit.schema.json +32 -0
  33. package/dist/schemas/schema_query.schema.json +33 -0
  34. package/dist/schemas/wip_file.schema.json +27 -0
  35. package/dist/schemas/wowok_buildin_info.schema.json +487 -0
  36. package/package.json +7 -5
  37. package/dist/docs/index.d.ts +0 -3
  38. package/dist/docs/index.js +0 -2
  39. package/dist/docs/loader.d.ts +0 -12
  40. package/dist/docs/loader.js +0 -177
  41. package/dist/docs/search.d.ts +0 -17
  42. package/dist/docs/search.js +0 -325
  43. package/dist/docs/types.d.ts +0 -55
  44. package/dist/docs/types.js +0 -1
  45. package/docs/README.md +0 -249
  46. package/docs/WIP.md +0 -388
  47. package/docs/WTS.md +0 -536
  48. package/docs/docs/account.md +0 -914
  49. package/docs/docs/allocation.md +0 -635
  50. package/docs/docs/arbitration.md +0 -1804
  51. package/docs/docs/arbitration_state_machine.md +0 -270
  52. package/docs/docs/contact.md +0 -709
  53. package/docs/docs/demand.md +0 -948
  54. package/docs/docs/guard.md +0 -1465
  55. package/docs/docs/localinfo.md +0 -432
  56. package/docs/docs/localmark.md +0 -583
  57. package/docs/docs/machine.md +0 -2490
  58. package/docs/docs/messenger.md +0 -2098
  59. package/docs/docs/onchain_events.md +0 -267
  60. package/docs/docs/order.md +0 -1001
  61. package/docs/docs/payment.md +0 -512
  62. package/docs/docs/permission.md +0 -1438
  63. package/docs/docs/personal.md +0 -742
  64. package/docs/docs/progress.md +0 -1748
  65. package/docs/docs/query.md +0 -467
  66. package/docs/docs/repository.md +0 -1043
  67. package/docs/docs/reward.md +0 -833
  68. package/docs/docs/service.md +0 -2130
  69. package/docs/docs/stage-01-introduction.md +0 -243
  70. package/docs/docs/stage-02-trust.md +0 -302
  71. package/docs/docs/stage-03-collaboration.md +0 -337
  72. package/docs/docs/stage-04-transaction.md +0 -277
  73. package/docs/docs/stage-05-business.md +0 -151
  74. package/docs/docs/stage-06-personal.md +0 -203
  75. package/docs/docs/stage-07-query.md +0 -572
  76. package/docs/docs/stage-08-examples.md +0 -184
  77. package/docs/docs/treasury.md +0 -1149
  78. package/docs/docs/wowok_buildin_info.md +0 -740
  79. package/docs/examples/Insurance/Insurance.md +0 -594
  80. package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
  81. package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
  82. package/docs/examples/MyShop/MyShop.md +0 -1353
  83. package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
  84. package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
  85. package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
  86. package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
  87. package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
  88. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
  89. package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
  90. package/docs/examples/Travel/Travel.md +0 -1157
  91. package/docs/examples/Travel/Travel_TestResults.md +0 -743
  92. package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
  93. package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
  94. package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
  95. package/docs/skills/WOWOK.md +0 -650
  96. package/docs/skills/onchain_operations/_common.md +0 -406
  97. package/docs/skills/onchain_operations/_index.md +0 -196
  98. package/docs/skills/onchain_operations/allocation.md +0 -28
  99. package/docs/skills/onchain_operations/arbitration.md +0 -106
  100. package/docs/skills/onchain_operations/contact.md +0 -40
  101. package/docs/skills/onchain_operations/demand.md +0 -53
  102. package/docs/skills/onchain_operations/gen_passport.md +0 -23
  103. package/docs/skills/onchain_operations/guard.md +0 -56
  104. package/docs/skills/onchain_operations/machine.md +0 -89
  105. package/docs/skills/onchain_operations/order.md +0 -56
  106. package/docs/skills/onchain_operations/payment.md +0 -24
  107. package/docs/skills/onchain_operations/permission.md +0 -68
  108. package/docs/skills/onchain_operations/personal.md +0 -58
  109. package/docs/skills/onchain_operations/progress.md +0 -38
  110. package/docs/skills/onchain_operations/repository.md +0 -70
  111. package/docs/skills/onchain_operations/reward.md +0 -38
  112. package/docs/skills/onchain_operations/service.md +0 -78
  113. package/docs/skills/onchain_operations/treasury.md +0 -68
  114. package/docs/skills/schema-account_operation.md +0 -402
  115. package/docs/skills/schema-guard2file.md +0 -153
  116. package/docs/skills/schema-local_info_operation.md +0 -160
  117. package/docs/skills/schema-local_mark_operation.md +0 -148
  118. package/docs/skills/schema-machineNode2file.md +0 -155
  119. package/docs/skills/schema-messenger_operation.md +0 -547
  120. package/docs/skills/schema-onchain_events.md +0 -201
  121. package/docs/skills/schema-onchain_table_data.md +0 -334
  122. package/docs/skills/schema-query_toolkit.md +0 -395
  123. package/docs/skills/schema-wip_file.md +0 -240
  124. package/docs/skills/schema-wowok_buildin_info.md +0 -296
  125. package/docs/wip-examples/three_body.html +0 -57
  126. package/docs/wip-examples/three_body.wip +0 -30
@@ -1,594 +0,0 @@
1
- # Insurance Service Example
2
-
3
- A complete example demonstrating how to create an outdoor accident insurance service using WoWok protocol. This insurance service is designed to be purchased by travel service providers as part of a travel package (supply chain sub-order).
4
-
5
- > **View Actual Execution Results**: See [Insurance_TestResults.md](Insurance_TestResults.md) for real testnet execution results with actual object addresses and transaction outputs.
6
-
7
- ---
8
-
9
- ## Core Requirements & Features
10
-
11
- | Requirement | Description | Implementation |
12
- |-------------|-------------|----------------|
13
- | **Insurance Claims** | Process insurance claims with time-lock verification | Machine with Start -> Complete workflow |
14
- | **Time-Lock Guard** | Prevent premature claim completion | Guard using Order + convert_witness(TypeOrderProgress) to verify clock > progress.current_time + lock_duration |
15
- | **Supply Chain Integration** | Support sub-order creation by travel service providers | Order can be created by authorized agents (travel_provider) |
16
- | **Permission Control** | Role-based access for insurance operations | Permission object with custom indexes for claim processing |
17
-
18
- ### Key Design Decisions
19
-
20
- 1. **Time-Lock via Witness Conversion**: The Complete node Guard uses `convert_witness: 100` (TypeOrderProgress) to convert the submitted Order ID into its associated Progress object, then queries `progress.current_time` to verify the time-lock condition.
21
- 2. **Simple Two-Node Workflow**: Insurance claims follow a straightforward Start -> Complete path, keeping the workflow simple and predictable.
22
- 3. **Order ID as Submission**: The Order ID is submitted at runtime (`b_submission: true`) and used for witness conversion.
23
- 4. **Machine Creation Pattern**: Machine must be created first, then nodes added separately, then published. Creating machine with nodes and publish in one transaction does not work correctly.
24
-
25
- ---
26
-
27
- ## Overview
28
-
29
- This example demonstrates:
30
-
31
- - **Insurance Service Setup**: Permission, Guard, Machine, and Service creation
32
- - **Time-Lock Guard**: Using Order + convert_witness to access Progress data
33
- - **Workflow Automation**: Machine-driven claim processing
34
-
35
- ---
36
-
37
- ## Architecture
38
-
39
- ### System Components
40
-
41
- ```
42
- ------------------------------------------------------------------
43
- | Insurance Service System |
44
- |------------------------------------------------------------------|
45
- | |
46
- | +-----------------+ +-----------------+ |
47
- | | Permission | | Guard | |
48
- | | (insurance_ | | (insurance_ | |
49
- | | permission) | | complete_guard)| |
50
- | +--------+--------+ +--------+--------+ |
51
- | | | |
52
- | v v |
53
- | +-----------------+ +-----------------+ |
54
- | | Machine | | Service | |
55
- | | (insurance_ |<---| (insurance_ | |
56
- | | machine) | | service) | |
57
- | +-----------------+ +-----------------+ |
58
- | |
59
- | Workflow: Start -> Complete (Time-Lock Guard) |
60
- | |
61
- ------------------------------------------------------------------
62
- ```
63
-
64
- ### Claim Workflow
65
-
66
- ```
67
- +----------+ +--------------+
68
- | Start |-------->| Complete |
69
- | | | (Time-Lock) |
70
- +----------+ +--------------+
71
- ```
72
-
73
- **Guard Logic**:
74
- ```
75
- clock > progress.current_time + 1000ms
76
- (progress accessed via Order + convert_witness=TypeOrderProgress)
77
- ```
78
-
79
- ---
80
-
81
- ## Prerequisites
82
-
83
- Before running this example, ensure you have:
84
-
85
- 1. An account named `insurance_provider_v1` with sufficient WOW tokens
86
- 2. Access to the WoWok MCP server
87
-
88
- ### Create Insurance Provider Account
89
-
90
- **Prompt**: Create a new account named "insurance_provider_v1" for the insurance service provider.
91
-
92
- ```json
93
- {
94
- "gen": {
95
- "name": "insurance_provider_v1",
96
- "replaceExistName": true
97
- }
98
- }
99
- ```
100
-
101
- ### Get Test Tokens
102
-
103
- **Prompt**: Request testnet WOW tokens for account "insurance_provider_v1".
104
-
105
- ```json
106
- {
107
- "faucet": {
108
- "network": "testnet",
109
- "name_or_address": "insurance_provider_v1"
110
- }
111
- }
112
- ```
113
-
114
- ---
115
-
116
- ## Step 1: Create Permission Object
117
-
118
- Create a Permission object to manage access control for the insurance service.
119
-
120
- **Prompt**: Create a Permission object named "insurance_permission" for the insurance service.
121
-
122
- ```json
123
- {
124
- "operation_type": "permission",
125
- "data": {
126
- "object": {
127
- "name": "insurance_permission_v1",
128
- "replaceExistName": true
129
- },
130
- "description": "Permission for outdoor accident insurance service",
131
- "table": {
132
- "op": "add perm by entity",
133
- "entity": {"name_or_address": "insurance_provider_v1"},
134
- "index": [1000, 1001, 1002, 1003, 1004, 1005]
135
- }
136
- },
137
- "env": {
138
- "account": "insurance_provider_v1",
139
- "network": "testnet"
140
- }
141
- }
142
- ```
143
-
144
- ---
145
-
146
- ## Step 2: Create Time-Lock Complete Guard
147
-
148
- Create a Guard that verifies the time-lock condition for claim completion. The Guard uses the submitted Order ID with `convert_witness: 100` (TypeOrderProgress) to access the associated Progress object and query `progress.current_time`.
149
-
150
- **Guard Logic**:
151
- ```
152
- clock > progress.current_time + 1000
153
- ```
154
-
155
- **Prompt**: Create a Guard named "insurance_complete_guard" for time-lock verification on claim completion.
156
-
157
- ```json
158
- {
159
- "operation_type": "guard",
160
- "data": {
161
- "namedNew": {
162
- "name": "insurance_complete_guard_v1",
163
- "tags": ["insurance", "time-lock", "complete"],
164
- "replaceExistName": true
165
- },
166
- "description": "Time-lock guard for insurance claim completion. Requires current clock > progress.current_time + 1000ms (1 second for TESTING; in production set to reasonable duration like 8 hours). Progress is accessed via Order with convert_witness=TypeOrderProgress(100).",
167
- "table": [
168
- {
169
- "identifier": 0,
170
- "b_submission": true,
171
- "value_type": "Address",
172
- "value": "0x0000000000000000000000000000000000000000000000000000000000000000",
173
- "name": "Order ID (submitted at runtime)"
174
- },
175
- {
176
- "identifier": 1,
177
- "b_submission": false,
178
- "value_type": "U64",
179
- "value": 1000
180
- }
181
- ],
182
- "root": {
183
- "type": "node",
184
- "node": {
185
- "type": "logic_as_u256_greater",
186
- "nodes": [
187
- {
188
- "type": "context",
189
- "context": "Clock"
190
- },
191
- {
192
- "type": "calc_number_add",
193
- "nodes": [
194
- {
195
- "type": "query",
196
- "query": "progress.current_time",
197
- "object": {
198
- "identifier": 0,
199
- "convert_witness": 100
200
- },
201
- "parameters": []
202
- },
203
- {
204
- "type": "identifier",
205
- "identifier": 1
206
- }
207
- ]
208
- }
209
- ]
210
- }
211
- }
212
- },
213
- "env": {
214
- "account": "insurance_provider_v1",
215
- "network": "testnet"
216
- }
217
- }
218
- ```
219
-
220
- **Guard Table**:
221
-
222
- | identifier | b_submission | value_type | value | Purpose |
223
- |------------|-------------|-----------|-------|---------|
224
- | 0 | **true** | Address | 0x0...0 (placeholder) | Order ID submitted at runtime, converted to Progress via convert_witness |
225
- | 1 | false | U64 | 1000 | Time-lock duration in ms (1 second for testing) |
226
-
227
- > **Important**: `1000` ms (1 second) is for testing only. In production, set to a reasonable duration (e.g., 8 hours = 28800000 ms).
228
-
229
- ---
230
-
231
- ## Step 3: Create Withdraw Guard for Order Allocators
232
-
233
- Create a Guard that allows the insurance provider to withdraw funds after the order reaches the Complete node.
234
-
235
- **Prompt**: Create a Guard named "insurance_withdraw_guard" for order fund allocation.
236
-
237
- ```json
238
- {
239
- "operation_type": "guard",
240
- "data": {
241
- "namedNew": {
242
- "name": "insurance_withdraw_guard_v1",
243
- "tags": ["insurance", "withdraw"],
244
- "replaceExistName": true
245
- },
246
- "description": "Allow insurance provider to withdraw funds after order is completed.",
247
- "table": [
248
- {
249
- "identifier": 0,
250
- "b_submission": true,
251
- "value_type": "Address",
252
- "name": "order_id"
253
- },
254
- {
255
- "identifier": 1,
256
- "b_submission": false,
257
- "value_type": "String",
258
- "value": "Complete",
259
- "name": "complete_node"
260
- }
261
- ],
262
- "root": {
263
- "type": "node",
264
- "node": {
265
- "type": "logic_equal",
266
- "nodes": [
267
- {
268
- "type": "query",
269
- "query": "progress.current",
270
- "object": {
271
- "identifier": 0,
272
- "convert_witness": 100
273
- },
274
- "parameters": []
275
- },
276
- {
277
- "type": "identifier",
278
- "identifier": 1
279
- }
280
- ]
281
- }
282
- }
283
- },
284
- "env": {
285
- "account": "insurance_provider_v1",
286
- "network": "testnet"
287
- }
288
- }
289
- ```
290
-
291
- ---
292
-
293
- ## Step 4: Create, Configure and Publish Machine
294
-
295
- Create a Machine with workflow nodes and publish it in a single transaction. **IMPORTANT**: Machine nodes must be added during creation (in the same transaction) before publishing. Adding nodes after creation in separate transactions may not persist correctly.
296
-
297
- **Prompt**: Create a Machine named "insurance_machine" with the claim processing workflow and publish it.
298
-
299
- ```json
300
- {
301
- "operation_type": "machine",
302
- "data": {
303
- "object": {
304
- "name": "insurance_machine_v1",
305
- "permission": "insurance_permission_v1",
306
- "replaceExistName": true
307
- },
308
- "description": "Insurance claim processing workflow: Start -> Complete (with time-lock guard)",
309
- "node": {
310
- "op": "add",
311
- "nodes": [
312
- {
313
- "name": "Start",
314
- "pairs": [
315
- {
316
- "prev_node": "",
317
- "threshold": 0,
318
- "forwards": [
319
- {
320
- "name": "start_claim",
321
- "permissionIndex": 1000,
322
- "weight": 1
323
- }
324
- ]
325
- }
326
- ]
327
- },
328
- {
329
- "name": "Complete",
330
- "pairs": [
331
- {
332
- "prev_node": "Start",
333
- "threshold": 1,
334
- "forwards": [
335
- {
336
- "name": "complete_claim",
337
- "permissionIndex": 1001,
338
- "weight": 1,
339
- "guard": {
340
- "guard": "insurance_complete_guard_v1"
341
- }
342
- }
343
- ]
344
- }
345
- ]
346
- }
347
- ]
348
- },
349
- "publish": true
350
- },
351
- "env": {
352
- "account": "insurance_provider_v1",
353
- "network": "testnet"
354
- }
355
- }
356
- ```
357
-
358
- **Workflow Nodes**:
359
-
360
- | Node | Forward | Guard | Description |
361
- |------|---------|-------|-------------|
362
- | Start | start_claim -> Start | - | Enter the Start node from initial state |
363
- | Complete | complete_claim -> Complete | insurance_complete_guard_v1 | Complete the claim after time-lock verification |
364
-
365
- ---
366
-
367
- ## Step 7: Create and Publish Service
368
-
369
- Create the insurance service with machine, order_allocators, sales, and publish in a single transaction.
370
-
371
- > **Important**: Service must include `order_allocators` when publishing. After publishing, `machine`, `order_allocators`, and `arbitrations` become immutable.
372
-
373
- **Prompt**: Create and publish a Service named "insurance_service" with machine, order allocation, and insurance product.
374
-
375
- ```json
376
- {
377
- "operation_type": "service",
378
- "data": {
379
- "object": {
380
- "name": "insurance_service_v1",
381
- "type_parameter": "0x2::wow::WOW",
382
- "permission": "insurance_permission_v1",
383
- "replaceExistName": true
384
- },
385
- "description": "Outdoor accident insurance for Iceland travel. Provides coverage for ice scooting and other outdoor activities.",
386
- "machine": "insurance_machine_v1",
387
- "order_allocators": {
388
- "description": "Insurance order revenue allocation",
389
- "threshold": 0,
390
- "allocators": [
391
- {
392
- "guard": "insurance_withdraw_guard_v1",
393
- "sharing": [
394
- {
395
- "who": {"Signer": "signer"},
396
- "sharing": 10000,
397
- "mode": "Rate"
398
- }
399
- ]
400
- }
401
- ]
402
- },
403
- "sales": {
404
- "op": "add",
405
- "sales": [
406
- {
407
- "name": "Outdoor Accident Insurance",
408
- "price": 100000000,
409
- "stock": 1000,
410
- "suspension": false,
411
- "wip": "",
412
- "wip_hash": ""
413
- }
414
- ]
415
- },
416
- "publish": true
417
- },
418
- "env": {
419
- "account": "insurance_provider_v1",
420
- "network": "testnet"
421
- }
422
- }
423
- ```
424
-
425
- ---
426
-
427
- ## Step 8: Unpause Service
428
-
429
- Unpause the service to allow order creation.
430
-
431
- **Prompt**: Unpause "insurance_service".
432
-
433
- ```json
434
- {
435
- "operation_type": "service",
436
- "data": {
437
- "object": "insurance_service",
438
- "pause": false
439
- },
440
- "env": {
441
- "account": "insurance_provider_v1",
442
- "network": "testnet"
443
- }
444
- }
445
- ```
446
-
447
- ---
448
-
449
- ## Step 9: Verify Service Configuration
450
-
451
- Query the service to verify all configurations are correct.
452
-
453
- **Prompt**: Query "insurance_service" to verify configuration.
454
-
455
- ```json
456
- {
457
- "query_type": "onchain_objects",
458
- "objects": ["insurance_service"]
459
- }
460
- ```
461
-
462
- ---
463
-
464
- ## Step 10: Test Order Creation and Progress
465
-
466
- ### 10.1 Create Insurance Order
467
-
468
- Create an order on the insurance service using the `order_new` field of the `service` operation. In production, this would be done by the travel service provider as a supply chain sub-order.
469
-
470
- **Prompt**: Create an order on "insurance_service" using account "insurance_provider".
471
-
472
- ```json
473
- {
474
- "operation_type": "service",
475
- "data": {
476
- "object": "insurance_service",
477
- "order_new": {
478
- "buy": {
479
- "items": [
480
- {
481
- "name": "Outdoor Accident Insurance",
482
- "stock": 1,
483
- "wip_hash": ""
484
- }
485
- ],
486
- "total_pay": {
487
- "balance": 100000000
488
- }
489
- },
490
- "namedNewOrder": {
491
- "name": "test_insurance_order_v1",
492
- "replaceExistName": true
493
- }
494
- }
495
- },
496
- "env": {
497
- "account": "insurance_provider_v1",
498
- "network": "testnet"
499
- }
500
- }
501
- ```
502
-
503
- ### 10.2 Advance Progress: Initial -> Start
504
-
505
- First, advance the progress from initial state to Start node.
506
-
507
- **Prompt**: Advance progress to Start node.
508
-
509
- ```json
510
- {
511
- "operation_type": "progress",
512
- "data": {
513
- "object": "<insurance_progress_id>",
514
- "operate": {
515
- "operation": {
516
- "next_node_name": "Start",
517
- "forward": "start_claim"
518
- }
519
- }
520
- },
521
- "env": {
522
- "account": "insurance_provider_v1",
523
- "network": "testnet"
524
- }
525
- }
526
- ```
527
-
528
- ### 10.3 Advance Progress: Start -> Complete
529
-
530
- Wait at least 1 second after entering Start node, then advance the progress to Complete with the Order ID as submission.
531
-
532
- **Prompt**: Advance progress to Complete, submitting the Order ID. Wait 1 second before executing.
533
-
534
- ```json
535
- {
536
- "operation_type": "progress",
537
- "data": {
538
- "object": "<insurance_progress_id>",
539
- "operate": {
540
- "operation": {
541
- "next_node_name": "Complete",
542
- "forward": "complete_claim"
543
- }
544
- }
545
- },
546
- "env": {
547
- "account": "insurance_provider_v1",
548
- "network": "testnet"
549
- },
550
- "submission": {
551
- "type": "submission",
552
- "guard": [
553
- {
554
- "object": "insurance_complete_guard_v1",
555
- "impack": true
556
- }
557
- ],
558
- "submission": [
559
- {
560
- "guard": "insurance_complete_guard_v1",
561
- "submission": [
562
- {
563
- "identifier": 0,
564
- "b_submission": true,
565
- "value_type": "Address",
566
- "value": "<insurance_order_id>"
567
- }
568
- ]
569
- }
570
- ]
571
- }
572
- }
573
- ```
574
-
575
- > **Note**: Replace `<insurance_progress_id>` and `<insurance_order_id>` with actual values from step 10.1.
576
-
577
- ---
578
-
579
- ## Execution Checklist
580
-
581
- - [ ] Create `insurance_provider` account
582
- - [ ] Get test tokens for `insurance_provider`
583
- - [ ] Step 1: Create `insurance_permission`
584
- - [ ] Step 2: Create `insurance_complete_guard`
585
- - [ ] Step 3: Create `insurance_withdraw_guard`
586
- - [ ] Step 4: Create `insurance_machine` (without nodes)
587
- - [ ] Step 5: Add nodes to Machine (Start, Complete)
588
- - [ ] Step 6: Publish Machine
589
- - [ ] Step 7: Create and publish `insurance_service` (with machine, order_allocators, sales)
590
- - [ ] Step 8: Unpause Service
591
- - [ ] Step 9: Verify Service configuration
592
- - [ ] Step 10.1: Create test insurance order
593
- - [ ] Step 10.2: Advance progress Initial -> Start
594
- - [ ] Step 10.3: Wait 1s, then advance progress Start -> Complete