@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
package/docs/docs/payment.md
DELETED
|
@@ -1,512 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Payment Component (💰 Direct Transfer)
|
|
3
|
-
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Component Overview
|
|
7
|
-
|
|
8
|
-
The Payment component is used to send instant, irreversible token transfers to any wallet address. Payment is an immutable object that can only be created, not modified.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Function List
|
|
13
|
-
|
|
14
|
-
| Function Name | Purpose | Usage Scenario | Significance |
|
|
15
|
-
|---------------|---------|----------------|-------------|
|
|
16
|
-
| **Create Single Recipient Payment** | Send tokens to one recipient | Personal payments, simple transfers | Direct, secure one-to-one token transfers |
|
|
17
|
-
| **Create Multi-Recipient Payment** | Send tokens to multiple recipients in one transaction | Team bonuses, payroll, bulk transfers | Efficiently distribute tokens to multiple addresses simultaneously |
|
|
18
|
-
| **Named Payment** | Create a named Payment object for tracking | Recorded transactions, audit trails | Creates identifiable payment objects on-chain |
|
|
19
|
-
| **Payment with Info** | Add payment metadata (remark, index, for_object, for_guard) | Service payments, order payments, Guard-verified payments | Provides context and verification for payments |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Complete Tool Call Structure
|
|
24
|
-
|
|
25
|
-
Payment operations use the following top-level structure:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"operation_type": "payment",
|
|
30
|
-
"data": { ... }, // Payment data definition
|
|
31
|
-
"env": { ... } // Execution environment (optional)
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Schema Tree
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
payment (Payment Object)
|
|
41
|
-
├── operation_type: "payment" (fixed value)
|
|
42
|
-
├── data (Payment data definition)
|
|
43
|
-
│ ├── object (object definition, required)
|
|
44
|
-
│ │ ├── name|tags|type_parameter (create new object)
|
|
45
|
-
│ │ └── type_parameter (token type, e.g., 0x2::wow::WOW)
|
|
46
|
-
│ ├── revenue (recipient and amount array, required)
|
|
47
|
-
│ │ └── [] (each item has recipient + amount)
|
|
48
|
-
│ └── info (payment information, required)
|
|
49
|
-
│ ├── remark (payment remark)
|
|
50
|
-
│ ├── index (payment index)
|
|
51
|
-
│ ├── for_object (optional, related object)
|
|
52
|
-
│ └── for_guard (optional, Guard verification)
|
|
53
|
-
└── env (optional, execution environment)
|
|
54
|
-
├── account (string, optional) - account name or address, empty string for default
|
|
55
|
-
├── network (string, optional) - "testnet" or "localnet"
|
|
56
|
-
├── permission_guard (array, optional) - list of permission guard IDs
|
|
57
|
-
├── no_cache (boolean, optional) - disable caching
|
|
58
|
-
└── referrer (string, optional) - referrer ID
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Sub-feature 1: Create Single Recipient Payment
|
|
64
|
-
|
|
65
|
-
### Feature Description
|
|
66
|
-
|
|
67
|
-
Create a Payment object to send tokens to a single recipient. Payment is an immutable object and cannot be modified after creation.
|
|
68
|
-
|
|
69
|
-
### Parameter Description
|
|
70
|
-
|
|
71
|
-
| Parameter Path | Type | Required | Description | Constraints |
|
|
72
|
-
|----------|------|------|------|------|
|
|
73
|
-
| `operation_type` | string | Yes | Operation type | Fixed value "payment" |
|
|
74
|
-
| `data.object` | object | Yes | Object configuration | Must include type_parameter |
|
|
75
|
-
| `data.object.type_parameter` | string | Yes | Token type | e.g., "0x2::wow::WOW" |
|
|
76
|
-
| `data.object.name` | string | No | Payment name | Max 64 bcs characters |
|
|
77
|
-
| `data.revenue` | array | Yes | Recipient and amount array | At least one recipient, max 200 |
|
|
78
|
-
| `data.revenue[].recipient` | object | Yes | Recipient | AccountOrMark_Address with name_or_address |
|
|
79
|
-
| `data.revenue[].amount` | object | Yes | Amount | CoinParam with balance field |
|
|
80
|
-
| `data.revenue[].amount.balance` | string/number | Yes | Amount value | Minimum unit, no decimals or negatives |
|
|
81
|
-
| `data.info` | object | Yes | Payment information | Must include remark and index |
|
|
82
|
-
| `data.info.remark` | string | Yes | Payment remark | Description of the payment |
|
|
83
|
-
| `data.info.index` | number/string | Yes | Payment index | Numeric identifier for this payment |
|
|
84
|
-
|
|
85
|
-
### Important Notes
|
|
86
|
-
|
|
87
|
-
⚠️ **Payment is an immutable object!** Can only be created, not modified.
|
|
88
|
-
|
|
89
|
-
⚠️ **Transfer is irreversible!** Please confirm recipient address is correct.
|
|
90
|
-
|
|
91
|
-
⚠️ **Ensure sufficient balance!**
|
|
92
|
-
|
|
93
|
-
⚠️ **Maximum 200 recipients per payment!**
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
### Examples
|
|
98
|
-
|
|
99
|
-
#### Example 1.1: Minimal Single Recipient Payment
|
|
100
|
-
|
|
101
|
-
**Prompt**: Create a Payment to send 5000000000 minimum unit WOW tokens to "alice", add remark "Thanks for the help!", set index 1.
|
|
102
|
-
|
|
103
|
-
```json
|
|
104
|
-
{
|
|
105
|
-
"operation_type": "payment",
|
|
106
|
-
"data": {
|
|
107
|
-
"object": {
|
|
108
|
-
"type_parameter": "0x2::wow::WOW"
|
|
109
|
-
},
|
|
110
|
-
"revenue": [
|
|
111
|
-
{
|
|
112
|
-
"recipient": { "name_or_address": "alice" },
|
|
113
|
-
"amount": { "balance": "5000000000" }
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
"info": {
|
|
117
|
-
"remark": "Thanks for the help!",
|
|
118
|
-
"index": 1
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
**Execution Result**:
|
|
124
|
-
```json
|
|
125
|
-
{
|
|
126
|
-
"status": "success",
|
|
127
|
-
"object": "0xc8e8...1bb4",
|
|
128
|
-
"type": "Payment",
|
|
129
|
-
"version": "30128",
|
|
130
|
-
"change": "created",
|
|
131
|
-
"objects": [
|
|
132
|
-
{
|
|
133
|
-
"type": "WReceivedObject",
|
|
134
|
-
"object": "0x1a88...9649",
|
|
135
|
-
"change": "created"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "Payment",
|
|
139
|
-
"object": "0xc8e8...1bb4",
|
|
140
|
-
"change": "created"
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
#### Example 1.2: Named Single Recipient Payment
|
|
149
|
-
|
|
150
|
-
**Prompt**: Create a Payment named "payment_to_alice" to send to "alice", add tags "personal", "payment", use WOW token, remark "Birthday gift", index 2.
|
|
151
|
-
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"operation_type": "payment",
|
|
155
|
-
"data": {
|
|
156
|
-
"object": {
|
|
157
|
-
"name": "payment_to_alice",
|
|
158
|
-
"tags": ["personal", "payment"],
|
|
159
|
-
"type_parameter": "0x2::wow::WOW"
|
|
160
|
-
},
|
|
161
|
-
"revenue": [
|
|
162
|
-
{
|
|
163
|
-
"recipient": { "name_or_address": "alice" },
|
|
164
|
-
"amount": { "balance": "10000000000" }
|
|
165
|
-
}
|
|
166
|
-
],
|
|
167
|
-
"info": {
|
|
168
|
-
"remark": "Birthday gift",
|
|
169
|
-
"index": 2
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
**Execution Result**:
|
|
175
|
-
```json
|
|
176
|
-
{
|
|
177
|
-
"status": "success",
|
|
178
|
-
"object": "0x...",
|
|
179
|
-
"type": "Payment",
|
|
180
|
-
"version": "...",
|
|
181
|
-
"change": "created"
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Sub-feature 2: Create Multi-Recipient Payment
|
|
188
|
-
|
|
189
|
-
### Feature Description
|
|
190
|
-
|
|
191
|
-
Create a Payment object to send tokens to multiple recipients in a single transaction. This is efficient for bulk transfers.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
### Examples
|
|
196
|
-
|
|
197
|
-
#### Example 2.1: Two Recipients Payment
|
|
198
|
-
|
|
199
|
-
**Prompt**: Create a Payment to send to "alice" and "bob" simultaneously: "alice" gets 3000000000, "bob" gets 2000000000, add remark "Team bonus", index 10.
|
|
200
|
-
|
|
201
|
-
```json
|
|
202
|
-
{
|
|
203
|
-
"operation_type": "payment",
|
|
204
|
-
"data": {
|
|
205
|
-
"object": {
|
|
206
|
-
"type_parameter": "0x2::wow::WOW"
|
|
207
|
-
},
|
|
208
|
-
"revenue": [
|
|
209
|
-
{
|
|
210
|
-
"recipient": { "name_or_address": "alice" },
|
|
211
|
-
"amount": { "balance": "3000000000" }
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"recipient": { "name_or_address": "bob" },
|
|
215
|
-
"amount": { "balance": "2000000000" }
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
"info": {
|
|
219
|
-
"remark": "Team bonus",
|
|
220
|
-
"index": 10
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
**Execution Result**:
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"status": "success"
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
#### Example 2.2: Named Multi-Recipient Payment
|
|
235
|
-
|
|
236
|
-
**Prompt**: Create a Payment named "q1_bonus_payment" with tags "payroll", "q1-2025", send to three team members: "charlie" gets 5000000000, "dave" gets 4000000000, "eve" gets 3500000000, remark "Q1 2025 performance bonus", index 15.
|
|
237
|
-
|
|
238
|
-
```json
|
|
239
|
-
{
|
|
240
|
-
"operation_type": "payment",
|
|
241
|
-
"data": {
|
|
242
|
-
"object": {
|
|
243
|
-
"name": "q1_bonus_payment",
|
|
244
|
-
"tags": ["payroll", "q1-2025"],
|
|
245
|
-
"type_parameter": "0x2::wow::WOW"
|
|
246
|
-
},
|
|
247
|
-
"revenue": [
|
|
248
|
-
{
|
|
249
|
-
"recipient": { "name_or_address": "charlie" },
|
|
250
|
-
"amount": { "balance": "5000000000" }
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"recipient": { "name_or_address": "dave" },
|
|
254
|
-
"amount": { "balance": "4000000000" }
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"recipient": { "name_or_address": "eve" },
|
|
258
|
-
"amount": { "balance": "3500000000" }
|
|
259
|
-
}
|
|
260
|
-
],
|
|
261
|
-
"info": {
|
|
262
|
-
"remark": "Q1 2025 performance bonus",
|
|
263
|
-
"index": 15
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
**Execution Result**:
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"status": "success"
|
|
272
|
-
}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
## Sub-feature 3: Payment with Additional Info
|
|
278
|
-
|
|
279
|
-
### Feature Description
|
|
280
|
-
|
|
281
|
-
Create a Payment with additional metadata, such as linking to a specific object or Guard for verification purposes.
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
### Examples
|
|
286
|
-
|
|
287
|
-
#### Example 3.1: Payment Linked to Object
|
|
288
|
-
|
|
289
|
-
**Prompt**: Create a Payment linked to "my_service_order", send 8000000000 to "service_provider", remark "Service order payment", index 100, set for_object to "my_service_order".
|
|
290
|
-
|
|
291
|
-
```json
|
|
292
|
-
{
|
|
293
|
-
"operation_type": "payment",
|
|
294
|
-
"data": {
|
|
295
|
-
"object": {
|
|
296
|
-
"type_parameter": "0x2::wow::WOW"
|
|
297
|
-
},
|
|
298
|
-
"revenue": [
|
|
299
|
-
{
|
|
300
|
-
"recipient": { "name_or_address": "service_provider" },
|
|
301
|
-
"amount": { "balance": "8000000000" }
|
|
302
|
-
}
|
|
303
|
-
],
|
|
304
|
-
"info": {
|
|
305
|
-
"remark": "Service order payment",
|
|
306
|
-
"index": 100,
|
|
307
|
-
"for_object": "my_service_order"
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
**Execution Result**:
|
|
313
|
-
```json
|
|
314
|
-
{
|
|
315
|
-
"status": "success"
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
**Note**: The `for_object` parameter accepts any WoWok protocol object (such as Permission, Repository, Service, Demand, Order, etc.). The referenced object must be a WoWok object type (type must start with the WoWok package address).
|
|
320
|
-
|
|
321
|
-
**To use this feature**:
|
|
322
|
-
1. Create a WoWok object (e.g., Permission, Repository, Service, Demand) first
|
|
323
|
-
2. Use that object's ID/name as `for_object`
|
|
324
|
-
3. The Payment will be linked to that object for tracking purposes
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
#### Example 3.2: Payment with Guard Verification
|
|
329
|
-
|
|
330
|
-
**Prompt**: Create a Payment that requires Guard verification: send 25000000000 to "merchant", remark "Purchase payment", index 200, set for_guard to "purchase_guard".
|
|
331
|
-
|
|
332
|
-
```json
|
|
333
|
-
{
|
|
334
|
-
"operation_type": "payment",
|
|
335
|
-
"data": {
|
|
336
|
-
"object": {
|
|
337
|
-
"name": "purchase_payment",
|
|
338
|
-
"type_parameter": "0x2::wow::WOW"
|
|
339
|
-
},
|
|
340
|
-
"revenue": [
|
|
341
|
-
{
|
|
342
|
-
"recipient": { "name_or_address": "merchant" },
|
|
343
|
-
"amount": { "balance": "25000000000" }
|
|
344
|
-
}
|
|
345
|
-
],
|
|
346
|
-
"info": {
|
|
347
|
-
"remark": "Purchase payment",
|
|
348
|
-
"index": 200,
|
|
349
|
-
"for_guard": "purchase_guard"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
**Execution Result**:
|
|
355
|
-
```json
|
|
356
|
-
{
|
|
357
|
-
"status": "success"
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
#### Example 3.3: Full Payment with Object and Guard
|
|
364
|
-
|
|
365
|
-
**Prompt**: Create a complete Payment with all fields: named "order_500_payment", tags "service", "order-500", send 15000000000 to "vendor_alice", link to "service_order_500", use "service_guard" for verification, remark "Payment for service order #500", index 500, use WOW token.
|
|
366
|
-
|
|
367
|
-
```json
|
|
368
|
-
{
|
|
369
|
-
"operation_type": "payment",
|
|
370
|
-
"data": {
|
|
371
|
-
"object": {
|
|
372
|
-
"name": "order_500_payment",
|
|
373
|
-
"tags": ["service", "order-500"],
|
|
374
|
-
"type_parameter": "0x2::wow::WOW"
|
|
375
|
-
},
|
|
376
|
-
"revenue": [
|
|
377
|
-
{
|
|
378
|
-
"recipient": { "name_or_address": "vendor_alice" },
|
|
379
|
-
"amount": { "balance": "15000000000" }
|
|
380
|
-
}
|
|
381
|
-
],
|
|
382
|
-
"info": {
|
|
383
|
-
"remark": "Payment for service order #500",
|
|
384
|
-
"index": 500,
|
|
385
|
-
"for_object": "service_order_500",
|
|
386
|
-
"for_guard": "service_guard"
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
**Execution Result**:
|
|
392
|
-
```json
|
|
393
|
-
{
|
|
394
|
-
"status": "success"
|
|
395
|
-
}
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
|
-
## Sub-feature 4: Payment with Environment Configuration
|
|
401
|
-
|
|
402
|
-
### Feature Description
|
|
403
|
-
|
|
404
|
-
Create a Payment with custom environment settings, such as specifying network or account.
|
|
405
|
-
|
|
406
|
-
---
|
|
407
|
-
|
|
408
|
-
### Examples
|
|
409
|
-
|
|
410
|
-
#### Example 4.1: Payment on Testnet
|
|
411
|
-
|
|
412
|
-
**Prompt**: On testnet network, create a Payment to send to "test_recipient", 1000000000 WOW, remark "Test payment", index 1, use default account.
|
|
413
|
-
|
|
414
|
-
```json
|
|
415
|
-
{
|
|
416
|
-
"operation_type": "payment",
|
|
417
|
-
"data": {
|
|
418
|
-
"object": {
|
|
419
|
-
"type_parameter": "0x2::wow::WOW"
|
|
420
|
-
},
|
|
421
|
-
"revenue": [
|
|
422
|
-
{
|
|
423
|
-
"recipient": { "name_or_address": "test_recipient" },
|
|
424
|
-
"amount": { "balance": "1000000000" }
|
|
425
|
-
}
|
|
426
|
-
],
|
|
427
|
-
"info": {
|
|
428
|
-
"remark": "Test payment",
|
|
429
|
-
"index": 1
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
"env": {
|
|
433
|
-
"network": "testnet"
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
**Execution Result**:
|
|
438
|
-
```json
|
|
439
|
-
{
|
|
440
|
-
"status": "success"
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
---
|
|
445
|
-
|
|
446
|
-
#### Example 4.2: Payment with Specific Account
|
|
447
|
-
|
|
448
|
-
**Prompt**: Use account "payment_manager" to create a Payment to send 6000000000 to "recipient_bob", remark "Project milestone payment", index 88.
|
|
449
|
-
|
|
450
|
-
```json
|
|
451
|
-
{
|
|
452
|
-
"operation_type": "payment",
|
|
453
|
-
"data": {
|
|
454
|
-
"object": {
|
|
455
|
-
"type_parameter": "0x2::wow::WOW"
|
|
456
|
-
},
|
|
457
|
-
"revenue": [
|
|
458
|
-
{
|
|
459
|
-
"recipient": { "name_or_address": "recipient_bob" },
|
|
460
|
-
"amount": { "balance": "6000000000" }
|
|
461
|
-
}
|
|
462
|
-
],
|
|
463
|
-
"info": {
|
|
464
|
-
"remark": "Project milestone payment",
|
|
465
|
-
"index": 88
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
"env": {
|
|
469
|
-
"account": "payment_manager"
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
**Execution Result**:
|
|
474
|
-
```json
|
|
475
|
-
{
|
|
476
|
-
"status": "success"
|
|
477
|
-
}
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
---
|
|
481
|
-
|
|
482
|
-
## Important Notes
|
|
483
|
-
|
|
484
|
-
⚠️ **Payment is an immutable object!** Can only be created, not modified.
|
|
485
|
-
|
|
486
|
-
⚠️ **Transfer is irreversible!** Please confirm recipient address is correct.
|
|
487
|
-
|
|
488
|
-
⚠️ **Ensure sufficient balance!**
|
|
489
|
-
|
|
490
|
-
⚠️ **Maximum 200 recipients per payment!**
|
|
491
|
-
|
|
492
|
-
⚠️ **type_parameter is required!** Specify token type inside object.
|
|
493
|
-
|
|
494
|
-
⚠️ **All amount values must be positive integers!** No decimals or negative values.
|
|
495
|
-
|
|
496
|
-
⚠️ **info.remark and info.index are required!** Must provide both for every payment.
|
|
497
|
-
|
|
498
|
-
⚠️ **Use names instead of addresses in prompts for better readability.**
|
|
499
|
-
|
|
500
|
-
---
|
|
501
|
-
|
|
502
|
-
## Related Components
|
|
503
|
-
|
|
504
|
-
| Component | Description |
|
|
505
|
-
|-----------|-------------|
|
|
506
|
-
| **[Treasury](treasury.md)** | Team fund management |
|
|
507
|
-
| **[Reward](reward.md)** | Marketing incentives |
|
|
508
|
-
| **[Allocation](allocation.md)** | Automatic fund distribution |
|
|
509
|
-
| **[Service](service.md)** | WYSIWYG product trading |
|
|
510
|
-
| **[Order](order.md)** | Order management |
|
|
511
|
-
| **[Guard](guard.md)** | Trust verification engine |
|
|
512
|
-
|