@wowok/skills 1.2.4 → 1.2.5
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 +34 -16
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/skills.d.ts +32 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +63 -0
- package/dist/skills.js.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/examples/Insurance/Insurance.md +543 -475
- package/examples/MyShop/MyShop.md +865 -746
- package/examples/MyShop_Advanced/MyShop_Advanced.md +1520 -1376
- package/examples/ThreeBody_Signature/ThreeBody_Signature.md +891 -651
- package/examples/Travel/Travel.md +952 -848
- package/package.json +2 -2
- package/scripts/install.js +3 -17
- package/wowok-arbitrator/SKILL.md +18 -57
- package/wowok-auditor/SKILL.md +16 -12
- package/wowok-distill/SKILL.md +237 -0
- package/wowok-guard/SKILL.md +40 -354
- package/wowok-machine/SKILL.md +21 -127
- package/wowok-messenger/SKILL.md +14 -59
- package/wowok-onboard/SKILL.md +42 -12
- package/wowok-order/SKILL.md +20 -169
- package/wowok-output/SKILL.md +0 -10
- package/wowok-planner/SKILL.md +28 -9
- package/wowok-provider/SKILL.md +72 -32
- package/wowok-safety/SKILL.md +8 -80
- package/wowok-scenario/SKILL.md +63 -98
- package/wowok-tools/SKILL.md +68 -107
- package/references/glossary.ts +0 -297
- package/references/guard-scenario-ledger.md +0 -353
- package/references/guard-template-library.md +0 -481
- package/references/machine-design-reference.md +0 -398
- package/references/machine-scenario-ledger.md +0 -227
- package/references/machine-template-library.md +0 -522
- package/references/merchant-scenario-coordination.md +0 -383
- package/references/object-collaboration.md +0 -362
- package/references/onchain-constants.md +0 -81
- package/wowok-arbitrator/APPENDIX.md +0 -545
- package/wowok-auditor/APPENDIX.md +0 -487
- package/wowok-guard/APPENDIX.md +0 -430
- package/wowok-machine/APPENDIX.md +0 -407
- package/wowok-messenger/APPENDIX.md +0 -550
- package/wowok-onboard/APPENDIX.md +0 -502
- package/wowok-order/APPENDIX.md +0 -777
- package/wowok-output/APPENDIX.md +0 -575
- package/wowok-planner/APPENDIX.md +0 -726
- package/wowok-provider/APPENDIX.md +0 -455
- package/wowok-safety/APPENDIX.md +0 -565
- package/wowok-scenario/APPENDIX.md +0 -97
- package/wowok-scenario/MODE-DETAILS.md +0 -275
- package/wowok-tools/APPENDIX.md +0 -394
|
@@ -24,6 +24,8 @@ This example sets `env.confirmed: true` on irreversible operations (e.g., `publi
|
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
+
> **💡 Call Format**: All WoWok operations go through a single unified `wowok` tool. The AI calls `wowok({ tool: "<sub-tool>", data: {<params>} })`. If parameters don't match the schema, the response includes the correct schema for self-correction. See [Response Format](../../docs/response-format.md) for details.
|
|
28
|
+
|
|
27
29
|
## Core Requirements & Features
|
|
28
30
|
|
|
29
31
|
| Requirement | Description | Implementation |
|
|
@@ -163,7 +165,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
163
165
|
├─────────────────────────────────────────────────────────────────────────────┤
|
|
164
166
|
│ │
|
|
165
167
|
│ Phase 1: Foundation │
|
|
166
|
-
│
|
|
168
|
+
│ ═══════════════════════════════════════════════ │
|
|
167
169
|
│ │
|
|
168
170
|
│ ┌─────────────────┐ ┌─────────────────┐ │
|
|
169
171
|
│ │ Permission │ │ Accounts │ │
|
|
@@ -221,7 +223,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
221
223
|
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
|
|
222
224
|
│ │
|
|
223
225
|
│ Phase 3: Machine Creation │
|
|
224
|
-
│
|
|
226
|
+
│ ═══════════════════════════════════════ │
|
|
225
227
|
│ │
|
|
226
228
|
│ ┌─────────────────┐ │
|
|
227
229
|
│ │ Machine │◄─── Requires: Permission + Guards │
|
|
@@ -231,7 +233,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
231
233
|
│ │ │
|
|
232
234
|
│ ▼ │
|
|
233
235
|
│ Phase 4: Machine Binding │
|
|
234
|
-
│
|
|
236
|
+
│ ═══════════════════════════════════════ │
|
|
235
237
|
│ │
|
|
236
238
|
│ ┌─────────────────┐ │
|
|
237
239
|
│ │ Bind Machine │◄─── Requires: Service + Machine │
|
|
@@ -240,7 +242,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
240
242
|
│ │ │
|
|
241
243
|
│ ▼ │
|
|
242
244
|
│ Phase 5: Arbitration Creation │
|
|
243
|
-
│
|
|
245
|
+
│ ═══════════════════════════════════════ │
|
|
244
246
|
│ │
|
|
245
247
|
│ ┌─────────────────┐ │
|
|
246
248
|
│ │ Arbitration │◄─── Independent, but needs Service binding │
|
|
@@ -250,7 +252,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
250
252
|
│ │ │
|
|
251
253
|
│ ▼ │
|
|
252
254
|
│ Phase 6: Service Configuration │
|
|
253
|
-
│
|
|
255
|
+
│ ═════════════════════════════════════════ │
|
|
254
256
|
│ │
|
|
255
257
|
│ ┌─────────────────┐ │
|
|
256
258
|
│ │ Update Service │◄─── Add: order_allocators, sales, arbitrations │
|
|
@@ -258,7 +260,7 @@ Understanding the correct order for creating WoWok objects is crucial for a succ
|
|
|
258
260
|
│ └─────────────────┘ │
|
|
259
261
|
│ │
|
|
260
262
|
│ Phase 7: Reward Pool Configuration │
|
|
261
|
-
│
|
|
263
|
+
│ ═══════════════════════════════════════════ │
|
|
262
264
|
│ │
|
|
263
265
|
│ ┌─────────────────┐ │
|
|
264
266
|
│ │ Add Guards to │◄─── Add reward guards with store_from_id │
|
|
@@ -397,18 +399,21 @@ Create a new permission object for the advanced shop.
|
|
|
397
399
|
|
|
398
400
|
```json
|
|
399
401
|
{
|
|
400
|
-
"
|
|
402
|
+
"tool": "onchain_operations",
|
|
401
403
|
"data": {
|
|
402
|
-
"
|
|
403
|
-
|
|
404
|
-
"
|
|
404
|
+
"operation_type": "permission",
|
|
405
|
+
"data": {
|
|
406
|
+
"object": {
|
|
407
|
+
"name": "myshop_perm_v2",
|
|
408
|
+
"replaceExistName": true
|
|
409
|
+
},
|
|
410
|
+
"description": "Permission object for MyShop Advanced e-commerce system"
|
|
405
411
|
},
|
|
406
|
-
"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
"no_cache": true
|
|
412
|
+
"env": {
|
|
413
|
+
"account": "myshop_merchant",
|
|
414
|
+
"network": "mainnet",
|
|
415
|
+
"no_cache": true
|
|
416
|
+
}
|
|
412
417
|
}
|
|
413
418
|
}
|
|
414
419
|
```
|
|
@@ -423,26 +428,29 @@ Add custom permission indexes for advanced operations.
|
|
|
423
428
|
|
|
424
429
|
```json
|
|
425
430
|
{
|
|
426
|
-
"
|
|
431
|
+
"tool": "onchain_operations",
|
|
427
432
|
"data": {
|
|
428
|
-
"
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
"
|
|
437
|
-
|
|
438
|
-
"
|
|
433
|
+
"operation_type": "permission",
|
|
434
|
+
"data": {
|
|
435
|
+
"object": "myshop_perm_v2",
|
|
436
|
+
"remark": {
|
|
437
|
+
"op": "set",
|
|
438
|
+
"index": 1000,
|
|
439
|
+
"remark": "Order Confirmed and Order Cancel - Merchant confirms or cancels order"
|
|
440
|
+
},
|
|
441
|
+
"table": {
|
|
442
|
+
"op": "add perm by index",
|
|
443
|
+
"index": 1000,
|
|
444
|
+
"entity": {
|
|
445
|
+
"entities": [{"name_or_address": "myshop_merchant"}]
|
|
446
|
+
}
|
|
439
447
|
}
|
|
448
|
+
},
|
|
449
|
+
"env": {
|
|
450
|
+
"account": "myshop_merchant",
|
|
451
|
+
"network": "mainnet",
|
|
452
|
+
"no_cache": true
|
|
440
453
|
}
|
|
441
|
-
},
|
|
442
|
-
"env": {
|
|
443
|
-
"account": "myshop_merchant",
|
|
444
|
-
"network": "mainnet",
|
|
445
|
-
"no_cache": true
|
|
446
454
|
}
|
|
447
455
|
}
|
|
448
456
|
```
|
|
@@ -451,26 +459,29 @@ Add custom permission indexes for advanced operations.
|
|
|
451
459
|
|
|
452
460
|
```json
|
|
453
461
|
{
|
|
454
|
-
"
|
|
462
|
+
"tool": "onchain_operations",
|
|
455
463
|
"data": {
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
"
|
|
464
|
+
"operation_type": "permission",
|
|
465
|
+
"data": {
|
|
466
|
+
"object": "myshop_perm_v2",
|
|
467
|
+
"remark": {
|
|
468
|
+
"op": "set",
|
|
469
|
+
"index": 1001,
|
|
470
|
+
"remark": "Shipping, Order Complete, Lost, Return operations - Merchant logistics operations"
|
|
471
|
+
},
|
|
472
|
+
"table": {
|
|
473
|
+
"op": "add perm by index",
|
|
474
|
+
"index": 1001,
|
|
475
|
+
"entity": {
|
|
476
|
+
"entities": [{"name_or_address": "myshop_merchant"}]
|
|
477
|
+
}
|
|
467
478
|
}
|
|
479
|
+
},
|
|
480
|
+
"env": {
|
|
481
|
+
"account": "myshop_merchant",
|
|
482
|
+
"network": "mainnet",
|
|
483
|
+
"no_cache": true
|
|
468
484
|
}
|
|
469
|
-
},
|
|
470
|
-
"env": {
|
|
471
|
-
"account": "myshop_merchant",
|
|
472
|
-
"network": "mainnet",
|
|
473
|
-
"no_cache": true
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
487
|
```
|
|
@@ -485,20 +496,23 @@ Create the Service without publishing to obtain its address for Guard creation.
|
|
|
485
496
|
|
|
486
497
|
```json
|
|
487
498
|
{
|
|
488
|
-
"
|
|
499
|
+
"tool": "onchain_operations",
|
|
489
500
|
"data": {
|
|
490
|
-
"
|
|
491
|
-
|
|
492
|
-
"
|
|
493
|
-
|
|
501
|
+
"operation_type": "service",
|
|
502
|
+
"data": {
|
|
503
|
+
"object": {
|
|
504
|
+
"name": "three_body_signature_service_v2",
|
|
505
|
+
"replaceExistName": true,
|
|
506
|
+
"permission": "myshop_perm_v2"
|
|
507
|
+
},
|
|
508
|
+
"description": "Three-Body Problem Signature Edition - Limited collector's item with WIP verification",
|
|
509
|
+
"pause": false
|
|
494
510
|
},
|
|
495
|
-
"
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
"network": "mainnet",
|
|
501
|
-
"no_cache": true
|
|
511
|
+
"env": {
|
|
512
|
+
"account": "myshop_merchant",
|
|
513
|
+
"network": "mainnet",
|
|
514
|
+
"no_cache": true
|
|
515
|
+
}
|
|
502
516
|
}
|
|
503
517
|
}
|
|
504
518
|
```
|
|
@@ -515,20 +529,23 @@ Create a Treasury object to aggregate merchant revenue. The Treasury uses the **
|
|
|
515
529
|
|
|
516
530
|
```json
|
|
517
531
|
{
|
|
518
|
-
"
|
|
532
|
+
"tool": "onchain_operations",
|
|
519
533
|
"data": {
|
|
520
|
-
"
|
|
521
|
-
|
|
522
|
-
"
|
|
523
|
-
|
|
524
|
-
|
|
534
|
+
"operation_type": "treasury",
|
|
535
|
+
"data": {
|
|
536
|
+
"object": {
|
|
537
|
+
"name": "myshop_treasury_v2",
|
|
538
|
+
"type_parameter": "0x2::wow::WOW",
|
|
539
|
+
"permission": "myshop_perm_v2",
|
|
540
|
+
"replaceExistName": true
|
|
541
|
+
},
|
|
542
|
+
"description": "Treasury for aggregating MyShop merchant revenue. Uses the same Permission as the Service (myshop_perm_v2) for consistency — a single permission organization governs both fund collection and service operations."
|
|
525
543
|
},
|
|
526
|
-
"
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
"no_cache": true
|
|
544
|
+
"env": {
|
|
545
|
+
"account": "myshop_merchant",
|
|
546
|
+
"network": "mainnet",
|
|
547
|
+
"no_cache": true
|
|
548
|
+
}
|
|
532
549
|
}
|
|
533
550
|
}
|
|
534
551
|
```
|
|
@@ -548,8 +565,11 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
548
565
|
>
|
|
549
566
|
> ```json
|
|
550
567
|
> {
|
|
551
|
-
> "
|
|
552
|
-
> "
|
|
568
|
+
> "tool": "wowok_buildin_info",
|
|
569
|
+
> "data": {
|
|
570
|
+
> "info": "guard instructions",
|
|
571
|
+
> "filter": { "scope": "all" }
|
|
572
|
+
> }
|
|
553
573
|
> }
|
|
554
574
|
> ```
|
|
555
575
|
>
|
|
@@ -561,29 +581,32 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
561
581
|
|
|
562
582
|
```json
|
|
563
583
|
{
|
|
564
|
-
"
|
|
584
|
+
"tool": "onchain_operations",
|
|
565
585
|
"data": {
|
|
566
|
-
"
|
|
567
|
-
|
|
568
|
-
"
|
|
586
|
+
"operation_type": "guard",
|
|
587
|
+
"data": {
|
|
588
|
+
"namedNew": {
|
|
589
|
+
"name": "machine_merkle_root_v2",
|
|
590
|
+
"replaceExistName": true
|
|
591
|
+
},
|
|
592
|
+
"description": "Verify Merkle Root string length is 66 characters (0x prefix + 64 hex)",
|
|
593
|
+
"table": [
|
|
594
|
+
{"identifier": 0, "b_submission": true, "value_type": "String"},
|
|
595
|
+
{"identifier": 1, "b_submission": false, "value_type": "U64", "value": "66"}
|
|
596
|
+
],
|
|
597
|
+
"root": {
|
|
598
|
+
"type": "logic_as_u256_equal",
|
|
599
|
+
"nodes": [
|
|
600
|
+
{"type": "calc_string_length", "node": {"type": "identifier", "identifier": 0}},
|
|
601
|
+
{"type": "identifier", "identifier": 1}
|
|
602
|
+
]
|
|
603
|
+
}
|
|
569
604
|
},
|
|
570
|
-
"
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
],
|
|
575
|
-
"root": {
|
|
576
|
-
"type": "logic_as_u256_equal",
|
|
577
|
-
"nodes": [
|
|
578
|
-
{"type": "calc_string_length", "node": {"type": "identifier", "identifier": 0}},
|
|
579
|
-
{"type": "identifier", "identifier": 1}
|
|
580
|
-
]
|
|
605
|
+
"env": {
|
|
606
|
+
"account": "myshop_merchant",
|
|
607
|
+
"network": "mainnet",
|
|
608
|
+
"no_cache": true
|
|
581
609
|
}
|
|
582
|
-
},
|
|
583
|
-
"env": {
|
|
584
|
-
"account": "myshop_merchant",
|
|
585
|
-
"network": "mainnet",
|
|
586
|
-
"no_cache": true
|
|
587
610
|
}
|
|
588
611
|
}
|
|
589
612
|
```
|
|
@@ -601,49 +624,52 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
601
624
|
|
|
602
625
|
```json
|
|
603
626
|
{
|
|
604
|
-
"
|
|
627
|
+
"tool": "onchain_operations",
|
|
605
628
|
"data": {
|
|
606
|
-
"
|
|
607
|
-
|
|
608
|
-
"
|
|
629
|
+
"operation_type": "guard",
|
|
630
|
+
"data": {
|
|
631
|
+
"namedNew": {
|
|
632
|
+
"name": "machine_messenger_proof_v2",
|
|
633
|
+
"replaceExistName": true
|
|
634
|
+
},
|
|
635
|
+
"description": "Strict-mode privacy delivery: verify Signer==proof.signer AND proof.time>order.time AND order.service==service (verifier submits Proof+Order object addresses)",
|
|
636
|
+
"table": [
|
|
637
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "Proof object from submitChainProof"},
|
|
638
|
+
{"identifier": 1, "b_submission": true, "value_type": "Address", "name": "Order object submitted by verifier"},
|
|
639
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
640
|
+
],
|
|
641
|
+
"root": {
|
|
642
|
+
"type": "logic_and",
|
|
643
|
+
"nodes": [
|
|
644
|
+
{
|
|
645
|
+
"type": "logic_equal",
|
|
646
|
+
"nodes": [
|
|
647
|
+
{"type": "context", "context": "Signer"},
|
|
648
|
+
{"type": "query", "query": "proof.signer", "object": {"identifier": 0}, "parameters": []}
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"type": "logic_as_u256_greater",
|
|
653
|
+
"nodes": [
|
|
654
|
+
{"type": "query", "query": "proof.time", "object": {"identifier": 0}, "parameters": []},
|
|
655
|
+
{"type": "query", "query": "order.time", "object": {"identifier": 1}, "parameters": []}
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"type": "logic_equal",
|
|
660
|
+
"nodes": [
|
|
661
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 1}, "parameters": []},
|
|
662
|
+
{"type": "identifier", "identifier": 2}
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
}
|
|
609
667
|
},
|
|
610
|
-
"
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
615
|
-
],
|
|
616
|
-
"root": {
|
|
617
|
-
"type": "logic_and",
|
|
618
|
-
"nodes": [
|
|
619
|
-
{
|
|
620
|
-
"type": "logic_equal",
|
|
621
|
-
"nodes": [
|
|
622
|
-
{"type": "context", "context": "Signer"},
|
|
623
|
-
{"type": "query", "query": "proof.signer", "object": {"identifier": 0}, "parameters": []}
|
|
624
|
-
]
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
"type": "logic_as_u256_greater",
|
|
628
|
-
"nodes": [
|
|
629
|
-
{"type": "query", "query": "proof.time", "object": {"identifier": 0}, "parameters": []},
|
|
630
|
-
{"type": "query", "query": "order.time", "object": {"identifier": 1}, "parameters": []}
|
|
631
|
-
]
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
"type": "logic_equal",
|
|
635
|
-
"nodes": [
|
|
636
|
-
{"type": "query", "query": "order.service", "object": {"identifier": 1}, "parameters": []},
|
|
637
|
-
{"type": "identifier", "identifier": 2}
|
|
638
|
-
]
|
|
639
|
-
}
|
|
640
|
-
]
|
|
668
|
+
"env": {
|
|
669
|
+
"account": "myshop_merchant",
|
|
670
|
+
"network": "mainnet",
|
|
671
|
+
"no_cache": true
|
|
641
672
|
}
|
|
642
|
-
},
|
|
643
|
-
"env": {
|
|
644
|
-
"account": "myshop_merchant",
|
|
645
|
-
"network": "mainnet",
|
|
646
|
-
"no_cache": true
|
|
647
673
|
}
|
|
648
674
|
}
|
|
649
675
|
```
|
|
@@ -671,35 +697,38 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
671
697
|
|
|
672
698
|
```json
|
|
673
699
|
{
|
|
674
|
-
"
|
|
700
|
+
"tool": "onchain_operations",
|
|
675
701
|
"data": {
|
|
676
|
-
"
|
|
677
|
-
|
|
678
|
-
"
|
|
702
|
+
"operation_type": "guard",
|
|
703
|
+
"data": {
|
|
704
|
+
"namedNew": {
|
|
705
|
+
"name": "machine_time_10d_v2",
|
|
706
|
+
"replaceExistName": true
|
|
707
|
+
},
|
|
708
|
+
"description": "Verify time elapsed >= 10 days (864000000 ms)",
|
|
709
|
+
"table": [
|
|
710
|
+
{"identifier": 0, "b_submission": true, "value_type": "U64"},
|
|
711
|
+
{"identifier": 1, "b_submission": false, "value_type": "U64", "value": "864000000"}
|
|
712
|
+
],
|
|
713
|
+
"root": {
|
|
714
|
+
"type": "logic_as_u256_greater_or_equal",
|
|
715
|
+
"nodes": [
|
|
716
|
+
{
|
|
717
|
+
"type": "calc_number_subtract",
|
|
718
|
+
"nodes": [
|
|
719
|
+
{"type": "context", "context": "Clock"},
|
|
720
|
+
{"type": "identifier", "identifier": 0}
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
{"type": "identifier", "identifier": 1}
|
|
724
|
+
]
|
|
725
|
+
}
|
|
679
726
|
},
|
|
680
|
-
"
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
],
|
|
685
|
-
"root": {
|
|
686
|
-
"type": "logic_as_u256_greater_or_equal",
|
|
687
|
-
"nodes": [
|
|
688
|
-
{
|
|
689
|
-
"type": "calc_number_subtract",
|
|
690
|
-
"nodes": [
|
|
691
|
-
{"type": "context", "context": "Clock"},
|
|
692
|
-
{"type": "identifier", "identifier": 0}
|
|
693
|
-
]
|
|
694
|
-
},
|
|
695
|
-
{"type": "identifier", "identifier": 1}
|
|
696
|
-
]
|
|
727
|
+
"env": {
|
|
728
|
+
"account": "myshop_merchant",
|
|
729
|
+
"network": "mainnet",
|
|
730
|
+
"no_cache": true
|
|
697
731
|
}
|
|
698
|
-
},
|
|
699
|
-
"env": {
|
|
700
|
-
"account": "myshop_merchant",
|
|
701
|
-
"network": "mainnet",
|
|
702
|
-
"no_cache": true
|
|
703
732
|
}
|
|
704
733
|
}
|
|
705
734
|
```
|
|
@@ -708,35 +737,38 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
708
737
|
|
|
709
738
|
```json
|
|
710
739
|
{
|
|
711
|
-
"
|
|
740
|
+
"tool": "onchain_operations",
|
|
712
741
|
"data": {
|
|
713
|
-
"
|
|
714
|
-
|
|
715
|
-
"
|
|
742
|
+
"operation_type": "guard",
|
|
743
|
+
"data": {
|
|
744
|
+
"namedNew": {
|
|
745
|
+
"name": "machine_time_2d_v2",
|
|
746
|
+
"replaceExistName": true
|
|
747
|
+
},
|
|
748
|
+
"description": "Verify time elapsed >= 2 days (172800000 ms)",
|
|
749
|
+
"table": [
|
|
750
|
+
{"identifier": 0, "b_submission": true, "value_type": "U64"},
|
|
751
|
+
{"identifier": 1, "b_submission": false, "value_type": "U64", "value": "172800000"}
|
|
752
|
+
],
|
|
753
|
+
"root": {
|
|
754
|
+
"type": "logic_as_u256_greater_or_equal",
|
|
755
|
+
"nodes": [
|
|
756
|
+
{
|
|
757
|
+
"type": "calc_number_subtract",
|
|
758
|
+
"nodes": [
|
|
759
|
+
{"type": "context", "context": "Clock"},
|
|
760
|
+
{"type": "identifier", "identifier": 0}
|
|
761
|
+
]
|
|
762
|
+
},
|
|
763
|
+
{"type": "identifier", "identifier": 1}
|
|
764
|
+
]
|
|
765
|
+
}
|
|
716
766
|
},
|
|
717
|
-
"
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
],
|
|
722
|
-
"root": {
|
|
723
|
-
"type": "logic_as_u256_greater_or_equal",
|
|
724
|
-
"nodes": [
|
|
725
|
-
{
|
|
726
|
-
"type": "calc_number_subtract",
|
|
727
|
-
"nodes": [
|
|
728
|
-
{"type": "context", "context": "Clock"},
|
|
729
|
-
{"type": "identifier", "identifier": 0}
|
|
730
|
-
]
|
|
731
|
-
},
|
|
732
|
-
{"type": "identifier", "identifier": 1}
|
|
733
|
-
]
|
|
767
|
+
"env": {
|
|
768
|
+
"account": "myshop_merchant",
|
|
769
|
+
"network": "mainnet",
|
|
770
|
+
"no_cache": true
|
|
734
771
|
}
|
|
735
|
-
},
|
|
736
|
-
"env": {
|
|
737
|
-
"account": "myshop_merchant",
|
|
738
|
-
"network": "mainnet",
|
|
739
|
-
"no_cache": true
|
|
740
772
|
}
|
|
741
773
|
}
|
|
742
774
|
```
|
|
@@ -747,64 +779,67 @@ Create Guards using the Service address. Guards verify order state and service o
|
|
|
747
779
|
|
|
748
780
|
```json
|
|
749
781
|
{
|
|
750
|
-
"
|
|
782
|
+
"tool": "onchain_operations",
|
|
751
783
|
"data": {
|
|
752
|
-
"
|
|
753
|
-
|
|
754
|
-
"
|
|
755
|
-
|
|
784
|
+
"operation_type": "guard",
|
|
785
|
+
"data": {
|
|
786
|
+
"namedNew": {
|
|
787
|
+
"name": "service_merchant_win_v2",
|
|
788
|
+
"tags": ["order", "merchant-win", "level3-scene-combined"],
|
|
789
|
+
"replaceExistName": true
|
|
790
|
+
},
|
|
791
|
+
"description": "Verify order at merchant win nodes (Order Complete, Wonderful, Return Fail) AND order belongs to three_body_signature_service_v2. VERIFIER CONSTRAINT LEVEL 3 (scene-combined): No Signer binding needed because the allocator uses sharing.who=Entity (myshop_treasury_v2) — funds always flow to the Treasury regardless of caller (R-C3-06 safe). Two-fold verification: (1) order at merchant win node, (2) order belongs to this service (prevents cross-service theft, R-C3-05).",
|
|
792
|
+
"table": [
|
|
793
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
794
|
+
{"identifier": 1, "b_submission": false, "value_type": "String", "value": "Order Complete"},
|
|
795
|
+
{"identifier": 2, "b_submission": false, "value_type": "String", "value": "Wonderful"},
|
|
796
|
+
{"identifier": 3, "b_submission": false, "value_type": "String", "value": "Return Fail"},
|
|
797
|
+
{"identifier": 4, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
798
|
+
],
|
|
799
|
+
"root": {
|
|
800
|
+
"type": "logic_and",
|
|
801
|
+
"nodes": [
|
|
802
|
+
{
|
|
803
|
+
"type": "logic_or",
|
|
804
|
+
"nodes": [
|
|
805
|
+
{
|
|
806
|
+
"type": "logic_string_nocase_equal",
|
|
807
|
+
"nodes": [
|
|
808
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
809
|
+
{"type": "identifier", "identifier": 1}
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"type": "logic_string_nocase_equal",
|
|
814
|
+
"nodes": [
|
|
815
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
816
|
+
{"type": "identifier", "identifier": 2}
|
|
817
|
+
]
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"type": "logic_string_nocase_equal",
|
|
821
|
+
"nodes": [
|
|
822
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
823
|
+
{"type": "identifier", "identifier": 3}
|
|
824
|
+
]
|
|
825
|
+
}
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"type": "logic_equal",
|
|
830
|
+
"nodes": [
|
|
831
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
832
|
+
{"type": "identifier", "identifier": 4}
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
]
|
|
836
|
+
}
|
|
756
837
|
},
|
|
757
|
-
"
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
{"identifier": 2, "b_submission": false, "value_type": "String", "value": "Wonderful"},
|
|
762
|
-
{"identifier": 3, "b_submission": false, "value_type": "String", "value": "Return Fail"},
|
|
763
|
-
{"identifier": 4, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
764
|
-
],
|
|
765
|
-
"root": {
|
|
766
|
-
"type": "logic_and",
|
|
767
|
-
"nodes": [
|
|
768
|
-
{
|
|
769
|
-
"type": "logic_or",
|
|
770
|
-
"nodes": [
|
|
771
|
-
{
|
|
772
|
-
"type": "logic_string_nocase_equal",
|
|
773
|
-
"nodes": [
|
|
774
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
775
|
-
{"type": "identifier", "identifier": 1}
|
|
776
|
-
]
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
"type": "logic_string_nocase_equal",
|
|
780
|
-
"nodes": [
|
|
781
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
782
|
-
{"type": "identifier", "identifier": 2}
|
|
783
|
-
]
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
"type": "logic_string_nocase_equal",
|
|
787
|
-
"nodes": [
|
|
788
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
789
|
-
{"type": "identifier", "identifier": 3}
|
|
790
|
-
]
|
|
791
|
-
}
|
|
792
|
-
]
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
"type": "logic_equal",
|
|
796
|
-
"nodes": [
|
|
797
|
-
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
798
|
-
{"type": "identifier", "identifier": 4}
|
|
799
|
-
]
|
|
800
|
-
}
|
|
801
|
-
]
|
|
838
|
+
"env": {
|
|
839
|
+
"account": "myshop_merchant",
|
|
840
|
+
"network": "mainnet",
|
|
841
|
+
"no_cache": true
|
|
802
842
|
}
|
|
803
|
-
},
|
|
804
|
-
"env": {
|
|
805
|
-
"account": "myshop_merchant",
|
|
806
|
-
"network": "mainnet",
|
|
807
|
-
"no_cache": true
|
|
808
843
|
}
|
|
809
844
|
}
|
|
810
845
|
```
|
|
@@ -826,43 +861,46 @@ The `logic_or` of three `logic_string_nocase_equal` checks above can be collapse
|
|
|
826
861
|
|
|
827
862
|
```json
|
|
828
863
|
{
|
|
829
|
-
"
|
|
864
|
+
"tool": "onchain_operations",
|
|
830
865
|
"data": {
|
|
831
|
-
"
|
|
832
|
-
|
|
833
|
-
"
|
|
834
|
-
|
|
866
|
+
"operation_type": "guard",
|
|
867
|
+
"data": {
|
|
868
|
+
"namedNew": {
|
|
869
|
+
"name": "service_merchant_win_v2",
|
|
870
|
+
"tags": ["order", "merchant-win", "level3-scene-combined"],
|
|
871
|
+
"replaceExistName": true
|
|
872
|
+
},
|
|
873
|
+
"description": "Verify order at merchant win nodes (Order Complete, Wonderful, Return Fail) AND order belongs to three_body_signature_service_v2. SHORTHAND: collapses three String constants + logic_or[logic_string_nocase_equal x 3] into a single VecString + vec_contains_string_nocase. Semantically equivalent to the original form (see guard-examples-lint 'Semantic Equivalence' tests).",
|
|
874
|
+
"table": [
|
|
875
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
876
|
+
{"identifier": 1, "b_submission": false, "value_type": "VecString", "value": ["Order Complete", "Wonderful", "Return Fail"], "name": "merchant_win_nodes"},
|
|
877
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
878
|
+
],
|
|
879
|
+
"root": {
|
|
880
|
+
"type": "logic_and",
|
|
881
|
+
"nodes": [
|
|
882
|
+
{
|
|
883
|
+
"type": "vec_contains_string_nocase",
|
|
884
|
+
"nodes": [
|
|
885
|
+
{"type": "identifier", "identifier": 1},
|
|
886
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []}
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"type": "logic_equal",
|
|
891
|
+
"nodes": [
|
|
892
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
893
|
+
{"type": "identifier", "identifier": 2}
|
|
894
|
+
]
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
}
|
|
835
898
|
},
|
|
836
|
-
"
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
841
|
-
],
|
|
842
|
-
"root": {
|
|
843
|
-
"type": "logic_and",
|
|
844
|
-
"nodes": [
|
|
845
|
-
{
|
|
846
|
-
"type": "vec_contains_string_nocase",
|
|
847
|
-
"nodes": [
|
|
848
|
-
{"type": "identifier", "identifier": 1},
|
|
849
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []}
|
|
850
|
-
]
|
|
851
|
-
},
|
|
852
|
-
{
|
|
853
|
-
"type": "logic_equal",
|
|
854
|
-
"nodes": [
|
|
855
|
-
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
856
|
-
{"type": "identifier", "identifier": 2}
|
|
857
|
-
]
|
|
858
|
-
}
|
|
859
|
-
]
|
|
899
|
+
"env": {
|
|
900
|
+
"account": "myshop_merchant",
|
|
901
|
+
"network": "mainnet",
|
|
902
|
+
"no_cache": true
|
|
860
903
|
}
|
|
861
|
-
},
|
|
862
|
-
"env": {
|
|
863
|
-
"account": "myshop_merchant",
|
|
864
|
-
"network": "mainnet",
|
|
865
|
-
"no_cache": true
|
|
866
904
|
}
|
|
867
905
|
}
|
|
868
906
|
```
|
|
@@ -892,37 +930,40 @@ The `logic_or` of three `logic_string_nocase_equal` checks above can be collapse
|
|
|
892
930
|
|
|
893
931
|
```json
|
|
894
932
|
{
|
|
895
|
-
"
|
|
933
|
+
"tool": "onchain_operations",
|
|
896
934
|
"data": {
|
|
897
|
-
"
|
|
898
|
-
|
|
899
|
-
"
|
|
935
|
+
"operation_type": "guard",
|
|
936
|
+
"data": {
|
|
937
|
+
"namedNew": {
|
|
938
|
+
"name": "machine_service_order_v2",
|
|
939
|
+
"replaceExistName": true
|
|
940
|
+
},
|
|
941
|
+
"description": "Verify order belongs to three_body_signature_service_v2",
|
|
942
|
+
"table": [
|
|
943
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
944
|
+
{"identifier": 1, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
945
|
+
],
|
|
946
|
+
"root": {
|
|
947
|
+
"type": "logic_equal",
|
|
948
|
+
"nodes": [
|
|
949
|
+
{
|
|
950
|
+
"type": "query",
|
|
951
|
+
"query": "order.service",
|
|
952
|
+
"object": {"identifier": 0},
|
|
953
|
+
"parameters": []
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"type": "identifier",
|
|
957
|
+
"identifier": 1
|
|
958
|
+
}
|
|
959
|
+
]
|
|
960
|
+
}
|
|
900
961
|
},
|
|
901
|
-
"
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
],
|
|
906
|
-
"root": {
|
|
907
|
-
"type": "logic_equal",
|
|
908
|
-
"nodes": [
|
|
909
|
-
{
|
|
910
|
-
"type": "query",
|
|
911
|
-
"query": "order.service",
|
|
912
|
-
"object": {"identifier": 0},
|
|
913
|
-
"parameters": []
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
"type": "identifier",
|
|
917
|
-
"identifier": 1
|
|
918
|
-
}
|
|
919
|
-
]
|
|
962
|
+
"env": {
|
|
963
|
+
"account": "myshop_merchant",
|
|
964
|
+
"network": "mainnet",
|
|
965
|
+
"no_cache": true
|
|
920
966
|
}
|
|
921
|
-
},
|
|
922
|
-
"env": {
|
|
923
|
-
"account": "myshop_merchant",
|
|
924
|
-
"network": "mainnet",
|
|
925
|
-
"no_cache": true
|
|
926
967
|
}
|
|
927
968
|
}
|
|
928
969
|
```
|
|
@@ -933,63 +974,66 @@ The `logic_or` of three `logic_string_nocase_equal` checks above can be collapse
|
|
|
933
974
|
|
|
934
975
|
```json
|
|
935
976
|
{
|
|
936
|
-
"
|
|
977
|
+
"tool": "onchain_operations",
|
|
937
978
|
"data": {
|
|
938
|
-
"
|
|
939
|
-
|
|
940
|
-
"
|
|
941
|
-
|
|
979
|
+
"operation_type": "guard",
|
|
980
|
+
"data": {
|
|
981
|
+
"namedNew": {
|
|
982
|
+
"name": "service_customer_win_v2",
|
|
983
|
+
"tags": ["order", "customer-win", "level2-dynamic-binding"],
|
|
984
|
+
"replaceExistName": true
|
|
985
|
+
},
|
|
986
|
+
"description": "Verify order at customer win nodes (Lost, Return Complete) AND order belongs to three_body_signature_service_v2. VERIFIER CONSTRAINT LEVEL 2 (dynamic identity binding): Signer bound to query('order.owner') — only the order's rightful owner can trigger the refund. RISK ELIMINATION: Three-fold verification - (1) order at customer win node, (2) signer is order.owner (dynamic query, prevents fund theft - only order owner can trigger their own refund), (3) order belongs to three_body_signature_service_v2 (prevents cross-service theft).",
|
|
987
|
+
"table": [
|
|
988
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
989
|
+
{"identifier": 1, "b_submission": false, "value_type": "String", "value": "Lost"},
|
|
990
|
+
{"identifier": 2, "b_submission": false, "value_type": "String", "value": "Return Complete"},
|
|
991
|
+
{"identifier": 3, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
992
|
+
],
|
|
993
|
+
"root": {
|
|
994
|
+
"type": "logic_and",
|
|
995
|
+
"nodes": [
|
|
996
|
+
{
|
|
997
|
+
"type": "logic_or",
|
|
998
|
+
"nodes": [
|
|
999
|
+
{
|
|
1000
|
+
"type": "logic_string_nocase_equal",
|
|
1001
|
+
"nodes": [
|
|
1002
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
1003
|
+
{"type": "identifier", "identifier": 1}
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"type": "logic_string_nocase_equal",
|
|
1008
|
+
"nodes": [
|
|
1009
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
1010
|
+
{"type": "identifier", "identifier": 2}
|
|
1011
|
+
]
|
|
1012
|
+
}
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"type": "logic_equal",
|
|
1017
|
+
"nodes": [
|
|
1018
|
+
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1019
|
+
{"type": "context", "context": "Signer"}
|
|
1020
|
+
]
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"type": "logic_equal",
|
|
1024
|
+
"nodes": [
|
|
1025
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1026
|
+
{"type": "identifier", "identifier": 3}
|
|
1027
|
+
]
|
|
1028
|
+
}
|
|
1029
|
+
]
|
|
1030
|
+
}
|
|
942
1031
|
},
|
|
943
|
-
"
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
{"identifier": 2, "b_submission": false, "value_type": "String", "value": "Return Complete"},
|
|
948
|
-
{"identifier": 3, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
949
|
-
],
|
|
950
|
-
"root": {
|
|
951
|
-
"type": "logic_and",
|
|
952
|
-
"nodes": [
|
|
953
|
-
{
|
|
954
|
-
"type": "logic_or",
|
|
955
|
-
"nodes": [
|
|
956
|
-
{
|
|
957
|
-
"type": "logic_string_nocase_equal",
|
|
958
|
-
"nodes": [
|
|
959
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
960
|
-
{"type": "identifier", "identifier": 1}
|
|
961
|
-
]
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
"type": "logic_string_nocase_equal",
|
|
965
|
-
"nodes": [
|
|
966
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
967
|
-
{"type": "identifier", "identifier": 2}
|
|
968
|
-
]
|
|
969
|
-
}
|
|
970
|
-
]
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
"type": "logic_equal",
|
|
974
|
-
"nodes": [
|
|
975
|
-
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
976
|
-
{"type": "context", "context": "Signer"}
|
|
977
|
-
]
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
"type": "logic_equal",
|
|
981
|
-
"nodes": [
|
|
982
|
-
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
983
|
-
{"type": "identifier", "identifier": 3}
|
|
984
|
-
]
|
|
985
|
-
}
|
|
986
|
-
]
|
|
1032
|
+
"env": {
|
|
1033
|
+
"account": "myshop_merchant",
|
|
1034
|
+
"network": "mainnet",
|
|
1035
|
+
"no_cache": true
|
|
987
1036
|
}
|
|
988
|
-
},
|
|
989
|
-
"env": {
|
|
990
|
-
"account": "myshop_merchant",
|
|
991
|
-
"network": "mainnet",
|
|
992
|
-
"no_cache": true
|
|
993
1037
|
}
|
|
994
1038
|
}
|
|
995
1039
|
```
|
|
@@ -1012,50 +1056,53 @@ The `logic_or` of two `logic_string_nocase_equal` checks above can be collapsed
|
|
|
1012
1056
|
|
|
1013
1057
|
```json
|
|
1014
1058
|
{
|
|
1015
|
-
"
|
|
1059
|
+
"tool": "onchain_operations",
|
|
1016
1060
|
"data": {
|
|
1017
|
-
"
|
|
1018
|
-
|
|
1019
|
-
"
|
|
1020
|
-
|
|
1061
|
+
"operation_type": "guard",
|
|
1062
|
+
"data": {
|
|
1063
|
+
"namedNew": {
|
|
1064
|
+
"name": "service_customer_win_v2",
|
|
1065
|
+
"tags": ["order", "customer-win", "level2-dynamic-binding"],
|
|
1066
|
+
"replaceExistName": true
|
|
1067
|
+
},
|
|
1068
|
+
"description": "Verify order at customer win nodes (Lost, Return Complete) AND order belongs to three_body_signature_service_v2. SHORTHAND: collapses two String constants + logic_or[logic_string_nocase_equal x 2] into a single VecString + vec_contains_string_nocase. Semantically equivalent to the original form (see guard-examples-lint 'Semantic Equivalence — Guard 6 Shorthand' tests).",
|
|
1069
|
+
"table": [
|
|
1070
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
1071
|
+
{"identifier": 1, "b_submission": false, "value_type": "VecString", "value": ["Lost", "Return Complete"], "name": "customer_win_nodes"},
|
|
1072
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
1073
|
+
],
|
|
1074
|
+
"root": {
|
|
1075
|
+
"type": "logic_and",
|
|
1076
|
+
"nodes": [
|
|
1077
|
+
{
|
|
1078
|
+
"type": "vec_contains_string_nocase",
|
|
1079
|
+
"nodes": [
|
|
1080
|
+
{"type": "identifier", "identifier": 1},
|
|
1081
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []}
|
|
1082
|
+
]
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
"type": "logic_equal",
|
|
1086
|
+
"nodes": [
|
|
1087
|
+
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1088
|
+
{"type": "context", "context": "Signer"}
|
|
1089
|
+
]
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"type": "logic_equal",
|
|
1093
|
+
"nodes": [
|
|
1094
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1095
|
+
{"type": "identifier", "identifier": 2}
|
|
1096
|
+
]
|
|
1097
|
+
}
|
|
1098
|
+
]
|
|
1099
|
+
}
|
|
1021
1100
|
},
|
|
1022
|
-
"
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
{"identifier": 2, "b_submission": false, "value_type": "Address", "name": "service_address", "value": "three_body_signature_service_v2"}
|
|
1027
|
-
],
|
|
1028
|
-
"root": {
|
|
1029
|
-
"type": "logic_and",
|
|
1030
|
-
"nodes": [
|
|
1031
|
-
{
|
|
1032
|
-
"type": "vec_contains_string_nocase",
|
|
1033
|
-
"nodes": [
|
|
1034
|
-
{"type": "identifier", "identifier": 1},
|
|
1035
|
-
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []}
|
|
1036
|
-
]
|
|
1037
|
-
},
|
|
1038
|
-
{
|
|
1039
|
-
"type": "logic_equal",
|
|
1040
|
-
"nodes": [
|
|
1041
|
-
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1042
|
-
{"type": "context", "context": "Signer"}
|
|
1043
|
-
]
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
"type": "logic_equal",
|
|
1047
|
-
"nodes": [
|
|
1048
|
-
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1049
|
-
{"type": "identifier", "identifier": 2}
|
|
1050
|
-
]
|
|
1051
|
-
}
|
|
1052
|
-
]
|
|
1101
|
+
"env": {
|
|
1102
|
+
"account": "myshop_merchant",
|
|
1103
|
+
"network": "mainnet",
|
|
1104
|
+
"no_cache": true
|
|
1053
1105
|
}
|
|
1054
|
-
},
|
|
1055
|
-
"env": {
|
|
1056
|
-
"account": "myshop_merchant",
|
|
1057
|
-
"network": "mainnet",
|
|
1058
|
-
"no_cache": true
|
|
1059
1106
|
}
|
|
1060
1107
|
}
|
|
1061
1108
|
```
|
|
@@ -1096,249 +1143,252 @@ Create Machine with all nodes and guards in a single operation.
|
|
|
1096
1143
|
|
|
1097
1144
|
```json
|
|
1098
1145
|
{
|
|
1099
|
-
"
|
|
1146
|
+
"tool": "onchain_operations",
|
|
1100
1147
|
"data": {
|
|
1101
|
-
"
|
|
1102
|
-
|
|
1103
|
-
"
|
|
1104
|
-
|
|
1148
|
+
"operation_type": "machine",
|
|
1149
|
+
"data": {
|
|
1150
|
+
"object": {
|
|
1151
|
+
"name": "myshop_advanced_machine_v2",
|
|
1152
|
+
"replaceExistName": true,
|
|
1153
|
+
"permission": "myshop_perm_v2"
|
|
1154
|
+
},
|
|
1155
|
+
"description": "Multi-path order processing with delivery confirmation, wonderful rating, lost handling and return processing - Complete workflow with guards",
|
|
1156
|
+
"node": {
|
|
1157
|
+
"op": "add",
|
|
1158
|
+
"nodes": [
|
|
1159
|
+
{
|
|
1160
|
+
"name": "Order Confirmed",
|
|
1161
|
+
"pairs": [
|
|
1162
|
+
{
|
|
1163
|
+
"prev_node": "",
|
|
1164
|
+
"threshold": 1,
|
|
1165
|
+
"forwards": [
|
|
1166
|
+
{
|
|
1167
|
+
"name": "Confirm Order",
|
|
1168
|
+
"permissionIndex": 1000,
|
|
1169
|
+
"weight": 1
|
|
1170
|
+
}
|
|
1171
|
+
]
|
|
1172
|
+
}
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"name": "Order Cancel",
|
|
1177
|
+
"pairs": [
|
|
1178
|
+
{
|
|
1179
|
+
"prev_node": "Order Confirmed",
|
|
1180
|
+
"threshold": 1,
|
|
1181
|
+
"forwards": [
|
|
1182
|
+
{
|
|
1183
|
+
"name": "Cancel Order",
|
|
1184
|
+
"permissionIndex": 1000,
|
|
1185
|
+
"weight": 1
|
|
1186
|
+
}
|
|
1187
|
+
]
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"name": "Shipping",
|
|
1193
|
+
"pairs": [
|
|
1194
|
+
{
|
|
1195
|
+
"prev_node": "Order Confirmed",
|
|
1196
|
+
"threshold": 1,
|
|
1197
|
+
"forwards": [
|
|
1198
|
+
{
|
|
1199
|
+
"name": "Confirm Signature and Submit Merkle Root",
|
|
1200
|
+
"permissionIndex": 1001,
|
|
1201
|
+
"weight": 1,
|
|
1202
|
+
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1203
|
+
}
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
]
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"name": "Delivery Complete",
|
|
1210
|
+
"pairs": [
|
|
1211
|
+
{
|
|
1212
|
+
"prev_node": "Shipping",
|
|
1213
|
+
"threshold": 1,
|
|
1214
|
+
"forwards": [
|
|
1215
|
+
{
|
|
1216
|
+
"name": "Confirm Receipt",
|
|
1217
|
+
"weight": 1,
|
|
1218
|
+
"namedOperator": ""
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
}
|
|
1222
|
+
]
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"name": "Wonderful",
|
|
1226
|
+
"pairs": [
|
|
1227
|
+
{
|
|
1228
|
+
"prev_node": "Delivery Complete",
|
|
1229
|
+
"threshold": 1,
|
|
1230
|
+
"forwards": [
|
|
1231
|
+
{
|
|
1232
|
+
"name": "Rate as Wonderful",
|
|
1233
|
+
"weight": 1,
|
|
1234
|
+
"namedOperator": ""
|
|
1235
|
+
}
|
|
1236
|
+
]
|
|
1237
|
+
}
|
|
1238
|
+
]
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"name": "Order Complete",
|
|
1242
|
+
"pairs": [
|
|
1243
|
+
{
|
|
1244
|
+
"prev_node": "Delivery Complete",
|
|
1245
|
+
"threshold": 1,
|
|
1246
|
+
"forwards": [
|
|
1247
|
+
{
|
|
1248
|
+
"name": "Complete Order",
|
|
1249
|
+
"permissionIndex": 1001,
|
|
1250
|
+
"weight": 1
|
|
1251
|
+
}
|
|
1252
|
+
]
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"prev_node": "Shipping",
|
|
1256
|
+
"threshold": 1,
|
|
1257
|
+
"forwards": [
|
|
1258
|
+
{
|
|
1259
|
+
"name": "Auto Complete from Shipping",
|
|
1260
|
+
"permissionIndex": 1001,
|
|
1261
|
+
"weight": 1,
|
|
1262
|
+
"guard": { "guard": "machine_time_10d_v2" }
|
|
1263
|
+
}
|
|
1264
|
+
]
|
|
1265
|
+
}
|
|
1266
|
+
]
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "Lost",
|
|
1270
|
+
"pairs": [
|
|
1271
|
+
{
|
|
1272
|
+
"prev_node": "Shipping",
|
|
1273
|
+
"threshold": 2,
|
|
1274
|
+
"forwards": [
|
|
1275
|
+
{
|
|
1276
|
+
"name": "Report Lost",
|
|
1277
|
+
"weight": 1,
|
|
1278
|
+
"namedOperator": ""
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"name": "Confirm Lost with Merkle Root",
|
|
1282
|
+
"permissionIndex": 1001,
|
|
1283
|
+
"weight": 1,
|
|
1284
|
+
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1285
|
+
}
|
|
1286
|
+
]
|
|
1287
|
+
}
|
|
1288
|
+
]
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"name": "Non-receipt Return",
|
|
1292
|
+
"pairs": [
|
|
1293
|
+
{
|
|
1294
|
+
"prev_node": "Shipping",
|
|
1295
|
+
"threshold": 2,
|
|
1296
|
+
"forwards": [
|
|
1297
|
+
{
|
|
1298
|
+
"name": "Request Return",
|
|
1299
|
+
"weight": 1,
|
|
1300
|
+
"namedOperator": ""
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"name": "Confirm Return with Merkle Root",
|
|
1304
|
+
"permissionIndex": 1001,
|
|
1305
|
+
"weight": 1,
|
|
1306
|
+
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1307
|
+
}
|
|
1308
|
+
]
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"name": "Receipt Return",
|
|
1314
|
+
"pairs": [
|
|
1315
|
+
{
|
|
1316
|
+
"prev_node": "Delivery Complete",
|
|
1317
|
+
"threshold": 2,
|
|
1318
|
+
"forwards": [
|
|
1319
|
+
{
|
|
1320
|
+
"name": "Request Return with Receipt",
|
|
1321
|
+
"weight": 1,
|
|
1322
|
+
"namedOperator": ""
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "Confirm Return Address with Merkle Root",
|
|
1326
|
+
"permissionIndex": 1001,
|
|
1327
|
+
"weight": 1,
|
|
1328
|
+
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1329
|
+
}
|
|
1330
|
+
]
|
|
1331
|
+
}
|
|
1332
|
+
]
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"name": "Return Fail",
|
|
1336
|
+
"pairs": [
|
|
1337
|
+
{
|
|
1338
|
+
"prev_node": "Receipt Return",
|
|
1339
|
+
"threshold": 1,
|
|
1340
|
+
"forwards": [
|
|
1341
|
+
{
|
|
1342
|
+
"name": "Timeout Return Not Received",
|
|
1343
|
+
"permissionIndex": 1001,
|
|
1344
|
+
"weight": 1,
|
|
1345
|
+
"guard": { "guard": "machine_time_10d_v2" }
|
|
1346
|
+
}
|
|
1347
|
+
]
|
|
1348
|
+
}
|
|
1349
|
+
]
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
"name": "Return Complete",
|
|
1353
|
+
"pairs": [
|
|
1354
|
+
{
|
|
1355
|
+
"prev_node": "Receipt Return",
|
|
1356
|
+
"threshold": 2,
|
|
1357
|
+
"forwards": [
|
|
1358
|
+
{
|
|
1359
|
+
"name": "Submit Return Merkle Root",
|
|
1360
|
+
"weight": 1,
|
|
1361
|
+
"namedOperator": "",
|
|
1362
|
+
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"name": "Confirm Return Received",
|
|
1366
|
+
"permissionIndex": 1001,
|
|
1367
|
+
"weight": 1
|
|
1368
|
+
}
|
|
1369
|
+
]
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"prev_node": "Non-receipt Return",
|
|
1373
|
+
"threshold": 1,
|
|
1374
|
+
"forwards": [
|
|
1375
|
+
{
|
|
1376
|
+
"name": "Confirm Goods Recovered",
|
|
1377
|
+
"permissionIndex": 1001,
|
|
1378
|
+
"weight": 1
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
}
|
|
1382
|
+
]
|
|
1383
|
+
}
|
|
1384
|
+
]
|
|
1385
|
+
}
|
|
1105
1386
|
},
|
|
1106
|
-
"
|
|
1107
|
-
|
|
1108
|
-
"
|
|
1109
|
-
"
|
|
1110
|
-
{
|
|
1111
|
-
"name": "Order Confirmed",
|
|
1112
|
-
"pairs": [
|
|
1113
|
-
{
|
|
1114
|
-
"prev_node": "",
|
|
1115
|
-
"threshold": 1,
|
|
1116
|
-
"forwards": [
|
|
1117
|
-
{
|
|
1118
|
-
"name": "Confirm Order",
|
|
1119
|
-
"permissionIndex": 1000,
|
|
1120
|
-
"weight": 1
|
|
1121
|
-
}
|
|
1122
|
-
]
|
|
1123
|
-
}
|
|
1124
|
-
]
|
|
1125
|
-
},
|
|
1126
|
-
{
|
|
1127
|
-
"name": "Order Cancel",
|
|
1128
|
-
"pairs": [
|
|
1129
|
-
{
|
|
1130
|
-
"prev_node": "Order Confirmed",
|
|
1131
|
-
"threshold": 1,
|
|
1132
|
-
"forwards": [
|
|
1133
|
-
{
|
|
1134
|
-
"name": "Cancel Order",
|
|
1135
|
-
"permissionIndex": 1000,
|
|
1136
|
-
"weight": 1
|
|
1137
|
-
}
|
|
1138
|
-
]
|
|
1139
|
-
}
|
|
1140
|
-
]
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
"name": "Shipping",
|
|
1144
|
-
"pairs": [
|
|
1145
|
-
{
|
|
1146
|
-
"prev_node": "Order Confirmed",
|
|
1147
|
-
"threshold": 1,
|
|
1148
|
-
"forwards": [
|
|
1149
|
-
{
|
|
1150
|
-
"name": "Confirm Signature and Submit Merkle Root",
|
|
1151
|
-
"permissionIndex": 1001,
|
|
1152
|
-
"weight": 1,
|
|
1153
|
-
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1154
|
-
}
|
|
1155
|
-
]
|
|
1156
|
-
}
|
|
1157
|
-
]
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"name": "Delivery Complete",
|
|
1161
|
-
"pairs": [
|
|
1162
|
-
{
|
|
1163
|
-
"prev_node": "Shipping",
|
|
1164
|
-
"threshold": 1,
|
|
1165
|
-
"forwards": [
|
|
1166
|
-
{
|
|
1167
|
-
"name": "Confirm Receipt",
|
|
1168
|
-
"weight": 1,
|
|
1169
|
-
"namedOperator": ""
|
|
1170
|
-
}
|
|
1171
|
-
]
|
|
1172
|
-
}
|
|
1173
|
-
]
|
|
1174
|
-
},
|
|
1175
|
-
{
|
|
1176
|
-
"name": "Wonderful",
|
|
1177
|
-
"pairs": [
|
|
1178
|
-
{
|
|
1179
|
-
"prev_node": "Delivery Complete",
|
|
1180
|
-
"threshold": 1,
|
|
1181
|
-
"forwards": [
|
|
1182
|
-
{
|
|
1183
|
-
"name": "Rate as Wonderful",
|
|
1184
|
-
"weight": 1,
|
|
1185
|
-
"namedOperator": ""
|
|
1186
|
-
}
|
|
1187
|
-
]
|
|
1188
|
-
}
|
|
1189
|
-
]
|
|
1190
|
-
},
|
|
1191
|
-
{
|
|
1192
|
-
"name": "Order Complete",
|
|
1193
|
-
"pairs": [
|
|
1194
|
-
{
|
|
1195
|
-
"prev_node": "Delivery Complete",
|
|
1196
|
-
"threshold": 1,
|
|
1197
|
-
"forwards": [
|
|
1198
|
-
{
|
|
1199
|
-
"name": "Complete Order",
|
|
1200
|
-
"permissionIndex": 1001,
|
|
1201
|
-
"weight": 1
|
|
1202
|
-
}
|
|
1203
|
-
]
|
|
1204
|
-
},
|
|
1205
|
-
{
|
|
1206
|
-
"prev_node": "Shipping",
|
|
1207
|
-
"threshold": 1,
|
|
1208
|
-
"forwards": [
|
|
1209
|
-
{
|
|
1210
|
-
"name": "Auto Complete from Shipping",
|
|
1211
|
-
"permissionIndex": 1001,
|
|
1212
|
-
"weight": 1,
|
|
1213
|
-
"guard": { "guard": "machine_time_10d_v2" }
|
|
1214
|
-
}
|
|
1215
|
-
]
|
|
1216
|
-
}
|
|
1217
|
-
]
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
"name": "Lost",
|
|
1221
|
-
"pairs": [
|
|
1222
|
-
{
|
|
1223
|
-
"prev_node": "Shipping",
|
|
1224
|
-
"threshold": 2,
|
|
1225
|
-
"forwards": [
|
|
1226
|
-
{
|
|
1227
|
-
"name": "Report Lost",
|
|
1228
|
-
"weight": 1,
|
|
1229
|
-
"namedOperator": ""
|
|
1230
|
-
},
|
|
1231
|
-
{
|
|
1232
|
-
"name": "Confirm Lost with Merkle Root",
|
|
1233
|
-
"permissionIndex": 1001,
|
|
1234
|
-
"weight": 1,
|
|
1235
|
-
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1236
|
-
}
|
|
1237
|
-
]
|
|
1238
|
-
}
|
|
1239
|
-
]
|
|
1240
|
-
},
|
|
1241
|
-
{
|
|
1242
|
-
"name": "Non-receipt Return",
|
|
1243
|
-
"pairs": [
|
|
1244
|
-
{
|
|
1245
|
-
"prev_node": "Shipping",
|
|
1246
|
-
"threshold": 2,
|
|
1247
|
-
"forwards": [
|
|
1248
|
-
{
|
|
1249
|
-
"name": "Request Return",
|
|
1250
|
-
"weight": 1,
|
|
1251
|
-
"namedOperator": ""
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
"name": "Confirm Return with Merkle Root",
|
|
1255
|
-
"permissionIndex": 1001,
|
|
1256
|
-
"weight": 1,
|
|
1257
|
-
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1258
|
-
}
|
|
1259
|
-
]
|
|
1260
|
-
}
|
|
1261
|
-
]
|
|
1262
|
-
},
|
|
1263
|
-
{
|
|
1264
|
-
"name": "Receipt Return",
|
|
1265
|
-
"pairs": [
|
|
1266
|
-
{
|
|
1267
|
-
"prev_node": "Delivery Complete",
|
|
1268
|
-
"threshold": 2,
|
|
1269
|
-
"forwards": [
|
|
1270
|
-
{
|
|
1271
|
-
"name": "Request Return with Receipt",
|
|
1272
|
-
"weight": 1,
|
|
1273
|
-
"namedOperator": ""
|
|
1274
|
-
},
|
|
1275
|
-
{
|
|
1276
|
-
"name": "Confirm Return Address with Merkle Root",
|
|
1277
|
-
"permissionIndex": 1001,
|
|
1278
|
-
"weight": 1,
|
|
1279
|
-
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1280
|
-
}
|
|
1281
|
-
]
|
|
1282
|
-
}
|
|
1283
|
-
]
|
|
1284
|
-
},
|
|
1285
|
-
{
|
|
1286
|
-
"name": "Return Fail",
|
|
1287
|
-
"pairs": [
|
|
1288
|
-
{
|
|
1289
|
-
"prev_node": "Receipt Return",
|
|
1290
|
-
"threshold": 1,
|
|
1291
|
-
"forwards": [
|
|
1292
|
-
{
|
|
1293
|
-
"name": "Timeout Return Not Received",
|
|
1294
|
-
"permissionIndex": 1001,
|
|
1295
|
-
"weight": 1,
|
|
1296
|
-
"guard": { "guard": "machine_time_10d_v2" }
|
|
1297
|
-
}
|
|
1298
|
-
]
|
|
1299
|
-
}
|
|
1300
|
-
]
|
|
1301
|
-
},
|
|
1302
|
-
{
|
|
1303
|
-
"name": "Return Complete",
|
|
1304
|
-
"pairs": [
|
|
1305
|
-
{
|
|
1306
|
-
"prev_node": "Receipt Return",
|
|
1307
|
-
"threshold": 2,
|
|
1308
|
-
"forwards": [
|
|
1309
|
-
{
|
|
1310
|
-
"name": "Submit Return Merkle Root",
|
|
1311
|
-
"weight": 1,
|
|
1312
|
-
"namedOperator": "",
|
|
1313
|
-
"guard": { "guard": "machine_merkle_root_v2" }
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
"name": "Confirm Return Received",
|
|
1317
|
-
"permissionIndex": 1001,
|
|
1318
|
-
"weight": 1
|
|
1319
|
-
}
|
|
1320
|
-
]
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
"prev_node": "Non-receipt Return",
|
|
1324
|
-
"threshold": 1,
|
|
1325
|
-
"forwards": [
|
|
1326
|
-
{
|
|
1327
|
-
"name": "Confirm Goods Recovered",
|
|
1328
|
-
"permissionIndex": 1001,
|
|
1329
|
-
"weight": 1
|
|
1330
|
-
}
|
|
1331
|
-
]
|
|
1332
|
-
}
|
|
1333
|
-
]
|
|
1334
|
-
}
|
|
1335
|
-
]
|
|
1387
|
+
"env": {
|
|
1388
|
+
"account": "myshop_merchant",
|
|
1389
|
+
"network": "mainnet",
|
|
1390
|
+
"no_cache": true
|
|
1336
1391
|
}
|
|
1337
|
-
},
|
|
1338
|
-
"env": {
|
|
1339
|
-
"account": "myshop_merchant",
|
|
1340
|
-
"network": "mainnet",
|
|
1341
|
-
"no_cache": true
|
|
1342
1392
|
}
|
|
1343
1393
|
}
|
|
1344
1394
|
```
|
|
@@ -1351,8 +1401,11 @@ Create Machine with all nodes and guards in a single operation.
|
|
|
1351
1401
|
>
|
|
1352
1402
|
> ```json
|
|
1353
1403
|
> {
|
|
1354
|
-
> "
|
|
1355
|
-
> "
|
|
1404
|
+
> "tool": "machineNode2file",
|
|
1405
|
+
> "data": {
|
|
1406
|
+
> "object": "myshop_advanced_machine_v2",
|
|
1407
|
+
> "format": "json"
|
|
1408
|
+
> }
|
|
1356
1409
|
> }
|
|
1357
1410
|
> ```
|
|
1358
1411
|
>
|
|
@@ -1362,15 +1415,18 @@ Machine must be published before binding to Service.
|
|
|
1362
1415
|
|
|
1363
1416
|
```json
|
|
1364
1417
|
{
|
|
1365
|
-
"
|
|
1418
|
+
"tool": "onchain_operations",
|
|
1366
1419
|
"data": {
|
|
1367
|
-
"
|
|
1368
|
-
"
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
"
|
|
1373
|
-
|
|
1420
|
+
"operation_type": "machine",
|
|
1421
|
+
"data": {
|
|
1422
|
+
"object": "myshop_advanced_machine_v2",
|
|
1423
|
+
"publish": true
|
|
1424
|
+
},
|
|
1425
|
+
"env": {
|
|
1426
|
+
"account": "myshop_merchant",
|
|
1427
|
+
"network": "mainnet",
|
|
1428
|
+
"no_cache": true
|
|
1429
|
+
}
|
|
1374
1430
|
}
|
|
1375
1431
|
}
|
|
1376
1432
|
```
|
|
@@ -1385,15 +1441,18 @@ Bind the Machine to the Service. **Important**: The Service must be unpublished
|
|
|
1385
1441
|
|
|
1386
1442
|
```json
|
|
1387
1443
|
{
|
|
1388
|
-
"
|
|
1444
|
+
"tool": "onchain_operations",
|
|
1389
1445
|
"data": {
|
|
1390
|
-
"
|
|
1391
|
-
"
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
"
|
|
1396
|
-
|
|
1446
|
+
"operation_type": "service",
|
|
1447
|
+
"data": {
|
|
1448
|
+
"object": "three_body_signature_service_v2",
|
|
1449
|
+
"machine": "myshop_advanced_machine_v2"
|
|
1450
|
+
},
|
|
1451
|
+
"env": {
|
|
1452
|
+
"account": "myshop_merchant",
|
|
1453
|
+
"network": "mainnet",
|
|
1454
|
+
"no_cache": true
|
|
1455
|
+
}
|
|
1397
1456
|
}
|
|
1398
1457
|
}
|
|
1399
1458
|
```
|
|
@@ -1427,30 +1486,33 @@ Create an Arbitration object as the final on-chain mechanism for protecting user
|
|
|
1427
1486
|
|
|
1428
1487
|
```json
|
|
1429
1488
|
{
|
|
1430
|
-
"
|
|
1489
|
+
"tool": "onchain_operations",
|
|
1431
1490
|
"data": {
|
|
1432
|
-
"
|
|
1433
|
-
|
|
1434
|
-
"
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
"
|
|
1440
|
-
"
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
"
|
|
1491
|
+
"operation_type": "arbitration",
|
|
1492
|
+
"data": {
|
|
1493
|
+
"object": {
|
|
1494
|
+
"name": "myshop_arbitration_v2",
|
|
1495
|
+
"replaceExistName": true,
|
|
1496
|
+
"permission": "myshop_perm_v2"
|
|
1497
|
+
},
|
|
1498
|
+
"description": "Arbitration for MyShop Advanced - Final dispute resolution mechanism",
|
|
1499
|
+
"voting_guard": {
|
|
1500
|
+
"op": "add",
|
|
1501
|
+
"guards": [
|
|
1502
|
+
{
|
|
1503
|
+
"guard": "machine_merkle_root_v2",
|
|
1504
|
+
"vote_weight": {
|
|
1505
|
+
"FixedValue": 1
|
|
1506
|
+
}
|
|
1445
1507
|
}
|
|
1446
|
-
|
|
1447
|
-
|
|
1508
|
+
]
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
"env": {
|
|
1512
|
+
"account": "myshop_merchant",
|
|
1513
|
+
"network": "mainnet",
|
|
1514
|
+
"no_cache": true
|
|
1448
1515
|
}
|
|
1449
|
-
},
|
|
1450
|
-
"env": {
|
|
1451
|
-
"account": "myshop_merchant",
|
|
1452
|
-
"network": "mainnet",
|
|
1453
|
-
"no_cache": true
|
|
1454
1516
|
}
|
|
1455
1517
|
}
|
|
1456
1518
|
```
|
|
@@ -1468,10 +1530,13 @@ Configure order_allocators to define fund distribution rules, then publish the S
|
|
|
1468
1530
|
>
|
|
1469
1531
|
> ```json
|
|
1470
1532
|
> {
|
|
1471
|
-
> "
|
|
1472
|
-
> "
|
|
1473
|
-
>
|
|
1474
|
-
>
|
|
1533
|
+
> "tool": "query_toolkit",
|
|
1534
|
+
> "data": {
|
|
1535
|
+
> "query_type": "service",
|
|
1536
|
+
> "object": "three_body_signature_service_v2",
|
|
1537
|
+
> "network": "mainnet",
|
|
1538
|
+
> "no_cache": true
|
|
1539
|
+
> }
|
|
1475
1540
|
> }
|
|
1476
1541
|
> ```
|
|
1477
1542
|
>
|
|
@@ -1483,62 +1548,65 @@ Configure order_allocators to define fund distribution rules, then publish the S
|
|
|
1483
1548
|
|
|
1484
1549
|
```json
|
|
1485
1550
|
{
|
|
1486
|
-
"
|
|
1551
|
+
"tool": "onchain_operations",
|
|
1487
1552
|
"data": {
|
|
1488
|
-
"
|
|
1489
|
-
"
|
|
1490
|
-
"
|
|
1491
|
-
"sales":
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
"
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
"
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
"
|
|
1553
|
+
"operation_type": "service",
|
|
1554
|
+
"data": {
|
|
1555
|
+
"object": "three_body_signature_service_v2",
|
|
1556
|
+
"sales": {
|
|
1557
|
+
"op": "add",
|
|
1558
|
+
"sales": [
|
|
1559
|
+
{
|
|
1560
|
+
"name": "The Three-Body Problem + Author Signature",
|
|
1561
|
+
"price": 100000000,
|
|
1562
|
+
"stock": 100,
|
|
1563
|
+
"suspension": false,
|
|
1564
|
+
"wip": "https://wowok.net/test/three_body.wip",
|
|
1565
|
+
"wip_hash": "03c18561efa8faf4d75480eb1f732c4a46ffde95599e92eca06167785fc07a5b"
|
|
1566
|
+
}
|
|
1567
|
+
]
|
|
1568
|
+
},
|
|
1569
|
+
"order_allocators": {
|
|
1570
|
+
"description": "Order fund allocation - 100% to Treasury when order complete/wonderful/return fail, 100% to Order owner when lost/return complete",
|
|
1571
|
+
"threshold": 1,
|
|
1572
|
+
"allocators": [
|
|
1573
|
+
{
|
|
1574
|
+
"guard": "service_merchant_win_v2",
|
|
1575
|
+
"sharing": [
|
|
1576
|
+
{
|
|
1577
|
+
"who": {"Entity": {"name_or_address": "myshop_treasury_v2"}},
|
|
1578
|
+
"sharing": 10000,
|
|
1579
|
+
"mode": "Rate"
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"guard": "service_customer_win_v2",
|
|
1585
|
+
"sharing": [
|
|
1586
|
+
{
|
|
1587
|
+
"who": {"Signer": "signer"},
|
|
1588
|
+
"sharing": 10000,
|
|
1589
|
+
"mode": "Rate"
|
|
1590
|
+
}
|
|
1591
|
+
]
|
|
1592
|
+
}
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
"arbitrations": {
|
|
1596
|
+
"op": "add",
|
|
1597
|
+
"objects": ["myshop_arbitration_v2"]
|
|
1598
|
+
},
|
|
1599
|
+
"rewards": {
|
|
1600
|
+
"op": "add",
|
|
1601
|
+
"objects": ["myshop_reward_v2"]
|
|
1602
|
+
},
|
|
1603
|
+
"publish": true
|
|
1535
1604
|
},
|
|
1536
|
-
"
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
"no_cache": true
|
|
1605
|
+
"env": {
|
|
1606
|
+
"account": "myshop_merchant",
|
|
1607
|
+
"network": "mainnet",
|
|
1608
|
+
"no_cache": true
|
|
1609
|
+
}
|
|
1542
1610
|
}
|
|
1543
1611
|
}
|
|
1544
1612
|
```
|
|
@@ -1600,19 +1668,22 @@ Create an empty reward object first. This object will be referenced by reward gu
|
|
|
1600
1668
|
|
|
1601
1669
|
```json
|
|
1602
1670
|
{
|
|
1603
|
-
"
|
|
1671
|
+
"tool": "onchain_operations",
|
|
1604
1672
|
"data": {
|
|
1605
|
-
"
|
|
1606
|
-
|
|
1607
|
-
"
|
|
1608
|
-
|
|
1673
|
+
"operation_type": "reward",
|
|
1674
|
+
"data": {
|
|
1675
|
+
"object": {
|
|
1676
|
+
"name": "myshop_reward_v2",
|
|
1677
|
+
"replaceExistName": true,
|
|
1678
|
+
"permission": "myshop_perm_v2"
|
|
1679
|
+
},
|
|
1680
|
+
"description": "MyShop reward pool for wonderful service and compensation"
|
|
1609
1681
|
},
|
|
1610
|
-
"
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
"no_cache": true
|
|
1682
|
+
"env": {
|
|
1683
|
+
"account": "myshop_merchant",
|
|
1684
|
+
"network": "mainnet",
|
|
1685
|
+
"no_cache": true
|
|
1686
|
+
}
|
|
1616
1687
|
}
|
|
1617
1688
|
}
|
|
1618
1689
|
```
|
|
@@ -1631,60 +1702,63 @@ Create guards for reward verification with double-claim protection:
|
|
|
1631
1702
|
|
|
1632
1703
|
```json
|
|
1633
1704
|
{
|
|
1634
|
-
"
|
|
1705
|
+
"tool": "onchain_operations",
|
|
1635
1706
|
"data": {
|
|
1636
|
-
"
|
|
1637
|
-
|
|
1638
|
-
"
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
"
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
"type": "
|
|
1675
|
-
"
|
|
1676
|
-
|
|
1677
|
-
"
|
|
1707
|
+
"operation_type": "guard",
|
|
1708
|
+
"data": {
|
|
1709
|
+
"namedNew": {
|
|
1710
|
+
"name": "reward_wonderful_v2",
|
|
1711
|
+
"replaceExistName": true
|
|
1712
|
+
},
|
|
1713
|
+
"description": "Verify order at Wonderful node for reward, signer must be order owner, order belongs to this service, and not claimed before",
|
|
1714
|
+
"table": [
|
|
1715
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
1716
|
+
{"identifier": 1, "b_submission": false, "value_type": "String", "value": "Wonderful"},
|
|
1717
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "value": "myshop_reward_v2", "name": "reward_object"},
|
|
1718
|
+
{"identifier": 3, "b_submission": false, "value_type": "Address", "value": "three_body_signature_service_v2", "name": "service_address"}
|
|
1719
|
+
],
|
|
1720
|
+
"root": {
|
|
1721
|
+
"type": "logic_and",
|
|
1722
|
+
"nodes": [
|
|
1723
|
+
{
|
|
1724
|
+
"type": "logic_string_nocase_equal",
|
|
1725
|
+
"nodes": [
|
|
1726
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
1727
|
+
{"type": "identifier", "identifier": 1}
|
|
1728
|
+
]
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"type": "logic_equal",
|
|
1732
|
+
"nodes": [
|
|
1733
|
+
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1734
|
+
{"type": "context", "context": "Signer"}
|
|
1735
|
+
]
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"type": "logic_equal",
|
|
1739
|
+
"nodes": [
|
|
1740
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1741
|
+
{"type": "identifier", "identifier": 3}
|
|
1742
|
+
]
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"type": "logic_not",
|
|
1746
|
+
"node": {
|
|
1747
|
+
"type": "query_reward_record_exists",
|
|
1748
|
+
"object": {"identifier": 2},
|
|
1749
|
+
"where": {
|
|
1750
|
+
"storeFromId": {"identifier": 0}
|
|
1751
|
+
}
|
|
1678
1752
|
}
|
|
1679
1753
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1754
|
+
]
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"env": {
|
|
1758
|
+
"account": "myshop_merchant",
|
|
1759
|
+
"network": "mainnet",
|
|
1760
|
+
"no_cache": true
|
|
1682
1761
|
}
|
|
1683
|
-
},
|
|
1684
|
-
"env": {
|
|
1685
|
-
"account": "myshop_merchant",
|
|
1686
|
-
"network": "mainnet",
|
|
1687
|
-
"no_cache": true
|
|
1688
1762
|
}
|
|
1689
1763
|
}
|
|
1690
1764
|
```
|
|
@@ -1693,60 +1767,63 @@ Create guards for reward verification with double-claim protection:
|
|
|
1693
1767
|
|
|
1694
1768
|
```json
|
|
1695
1769
|
{
|
|
1696
|
-
"
|
|
1770
|
+
"tool": "onchain_operations",
|
|
1697
1771
|
"data": {
|
|
1698
|
-
"
|
|
1699
|
-
|
|
1700
|
-
"
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
"
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
"type": "
|
|
1737
|
-
"
|
|
1738
|
-
|
|
1739
|
-
"
|
|
1772
|
+
"operation_type": "guard",
|
|
1773
|
+
"data": {
|
|
1774
|
+
"namedNew": {
|
|
1775
|
+
"name": "reward_lost_v2",
|
|
1776
|
+
"replaceExistName": true
|
|
1777
|
+
},
|
|
1778
|
+
"description": "Verify order at Lost node for compensation, signer must be order owner, order belongs to this service, and not claimed before",
|
|
1779
|
+
"table": [
|
|
1780
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
1781
|
+
{"identifier": 1, "b_submission": false, "value_type": "String", "value": "Lost"},
|
|
1782
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "value": "myshop_reward_v2", "name": "reward_object"},
|
|
1783
|
+
{"identifier": 3, "b_submission": false, "value_type": "Address", "value": "three_body_signature_service_v2", "name": "service_address"}
|
|
1784
|
+
],
|
|
1785
|
+
"root": {
|
|
1786
|
+
"type": "logic_and",
|
|
1787
|
+
"nodes": [
|
|
1788
|
+
{
|
|
1789
|
+
"type": "logic_string_nocase_equal",
|
|
1790
|
+
"nodes": [
|
|
1791
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
1792
|
+
{"type": "identifier", "identifier": 1}
|
|
1793
|
+
]
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"type": "logic_equal",
|
|
1797
|
+
"nodes": [
|
|
1798
|
+
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1799
|
+
{"type": "context", "context": "Signer"}
|
|
1800
|
+
]
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
"type": "logic_equal",
|
|
1804
|
+
"nodes": [
|
|
1805
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1806
|
+
{"type": "identifier", "identifier": 3}
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"type": "logic_not",
|
|
1811
|
+
"node": {
|
|
1812
|
+
"type": "query_reward_record_exists",
|
|
1813
|
+
"object": {"identifier": 2},
|
|
1814
|
+
"where": {
|
|
1815
|
+
"storeFromId": {"identifier": 0}
|
|
1816
|
+
}
|
|
1740
1817
|
}
|
|
1741
1818
|
}
|
|
1742
|
-
|
|
1743
|
-
|
|
1819
|
+
]
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
"env": {
|
|
1823
|
+
"account": "myshop_merchant",
|
|
1824
|
+
"network": "mainnet",
|
|
1825
|
+
"no_cache": true
|
|
1744
1826
|
}
|
|
1745
|
-
},
|
|
1746
|
-
"env": {
|
|
1747
|
-
"account": "myshop_merchant",
|
|
1748
|
-
"network": "mainnet",
|
|
1749
|
-
"no_cache": true
|
|
1750
1827
|
}
|
|
1751
1828
|
}
|
|
1752
1829
|
```
|
|
@@ -1755,60 +1832,63 @@ Create guards for reward verification with double-claim protection:
|
|
|
1755
1832
|
|
|
1756
1833
|
```json
|
|
1757
1834
|
{
|
|
1758
|
-
"
|
|
1835
|
+
"tool": "onchain_operations",
|
|
1759
1836
|
"data": {
|
|
1760
|
-
"
|
|
1761
|
-
|
|
1762
|
-
"
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
"
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
"type": "
|
|
1799
|
-
"
|
|
1800
|
-
|
|
1801
|
-
"
|
|
1837
|
+
"operation_type": "guard",
|
|
1838
|
+
"data": {
|
|
1839
|
+
"namedNew": {
|
|
1840
|
+
"name": "reward_shipping_timeout_v2",
|
|
1841
|
+
"replaceExistName": true
|
|
1842
|
+
},
|
|
1843
|
+
"description": "Verify order at Shipping node for timeout compensation, signer must be order owner, order belongs to this service, and not claimed before",
|
|
1844
|
+
"table": [
|
|
1845
|
+
{"identifier": 0, "b_submission": true, "value_type": "Address", "name": "order_id"},
|
|
1846
|
+
{"identifier": 1, "b_submission": false, "value_type": "String", "value": "Shipping"},
|
|
1847
|
+
{"identifier": 2, "b_submission": false, "value_type": "Address", "value": "myshop_reward_v2", "name": "reward_object"},
|
|
1848
|
+
{"identifier": 3, "b_submission": false, "value_type": "Address", "value": "three_body_signature_service_v2", "name": "service_address"}
|
|
1849
|
+
],
|
|
1850
|
+
"root": {
|
|
1851
|
+
"type": "logic_and",
|
|
1852
|
+
"nodes": [
|
|
1853
|
+
{
|
|
1854
|
+
"type": "logic_string_nocase_equal",
|
|
1855
|
+
"nodes": [
|
|
1856
|
+
{"type": "query", "query": "progress.current", "object": {"identifier": 0, "convert_witness": "OrderProgress"}, "parameters": []},
|
|
1857
|
+
{"type": "identifier", "identifier": 1}
|
|
1858
|
+
]
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"type": "logic_equal",
|
|
1862
|
+
"nodes": [
|
|
1863
|
+
{"type": "query", "query": "order.owner", "object": {"identifier": 0}, "parameters": []},
|
|
1864
|
+
{"type": "context", "context": "Signer"}
|
|
1865
|
+
]
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
"type": "logic_equal",
|
|
1869
|
+
"nodes": [
|
|
1870
|
+
{"type": "query", "query": "order.service", "object": {"identifier": 0}, "parameters": []},
|
|
1871
|
+
{"type": "identifier", "identifier": 3}
|
|
1872
|
+
]
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"type": "logic_not",
|
|
1876
|
+
"node": {
|
|
1877
|
+
"type": "query_reward_record_exists",
|
|
1878
|
+
"object": {"identifier": 2},
|
|
1879
|
+
"where": {
|
|
1880
|
+
"storeFromId": {"identifier": 0}
|
|
1881
|
+
}
|
|
1802
1882
|
}
|
|
1803
1883
|
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1884
|
+
]
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
"env": {
|
|
1888
|
+
"account": "myshop_merchant",
|
|
1889
|
+
"network": "mainnet",
|
|
1890
|
+
"no_cache": true
|
|
1806
1891
|
}
|
|
1807
|
-
},
|
|
1808
|
-
"env": {
|
|
1809
|
-
"account": "myshop_merchant",
|
|
1810
|
-
"network": "mainnet",
|
|
1811
|
-
"no_cache": true
|
|
1812
1892
|
}
|
|
1813
1893
|
}
|
|
1814
1894
|
```
|
|
@@ -1823,36 +1903,40 @@ Add reward guards to the reward object with `store_from_id` set to the order ide
|
|
|
1823
1903
|
|
|
1824
1904
|
```json
|
|
1825
1905
|
{
|
|
1826
|
-
"
|
|
1906
|
+
"tool": "onchain_operations",
|
|
1827
1907
|
"data": {
|
|
1828
|
-
"
|
|
1829
|
-
"
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
"
|
|
1853
|
-
|
|
1908
|
+
"operation_type": "reward",
|
|
1909
|
+
"data": {
|
|
1910
|
+
"object": "myshop_reward_v2",
|
|
1911
|
+
"guard_add": [
|
|
1912
|
+
{
|
|
1913
|
+
"guard": "reward_wonderful_v2",
|
|
1914
|
+
"recipient": {"Signer": "signer"},
|
|
1915
|
+
"amount": {"type": "Fixed", "value": 10000},
|
|
1916
|
+
"store_from_id": 0
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"guard": "reward_lost_v2",
|
|
1920
|
+
"recipient": {"Signer": "signer"},
|
|
1921
|
+
"amount": {"type": "Fixed", "value": 20000},
|
|
1922
|
+
"store_from_id": 0
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"guard": "reward_shipping_timeout_v2",
|
|
1926
|
+
"recipient": {"Signer": "signer"},
|
|
1927
|
+
"amount": {"type": "Fixed", "value": 20000},
|
|
1928
|
+
"store_from_id": 0
|
|
1929
|
+
}
|
|
1930
|
+
]
|
|
1931
|
+
},
|
|
1932
|
+
"env": {
|
|
1933
|
+
"account": "myshop_merchant",
|
|
1934
|
+
"network": "mainnet",
|
|
1935
|
+
"no_cache": true
|
|
1936
|
+
}
|
|
1854
1937
|
}
|
|
1855
1938
|
}
|
|
1939
|
+
```
|
|
1856
1940
|
|
|
1857
1941
|
***
|
|
1858
1942
|
|
|
@@ -1864,17 +1948,20 @@ Deposit WOW tokens to the reward pool for rewards and compensation.
|
|
|
1864
1948
|
|
|
1865
1949
|
```json
|
|
1866
1950
|
{
|
|
1867
|
-
"
|
|
1951
|
+
"tool": "onchain_operations",
|
|
1868
1952
|
"data": {
|
|
1869
|
-
"
|
|
1870
|
-
"
|
|
1871
|
-
"
|
|
1953
|
+
"operation_type": "reward",
|
|
1954
|
+
"data": {
|
|
1955
|
+
"object": "myshop_reward_v2",
|
|
1956
|
+
"coin_add": {
|
|
1957
|
+
"balance": 150000000
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
"env": {
|
|
1961
|
+
"account": "myshop_merchant",
|
|
1962
|
+
"network": "mainnet",
|
|
1963
|
+
"no_cache": true
|
|
1872
1964
|
}
|
|
1873
|
-
},
|
|
1874
|
-
"env": {
|
|
1875
|
-
"account": "myshop_merchant",
|
|
1876
|
-
"network": "mainnet",
|
|
1877
|
-
"no_cache": true
|
|
1878
1965
|
}
|
|
1879
1966
|
}
|
|
1880
1967
|
```
|
|
@@ -1891,41 +1978,44 @@ Customer places an order for "The Three-Body Problem + Author Signature" with WI
|
|
|
1891
1978
|
|
|
1892
1979
|
```json
|
|
1893
1980
|
{
|
|
1894
|
-
"
|
|
1981
|
+
"tool": "onchain_operations",
|
|
1895
1982
|
"data": {
|
|
1896
|
-
"
|
|
1897
|
-
"
|
|
1898
|
-
"
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1983
|
+
"operation_type": "service",
|
|
1984
|
+
"data": {
|
|
1985
|
+
"object": "three_body_signature_service_v2",
|
|
1986
|
+
"order_new": {
|
|
1987
|
+
"buy": {
|
|
1988
|
+
"items": [
|
|
1989
|
+
{
|
|
1990
|
+
"name": "The Three-Body Problem + Author Signature",
|
|
1991
|
+
"stock": 1,
|
|
1992
|
+
"wip_hash": "03c18561efa8faf4d75480eb1f732c4a46ffde95599e92eca06167785fc07a5b"
|
|
1993
|
+
}
|
|
1994
|
+
],
|
|
1995
|
+
"total_pay": {
|
|
1996
|
+
"balance": 100000000
|
|
1997
|
+
},
|
|
1998
|
+
"payment_remark": "To my dear friend - keep exploring the universe"
|
|
1908
1999
|
},
|
|
1909
|
-
"
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
"
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
"
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
"replaceExistName": true
|
|
2000
|
+
"namedNewOrder": {
|
|
2001
|
+
"name": "myshop_order_v2",
|
|
2002
|
+
"replaceExistName": true
|
|
2003
|
+
},
|
|
2004
|
+
"namedNewAllocation": {
|
|
2005
|
+
"name": "myshop_allocation_v2",
|
|
2006
|
+
"replaceExistName": true
|
|
2007
|
+
},
|
|
2008
|
+
"namedNewProgress": {
|
|
2009
|
+
"name": "myshop_progress_v2",
|
|
2010
|
+
"replaceExistName": true
|
|
2011
|
+
}
|
|
1922
2012
|
}
|
|
2013
|
+
},
|
|
2014
|
+
"env": {
|
|
2015
|
+
"account": "myshop_customer",
|
|
2016
|
+
"network": "mainnet",
|
|
2017
|
+
"no_cache": true
|
|
1923
2018
|
}
|
|
1924
|
-
},
|
|
1925
|
-
"env": {
|
|
1926
|
-
"account": "myshop_customer",
|
|
1927
|
-
"network": "mainnet",
|
|
1928
|
-
"no_cache": true
|
|
1929
2019
|
}
|
|
1930
2020
|
}
|
|
1931
2021
|
```
|
|
@@ -1940,21 +2030,24 @@ Merchant confirms the order. This step uses permission index 1000 (no Guard subm
|
|
|
1940
2030
|
|
|
1941
2031
|
```json
|
|
1942
2032
|
{
|
|
1943
|
-
"
|
|
2033
|
+
"tool": "onchain_operations",
|
|
1944
2034
|
"data": {
|
|
1945
|
-
"
|
|
1946
|
-
"
|
|
1947
|
-
"
|
|
1948
|
-
|
|
1949
|
-
"
|
|
1950
|
-
|
|
1951
|
-
|
|
2035
|
+
"operation_type": "progress",
|
|
2036
|
+
"data": {
|
|
2037
|
+
"object": "myshop_progress_v2",
|
|
2038
|
+
"operate": {
|
|
2039
|
+
"operation": {
|
|
2040
|
+
"next_node_name": "Order Confirmed",
|
|
2041
|
+
"forward": "Confirm Order"
|
|
2042
|
+
},
|
|
2043
|
+
"message": "Order confirmed by merchant"
|
|
2044
|
+
}
|
|
2045
|
+
},
|
|
2046
|
+
"env": {
|
|
2047
|
+
"account": "myshop_merchant",
|
|
2048
|
+
"network": "mainnet",
|
|
2049
|
+
"no_cache": true
|
|
1952
2050
|
}
|
|
1953
|
-
},
|
|
1954
|
-
"env": {
|
|
1955
|
-
"account": "myshop_merchant",
|
|
1956
|
-
"network": "mainnet",
|
|
1957
|
-
"no_cache": true
|
|
1958
2051
|
}
|
|
1959
2052
|
}
|
|
1960
2053
|
```
|
|
@@ -1969,43 +2062,46 @@ Merchant starts shipping after signature service is completed. The merchant subm
|
|
|
1969
2062
|
|
|
1970
2063
|
```json
|
|
1971
2064
|
{
|
|
1972
|
-
"
|
|
2065
|
+
"tool": "onchain_operations",
|
|
1973
2066
|
"data": {
|
|
1974
|
-
"
|
|
1975
|
-
"
|
|
1976
|
-
"
|
|
1977
|
-
|
|
1978
|
-
"
|
|
2067
|
+
"operation_type": "progress",
|
|
2068
|
+
"data": {
|
|
2069
|
+
"object": "myshop_progress_v2",
|
|
2070
|
+
"operate": {
|
|
2071
|
+
"operation": {
|
|
2072
|
+
"next_node_name": "Shipping",
|
|
2073
|
+
"forward": "Confirm Signature and Submit Merkle Root"
|
|
2074
|
+
},
|
|
2075
|
+
"message": "Shipping started - signature completed and Merkle Root submitted"
|
|
1979
2076
|
},
|
|
1980
|
-
"
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
"impack": true
|
|
1989
|
-
}
|
|
1990
|
-
],
|
|
1991
|
-
"submission": [
|
|
1992
|
-
{
|
|
1993
|
-
"guard": "machine_merkle_root_v2",
|
|
2077
|
+
"submission": {
|
|
2078
|
+
"type": "submission",
|
|
2079
|
+
"guard": [
|
|
2080
|
+
{
|
|
2081
|
+
"object": "machine_merkle_root_v2",
|
|
2082
|
+
"impack": true
|
|
2083
|
+
}
|
|
2084
|
+
],
|
|
1994
2085
|
"submission": [
|
|
1995
2086
|
{
|
|
1996
|
-
"
|
|
1997
|
-
"
|
|
1998
|
-
|
|
1999
|
-
|
|
2087
|
+
"guard": "machine_merkle_root_v2",
|
|
2088
|
+
"submission": [
|
|
2089
|
+
{
|
|
2090
|
+
"identifier": 0,
|
|
2091
|
+
"b_submission": true,
|
|
2092
|
+
"value_type": "String",
|
|
2093
|
+
"value": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
2094
|
+
}
|
|
2095
|
+
]
|
|
2000
2096
|
}
|
|
2001
2097
|
]
|
|
2002
2098
|
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2099
|
+
},
|
|
2100
|
+
"env": {
|
|
2101
|
+
"account": "myshop_merchant",
|
|
2102
|
+
"network": "mainnet",
|
|
2103
|
+
"no_cache": true
|
|
2104
|
+
}
|
|
2009
2105
|
}
|
|
2010
2106
|
}
|
|
2011
2107
|
```
|
|
@@ -2022,21 +2118,24 @@ Customer confirms receipt of goods.
|
|
|
2022
2118
|
|
|
2023
2119
|
```json
|
|
2024
2120
|
{
|
|
2025
|
-
"
|
|
2121
|
+
"tool": "onchain_operations",
|
|
2026
2122
|
"data": {
|
|
2027
|
-
"
|
|
2028
|
-
"
|
|
2029
|
-
"
|
|
2030
|
-
|
|
2031
|
-
"
|
|
2032
|
-
|
|
2033
|
-
|
|
2123
|
+
"operation_type": "order",
|
|
2124
|
+
"data": {
|
|
2125
|
+
"object": "myshop_order_v2",
|
|
2126
|
+
"progress": {
|
|
2127
|
+
"operation": {
|
|
2128
|
+
"next_node_name": "Delivery Complete",
|
|
2129
|
+
"forward": "Confirm Receipt"
|
|
2130
|
+
},
|
|
2131
|
+
"message": "Delivery confirmed - goods received"
|
|
2132
|
+
}
|
|
2133
|
+
},
|
|
2134
|
+
"env": {
|
|
2135
|
+
"account": "myshop_customer",
|
|
2136
|
+
"network": "mainnet",
|
|
2137
|
+
"no_cache": true
|
|
2034
2138
|
}
|
|
2035
|
-
},
|
|
2036
|
-
"env": {
|
|
2037
|
-
"account": "myshop_customer",
|
|
2038
|
-
"network": "mainnet",
|
|
2039
|
-
"no_cache": true
|
|
2040
2139
|
}
|
|
2041
2140
|
}
|
|
2042
2141
|
```
|
|
@@ -2051,21 +2150,24 @@ Alternatively, customer can rate as Wonderful (very satisfied).
|
|
|
2051
2150
|
|
|
2052
2151
|
```json
|
|
2053
2152
|
{
|
|
2054
|
-
"
|
|
2153
|
+
"tool": "onchain_operations",
|
|
2055
2154
|
"data": {
|
|
2056
|
-
"
|
|
2057
|
-
"
|
|
2058
|
-
"
|
|
2059
|
-
|
|
2060
|
-
"
|
|
2061
|
-
|
|
2062
|
-
|
|
2155
|
+
"operation_type": "order",
|
|
2156
|
+
"data": {
|
|
2157
|
+
"object": "myshop_order_v2",
|
|
2158
|
+
"progress": {
|
|
2159
|
+
"operation": {
|
|
2160
|
+
"next_node_name": "Wonderful",
|
|
2161
|
+
"forward": "Rate as Wonderful"
|
|
2162
|
+
},
|
|
2163
|
+
"message": "Rated as Wonderful - very satisfied with the service"
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
"env": {
|
|
2167
|
+
"account": "myshop_customer",
|
|
2168
|
+
"network": "mainnet",
|
|
2169
|
+
"no_cache": true
|
|
2063
2170
|
}
|
|
2064
|
-
},
|
|
2065
|
-
"env": {
|
|
2066
|
-
"account": "myshop_customer",
|
|
2067
|
-
"network": "mainnet",
|
|
2068
|
-
"no_cache": true
|
|
2069
2171
|
}
|
|
2070
2172
|
}
|
|
2071
2173
|
```
|
|
@@ -2080,37 +2182,40 @@ Customer claims Wonderful reward from reward pool.
|
|
|
2080
2182
|
|
|
2081
2183
|
```json
|
|
2082
2184
|
{
|
|
2083
|
-
"
|
|
2185
|
+
"tool": "onchain_operations",
|
|
2084
2186
|
"data": {
|
|
2085
|
-
"
|
|
2086
|
-
"
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
{
|
|
2098
|
-
"guard": "reward_wonderful_v2",
|
|
2187
|
+
"operation_type": "reward",
|
|
2188
|
+
"data": {
|
|
2189
|
+
"object": "myshop_reward_v2",
|
|
2190
|
+
"claim": "reward_wonderful_v2",
|
|
2191
|
+
"submission": {
|
|
2192
|
+
"type": "submission",
|
|
2193
|
+
"guard": [
|
|
2194
|
+
{
|
|
2195
|
+
"object": "reward_wonderful_v2",
|
|
2196
|
+
"impack": true
|
|
2197
|
+
}
|
|
2198
|
+
],
|
|
2099
2199
|
"submission": [
|
|
2100
2200
|
{
|
|
2101
|
-
"
|
|
2102
|
-
"
|
|
2103
|
-
|
|
2104
|
-
|
|
2201
|
+
"guard": "reward_wonderful_v2",
|
|
2202
|
+
"submission": [
|
|
2203
|
+
{
|
|
2204
|
+
"identifier": 0,
|
|
2205
|
+
"b_submission": true,
|
|
2206
|
+
"value_type": "Address",
|
|
2207
|
+
"value": "myshop_order_v2"
|
|
2208
|
+
}
|
|
2209
|
+
]
|
|
2105
2210
|
}
|
|
2106
2211
|
]
|
|
2107
2212
|
}
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2213
|
+
},
|
|
2214
|
+
"env": {
|
|
2215
|
+
"account": "myshop_customer",
|
|
2216
|
+
"network": "mainnet",
|
|
2217
|
+
"no_cache": true
|
|
2218
|
+
}
|
|
2114
2219
|
}
|
|
2115
2220
|
}
|
|
2116
2221
|
```
|
|
@@ -2125,44 +2230,47 @@ Order can auto-complete after time thresholds or be manually completed.
|
|
|
2125
2230
|
|
|
2126
2231
|
```json
|
|
2127
2232
|
{
|
|
2128
|
-
"
|
|
2233
|
+
"tool": "onchain_operations",
|
|
2129
2234
|
"data": {
|
|
2130
|
-
"
|
|
2131
|
-
"
|
|
2132
|
-
"
|
|
2133
|
-
|
|
2134
|
-
"
|
|
2235
|
+
"operation_type": "progress",
|
|
2236
|
+
"data": {
|
|
2237
|
+
"object": "myshop_progress_v2",
|
|
2238
|
+
"operate": {
|
|
2239
|
+
"operation": {
|
|
2240
|
+
"next_node_name": "Order Complete",
|
|
2241
|
+
"forward": "Auto Complete from Shipping"
|
|
2242
|
+
},
|
|
2243
|
+
"hold": false,
|
|
2244
|
+
"message": "Order auto-completed after 10 days"
|
|
2135
2245
|
},
|
|
2136
|
-
"
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
"object": "machine_time_10d_v2",
|
|
2145
|
-
"impack": true
|
|
2146
|
-
}
|
|
2147
|
-
],
|
|
2148
|
-
"submission": [
|
|
2149
|
-
{
|
|
2150
|
-
"guard": "machine_time_10d_v2",
|
|
2246
|
+
"submission": {
|
|
2247
|
+
"type": "submission",
|
|
2248
|
+
"guard": [
|
|
2249
|
+
{
|
|
2250
|
+
"object": "machine_time_10d_v2",
|
|
2251
|
+
"impack": true
|
|
2252
|
+
}
|
|
2253
|
+
],
|
|
2151
2254
|
"submission": [
|
|
2152
2255
|
{
|
|
2153
|
-
"
|
|
2154
|
-
"
|
|
2155
|
-
|
|
2156
|
-
|
|
2256
|
+
"guard": "machine_time_10d_v2",
|
|
2257
|
+
"submission": [
|
|
2258
|
+
{
|
|
2259
|
+
"identifier": 0,
|
|
2260
|
+
"b_submission": true,
|
|
2261
|
+
"value_type": "Address",
|
|
2262
|
+
"value": "myshop_progress_v2"
|
|
2263
|
+
}
|
|
2264
|
+
]
|
|
2157
2265
|
}
|
|
2158
2266
|
]
|
|
2159
2267
|
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2268
|
+
},
|
|
2269
|
+
"env": {
|
|
2270
|
+
"account": "myshop_merchant",
|
|
2271
|
+
"network": "mainnet",
|
|
2272
|
+
"no_cache": true
|
|
2273
|
+
}
|
|
2166
2274
|
}
|
|
2167
2275
|
}
|
|
2168
2276
|
```
|
|
@@ -2171,44 +2279,47 @@ Order can auto-complete after time thresholds or be manually completed.
|
|
|
2171
2279
|
|
|
2172
2280
|
```json
|
|
2173
2281
|
{
|
|
2174
|
-
"
|
|
2282
|
+
"tool": "onchain_operations",
|
|
2175
2283
|
"data": {
|
|
2176
|
-
"
|
|
2177
|
-
"
|
|
2178
|
-
"
|
|
2179
|
-
|
|
2180
|
-
"
|
|
2284
|
+
"operation_type": "progress",
|
|
2285
|
+
"data": {
|
|
2286
|
+
"object": "myshop_progress_v2",
|
|
2287
|
+
"operate": {
|
|
2288
|
+
"operation": {
|
|
2289
|
+
"next_node_name": "Order Complete",
|
|
2290
|
+
"forward": "Auto Complete from Delivery"
|
|
2291
|
+
},
|
|
2292
|
+
"hold": false,
|
|
2293
|
+
"message": "Order auto-completed after 2 days from delivery"
|
|
2181
2294
|
},
|
|
2182
|
-
"
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
"object": "machine_time_2d_v2",
|
|
2191
|
-
"impack": true
|
|
2192
|
-
}
|
|
2193
|
-
],
|
|
2194
|
-
"submission": [
|
|
2195
|
-
{
|
|
2196
|
-
"guard": "machine_time_2d_v2",
|
|
2295
|
+
"submission": {
|
|
2296
|
+
"type": "submission",
|
|
2297
|
+
"guard": [
|
|
2298
|
+
{
|
|
2299
|
+
"object": "machine_time_2d_v2",
|
|
2300
|
+
"impack": true
|
|
2301
|
+
}
|
|
2302
|
+
],
|
|
2197
2303
|
"submission": [
|
|
2198
2304
|
{
|
|
2199
|
-
"
|
|
2200
|
-
"
|
|
2201
|
-
|
|
2202
|
-
|
|
2305
|
+
"guard": "machine_time_2d_v2",
|
|
2306
|
+
"submission": [
|
|
2307
|
+
{
|
|
2308
|
+
"identifier": 0,
|
|
2309
|
+
"b_submission": true,
|
|
2310
|
+
"value_type": "Address",
|
|
2311
|
+
"value": "myshop_progress_v2"
|
|
2312
|
+
}
|
|
2313
|
+
]
|
|
2203
2314
|
}
|
|
2204
2315
|
]
|
|
2205
2316
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2317
|
+
},
|
|
2318
|
+
"env": {
|
|
2319
|
+
"account": "myshop_merchant",
|
|
2320
|
+
"network": "mainnet",
|
|
2321
|
+
"no_cache": true
|
|
2322
|
+
}
|
|
2212
2323
|
}
|
|
2213
2324
|
}
|
|
2214
2325
|
```
|
|
@@ -2223,22 +2334,25 @@ If package is lost, customer reports and merchant confirms.
|
|
|
2223
2334
|
|
|
2224
2335
|
```json
|
|
2225
2336
|
{
|
|
2226
|
-
"
|
|
2337
|
+
"tool": "onchain_operations",
|
|
2227
2338
|
"data": {
|
|
2228
|
-
"
|
|
2229
|
-
"
|
|
2230
|
-
"
|
|
2231
|
-
|
|
2232
|
-
"
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2339
|
+
"operation_type": "progress",
|
|
2340
|
+
"data": {
|
|
2341
|
+
"object": "myshop_progress_v2",
|
|
2342
|
+
"operate": {
|
|
2343
|
+
"operation": {
|
|
2344
|
+
"next_node_name": "Lost",
|
|
2345
|
+
"forward": "Report Lost"
|
|
2346
|
+
},
|
|
2347
|
+
"hold": false,
|
|
2348
|
+
"message": "Package reported as lost"
|
|
2349
|
+
}
|
|
2350
|
+
},
|
|
2351
|
+
"env": {
|
|
2352
|
+
"account": "myshop_customer",
|
|
2353
|
+
"network": "mainnet",
|
|
2354
|
+
"no_cache": true
|
|
2236
2355
|
}
|
|
2237
|
-
},
|
|
2238
|
-
"env": {
|
|
2239
|
-
"account": "myshop_customer",
|
|
2240
|
-
"network": "mainnet",
|
|
2241
|
-
"no_cache": true
|
|
2242
2356
|
}
|
|
2243
2357
|
}
|
|
2244
2358
|
```
|
|
@@ -2247,44 +2361,47 @@ If package is lost, customer reports and merchant confirms.
|
|
|
2247
2361
|
|
|
2248
2362
|
```json
|
|
2249
2363
|
{
|
|
2250
|
-
"
|
|
2364
|
+
"tool": "onchain_operations",
|
|
2251
2365
|
"data": {
|
|
2252
|
-
"
|
|
2253
|
-
"
|
|
2254
|
-
"
|
|
2255
|
-
|
|
2256
|
-
"
|
|
2366
|
+
"operation_type": "progress",
|
|
2367
|
+
"data": {
|
|
2368
|
+
"object": "myshop_progress_v2",
|
|
2369
|
+
"operate": {
|
|
2370
|
+
"operation": {
|
|
2371
|
+
"next_node_name": "Lost",
|
|
2372
|
+
"forward": "Confirm Lost with Merkle Root"
|
|
2373
|
+
},
|
|
2374
|
+
"hold": false,
|
|
2375
|
+
"message": "Lost confirmed with Merkle Root"
|
|
2257
2376
|
},
|
|
2258
|
-
"
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
"object": "machine_merkle_root_v2",
|
|
2267
|
-
"impack": true
|
|
2268
|
-
}
|
|
2269
|
-
],
|
|
2270
|
-
"submission": [
|
|
2271
|
-
{
|
|
2272
|
-
"guard": "machine_merkle_root_v2",
|
|
2377
|
+
"submission": {
|
|
2378
|
+
"type": "submission",
|
|
2379
|
+
"guard": [
|
|
2380
|
+
{
|
|
2381
|
+
"object": "machine_merkle_root_v2",
|
|
2382
|
+
"impack": true
|
|
2383
|
+
}
|
|
2384
|
+
],
|
|
2273
2385
|
"submission": [
|
|
2274
2386
|
{
|
|
2275
|
-
"
|
|
2276
|
-
"
|
|
2277
|
-
|
|
2278
|
-
|
|
2387
|
+
"guard": "machine_merkle_root_v2",
|
|
2388
|
+
"submission": [
|
|
2389
|
+
{
|
|
2390
|
+
"identifier": 0,
|
|
2391
|
+
"b_submission": true,
|
|
2392
|
+
"value_type": "String",
|
|
2393
|
+
"value": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
2394
|
+
}
|
|
2395
|
+
]
|
|
2279
2396
|
}
|
|
2280
2397
|
]
|
|
2281
2398
|
}
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2399
|
+
},
|
|
2400
|
+
"env": {
|
|
2401
|
+
"account": "myshop_merchant",
|
|
2402
|
+
"network": "mainnet",
|
|
2403
|
+
"no_cache": true
|
|
2404
|
+
}
|
|
2288
2405
|
}
|
|
2289
2406
|
}
|
|
2290
2407
|
```
|
|
@@ -2293,37 +2410,40 @@ If package is lost, customer reports and merchant confirms.
|
|
|
2293
2410
|
|
|
2294
2411
|
```json
|
|
2295
2412
|
{
|
|
2296
|
-
"
|
|
2413
|
+
"tool": "onchain_operations",
|
|
2297
2414
|
"data": {
|
|
2298
|
-
"
|
|
2299
|
-
"
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
{
|
|
2311
|
-
"guard": "reward_lost_v2",
|
|
2415
|
+
"operation_type": "reward",
|
|
2416
|
+
"data": {
|
|
2417
|
+
"object": "myshop_reward_v2",
|
|
2418
|
+
"claim": "reward_lost_v2",
|
|
2419
|
+
"submission": {
|
|
2420
|
+
"type": "submission",
|
|
2421
|
+
"guard": [
|
|
2422
|
+
{
|
|
2423
|
+
"object": "reward_lost_v2",
|
|
2424
|
+
"impack": true
|
|
2425
|
+
}
|
|
2426
|
+
],
|
|
2312
2427
|
"submission": [
|
|
2313
2428
|
{
|
|
2314
|
-
"
|
|
2315
|
-
"
|
|
2316
|
-
|
|
2317
|
-
|
|
2429
|
+
"guard": "reward_lost_v2",
|
|
2430
|
+
"submission": [
|
|
2431
|
+
{
|
|
2432
|
+
"identifier": 0,
|
|
2433
|
+
"b_submission": true,
|
|
2434
|
+
"value_type": "Address",
|
|
2435
|
+
"value": "myshop_order_v2"
|
|
2436
|
+
}
|
|
2437
|
+
]
|
|
2318
2438
|
}
|
|
2319
2439
|
]
|
|
2320
2440
|
}
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2441
|
+
},
|
|
2442
|
+
"env": {
|
|
2443
|
+
"account": "myshop_customer",
|
|
2444
|
+
"network": "mainnet",
|
|
2445
|
+
"no_cache": true
|
|
2446
|
+
}
|
|
2327
2447
|
}
|
|
2328
2448
|
}
|
|
2329
2449
|
```
|
|
@@ -2338,22 +2458,25 @@ Customer requests return after delivery confirmation.
|
|
|
2338
2458
|
|
|
2339
2459
|
```json
|
|
2340
2460
|
{
|
|
2341
|
-
"
|
|
2461
|
+
"tool": "onchain_operations",
|
|
2342
2462
|
"data": {
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2345
|
-
"
|
|
2346
|
-
|
|
2347
|
-
"
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2463
|
+
"operation_type": "progress",
|
|
2464
|
+
"data": {
|
|
2465
|
+
"object": "myshop_progress_v2",
|
|
2466
|
+
"operate": {
|
|
2467
|
+
"operation": {
|
|
2468
|
+
"next_node_name": "Receipt Return",
|
|
2469
|
+
"forward": "Request Return with Receipt"
|
|
2470
|
+
},
|
|
2471
|
+
"hold": false,
|
|
2472
|
+
"message": "Return requested after delivery"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"env": {
|
|
2476
|
+
"account": "myshop_customer",
|
|
2477
|
+
"network": "mainnet",
|
|
2478
|
+
"no_cache": true
|
|
2351
2479
|
}
|
|
2352
|
-
},
|
|
2353
|
-
"env": {
|
|
2354
|
-
"account": "myshop_customer",
|
|
2355
|
-
"network": "mainnet",
|
|
2356
|
-
"no_cache": true
|
|
2357
2480
|
}
|
|
2358
2481
|
}
|
|
2359
2482
|
```
|
|
@@ -2362,44 +2485,47 @@ Customer requests return after delivery confirmation.
|
|
|
2362
2485
|
|
|
2363
2486
|
```json
|
|
2364
2487
|
{
|
|
2365
|
-
"
|
|
2488
|
+
"tool": "onchain_operations",
|
|
2366
2489
|
"data": {
|
|
2367
|
-
"
|
|
2368
|
-
"
|
|
2369
|
-
"
|
|
2370
|
-
|
|
2371
|
-
"
|
|
2490
|
+
"operation_type": "progress",
|
|
2491
|
+
"data": {
|
|
2492
|
+
"object": "myshop_progress_v2",
|
|
2493
|
+
"operate": {
|
|
2494
|
+
"operation": {
|
|
2495
|
+
"next_node_name": "Receipt Return",
|
|
2496
|
+
"forward": "Confirm Return Address with Merkle Root"
|
|
2497
|
+
},
|
|
2498
|
+
"hold": false,
|
|
2499
|
+
"message": "Return address confirmed with Merkle Root"
|
|
2372
2500
|
},
|
|
2373
|
-
"
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
"object": "machine_merkle_root_v2",
|
|
2382
|
-
"impack": true
|
|
2383
|
-
}
|
|
2384
|
-
],
|
|
2385
|
-
"submission": [
|
|
2386
|
-
{
|
|
2387
|
-
"guard": "machine_merkle_root_v2",
|
|
2501
|
+
"submission": {
|
|
2502
|
+
"type": "submission",
|
|
2503
|
+
"guard": [
|
|
2504
|
+
{
|
|
2505
|
+
"object": "machine_merkle_root_v2",
|
|
2506
|
+
"impack": true
|
|
2507
|
+
}
|
|
2508
|
+
],
|
|
2388
2509
|
"submission": [
|
|
2389
2510
|
{
|
|
2390
|
-
"
|
|
2391
|
-
"
|
|
2392
|
-
|
|
2393
|
-
|
|
2511
|
+
"guard": "machine_merkle_root_v2",
|
|
2512
|
+
"submission": [
|
|
2513
|
+
{
|
|
2514
|
+
"identifier": 0,
|
|
2515
|
+
"b_submission": true,
|
|
2516
|
+
"value_type": "String",
|
|
2517
|
+
"value": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
|
2518
|
+
}
|
|
2519
|
+
]
|
|
2394
2520
|
}
|
|
2395
2521
|
]
|
|
2396
2522
|
}
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2523
|
+
},
|
|
2524
|
+
"env": {
|
|
2525
|
+
"account": "myshop_merchant",
|
|
2526
|
+
"network": "mainnet",
|
|
2527
|
+
"no_cache": true
|
|
2528
|
+
}
|
|
2403
2529
|
}
|
|
2404
2530
|
}
|
|
2405
2531
|
```
|
|
@@ -2408,44 +2534,47 @@ Customer requests return after delivery confirmation.
|
|
|
2408
2534
|
|
|
2409
2535
|
```json
|
|
2410
2536
|
{
|
|
2411
|
-
"
|
|
2537
|
+
"tool": "onchain_operations",
|
|
2412
2538
|
"data": {
|
|
2413
|
-
"
|
|
2414
|
-
"
|
|
2415
|
-
"
|
|
2416
|
-
|
|
2417
|
-
"
|
|
2539
|
+
"operation_type": "progress",
|
|
2540
|
+
"data": {
|
|
2541
|
+
"object": "myshop_progress_v2",
|
|
2542
|
+
"operate": {
|
|
2543
|
+
"operation": {
|
|
2544
|
+
"next_node_name": "Return Complete",
|
|
2545
|
+
"forward": "Submit Return Merkle Root"
|
|
2546
|
+
},
|
|
2547
|
+
"hold": false,
|
|
2548
|
+
"message": "Return shipping Merkle Root submitted"
|
|
2418
2549
|
},
|
|
2419
|
-
"
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
"object": "machine_merkle_root_v2",
|
|
2428
|
-
"impack": true
|
|
2429
|
-
}
|
|
2430
|
-
],
|
|
2431
|
-
"submission": [
|
|
2432
|
-
{
|
|
2433
|
-
"guard": "machine_merkle_root_v2",
|
|
2550
|
+
"submission": {
|
|
2551
|
+
"type": "submission",
|
|
2552
|
+
"guard": [
|
|
2553
|
+
{
|
|
2554
|
+
"object": "machine_merkle_root_v2",
|
|
2555
|
+
"impack": true
|
|
2556
|
+
}
|
|
2557
|
+
],
|
|
2434
2558
|
"submission": [
|
|
2435
2559
|
{
|
|
2436
|
-
"
|
|
2437
|
-
"
|
|
2438
|
-
|
|
2439
|
-
|
|
2560
|
+
"guard": "machine_merkle_root_v2",
|
|
2561
|
+
"submission": [
|
|
2562
|
+
{
|
|
2563
|
+
"identifier": 0,
|
|
2564
|
+
"b_submission": true,
|
|
2565
|
+
"value_type": "String",
|
|
2566
|
+
"value": "0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
|
2567
|
+
}
|
|
2568
|
+
]
|
|
2440
2569
|
}
|
|
2441
2570
|
]
|
|
2442
2571
|
}
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2572
|
+
},
|
|
2573
|
+
"env": {
|
|
2574
|
+
"account": "myshop_customer",
|
|
2575
|
+
"network": "mainnet",
|
|
2576
|
+
"no_cache": true
|
|
2577
|
+
}
|
|
2449
2578
|
}
|
|
2450
2579
|
}
|
|
2451
2580
|
```
|
|
@@ -2454,22 +2583,25 @@ Customer requests return after delivery confirmation.
|
|
|
2454
2583
|
|
|
2455
2584
|
```json
|
|
2456
2585
|
{
|
|
2457
|
-
"
|
|
2586
|
+
"tool": "onchain_operations",
|
|
2458
2587
|
"data": {
|
|
2459
|
-
"
|
|
2460
|
-
"
|
|
2461
|
-
"
|
|
2462
|
-
|
|
2463
|
-
"
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2588
|
+
"operation_type": "progress",
|
|
2589
|
+
"data": {
|
|
2590
|
+
"object": "myshop_progress_v2",
|
|
2591
|
+
"operate": {
|
|
2592
|
+
"operation": {
|
|
2593
|
+
"next_node_name": "Return Complete",
|
|
2594
|
+
"forward": "Confirm Return Received"
|
|
2595
|
+
},
|
|
2596
|
+
"hold": false,
|
|
2597
|
+
"message": "Return received and confirmed"
|
|
2598
|
+
}
|
|
2599
|
+
},
|
|
2600
|
+
"env": {
|
|
2601
|
+
"account": "myshop_merchant",
|
|
2602
|
+
"network": "mainnet",
|
|
2603
|
+
"no_cache": true
|
|
2467
2604
|
}
|
|
2468
|
-
},
|
|
2469
|
-
"env": {
|
|
2470
|
-
"account": "myshop_merchant",
|
|
2471
|
-
"network": "mainnet",
|
|
2472
|
-
"no_cache": true
|
|
2473
2605
|
}
|
|
2474
2606
|
}
|
|
2475
2607
|
```
|
|
@@ -2482,22 +2614,25 @@ For the Non-receipt Return path, the customer never received the goods and has n
|
|
|
2482
2614
|
|
|
2483
2615
|
```json
|
|
2484
2616
|
{
|
|
2485
|
-
"
|
|
2617
|
+
"tool": "onchain_operations",
|
|
2486
2618
|
"data": {
|
|
2487
|
-
"
|
|
2488
|
-
"
|
|
2489
|
-
"
|
|
2490
|
-
|
|
2491
|
-
"
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2619
|
+
"operation_type": "progress",
|
|
2620
|
+
"data": {
|
|
2621
|
+
"object": "myshop_progress_v2",
|
|
2622
|
+
"operate": {
|
|
2623
|
+
"operation": {
|
|
2624
|
+
"next_node_name": "Return Complete",
|
|
2625
|
+
"forward": "Confirm Goods Recovered"
|
|
2626
|
+
},
|
|
2627
|
+
"hold": false,
|
|
2628
|
+
"message": "Goods recovered by merchant - non-receipt return complete"
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
"env": {
|
|
2632
|
+
"account": "myshop_merchant",
|
|
2633
|
+
"network": "mainnet",
|
|
2634
|
+
"no_cache": true
|
|
2495
2635
|
}
|
|
2496
|
-
},
|
|
2497
|
-
"env": {
|
|
2498
|
-
"account": "myshop_merchant",
|
|
2499
|
-
"network": "mainnet",
|
|
2500
|
-
"no_cache": true
|
|
2501
2636
|
}
|
|
2502
2637
|
}
|
|
2503
2638
|
```
|
|
@@ -2512,44 +2647,47 @@ If customer doesn't return within 10 days, merchant can mark as Return Fail.
|
|
|
2512
2647
|
|
|
2513
2648
|
```json
|
|
2514
2649
|
{
|
|
2515
|
-
"
|
|
2650
|
+
"tool": "onchain_operations",
|
|
2516
2651
|
"data": {
|
|
2517
|
-
"
|
|
2518
|
-
"
|
|
2519
|
-
"
|
|
2520
|
-
|
|
2521
|
-
"
|
|
2652
|
+
"operation_type": "progress",
|
|
2653
|
+
"data": {
|
|
2654
|
+
"object": "myshop_progress_v2",
|
|
2655
|
+
"operate": {
|
|
2656
|
+
"operation": {
|
|
2657
|
+
"next_node_name": "Return Fail",
|
|
2658
|
+
"forward": "Timeout Return Not Received"
|
|
2659
|
+
},
|
|
2660
|
+
"hold": false,
|
|
2661
|
+
"message": "Return failed - timeout"
|
|
2522
2662
|
},
|
|
2523
|
-
"
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
"object": "machine_time_10d_v2",
|
|
2532
|
-
"impack": true
|
|
2533
|
-
}
|
|
2534
|
-
],
|
|
2535
|
-
"submission": [
|
|
2536
|
-
{
|
|
2537
|
-
"guard": "machine_time_10d_v2",
|
|
2663
|
+
"submission": {
|
|
2664
|
+
"type": "submission",
|
|
2665
|
+
"guard": [
|
|
2666
|
+
{
|
|
2667
|
+
"object": "machine_time_10d_v2",
|
|
2668
|
+
"impack": true
|
|
2669
|
+
}
|
|
2670
|
+
],
|
|
2538
2671
|
"submission": [
|
|
2539
2672
|
{
|
|
2540
|
-
"
|
|
2541
|
-
"
|
|
2542
|
-
|
|
2543
|
-
|
|
2673
|
+
"guard": "machine_time_10d_v2",
|
|
2674
|
+
"submission": [
|
|
2675
|
+
{
|
|
2676
|
+
"identifier": 0,
|
|
2677
|
+
"b_submission": true,
|
|
2678
|
+
"value_type": "Address",
|
|
2679
|
+
"value": "myshop_progress_v2"
|
|
2680
|
+
}
|
|
2681
|
+
]
|
|
2544
2682
|
}
|
|
2545
2683
|
]
|
|
2546
2684
|
}
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2685
|
+
},
|
|
2686
|
+
"env": {
|
|
2687
|
+
"account": "myshop_merchant",
|
|
2688
|
+
"network": "mainnet",
|
|
2689
|
+
"no_cache": true
|
|
2690
|
+
}
|
|
2553
2691
|
}
|
|
2554
2692
|
}
|
|
2555
2693
|
```
|
|
@@ -2566,37 +2704,40 @@ When order reaches Order Complete, Wonderful, or Return Fail, merchant can withd
|
|
|
2566
2704
|
|
|
2567
2705
|
```json
|
|
2568
2706
|
{
|
|
2569
|
-
"
|
|
2707
|
+
"tool": "onchain_operations",
|
|
2570
2708
|
"data": {
|
|
2571
|
-
"
|
|
2572
|
-
"
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
{
|
|
2584
|
-
"guard": "service_merchant_win_v2",
|
|
2709
|
+
"operation_type": "allocation",
|
|
2710
|
+
"data": {
|
|
2711
|
+
"object": "myshop_allocation_v2",
|
|
2712
|
+
"alloc_by_guard": "service_merchant_win_v2",
|
|
2713
|
+
"submission": {
|
|
2714
|
+
"type": "submission",
|
|
2715
|
+
"guard": [
|
|
2716
|
+
{
|
|
2717
|
+
"object": "service_merchant_win_v2",
|
|
2718
|
+
"impack": true
|
|
2719
|
+
}
|
|
2720
|
+
],
|
|
2585
2721
|
"submission": [
|
|
2586
2722
|
{
|
|
2587
|
-
"
|
|
2588
|
-
"
|
|
2589
|
-
|
|
2590
|
-
|
|
2723
|
+
"guard": "service_merchant_win_v2",
|
|
2724
|
+
"submission": [
|
|
2725
|
+
{
|
|
2726
|
+
"identifier": 0,
|
|
2727
|
+
"b_submission": true,
|
|
2728
|
+
"value_type": "Address",
|
|
2729
|
+
"value": "myshop_order_v2"
|
|
2730
|
+
}
|
|
2731
|
+
]
|
|
2591
2732
|
}
|
|
2592
2733
|
]
|
|
2593
2734
|
}
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2735
|
+
},
|
|
2736
|
+
"env": {
|
|
2737
|
+
"account": "myshop_merchant",
|
|
2738
|
+
"network": "mainnet",
|
|
2739
|
+
"no_cache": true
|
|
2740
|
+
}
|
|
2600
2741
|
}
|
|
2601
2742
|
}
|
|
2602
2743
|
```
|
|
@@ -2609,37 +2750,40 @@ When order reaches Lost or Return Complete, customer can withdraw funds.
|
|
|
2609
2750
|
|
|
2610
2751
|
```json
|
|
2611
2752
|
{
|
|
2612
|
-
"
|
|
2753
|
+
"tool": "onchain_operations",
|
|
2613
2754
|
"data": {
|
|
2614
|
-
"
|
|
2615
|
-
"
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
{
|
|
2627
|
-
"guard": "service_customer_win_v2",
|
|
2755
|
+
"operation_type": "allocation",
|
|
2756
|
+
"data": {
|
|
2757
|
+
"object": "myshop_allocation_v2",
|
|
2758
|
+
"alloc_by_guard": "service_customer_win_v2",
|
|
2759
|
+
"submission": {
|
|
2760
|
+
"type": "submission",
|
|
2761
|
+
"guard": [
|
|
2762
|
+
{
|
|
2763
|
+
"object": "service_customer_win_v2",
|
|
2764
|
+
"impack": true
|
|
2765
|
+
}
|
|
2766
|
+
],
|
|
2628
2767
|
"submission": [
|
|
2629
2768
|
{
|
|
2630
|
-
"
|
|
2631
|
-
"
|
|
2632
|
-
|
|
2633
|
-
|
|
2769
|
+
"guard": "service_customer_win_v2",
|
|
2770
|
+
"submission": [
|
|
2771
|
+
{
|
|
2772
|
+
"identifier": 0,
|
|
2773
|
+
"b_submission": true,
|
|
2774
|
+
"value_type": "Address",
|
|
2775
|
+
"value": "myshop_order_v2"
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
2634
2778
|
}
|
|
2635
2779
|
]
|
|
2636
2780
|
}
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2781
|
+
},
|
|
2782
|
+
"env": {
|
|
2783
|
+
"account": "myshop_customer",
|
|
2784
|
+
"network": "mainnet",
|
|
2785
|
+
"no_cache": true
|
|
2786
|
+
}
|
|
2643
2787
|
}
|
|
2644
2788
|
}
|
|
2645
2789
|
```
|