@wowok/skills 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,18 @@
9
9
  {
10
10
  "name": "Cancel Order",
11
11
  "weight": 1,
12
- "namedOperator": "",
13
- "permissionIndex": null
12
+ "namedOperator": ""
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "prev_node": "Order Confirmation",
18
+ "threshold": 1,
19
+ "forwards": [
20
+ {
21
+ "name": "Cancel Order",
22
+ "weight": 1,
23
+ "namedOperator": ""
14
24
  }
15
25
  ]
16
26
  }
@@ -26,8 +36,7 @@
26
36
  {
27
37
  "name": "Complete Order",
28
38
  "weight": 1,
29
- "namedOperator": "",
30
- "permissionIndex": null
39
+ "namedOperator": ""
31
40
  }
32
41
  ]
33
42
  }
@@ -43,7 +52,6 @@
43
52
  {
44
53
  "name": "Confirm Delivery",
45
54
  "weight": 1,
46
- "namedOperator": null,
47
55
  "permissionIndex": 1002
48
56
  }
49
57
  ]
@@ -60,7 +68,6 @@
60
68
  {
61
69
  "name": "Confirm Order",
62
70
  "weight": 1,
63
- "namedOperator": null,
64
71
  "permissionIndex": 1000
65
72
  }
66
73
  ]
@@ -77,11 +84,10 @@
77
84
  {
78
85
  "name": "Ship Goods",
79
86
  "weight": 1,
80
- "namedOperator": null,
81
87
  "permissionIndex": 1001
82
88
  }
83
89
  ]
84
90
  }
85
91
  ]
86
92
  }
87
- ]
93
+ ]
@@ -350,7 +350,9 @@ Reuse existing accounts from basic MyShop:
350
350
  - Account: `myshop_merchant` (store owner)
351
351
  - Account: `myshop_customer` (customer)
352
352
 
353
- Ensure both accounts have sufficient testnet WOW tokens.
353
+ > **Mandatory**: Ensure both accounts (`myshop_merchant` and `myshop_customer`) exist as local marks BEFORE proceeding. The Permission object (Step 2) grants indexes to `myshop_merchant` by name — if the account does not exist when the permission is created, the grant will silently fail or target the wrong account, causing "Permission denied" errors in later steps.
354
+
355
+ Ensure both accounts have sufficient mainnet WOW tokens.
354
356
 
355
357
  ***
356
358
 
@@ -372,7 +374,7 @@ Create a new permission object for the advanced shop.
372
374
  },
373
375
  "env": {
374
376
  "account": "myshop_merchant",
375
- "network": "testnet",
377
+ "network": "mainnet",
376
378
  "no_cache": true
377
379
  }
378
380
  }
@@ -406,7 +408,7 @@ Add custom permission indexes for advanced operations.
406
408
  },
407
409
  "env": {
408
410
  "account": "myshop_merchant",
409
- "network": "testnet",
411
+ "network": "mainnet",
410
412
  "no_cache": true
411
413
  }
412
414
  }
@@ -434,7 +436,7 @@ Add custom permission indexes for advanced operations.
434
436
  },
435
437
  "env": {
436
438
  "account": "myshop_merchant",
437
- "network": "testnet",
439
+ "network": "mainnet",
438
440
  "no_cache": true
439
441
  }
440
442
  }
@@ -462,7 +464,7 @@ Create the Service without publishing to obtain its address for Guard creation.
462
464
  },
463
465
  "env": {
464
466
  "account": "myshop_merchant",
465
- "network": "testnet",
467
+ "network": "mainnet",
466
468
  "no_cache": true
467
469
  }
468
470
  }
@@ -487,7 +489,7 @@ Create Guards using the Service address. Guards verify order state and service o
487
489
  >
488
490
  > Key instructions used in this example:
489
491
  > - Query ID 1563 (`order.service`): Returns the Service address of an Order — used to verify order belongs to this service
490
- > - Query ID for `progress.node_current`: Returns current node name — used to verify order at specific workflow node
492
+ > - Query ID 1253 (`progress.current`): Returns current node name — used to verify order at specific workflow node
491
493
 
