@wowok/agent-mcp 2.2.13 → 2.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/dist/index.js +44 -100
- package/dist/schema/query/index.js +1 -1
- package/dist/schema-query/index.d.ts +29 -0
- package/dist/schema-query/index.js +149 -0
- package/dist/schemas/account_operation.schema.json +255 -0
- package/dist/schemas/guard2file.schema.json +71 -0
- package/dist/schemas/index.json +139 -0
- package/dist/schemas/local_info_operation.schema.json +142 -0
- package/dist/schemas/local_mark_operation.schema.json +119 -0
- package/dist/schemas/machineNode2file.schema.json +71 -0
- package/dist/schemas/messenger_operation.schema.json +1393 -0
- package/dist/schemas/onchain_events.schema.json +113 -0
- package/dist/schemas/onchain_operations.schema.json +376 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
- package/dist/schemas/onchain_operations_contact.schema.json +853 -0
- package/dist/schemas/onchain_operations_demand.schema.json +984 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
- package/dist/schemas/onchain_operations_guard.schema.json +713 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
- package/dist/schemas/onchain_operations_order.schema.json +830 -0
- package/dist/schemas/onchain_operations_payment.schema.json +717 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
- package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
- package/dist/schemas/onchain_operations_progress.schema.json +751 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
- package/dist/schemas/onchain_operations_reward.schema.json +955 -0
- package/dist/schemas/onchain_operations_service.schema.json +1411 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
- package/dist/schemas/onchain_table_data.schema.json +35 -0
- package/dist/schemas/query_toolkit.schema.json +32 -0
- package/dist/schemas/schema_query.schema.json +33 -0
- package/dist/schemas/wip_file.schema.json +27 -0
- package/dist/schemas/wowok_buildin_info.schema.json +487 -0
- package/package.json +7 -5
- package/dist/docs/index.d.ts +0 -3
- package/dist/docs/index.js +0 -2
- package/dist/docs/loader.d.ts +0 -12
- package/dist/docs/loader.js +0 -177
- package/dist/docs/search.d.ts +0 -17
- package/dist/docs/search.js +0 -325
- package/dist/docs/types.d.ts +0 -55
- package/dist/docs/types.js +0 -1
- package/docs/README.md +0 -249
- package/docs/WIP.md +0 -388
- package/docs/WTS.md +0 -536
- package/docs/docs/account.md +0 -914
- package/docs/docs/allocation.md +0 -635
- package/docs/docs/arbitration.md +0 -1804
- package/docs/docs/arbitration_state_machine.md +0 -270
- package/docs/docs/contact.md +0 -709
- package/docs/docs/demand.md +0 -948
- package/docs/docs/guard.md +0 -1465
- package/docs/docs/localinfo.md +0 -432
- package/docs/docs/localmark.md +0 -583
- package/docs/docs/machine.md +0 -2490
- package/docs/docs/messenger.md +0 -2098
- package/docs/docs/onchain_events.md +0 -267
- package/docs/docs/order.md +0 -1001
- package/docs/docs/payment.md +0 -512
- package/docs/docs/permission.md +0 -1438
- package/docs/docs/personal.md +0 -742
- package/docs/docs/progress.md +0 -1748
- package/docs/docs/query.md +0 -467
- package/docs/docs/repository.md +0 -1043
- package/docs/docs/reward.md +0 -833
- package/docs/docs/service.md +0 -2130
- package/docs/docs/stage-01-introduction.md +0 -243
- package/docs/docs/stage-02-trust.md +0 -302
- package/docs/docs/stage-03-collaboration.md +0 -337
- package/docs/docs/stage-04-transaction.md +0 -277
- package/docs/docs/stage-05-business.md +0 -151
- package/docs/docs/stage-06-personal.md +0 -203
- package/docs/docs/stage-07-query.md +0 -572
- package/docs/docs/stage-08-examples.md +0 -184
- package/docs/docs/treasury.md +0 -1149
- package/docs/docs/wowok_buildin_info.md +0 -740
- package/docs/examples/Insurance/Insurance.md +0 -594
- package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/docs/examples/MyShop/MyShop.md +0 -1353
- package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/docs/examples/Travel/Travel.md +0 -1157
- package/docs/examples/Travel/Travel_TestResults.md +0 -743
- package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
- package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
- package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
- package/docs/skills/WOWOK.md +0 -650
- package/docs/skills/onchain_operations/_common.md +0 -406
- package/docs/skills/onchain_operations/_index.md +0 -196
- package/docs/skills/onchain_operations/allocation.md +0 -28
- package/docs/skills/onchain_operations/arbitration.md +0 -106
- package/docs/skills/onchain_operations/contact.md +0 -40
- package/docs/skills/onchain_operations/demand.md +0 -53
- package/docs/skills/onchain_operations/gen_passport.md +0 -23
- package/docs/skills/onchain_operations/guard.md +0 -56
- package/docs/skills/onchain_operations/machine.md +0 -89
- package/docs/skills/onchain_operations/order.md +0 -56
- package/docs/skills/onchain_operations/payment.md +0 -24
- package/docs/skills/onchain_operations/permission.md +0 -68
- package/docs/skills/onchain_operations/personal.md +0 -58
- package/docs/skills/onchain_operations/progress.md +0 -38
- package/docs/skills/onchain_operations/repository.md +0 -70
- package/docs/skills/onchain_operations/reward.md +0 -38
- package/docs/skills/onchain_operations/service.md +0 -78
- package/docs/skills/onchain_operations/treasury.md +0 -68
- package/docs/skills/schema-account_operation.md +0 -402
- package/docs/skills/schema-guard2file.md +0 -153
- package/docs/skills/schema-local_info_operation.md +0 -160
- package/docs/skills/schema-local_mark_operation.md +0 -148
- package/docs/skills/schema-machineNode2file.md +0 -155
- package/docs/skills/schema-messenger_operation.md +0 -547
- package/docs/skills/schema-onchain_events.md +0 -201
- package/docs/skills/schema-onchain_table_data.md +0 -334
- package/docs/skills/schema-query_toolkit.md +0 -395
- package/docs/skills/schema-wip_file.md +0 -240
- package/docs/skills/schema-wowok_buildin_info.md +0 -296
- package/docs/wip-examples/three_body.html +0 -57
- package/docs/wip-examples/three_body.wip +0 -30
|
@@ -1,740 +0,0 @@
|
|
|
1
|
-
# WoWok Build-in Information Component (ℹ️ WoWok Build-in Information)
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Component Overview
|
|
6
|
-
|
|
7
|
-
The WoWok Build-in Information component is used to query WoWok protocol information, including constants, built-in permissions, guard instructions, current network, and value types.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Function List
|
|
12
|
-
|
|
13
|
-
| Function Name | Purpose | Usage Scenario | Significance |
|
|
14
|
-
|---------------|---------|----------------|-------------|
|
|
15
|
-
| **Query Constants** | Get protocol constant values | Reference system limits and defaults | Understand protocol configuration |
|
|
16
|
-
| **Query Built-in Permissions** | Get built-in permission definitions | Set up permission objects | Know available permission options |
|
|
17
|
-
| **Query Guard Instructions** | Get Guard instruction reference | Build Guard logic | Access all available operations |
|
|
18
|
-
| **Query Current Network** | Get current network entrypoint | Check which network is active | Verify environment configuration |
|
|
19
|
-
| **Query Value Types** | Get supported value type mappings | Work with on-chain data types | Understand type system |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Complete Tool Call Structure
|
|
24
|
-
|
|
25
|
-
Build-in info query uses the following top-level structure:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"info": "info_type",
|
|
30
|
-
// optional filter fields
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Schema Tree
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
wowok_buildin_info (Build-in Information Operations)
|
|
40
|
-
├── info (discriminator, required)
|
|
41
|
-
│ ├── "constants"
|
|
42
|
-
│ ├── "built-in permissions"
|
|
43
|
-
│ │ └── filter (optional, PermissionFilter)
|
|
44
|
-
│ │ ├── objectType (optional, ObjectType)
|
|
45
|
-
│ │ ├── name (optional, string)
|
|
46
|
-
│ │ ├── index (optional, number)
|
|
47
|
-
│ │ └── description (optional, string)
|
|
48
|
-
│ ├── "guard instructions"
|
|
49
|
-
│ │ └── filter (optional, GuardInstructFilter)
|
|
50
|
-
│ │ ├── name (optional, string)
|
|
51
|
-
│ │ ├── id (optional, number[])
|
|
52
|
-
│ │ ├── returnType (optional, ValueType)
|
|
53
|
-
│ │ ├── paramCount (optional, number)
|
|
54
|
-
│ │ ├── scope (optional, "instruct"/"object query"/"all")
|
|
55
|
-
│ │ └── objectType (optional, ObjectType, only for "object query" scope)
|
|
56
|
-
│ ├── "current network"
|
|
57
|
-
│ └── "value types"
|
|
58
|
-
└── (no other top-level fields)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Example 1: Query Constants
|
|
64
|
-
|
|
65
|
-
### Feature Description
|
|
66
|
-
|
|
67
|
-
Get protocol constant values, including system limits, default values, and configuration parameters.
|
|
68
|
-
|
|
69
|
-
### Examples
|
|
70
|
-
|
|
71
|
-
#### Example 1.1: Get All Constants
|
|
72
|
-
|
|
73
|
-
**Prompt**: Query all protocol constants to understand system configuration.
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"info": "constants"
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Execution Result**:
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"status": "success",
|
|
85
|
-
"result": [
|
|
86
|
-
{"name": "Protocol Package ID", "value": "0x2", "description": "Protocol package ID"},
|
|
87
|
-
{"name": "Gas Token Type", "value": "0x2::wow::WOW", "description": "Gas token type"},
|
|
88
|
-
{"name": "Gas Coin Type", "value": "0x2::coin::Coin<0x2::wow::WOW>", "description": "Gas coin type"},
|
|
89
|
-
{"name": "Entity Linker ID", "value": "0xaaa", "description": "Entity Linker ID"},
|
|
90
|
-
{"name": "Entity Registrar ID", "value": "0xaab", "description": "Entity registrar ID"}
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Example 2: Query Built-in Permissions
|
|
98
|
-
|
|
99
|
-
### Feature Description
|
|
100
|
-
|
|
101
|
-
Get definitions of built-in permissions, including their indexes, names, descriptions, and applicable object types.
|
|
102
|
-
|
|
103
|
-
### Examples
|
|
104
|
-
|
|
105
|
-
#### Example 2.1: Get All Built-in Permissions
|
|
106
|
-
|
|
107
|
-
**Prompt**: Query all built-in permissions to see available options.
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"info": "built-in permissions"
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Execution Result**:
|
|
116
|
-
```json
|
|
117
|
-
{
|
|
118
|
-
"status": "success",
|
|
119
|
-
"result": [
|
|
120
|
-
{"index": 100, "name": "repository.new", "description": "Create new repository", "object_type": "Repository"},
|
|
121
|
-
{"index": 101, "name": "repository.description", "description": "Set repository description", "object_type": "Repository"},
|
|
122
|
-
{"index": 102, "name": "repository.policy", "description": "Manage repository policies", "object_type": "Repository"},
|
|
123
|
-
{"index": 103, "name": "repository.reward", "description": "Manage repository rewards", "object_type": "Repository"},
|
|
124
|
-
{"index": 104, "name": "repository.owner_receive", "description": "Receive objects or payments for repository", "object_type": "Repository"},
|
|
125
|
-
{"index": 105, "name": "repository.um", "description": "Manage repository UM (User Manager)", "object_type": "Repository"},
|
|
126
|
-
{"index": 150, "name": "reward.new", "description": "Create new reward", "object_type": "Reward"},
|
|
127
|
-
{"index": 151, "name": "reward.description", "description": "Set reward description", "object_type": "Reward"},
|
|
128
|
-
{"index": 152, "name": "reward.guard", "description": "Manage reward guards", "object_type": "Reward"},
|
|
129
|
-
{"index": 153, "name": "reward.coin_add", "description": "Add coin to reward", "object_type": "Reward"},
|
|
130
|
-
{"index": 154, "name": "reward.receive", "description": "Receive payment for reward", "object_type": "Reward"},
|
|
131
|
-
{"index": 155, "name": "reward.guard_expiration_time_add", "description": "Add guard expiration time", "object_type": "Reward"},
|
|
132
|
-
{"index": 156, "name": "reward.owner_receive", "description": "Receive objects or payments for reward", "object_type": "Reward"},
|
|
133
|
-
{"index": 157, "name": "reward.um", "description": "Manage reward UM (User Manager)", "object_type": "Reward"},
|
|
134
|
-
{"index": 200, "name": "machine.new", "description": "Create new machine", "object_type": "Machine"},
|
|
135
|
-
{"index": 201, "name": "machine.description", "description": "Set machine description", "object_type": "Machine"},
|
|
136
|
-
{"index": 203, "name": "machine.consensus_repositories", "description": "Manage machine consensus repositories", "object_type": "Machine"},
|
|
137
|
-
{"index": 204, "name": "machine.pause", "description": "Pause or resume machine", "object_type": "Machine"},
|
|
138
|
-
{"index": 205, "name": "machine.publish", "description": "Publish machine", "object_type": "Machine"},
|
|
139
|
-
{"index": 206, "name": "machine.node", "description": "Manage machine nodes", "object_type": "Machine"},
|
|
140
|
-
{"index": 207, "name": "machine.owner_receive", "description": "Receive objects or payments for machine", "object_type": "Machine"},
|
|
141
|
-
{"index": 208, "name": "machine.um", "description": "Manage machine UM (User Manager)", "object_type": "Machine"},
|
|
142
|
-
{"index": 220, "name": "progress.new", "description": "Create new progress", "object_type": "Progress"},
|
|
143
|
-
{"index": 221, "name": "progress.namedOperator", "description": "Manage progress named operators (add, remove, set)", "object_type": "Progress"},
|
|
144
|
-
{"index": 222, "name": "progress.task", "description": "Set progress task", "object_type": "Progress"},
|
|
145
|
-
{"index": 223, "name": "progress.context_repository", "description": "Manage progress context repositories (add, remove, clear)", "object_type": "Progress"},
|
|
146
|
-
{"index": 224, "name": "progress.unhold", "description": "Unhold progress", "object_type": "Progress"},
|
|
147
|
-
{"index": 225, "name": "progress.owner_receive", "description": "Receive objects or payments for progress", "object_type": "Progress"},
|
|
148
|
-
{"index": 250, "name": "treasury.new", "description": "Create new treasury", "object_type": "Treasury"},
|
|
149
|
-
{"index": 251, "name": "treasury.description", "description": "Set treasury description", "object_type": "Treasury"},
|
|
150
|
-
{"index": 252, "name": "treasury.deposit", "description": "Deposit coins to treasury", "object_type": "Treasury"},
|
|
151
|
-
{"index": 253, "name": "treasury.receive", "description": "Receive payment for treasury", "object_type": "Treasury"},
|
|
152
|
-
{"index": 254, "name": "treasury.withdraw", "description": "Withdraw coins from treasury", "object_type": "Treasury"},
|
|
153
|
-
{"index": 255, "name": "treasury.external_deposit", "description": "External deposit to treasury", "object_type": "Treasury"},
|
|
154
|
-
{"index": 256, "name": "treasury.external_withdraw", "description": "External withdraw from treasury", "object_type": "Treasury"},
|
|
155
|
-
{"index": 257, "name": "treasury.external_deposit_guard", "description": "Manage treasury external deposit guards", "object_type": "Treasury"},
|
|
156
|
-
{"index": 258, "name": "treasury.external_withdraw_guard", "description": "Manage treasury external withdraw guards", "object_type": "Treasury"},
|
|
157
|
-
{"index": 259, "name": "treasury.owner_receive", "description": "Receive objects or payments for treasury", "object_type": "Treasury"},
|
|
158
|
-
{"index": 260, "name": "treasury.um", "description": "Manage treasury UM (User Manager)", "object_type": "Treasury"},
|
|
159
|
-
{"index": 300, "name": "service.new", "description": "Create new service", "object_type": "Service"},
|
|
160
|
-
{"index": 301, "name": "service.description", "description": "Set service description", "object_type": "Service"},
|
|
161
|
-
{"index": 303, "name": "service.location", "description": "Set service location", "object_type": "Service"},
|
|
162
|
-
{"index": 304, "name": "service.repository", "description": "Manage service repositories", "object_type": "Service"},
|
|
163
|
-
{"index": 305, "name": "service.sales", "description": "Manage service sales", "object_type": "Service"},
|
|
164
|
-
{"index": 306, "name": "service.machine", "description": "Manage service machines", "object_type": "Service"},
|
|
165
|
-
{"index": 307, "name": "service.buy_guard", "description": "Manage service buy guards", "object_type": "Service"},
|
|
166
|
-
{"index": 308, "name": "service.arbitration", "description": "Manage service arbitrations", "object_type": "Service"},
|
|
167
|
-
{"index": 309, "name": "service.customer_info_required", "description": "Manage service customer info requirements", "object_type": "Service"},
|
|
168
|
-
{"index": 310, "name": "service.pause", "description": "Pause or resume service", "object_type": "Service"},
|
|
169
|
-
{"index": 311, "name": "service.publish", "description": "Publish service", "object_type": "Service"},
|
|
170
|
-
{"index": 312, "name": "service.discount", "description": "Manage service discounts", "object_type": "Service"},
|
|
171
|
-
{"index": 313, "name": "service.order_allocator", "description": "Manage service order allocators", "object_type": "Service"},
|
|
172
|
-
{"index": 314, "name": "service.compensation_fund_withdraw", "description": "Withdraw from service compensation fund", "object_type": "Service"},
|
|
173
|
-
{"index": 315, "name": "service.compensation_fund_deposit", "description": "Deposit to service compensation fund", "object_type": "Service"},
|
|
174
|
-
{"index": 316, "name": "service.compensation_fund_receive", "description": "Receive payments for service compensation fund", "object_type": "Service"},
|
|
175
|
-
{"index": 317, "name": "service.setting_locked_time_add", "description": "Add locked time to service compensation", "object_type": "Service"},
|
|
176
|
-
{"index": 318, "name": "service.reward", "description": "Manage service rewards", "object_type": "Service"},
|
|
177
|
-
{"index": 319, "name": "service.owner_receive", "description": "Receive objects or payments for service", "object_type": "Service"},
|
|
178
|
-
{"index": 320, "name": "service.um", "description": "Manage service UM (User Manager)", "object_type": "Service"},
|
|
179
|
-
{"index": 350, "name": "arbitration.new", "description": "Create new arbitration", "object_type": "Arbitration"},
|
|
180
|
-
{"index": 351, "name": "arbitration.description", "description": "Set arbitration description", "object_type": "Arbitration"},
|
|
181
|
-
{"index": 353, "name": "arbitration.location", "description": "Set arbitration location", "object_type": "Arbitration"},
|
|
182
|
-
{"index": 354, "name": "arbitration.voting_guard", "description": "Manage arbitration voting guards", "object_type": "Arbitration"},
|
|
183
|
-
{"index": 355, "name": "arbitration.usage_guard", "description": "Set arbitration usage guard", "object_type": "Arbitration"},
|
|
184
|
-
{"index": 356, "name": "arbitration.pause", "description": "Pause or resume arbitration", "object_type": "Arbitration"},
|
|
185
|
-
{"index": 357, "name": "arbitration.fee", "description": "Set arbitration fee", "object_type": "Arbitration"},
|
|
186
|
-
{"index": 358, "name": "arbitration.vote", "description": "Vote on arbitration", "object_type": "Arbitration"},
|
|
187
|
-
{"index": 359, "name": "arbitration.arbitration", "description": "Perform arbitration", "object_type": "Arbitration"},
|
|
188
|
-
{"index": 360, "name": "arbitration.feedback", "description": "Provide arbitration feedback", "object_type": "Arbitration"},
|
|
189
|
-
{"index": 361, "name": "arbitration.confirm", "description": "Confirm arbitration", "object_type": "Arbitration"},
|
|
190
|
-
{"index": 362, "name": "arbitration.voting_deadline_change", "description": "Change voting deadline", "object_type": "Arbitration"},
|
|
191
|
-
{"index": 363, "name": "arbitration.reset", "description": "Reset arbitration", "object_type": "Arbitration"},
|
|
192
|
-
{"index": 364, "name": "arbitration.arb_withdraw", "description": "Withdraw arbitration", "object_type": "Arbitration"},
|
|
193
|
-
{"index": 365, "name": "arbitration.fees_alloc", "description": "Allocate arbitration fees", "object_type": "Arbitration"},
|
|
194
|
-
{"index": 366, "name": "arbitration.fees_transfer", "description": "Transfer arbitration fees", "object_type": "Arbitration"},
|
|
195
|
-
{"index": 367, "name": "arbitration.owner_receive", "description": "Receive objects or payments for arbitration", "object_type": "Arbitration"},
|
|
196
|
-
{"index": 368, "name": "arbitration.um", "description": "Manage arbitration UM (User Manager)", "object_type": "Arbitration"},
|
|
197
|
-
{"index": 400, "name": "demand.new", "description": "Create new demand", "object_type": "Demand"},
|
|
198
|
-
{"index": 401, "name": "demand.description", "description": "Set demand description", "object_type": "Demand"},
|
|
199
|
-
{"index": 402, "name": "demand.location", "description": "Set demand location", "object_type": "Demand"},
|
|
200
|
-
{"index": 404, "name": "demand.guard", "description": "Manage demand guards", "object_type": "Demand"},
|
|
201
|
-
{"index": 405, "name": "demand.reward", "description": "Manage demand rewards", "object_type": "Demand"},
|
|
202
|
-
{"index": 406, "name": "demand.feedback", "description": "Provide demand feedback", "object_type": "Demand"},
|
|
203
|
-
{"index": 407, "name": "demand.owner_receive", "description": "Receive objects for demand", "object_type": "Demand"},
|
|
204
|
-
{"index": 408, "name": "demand.um", "description": "Manage demand UM (User Manager)", "object_type": "Demand"},
|
|
205
|
-
{"index": 450, "name": "messenger.new", "description": "Create new messenger", "object_type": "Contact"},
|
|
206
|
-
{"index": 451, "name": "messenger.description", "description": "Set messenger description", "object_type": "Contact"},
|
|
207
|
-
{"index": 452, "name": "messenger.location", "description": "Set messenger location", "object_type": "Contact"},
|
|
208
|
-
{"index": 453, "name": "messenger.im", "description": "Manager im address", "object_type": "Contact"},
|
|
209
|
-
{"index": 454, "name": "messenger.owner_receive", "description": "Receive objects or payments for messenger", "object_type": "Contact"}
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
> **Note**: The result shows 69 built-in permissions across all object types. Indexes below 1000 are reserved for built-in permissions.
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
#### Example 2.2: Filter by Object Type
|
|
219
|
-
|
|
220
|
-
**Prompt**: Filter built-in permissions to only show those applicable to Service objects.
|
|
221
|
-
|
|
222
|
-
```json
|
|
223
|
-
{
|
|
224
|
-
"info": "built-in permissions",
|
|
225
|
-
"filter": {
|
|
226
|
-
"objectType": "Service"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
**Execution Result**:
|
|
232
|
-
```json
|
|
233
|
-
{
|
|
234
|
-
"status": "success",
|
|
235
|
-
"result": [
|
|
236
|
-
{"index": 300, "name": "service.new", "description": "Create new service", "object_type": "Service"},
|
|
237
|
-
{"index": 301, "name": "service.description", "description": "Set service description", "object_type": "Service"},
|
|
238
|
-
{"index": 303, "name": "service.location", "description": "Set service location", "object_type": "Service"},
|
|
239
|
-
{"index": 304, "name": "service.repository", "description": "Manage service repositories", "object_type": "Service"},
|
|
240
|
-
{"index": 305, "name": "service.sales", "description": "Manage service sales", "object_type": "Service"},
|
|
241
|
-
{"index": 306, "name": "service.machine", "description": "Manage service machines", "object_type": "Service"},
|
|
242
|
-
{"index": 307, "name": "service.buy_guard", "description": "Manage service buy guards", "object_type": "Service"},
|
|
243
|
-
{"index": 308, "name": "service.arbitration", "description": "Manage service arbitrations", "object_type": "Service"},
|
|
244
|
-
{"index": 309, "name": "service.customer_info_required", "description": "Manage service customer info requirements", "object_type": "Service"},
|
|
245
|
-
{"index": 310, "name": "service.pause", "description": "Pause or resume service", "object_type": "Service"},
|
|
246
|
-
{"index": 311, "name": "service.publish", "description": "Publish service", "object_type": "Service"},
|
|
247
|
-
{"index": 312, "name": "service.discount", "description": "Manage service discounts", "object_type": "Service"},
|
|
248
|
-
{"index": 313, "name": "service.order_allocator", "description": "Manage service order allocators", "object_type": "Service"},
|
|
249
|
-
{"index": 314, "name": "service.compensation_fund_withdraw", "description": "Withdraw from service compensation fund", "object_type": "Service"},
|
|
250
|
-
{"index": 315, "name": "service.compensation_fund_deposit", "description": "Deposit to service compensation fund", "object_type": "Service"},
|
|
251
|
-
{"index": 316, "name": "service.compensation_fund_receive", "description": "Receive payments for service compensation fund", "object_type": "Service"},
|
|
252
|
-
{"index": 317, "name": "service.setting_locked_time_add", "description": "Add locked time to service compensation", "object_type": "Service"},
|
|
253
|
-
{"index": 318, "name": "service.reward", "description": "Manage service rewards", "object_type": "Service"},
|
|
254
|
-
{"index": 319, "name": "service.owner_receive", "description": "Receive objects or payments for service", "object_type": "Service"},
|
|
255
|
-
{"index": 320, "name": "service.um", "description": "Manage service UM (User Manager)", "object_type": "Service"}
|
|
256
|
-
]
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
> **Note**: Filtering by "Service" returns 21 permissions specific to Service objects.
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
#### Example 2.3: Filter by Name
|
|
265
|
-
|
|
266
|
-
**Prompt**: Search for built-in permissions with "service" in their name.
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"info": "built-in permissions",
|
|
271
|
-
"filter": {
|
|
272
|
-
"name": "service"
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
**Execution Result**:
|
|
278
|
-
```json
|
|
279
|
-
{
|
|
280
|
-
"status": "success",
|
|
281
|
-
"result": [
|
|
282
|
-
{"index": 300, "name": "service.new", "description": "Create new service", "object_type": "Service"},
|
|
283
|
-
{"index": 301, "name": "service.description", "description": "Set service description", "object_type": "Service"},
|
|
284
|
-
{"index": 303, "name": "service.location", "description": "Set service location", "object_type": "Service"},
|
|
285
|
-
{"index": 304, "name": "service.repository", "description": "Manage service repositories", "object_type": "Service"},
|
|
286
|
-
{"index": 305, "name": "service.sales", "description": "Manage service sales", "object_type": "Service"},
|
|
287
|
-
{"index": 306, "name": "service.machine", "description": "Manage service machines", "object_type": "Service"},
|
|
288
|
-
{"index": 307, "name": "service.buy_guard", "description": "Manage service buy guards", "object_type": "Service"},
|
|
289
|
-
{"index": 308, "name": "service.arbitration", "description": "Manage service arbitrations", "object_type": "Service"},
|
|
290
|
-
{"index": 309, "name": "service.customer_info_required", "description": "Manage service customer info requirements", "object_type": "Service"},
|
|
291
|
-
{"index": 310, "name": "service.pause", "description": "Pause or resume service", "object_type": "Service"},
|
|
292
|
-
{"index": 311, "name": "service.publish", "description": "Publish service", "object_type": "Service"},
|
|
293
|
-
{"index": 312, "name": "service.discount", "description": "Manage service discounts", "object_type": "Service"},
|
|
294
|
-
{"index": 313, "name": "service.order_allocator", "description": "Manage service order allocators", "object_type": "Service"},
|
|
295
|
-
{"index": 314, "name": "service.compensation_fund_withdraw", "description": "Withdraw from service compensation fund", "object_type": "Service"},
|
|
296
|
-
{"index": 315, "name": "service.compensation_fund_deposit", "description": "Deposit to service compensation fund", "object_type": "Service"},
|
|
297
|
-
{"index": 316, "name": "service.compensation_fund_receive", "description": "Receive payments for service compensation fund", "object_type": "Service"},
|
|
298
|
-
{"index": 317, "name": "service.setting_locked_time_add", "description": "Add locked time to service compensation", "object_type": "Service"},
|
|
299
|
-
{"index": 318, "name": "service.reward", "description": "Manage service rewards", "object_type": "Service"},
|
|
300
|
-
{"index": 319, "name": "service.owner_receive", "description": "Receive objects or payments for service", "object_type": "Service"},
|
|
301
|
-
{"index": 320, "name": "service.um", "description": "Manage service UM (User Manager)", "object_type": "Service"}
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
> **Note**: Name filtering is case-insensitive and matches partial strings. The filter "service" returns all permissions with "service" in their name.
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Example 3: Query Guard Instructions
|
|
311
|
-
|
|
312
|
-
### Feature Description
|
|
313
|
-
|
|
314
|
-
Get reference information for Guard instructions and object queries, including their IDs, names, parameters, return types, and descriptions.
|
|
315
|
-
|
|
316
|
-
### Examples
|
|
317
|
-
|
|
318
|
-
#### Example 3.1: Get All Guard Instructions
|
|
319
|
-
|
|
320
|
-
**Prompt**: Query all Guard instructions to understand available operations.
|
|
321
|
-
|
|
322
|
-
```json
|
|
323
|
-
{
|
|
324
|
-
"info": "guard instructions"
|
|
325
|
-
}
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
**Execution Result**:
|
|
329
|
-
```json
|
|
330
|
-
{
|
|
331
|
-
"status": "success",
|
|
332
|
-
"result": [
|
|
333
|
-
{"name": "identifier", "id": 40, "description": "Returns the constant value stored at the specified identifier in the Guard table..."},
|
|
334
|
-
{"name": "query_wowok_object", "id": 40, "description": "Returns the result of executing a data query instruction on the specified object..."},
|
|
335
|
-
{"name": "logic_as_u256_greater_or_equal", "id": 92, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
336
|
-
{"name": "logic_as_u256_lesser_or_equal", "id": 94, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
337
|
-
{"name": "logic_as_u256_greater", "id": 91, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
338
|
-
{"name": "logic_as_u256_lesser", "id": 93, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
339
|
-
{"name": "logic_as_u256_equal", "id": 95, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
340
|
-
{"name": "logic_equal", "id": 90, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes of any type..."},
|
|
341
|
-
{"name": "logic_not", "id": 98, "returnType": 0, "description": "Returns Bool. Input: [Bool]..."},
|
|
342
|
-
{"name": "logic_and", "id": 96, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
343
|
-
{"name": "logic_or", "id": 97, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
344
|
-
{"name": "logic_string_contains", "id": 64, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
345
|
-
{"name": "logic_string_nocase_contains", "id": 65, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
346
|
-
{"name": "logic_string_nocase_equal", "id": 66, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
347
|
-
{"name": "calc_number_add", "id": 200, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
348
|
-
{"name": "calc_number_multiply", "id": 202, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
349
|
-
{"name": "calc_number_subtract", "id": 201, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
350
|
-
{"name": "calc_number_divide", "id": 203, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
351
|
-
{"name": "calc_number_mod", "id": 204, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
352
|
-
{"name": "calc_string_length", "id": 61, "returnType": 6, "description": "Returns U64. Input: [String]..."},
|
|
353
|
-
{"name": "calc_string_indexof", "id": 62, "returnType": 6, "description": "Returns U64. Input: [String, String, Order]..."},
|
|
354
|
-
{"name": "calc_string_nocase_indexof", "id": 63, "returnType": 6, "description": "Returns U64. Input: [String, String, Order]..."},
|
|
355
|
-
{"name": "convert_number_address", "id": 205, "returnType": 1, "description": "Returns Address. Input: [numeric]..."},
|
|
356
|
-
{"name": "convert_address_number", "id": 207, "returnType": 8, "description": "Returns U256. Input: [Address]..."},
|
|
357
|
-
{"name": "convert_number_string", "id": 206, "returnType": 2, "description": "Returns String. Input: [numeric]..."},
|
|
358
|
-
{"name": "convert_string_number", "id": 208, "returnType": 8, "description": "Returns U256. Input: [String]..."},
|
|
359
|
-
{"name": "convert_safe_u8", "id": 220, "returnType": 3, "description": "Returns U8. Input: [numeric]..."},
|
|
360
|
-
{"name": "convert_safe_u16", "id": 221, "returnType": 4, "description": "Returns U16. Input: [numeric]..."},
|
|
361
|
-
{"name": "convert_safe_u32", "id": 222, "returnType": 5, "description": "Returns U32. Input: [numeric]..."},
|
|
362
|
-
{"name": "convert_safe_u64", "id": 223, "returnType": 6, "description": "Returns U64. Input: [numeric]..."},
|
|
363
|
-
{"name": "convert_safe_u128", "id": 224, "returnType": 7, "description": "Returns U128. Input: [numeric]..."},
|
|
364
|
-
{"name": "convert_safe_u256", "id": 225, "returnType": 8, "description": "Returns U256. Input: [numeric]..."},
|
|
365
|
-
{"name": "value_type", "id": 70, "returnType": 3, "description": "Returns U8. Input: [any type]..."},
|
|
366
|
-
{"name": "vec_length", "id": 71, "returnType": 6, "description": "Returns U64. Input: [Vec type]..."},
|
|
367
|
-
{"name": "vec_contains_bool", "id": 72, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
368
|
-
{"name": "vec_contains_address", "id": 73, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
369
|
-
{"name": "vec_contains_string", "id": 74, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
370
|
-
{"name": "vec_contains_string_nocase", "id": 75, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
371
|
-
{"name": "vec_contains_number", "id": 76, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
372
|
-
{"name": "context_signer", "id": 45, "returnType": 1, "description": "Returns transaction sender address (Address)."},
|
|
373
|
-
{"name": "context_clock", "id": 46, "returnType": 6, "description": "Returns current on-chain timestamp (U64)."},
|
|
374
|
-
{"name": "context_guard", "id": 47, "returnType": 1, "description": "Returns current Guard object ID (Address)."},
|
|
375
|
-
{"id": 1001, "name": "permission.description", "objectType": "Permission", "parameters": [], "return": 2, "description": "Description of the permission"},
|
|
376
|
-
{"id": 1002, "name": "permission.owner", "objectType": "Permission", "parameters": [], "return": 1, "description": "Builder ID who has the ownership of the permission"},
|
|
377
|
-
{"id": 1003, "name": "permission.admin count", "objectType": "Permission", "parameters": [], "return": 6, "description": "Number of users with admin permission"},
|
|
378
|
-
{"id": 1004, "name": "permission.admin has", "objectType": "Permission", "parameters": [1], "return": 0, "description": "Whether the user has admin permission"},
|
|
379
|
-
{"id": 1150, "name": "repository.description", "objectType": "Repository", "parameters": [], "return": 2, "description": "Description of the repository"},
|
|
380
|
-
{"id": 1151, "name": "repository.policy count", "objectType": "Repository", "parameters": [], "return": 6, "description": "Number of policies in the repository"},
|
|
381
|
-
{"id": 1200, "name": "machine.description", "objectType": "Machine", "parameters": [], "return": 2, "description": "Description of the machine"},
|
|
382
|
-
{"id": 1201, "name": "machine.node_count", "objectType": "Machine", "parameters": [], "return": 6, "description": "Number of nodes in the machine"}
|
|
383
|
-
]
|
|
384
|
-
}
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
> **Note**: The full result contains 100+ instructions including basic logic operations, calculations, conversions, vector operations, context queries, and object-specific queries.
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
#### Example 3.2: Filter by Name
|
|
392
|
-
|
|
393
|
-
**Prompt**: Search for Guard instructions with "equal" in their name (case-insensitive).
|
|
394
|
-
|
|
395
|
-
```json
|
|
396
|
-
{
|
|
397
|
-
"info": "guard instructions",
|
|
398
|
-
"filter": {
|
|
399
|
-
"name": "equal"
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
**Execution Result**:
|
|
405
|
-
```json
|
|
406
|
-
{
|
|
407
|
-
"status": "success",
|
|
408
|
-
"result": [
|
|
409
|
-
{"name": "logic_as_u256_greater_or_equal", "id": 92, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
410
|
-
{"name": "logic_as_u256_lesser_or_equal", "id": 94, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
411
|
-
{"name": "logic_as_u256_equal", "id": 95, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
412
|
-
{"name": "logic_equal", "id": 90, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes of any type..."},
|
|
413
|
-
{"name": "logic_string_nocase_equal", "id": 66, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."}
|
|
414
|
-
]
|
|
415
|
-
}
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
> **Note**: Name filtering found 5 instructions containing "equal" in their name.
|
|
419
|
-
|
|
420
|
-
---
|
|
421
|
-
|
|
422
|
-
#### Example 3.3: Filter by Return Type
|
|
423
|
-
|
|
424
|
-
**Prompt**: Find all Guard instructions that return Bool type (returnType = 0).
|
|
425
|
-
|
|
426
|
-
```json
|
|
427
|
-
{
|
|
428
|
-
"info": "guard instructions",
|
|
429
|
-
"filter": {
|
|
430
|
-
"returnType": 0
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**Execution Result**:
|
|
436
|
-
```json
|
|
437
|
-
{
|
|
438
|
-
"status": "success",
|
|
439
|
-
"result": [
|
|
440
|
-
{"name": "logic_as_u256_greater_or_equal", "id": 92, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
441
|
-
{"name": "logic_as_u256_lesser_or_equal", "id": 94, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
442
|
-
{"name": "logic_as_u256_greater", "id": 91, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
443
|
-
{"name": "logic_as_u256_lesser", "id": 93, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
444
|
-
{"name": "logic_as_u256_equal", "id": 95, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
445
|
-
{"name": "logic_equal", "id": 90, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes of any type..."},
|
|
446
|
-
{"name": "logic_not", "id": 98, "returnType": 0, "description": "Returns Bool. Input: [Bool]..."},
|
|
447
|
-
{"name": "logic_and", "id": 96, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
448
|
-
{"name": "logic_or", "id": 97, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
449
|
-
{"name": "logic_string_contains", "id": 64, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
450
|
-
{"name": "logic_string_nocase_contains", "id": 65, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
451
|
-
{"name": "logic_string_nocase_equal", "id": 66, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
452
|
-
{"name": "vec_contains_bool", "id": 72, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
453
|
-
{"name": "vec_contains_address", "id": 73, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
454
|
-
{"name": "vec_contains_string", "id": 74, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
455
|
-
{"name": "vec_contains_string_nocase", "id": 75, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
456
|
-
{"name": "vec_contains_number", "id": 76, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."}
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
> **Note**: returnType uses numeric values (0 = Bool, 1 = Address, 2 = String, 3-8 = numeric types, 9+ = vector types). Use "value types" query to see all mappings.
|
|
462
|
-
|
|
463
|
-
---
|
|
464
|
-
|
|
465
|
-
#### Example 3.4: Filter by Parameter Count
|
|
466
|
-
|
|
467
|
-
**Prompt**: Find Guard instructions that take exactly 2 parameters.
|
|
468
|
-
|
|
469
|
-
```json
|
|
470
|
-
{
|
|
471
|
-
"info": "guard instructions",
|
|
472
|
-
"filter": {
|
|
473
|
-
"paramCount": 2
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
**Execution Result**:
|
|
479
|
-
```json
|
|
480
|
-
{
|
|
481
|
-
"status": "success",
|
|
482
|
-
"result": [
|
|
483
|
-
{"name": "logic_as_u256_greater_or_equal", "id": 92, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
484
|
-
{"name": "logic_as_u256_lesser_or_equal", "id": 94, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
485
|
-
{"name": "logic_as_u256_greater", "id": 91, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
486
|
-
{"name": "logic_as_u256_lesser", "id": 93, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
487
|
-
{"name": "logic_as_u256_equal", "id": 95, "returnType": 0, "description": "Returns Bool. Requires 2-8 numeric nodes..."},
|
|
488
|
-
{"name": "logic_equal", "id": 90, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes of any type..."},
|
|
489
|
-
{"name": "logic_and", "id": 96, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
490
|
-
{"name": "logic_or", "id": 97, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
491
|
-
{"name": "logic_string_contains", "id": 64, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
492
|
-
{"name": "logic_string_nocase_contains", "id": 65, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
493
|
-
{"name": "logic_string_nocase_equal", "id": 66, "returnType": 0, "description": "Returns Bool. Requires 2-8 string nodes..."},
|
|
494
|
-
{"name": "calc_number_add", "id": 200, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
495
|
-
{"name": "calc_number_multiply", "id": 202, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
496
|
-
{"name": "calc_number_subtract", "id": 201, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
497
|
-
{"name": "calc_number_divide", "id": 203, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
498
|
-
{"name": "calc_number_mod", "id": 204, "returnType": 8, "description": "Returns U256. Requires 2-8 numeric nodes..."},
|
|
499
|
-
{"name": "vec_contains_bool", "id": 72, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
500
|
-
{"name": "vec_contains_address", "id": 73, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
501
|
-
{"name": "vec_contains_string", "id": 74, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
502
|
-
{"name": "vec_contains_string_nocase", "id": 75, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."},
|
|
503
|
-
{"name": "vec_contains_number", "id": 76, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes..."}
|
|
504
|
-
]
|
|
505
|
-
}
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
> **Note**: Found 21 instructions that accept 2 or more parameters (most instructions support 2-8 parameters).
|
|
509
|
-
|
|
510
|
-
---
|
|
511
|
-
|
|
512
|
-
#### Example 3.5: Filter by Scope
|
|
513
|
-
|
|
514
|
-
**Prompt**: Show only object query instructions (not basic instructions).
|
|
515
|
-
|
|
516
|
-
```json
|
|
517
|
-
{
|
|
518
|
-
"info": "guard instructions",
|
|
519
|
-
"filter": {
|
|
520
|
-
"scope": "object query"
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
**Execution Result**:
|
|
526
|
-
```json
|
|
527
|
-
{
|
|
528
|
-
"status": "success",
|
|
529
|
-
"result": [
|
|
530
|
-
{"id": 1001, "name": "permission.description", "objectType": "Permission", "parameters": [], "return": 2, "description": "Description of the permission"},
|
|
531
|
-
{"id": 1002, "name": "permission.owner", "objectType": "Permission", "parameters": [], "return": 1, "description": "Builder ID who has the ownership of the permission"},
|
|
532
|
-
{"id": 1003, "name": "permission.admin count", "objectType": "Permission", "parameters": [], "return": 6, "description": "Number of users with admin permission"},
|
|
533
|
-
{"id": 1004, "name": "permission.admin has", "objectType": "Permission", "parameters": [1], "return": 0, "description": "Whether the user has admin permission"},
|
|
534
|
-
{"id": 1050, "name": "allocation.description", "objectType": "Allocation", "parameters": [], "return": 2, "description": "Description of the allocation"},
|
|
535
|
-
{"id": 1051, "name": "allocation.balance", "objectType": "Allocation", "parameters": [], "return": 6, "description": "Funding amount of the allocation"},
|
|
536
|
-
{"id": 1100, "name": "payment.amount", "objectType": "Payment", "parameters": [], "return": 6, "description": "Amount of the payment"},
|
|
537
|
-
{"id": 1150, "name": "repository.description", "objectType": "Repository", "parameters": [], "return": 2, "description": "Description of the repository"},
|
|
538
|
-
{"id": 1151, "name": "repository.policy count", "objectType": "Repository", "parameters": [], "return": 6, "description": "Number of policies in the repository"},
|
|
539
|
-
{"id": 1200, "name": "machine.description", "objectType": "Machine", "parameters": [], "return": 6, "description": "Description of the machine"}
|
|
540
|
-
]
|
|
541
|
-
}
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
> **Note**: Object query instructions allow querying on-chain object state. IDs 1000+ are reserved for object queries.
|
|
545
|
-
|
|
546
|
-
---
|
|
547
|
-
|
|
548
|
-
#### Example 3.6: Multiple Filters Combined
|
|
549
|
-
|
|
550
|
-
**Prompt**: Find instructions with "logic" in name, returning Bool, with 2 parameters.
|
|
551
|
-
|
|
552
|
-
```json
|
|
553
|
-
{
|
|
554
|
-
"info": "guard instructions",
|
|
555
|
-
"filter": {
|
|
556
|
-
"name": "logic",
|
|
557
|
-
"returnType": 0,
|
|
558
|
-
"paramCount": 2,
|
|
559
|
-
"scope": "all"
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
**Execution Result**:
|
|
565
|
-
```json
|
|
566
|
-
{
|
|
567
|
-
"status": "success",
|
|
568
|
-
"result": [
|
|
569
|
-
{"name": "logic_equal", "id": 90, "returnType": 0, "description": "Returns Bool. Requires 2-8 nodes of any type..."},
|
|
570
|
-
{"name": "logic_and", "id": 96, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."},
|
|
571
|
-
{"name": "logic_or", "id": 97, "returnType": 0, "description": "Returns Bool. Requires 2-8 boolean nodes..."}
|
|
572
|
-
]
|
|
573
|
-
}
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
> **Note**: Multiple filters are combined with AND logic. This query finds 3 logic instructions that return Bool and accept 2+ parameters.
|
|
577
|
-
|
|
578
|
-
---
|
|
579
|
-
|
|
580
|
-
#### Example 3.7: Filter by Object Type
|
|
581
|
-
|
|
582
|
-
**Prompt**: Show only object query instructions that operate on Permission objects.
|
|
583
|
-
|
|
584
|
-
```json
|
|
585
|
-
{
|
|
586
|
-
"info": "guard instructions",
|
|
587
|
-
"filter": {
|
|
588
|
-
"scope": "object query",
|
|
589
|
-
"objectType": "Permission"
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
```
|
|
593
|
-
|
|
594
|
-
**Execution Result**:
|
|
595
|
-
```json
|
|
596
|
-
{
|
|
597
|
-
"status": "success",
|
|
598
|
-
"result": [
|
|
599
|
-
{"id": 1001, "name": "permission.description", "objectType": "Permission", "parameters": [], "return": 2, "description": "Description of the permission"},
|
|
600
|
-
{"id": 1002, "name": "permission.owner", "objectType": "Permission", "parameters": [], "return": 1, "description": "Builder ID who has the ownership of the permission"},
|
|
601
|
-
{"id": 1003, "name": "permission.admin count", "objectType": "Permission", "parameters": [], "return": 6, "description": "Number of users with admin permission"},
|
|
602
|
-
{"id": 1004, "name": "permission.admin has", "objectType": "Permission", "parameters": [1], "return": 0, "description": "Whether the user has admin permission"},
|
|
603
|
-
{"id": 1005, "name": "permission.entity count", "objectType": "Permission", "parameters": [], "return": 6, "description": "Number of users or guard objects with entity permission"},
|
|
604
|
-
{"id": 1006, "name": "permission.entity has", "objectType": "Permission", "parameters": [1], "return": 0, "description": "Whether the user or guard object has entity permission"},
|
|
605
|
-
{"id": 1007, "name": "permission.entity.perm count", "objectType": "Permission", "parameters": [1], "return": 6, "description": "Number of permissions the user or guard object has"},
|
|
606
|
-
{"id": 1008, "name": "permission.entity.perm has", "objectType": "Permission", "parameters": [1, 4], "return": 0, "description": "Whether the user or guard object has the specified permission"},
|
|
607
|
-
{"id": 1009, "name": "permission.perm.remark count", "objectType": "Permission", "parameters": [], "return": 6, "description": "Number of permission remarks"},
|
|
608
|
-
{"id": 1010, "name": "permission.perm.remark has", "objectType": "Permission", "parameters": [4], "return": 0, "description": "Whether the permission has a remark"},
|
|
609
|
-
{"id": 1011, "name": "permission.perm.remark", "objectType": "Permission", "parameters": [4], "return": 2, "description": "Remark of the permission"},
|
|
610
|
-
{"id": 1012, "name": "permission.um some", "objectType": "Permission", "parameters": [], "return": 0, "description": "Whether the permission has set a Contact object"},
|
|
611
|
-
{"id": 1013, "name": "permission.um", "objectType": "Permission", "parameters": [], "return": 1, "description": "Contact object ID of the permission"}
|
|
612
|
-
]
|
|
613
|
-
}
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
> **Note**: Found 13 object query instructions for Permission objects. These allow querying permission state on-chain.
|
|
617
|
-
|
|
618
|
-
---
|
|
619
|
-
|
|
620
|
-
## Example 4: Query Current Network
|
|
621
|
-
|
|
622
|
-
### Feature Description
|
|
623
|
-
|
|
624
|
-
Get the current network entrypoint to verify which blockchain environment you're connected to.
|
|
625
|
-
|
|
626
|
-
### Examples
|
|
627
|
-
|
|
628
|
-
#### Example 4.1: Get Current Network
|
|
629
|
-
|
|
630
|
-
**Prompt**: Check which network is currently active (localnet or testnet).
|
|
631
|
-
|
|
632
|
-
```json
|
|
633
|
-
{
|
|
634
|
-
"info": "current network"
|
|
635
|
-
}
|
|
636
|
-
```
|
|
637
|
-
|
|
638
|
-
**Execution Result**:
|
|
639
|
-
```json
|
|
640
|
-
{
|
|
641
|
-
"status": "success",
|
|
642
|
-
"result": "testnet"
|
|
643
|
-
}
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
> **Note**: Current network is "testnet". Other possible values are "localnet" for local development.
|
|
647
|
-
|
|
648
|
-
---
|
|
649
|
-
|
|
650
|
-
## Example 5: Query Value Types
|
|
651
|
-
|
|
652
|
-
### Feature Description
|
|
653
|
-
|
|
654
|
-
Get mappings of supported value types, showing both their numeric IDs and string representations.
|
|
655
|
-
|
|
656
|
-
### Examples
|
|
657
|
-
|
|
658
|
-
#### Example 5.1: Get All Value Types
|
|
659
|
-
|
|
660
|
-
**Prompt**: Query all supported value types to understand type system mappings.
|
|
661
|
-
|
|
662
|
-
```json
|
|
663
|
-
{
|
|
664
|
-
"info": "value types"
|
|
665
|
-
}
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
**Execution Result**:
|
|
669
|
-
```json
|
|
670
|
-
{
|
|
671
|
-
"status": "success",
|
|
672
|
-
"result": [
|
|
673
|
-
{"name": "Bool", "value": "Bool", "description": "Value type Bool = 0"},
|
|
674
|
-
{"name": "Address", "value": "Address", "description": "Value type Address = 1"},
|
|
675
|
-
{"name": "String", "value": "String", "description": "Value type String = 2"},
|
|
676
|
-
{"name": "U8", "value": "U8", "description": "Value type U8 = 3"},
|
|
677
|
-
{"name": "U16", "value": "U16", "description": "Value type U16 = 4"},
|
|
678
|
-
{"name": "U32", "value": "U32", "description": "Value type U32 = 5"},
|
|
679
|
-
{"name": "U64", "value": "U64", "description": "Value type U64 = 6"},
|
|
680
|
-
{"name": "U128", "value": "U128", "description": "Value type U128 = 7"},
|
|
681
|
-
{"name": "U256", "value": "U256", "description": "Value type U256 = 8"},
|
|
682
|
-
{"name": "VecBool", "value": "VecBool", "description": "Value type VecBool = 9"},
|
|
683
|
-
{"name": "VecAddress", "value": "VecAddress", "description": "Value type VecAddress = 10"},
|
|
684
|
-
{"name": "VecString", "value": "VecString", "description": "Value type VecString = 11"},
|
|
685
|
-
{"name": "VecU8", "value": "VecU8", "description": "Value type VecU8 = 12"},
|
|
686
|
-
{"name": "VecU16", "value": "VecU16", "description": "Value type VecU16 = 13"},
|
|
687
|
-
{"name": "VecU32", "value": "VecU32", "description": "Value type VecU32 = 14"},
|
|
688
|
-
{"name": "VecU64", "value": "VecU64", "description": "Value type VecU64 = 15"},
|
|
689
|
-
{"name": "VecU128", "value": "VecU128", "description": "Value type VecU128 = 16"},
|
|
690
|
-
{"name": "VecU256", "value": "VecU256", "description": "Value type VecU256 = 17"},
|
|
691
|
-
{"name": "VecVecU8", "value": "VecVecU8", "description": "Value type VecVecU8 = 18"}
|
|
692
|
-
]
|
|
693
|
-
}
|
|
694
|
-
```
|
|
695
|
-
|
|
696
|
-
> **Note**: Value types 0-8 are scalar types, 9-18 are vector types. These numeric IDs are used in Guard instruction returnType fields.
|
|
697
|
-
|
|
698
|
-
---
|
|
699
|
-
|
|
700
|
-
## Important Notes
|
|
701
|
-
|
|
702
|
-
⚠️ **Constants are protocol-wide** - these values are fixed and consistent across the entire WoWok ecosystem.
|
|
703
|
-
|
|
704
|
-
⚠️ **Built-in permissions have fixed indexes** - indexes below 1000 are reserved for built-in permissions. Custom permissions start from index 1000.
|
|
705
|
-
|
|
706
|
-
⚠️ **Guard instructions are comprehensive** - use name filtering to find specific operations quickly. Instructions are categorized into:
|
|
707
|
-
- Basic instructions (IDs 40-99): Logic, calculation, conversion, vector operations
|
|
708
|
-
- Context instructions (IDs 45-47): Signer, clock, guard context
|
|
709
|
-
- Object query instructions (IDs 1000+): Query on-chain object state
|
|
710
|
-
|
|
711
|
-
⚠️ **Value type mappings** - Use numeric IDs in Guard instruction filters:
|
|
712
|
-
| ID | Type | ID | Type |
|
|
713
|
-
|----|------|----|------|
|
|
714
|
-
| 0 | Bool | 9 | VecBool |
|
|
715
|
-
| 1 | Address | 10 | VecAddress |
|
|
716
|
-
| 2 | String | 11 | VecString |
|
|
717
|
-
| 3 | U8 | 12 | VecU8 |
|
|
718
|
-
| 4 | U16 | 13 | VecU16 |
|
|
719
|
-
| 5 | U32 | 14 | VecU32 |
|
|
720
|
-
| 6 | U64 | 15 | VecU64 |
|
|
721
|
-
| 7 | U128 | 16 | VecU128 |
|
|
722
|
-
| 8 | U256 | 17 | VecU256 |
|
|
723
|
-
| | | 18 | VecVecU8 |
|
|
724
|
-
|
|
725
|
-
⚠️ **Current network indicates environment** - localnet for development, testnet for testing.
|
|
726
|
-
|
|
727
|
-
⚠️ **Filter behavior**:
|
|
728
|
-
- Name filtering is case-insensitive and matches partial strings
|
|
729
|
-
- Multiple filters are combined with AND logic
|
|
730
|
-
- Empty result means no matching instructions found
|
|
731
|
-
|
|
732
|
-
---
|
|
733
|
-
|
|
734
|
-
## Related Components
|
|
735
|
-
|
|
736
|
-
| Component | Description |
|
|
737
|
-
|-----------|-------------|
|
|
738
|
-
| **[Guard](guard.md)** | Trust verification engine - uses guard instructions |
|
|
739
|
-
| **[Permission](permission.md)** | Permission management - uses built-in permissions |
|
|
740
|
-
| **All components** | Every object uses the value type system |
|