492
494
  **Guard 1: machine_merkle_root_v2** - Verify Merkle Root string length = 66 (0x prefix + 64 hex chars)
493
495
 
@@ -514,7 +516,7 @@ Create Guards using the Service address. Guards verify order state and service o
514
516
  },
515
517
  "env": {
516
518
  "account": "myshop_merchant",
517
- "network": "testnet",
519
+ "network": "mainnet",
518
520
  "no_cache": true
519
521
  }
520
522
  }
@@ -551,7 +553,7 @@ Create Guards using the Service address. Guards verify order state and service o
551
553
  },
552
554
  "env": {
553
555
  "account": "myshop_merchant",
554
- "network": "testnet",
556
+ "network": "mainnet",
555
557
  "no_cache": true
556
558
  }
557
559
  }
@@ -588,7 +590,7 @@ Create Guards using the Service address. Guards verify order state and service o
588
590
  },
589
591
  "env": {
590
592
  "account": "myshop_merchant",
591
- "network": "testnet",
593
+ "network": "mainnet",
592
594
  "no_cache": true
593
595
  }
594
596
  }
@@ -655,7 +657,7 @@ Create Guards using the Service address. Guards verify order state and service o
655
657
  },
656
658
  "env": {
657
659
  "account": "myshop_merchant",
658
- "network": "testnet",
660
+ "network": "mainnet",
659
661
  "no_cache": true
660
662
  }
661
663
  }
@@ -699,7 +701,7 @@ Create Guards using the Service address. Guards verify order state and service o
699
701
  },
700
702
  "env": {
701
703
  "account": "myshop_merchant",
702
- "network": "testnet",
704
+ "network": "mainnet",
703
705
  "no_cache": true
704
706
  }
705
707
  }
@@ -758,7 +760,7 @@ Create Guards using the Service address. Guards verify order state and service o
758
760
  },
759
761
  "env": {
760
762
  "account": "myshop_merchant",
761
- "network": "testnet",
763
+ "network": "mainnet",
762
764
  "no_cache": true
763
765
  }
764
766
  }
@@ -1034,7 +1036,7 @@ Create Machine with all nodes and guards in a single operation.
1034
1036
  },
1035
1037
  "env": {
1036
1038
  "account": "myshop_merchant",
1037
- "network": "testnet",
1039
+ "network": "mainnet",
1038
1040
  "no_cache": true
1039
1041
  }
1040
1042
  }
@@ -1066,7 +1068,7 @@ Machine must be published before binding to Service.
1066
1068
  },
1067
1069
  "env": {
1068
1070
  "account": "myshop_merchant",
1069
- "network": "testnet",
1071
+ "network": "mainnet",
1070
1072
  "no_cache": true
1071
1073
  }
1072
1074
  }
@@ -1089,7 +1091,7 @@ Bind the Machine to the Service. **Important**: The Service must be unpublished
1089
1091
  },
1090
1092
  "env": {
1091
1093
  "account": "myshop_merchant",
1092
- "network": "testnet",
1094
+ "network": "mainnet",
1093
1095
  "no_cache": true
1094
1096
  }
1095
1097
  }
@@ -1128,7 +1130,8 @@ Create an Arbitration object as the final on-chain mechanism for protecting user
1128
1130
  "data": {
1129
1131
  "object": {
1130
1132
  "name": "myshop_arbitration_v2",
1131
- "replaceExistName": true
1133
+ "replaceExistName": true,
1134
+ "permission": "myshop_perm_v2"
1132
1135
  },
1133
1136
  "description": "Arbitration for MyShop Advanced - Final dispute resolution mechanism",
1134
1137
  "voting_guard": {
@@ -1145,7 +1148,7 @@ Create an Arbitration object as the final on-chain mechanism for protecting user
1145
1148
  },
1146
1149
  "env": {
1147
1150
  "account": "myshop_merchant",
1148
- "network": "testnet",
1151
+ "network": "mainnet",
1149
1152
  "no_cache": true
1150
1153
  }
1151
1154
  }
@@ -1166,7 +1169,7 @@ Configure order_allocators to define fund distribution rules, then publish the S
1166
1169
  > {
1167
1170
  > "query_type": "service",
1168
1171
  > "object": "three_body_signature_service_v2",
1169
- > "network": "testnet",
1172
+ > "network": "mainnet",
1170
1173
  > "no_cache": true
1171
1174
  > }
1172
1175
  > ```
@@ -1187,11 +1190,11 @@ Configure order_allocators to define fund distribution rules, then publish the S
1187
1190
  "sales": [
1188
1191
  {
1189
1192
  "name": "The Three-Body Problem + Author Signature",
1190
- "price": 1000000000,
1193
+ "price": 100000000,
1191
1194
  "stock": 100,
1192
1195
  "suspension": false,
1193
1196
  "wip": "https://wowok.net/test/three_body.wip",
1194
- "wip_hash": ""
1197
+ "wip_hash": "03c18561efa8faf4d75480eb1f732c4a46ffde95599e92eca06167785fc07a5b"
1195
1198
  }
1196
1199
  ]
1197
1200
  },
@@ -1233,7 +1236,7 @@ Configure order_allocators to define fund distribution rules, then publish the S
1233
1236
  },
1234
1237
  "env": {
1235
1238
  "account": "myshop_merchant",
1236
- "network": "testnet",
1239
+ "network": "mainnet",
1237
1240
  "no_cache": true
1238
1241
  }
1239
1242
  }
@@ -1272,7 +1275,7 @@ Create an empty reward object first. This object will be referenced by reward gu
1272
1275
  },
1273
1276
  "env": {
1274
1277
  "account": "myshop_merchant",
1275
- "network": "testnet",
1278
+ "network": "mainnet",
1276
1279
  "no_cache": true
1277
1280
  }
1278
1281
  }
@@ -1284,6 +1287,8 @@ Create an empty reward object first. This object will be referenced by reward gu
1284
1287
 
1285
1288
  Create guards for reward verification with double-claim protection:
1286
1289
 
1290
+ > **Note on `query_reward_record_exists`**: The guard uses `query_reward_record_exists` with `where.storeFromId` to prevent double-claiming. The MCP tool automatically generates an internal identifier (identifier 4, type VecU8) for this query's parameters. You only need to define identifiers 0–3 in the table; the tool handles the rest.
1291
+
1287
1292
  | # | Guard Name | Purpose | Reward Amount |
1288
1293
  |---|------------|---------|---------------|
1289
1294
  **Guard 7: reward_wonderful_v2**
@@ -1342,7 +1347,7 @@ Create guards for reward verification with double-claim protection:
1342
1347
  },
1343
1348
  "env": {
1344
1349
  "account": "myshop_merchant",
1345
- "network": "testnet",
1350
+ "network": "mainnet",
1346
1351
  "no_cache": true
1347
1352
  }
1348
1353
  }
@@ -1404,7 +1409,7 @@ Create guards for reward verification with double-claim protection:
1404
1409
  },
1405
1410
  "env": {
1406
1411
  "account": "myshop_merchant",
1407
- "network": "testnet",
1412
+ "network": "mainnet",
1408
1413
  "no_cache": true
1409
1414
  }
1410
1415
  }
@@ -1466,7 +1471,7 @@ Create guards for reward verification with double-claim protection:
1466
1471
  },
1467
1472
  "env": {
1468
1473
  "account": "myshop_merchant",
1469
- "network": "testnet",
1474
+ "network": "mainnet",
1470
1475
  "no_cache": true
1471
1476
  }
1472
1477
  }
@@ -1508,7 +1513,7 @@ Add reward guards to the reward object with `store_from_id` set to the order ide
1508
1513
  },
1509
1514
  "env": {
1510
1515
  "account": "myshop_merchant",
1511
- "network": "testnet",
1516
+ "network": "mainnet",
1512
1517
  "no_cache": true
1513
1518
  }
1514
1519
  }
@@ -1532,7 +1537,7 @@ Deposit WOW tokens to the reward pool for rewards and compensation.
1532
1537
  },
1533
1538
  "env": {
1534
1539
  "account": "myshop_merchant",
1535
- "network": "testnet",
1540
+ "network": "mainnet",
1536
1541
  "no_cache": true
1537
1542
  }
1538
1543
  }
@@ -1563,7 +1568,7 @@ Customer places an order for "The Three-Body Problem + Author Signature" with WI
1563
1568
  }
1564
1569
  ],
1565
1570
  "total_pay": {
1566
- "balance": 1000000000
1571
+ "balance": 100000000
1567
1572
  },
1568
1573
  "payment_remark": "To my dear friend - keep exploring the universe"
1569
1574
  },
@@ -1583,7 +1588,7 @@ Customer places an order for "The Three-Body Problem + Author Signature" with WI
1583
1588
  },
1584
1589
  "env": {
1585
1590
  "account": "myshop_customer",
1586
- "network": "testnet",
1591
+ "network": "mainnet",
1587
1592
  "no_cache": true
1588
1593
  }
1589
1594
  }
@@ -1612,7 +1617,7 @@ Merchant confirms the order. This step uses permission index 1000 (no Guard subm
1612
1617
  },
1613
1618
  "env": {
1614
1619
  "account": "myshop_merchant",
1615
- "network": "testnet",
1620
+ "network": "mainnet",
1616
1621
  "no_cache": true
1617
1622
  }
1618
1623
  }
@@ -1663,7 +1668,7 @@ Merchant starts shipping after signature service is completed. The merchant subm
1663
1668
  },
1664
1669
  "env": {
1665
1670
  "account": "myshop_merchant",
1666
- "network": "testnet",
1671
+ "network": "mainnet",
1667
1672
  "no_cache": true
1668
1673
  }
1669
1674
  }
@@ -1694,7 +1699,7 @@ Customer confirms receipt of goods.
1694
1699
  },
1695
1700
  "env": {
1696
1701
  "account": "myshop_customer",
1697
- "network": "testnet",
1702
+ "network": "mainnet",
1698
1703
  "no_cache": true
1699
1704
  }
1700
1705
  }
@@ -1723,7 +1728,7 @@ Alternatively, customer can rate as Wonderful (very satisfied).
1723
1728
  },
1724
1729
  "env": {
1725
1730
  "account": "myshop_customer",
1726
- "network": "testnet",
1731
+ "network": "mainnet",
1727
1732
  "no_cache": true
1728
1733
  }
1729
1734
  }
@@ -1768,7 +1773,7 @@ Customer claims Wonderful reward from reward pool.
1768
1773
  },
1769
1774
  "env": {
1770
1775
  "account": "myshop_customer",
1771
- "network": "testnet",
1776
+ "network": "mainnet",
1772
1777
  "no_cache": true
1773
1778
  }
1774
1779
  }
@@ -1820,7 +1825,7 @@ Order can auto-complete after time thresholds or be manually completed.
1820
1825
  },
1821
1826
  "env": {
1822
1827
  "account": "myshop_merchant",
1823
- "network": "testnet",
1828
+ "network": "mainnet",
1824
1829
  "no_cache": true
1825
1830
  }
1826
1831
  }
@@ -1866,7 +1871,7 @@ Order can auto-complete after time thresholds or be manually completed.
1866
1871
  },
1867
1872
  "env": {
1868
1873
  "account": "myshop_merchant",
1869
- "network": "testnet",
1874
+ "network": "mainnet",
1870
1875
  "no_cache": true
1871
1876
  }
1872
1877
  }
@@ -1896,7 +1901,7 @@ If package is lost, customer reports and merchant confirms.
1896
1901
  },
1897
1902
  "env": {
1898
1903
  "account": "myshop_customer",
1899
- "network": "testnet",
1904
+ "network": "mainnet",
1900
1905
  "no_cache": true
1901
1906
  }
1902
1907
  }
@@ -1942,7 +1947,7 @@ If package is lost, customer reports and merchant confirms.
1942
1947
  },
1943
1948
  "env": {
1944
1949
  "account": "myshop_merchant",
1945
- "network": "testnet",
1950
+ "network": "mainnet",
1946
1951
  "no_cache": true
1947
1952
  }
1948
1953
  }
@@ -1981,7 +1986,7 @@ If package is lost, customer reports and merchant confirms.
1981
1986
  },
1982
1987
  "env": {
1983
1988
  "account": "myshop_customer",
1984
- "network": "testnet",
1989
+ "network": "mainnet",
1985
1990
  "no_cache": true
1986
1991
  }
1987
1992
  }
@@ -2011,7 +2016,7 @@ Customer requests return after delivery confirmation.
2011
2016
  },
2012
2017
  "env": {
2013
2018
  "account": "myshop_customer",
2014
- "network": "testnet",
2019
+ "network": "mainnet",
2015
2020
  "no_cache": true
2016
2021
  }
2017
2022
  }
@@ -2057,7 +2062,7 @@ Customer requests return after delivery confirmation.
2057
2062
  },
2058
2063
  "env": {
2059
2064
  "account": "myshop_merchant",
2060
- "network": "testnet",
2065
+ "network": "mainnet",
2061
2066
  "no_cache": true
2062
2067
  }
2063
2068
  }
@@ -2103,7 +2108,7 @@ Customer requests return after delivery confirmation.
2103
2108
  },
2104
2109
  "env": {
2105
2110
  "account": "myshop_customer",
2106
- "network": "testnet",
2111
+ "network": "mainnet",
2107
2112
  "no_cache": true
2108
2113
  }
2109
2114
  }
@@ -2127,7 +2132,7 @@ Customer requests return after delivery confirmation.
2127
2132
  },
2128
2133
  "env": {
2129
2134
  "account": "myshop_merchant",
2130
- "network": "testnet",
2135
+ "network": "mainnet",
2131
2136
  "no_cache": true
2132
2137
  }
2133
2138
  }
@@ -2177,7 +2182,7 @@ If customer doesn't return within 10 days, merchant can mark as Return Fail.
2177
2182
  },
2178
2183
  "env": {
2179
2184
  "account": "myshop_merchant",
2180
- "network": "testnet",
2185
+ "network": "mainnet",
2181
2186
  "no_cache": true
2182
2187
  }
2183
2188
  }
@@ -2195,12 +2200,10 @@ When order reaches Order Complete, Wonderful, or Return Fail, merchant can withd
2195
2200
 
2196
2201
  ```json
2197
2202
  {
2198
- "operation_type": "order",
2203
+ "operation_type": "allocation",
2199
2204
  "data": {
2200
- "object": "myshop_order_v2",
2201
- "withdraw": {
2202
- "guard": "service_merchant_win_v2"
2203
- }
2205
+ "object": "myshop_allocation_v2",
2206
+ "alloc_by_guard": "service_merchant_win_v2"
2204
2207
  },
2205
2208
  "submission": {
2206
2209
  "type": "submission",
@@ -2226,7 +2229,7 @@ When order reaches Order Complete, Wonderful, or Return Fail, merchant can withd
2226
2229
  },
2227
2230
  "env": {
2228
2231
  "account": "myshop_merchant",
2229
- "network": "testnet",
2232
+ "network": "mainnet",
2230
2233
  "no_cache": true
2231
2234
  }
2232
2235
  }
@@ -2240,12 +2243,10 @@ When order reaches Lost or Return Complete, customer can withdraw funds.
2240
2243
 
2241
2244
  ```json
2242
2245
  {
2243
- "operation_type": "order",
2246
+ "operation_type": "allocation",
2244
2247
  "data": {
2245
- "object": "myshop_order_v2",
2246
- "withdraw": {
2247
- "guard": "service_customer_win_v2"
2248
- }
2248
+ "object": "myshop_allocation_v2",
2249
+ "alloc_by_guard": "service_customer_win_v2"
2249
2250
  },
2250
2251
  "submission": {
2251
2252
  "type": "submission",
@@ -2271,7 +2272,7 @@ When order reaches Lost or Return Complete, customer can withdraw funds.
2271
2272
  },
2272
2273
  "env": {
2273
2274
  "account": "myshop_customer",
2274
- "network": "testnet",
2275
+ "network": "mainnet",
2275
2276
  "no_cache": true
2276
2277
  }
2277
2278
  }