@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/order.md
DELETED
|
@@ -1,1001 +0,0 @@
|
|
|
1
|
-
# Order Component (📦 Order Management)
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Component Overview
|
|
6
|
-
|
|
7
|
-
The Order Component manages the complete lifecycle of an order. **Orders are usually created automatically by the [Service](service.md) component** when customers make purchases. Once created, orders can be operated directly to manage agents, required information, workflow progress, arbitration, fund receipt, and ownership transfer.
|
|
8
|
-
|
|
9
|
-
**Key Relationship with Service:**
|
|
10
|
-
- Orders are created through Service's `order_new` operation
|
|
11
|
-
- Each Order is linked to a Service and inherits its configuration (Machine, Arbitration, etc.)
|
|
12
|
-
- Order operations often require understanding the parent Service's setup
|
|
13
|
-
|
|
14
|
-
See [Service Component](service.md) for:
|
|
15
|
-
- Creating Services with products
|
|
16
|
-
- Configuring Machines for order workflows
|
|
17
|
-
- Setting up Arbitration for dispute resolution
|
|
18
|
-
- Creating orders via `order_new` operation
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Function List
|
|
23
|
-
|
|
24
|
-
| Name | Purpose | Usage Scenario | Significance |
|
|
25
|
-
|------|---------|----------------|--------------|
|
|
26
|
-
| **Set Order Agents** | Assign agents to an order who can operate it but not receive funds | Delegating order management to team members without sharing financial access | Provides secure delegation of operational rights while keeping financial control with the owner |
|
|
27
|
-
| **Set Required Info** | Attach Contact object for private communication with service provider | Sending sensitive information (delivery address, phone, etc.) via encrypted Messenger to service staff | Enables secure end-to-end encrypted transmission of private information without exposing it on-chain |
|
|
28
|
-
| **Advance Progress** | Move order workflow from current node to next node | Processing order through defined stages (e.g., from "pending" to "in_progress") | Enforces structured workflow and tracks order progression through stages |
|
|
29
|
-
| **Submit Arbitration** | Request arbitration for order disputes | When buyer and seller cannot resolve a dispute amicably | Provides formal dispute resolution mechanism with defined rules and compensation |
|
|
30
|
-
| **Object to Arbitration** | Appeal arbitration decision | When disagreeing with arbitration outcome | Allows challenging arbitration results with new evidence or arguments |
|
|
31
|
-
| **Claim Compensation** | Receive awarded compensation from arbitration | After arbitration ruling in your favor | Transfers awarded funds from resolved arbitration to order owner |
|
|
32
|
-
| **Receive Funds** | Unwrap and transfer order funds to owner | Collecting payments, refunds, or other assets sent to the order | Extracts and transfers received funds and objects to order owner |
|
|
33
|
-
| **Transfer Ownership** | Change order owner to another address | Selling or transferring order rights to another party | Transfers full ownership and control of the order to new address |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Schema Tree
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
order (Order Object)
|
|
41
|
-
├── operation_type: "order" (fixed value)
|
|
42
|
-
├── data (Order operation data)
|
|
43
|
-
│ ├── object (NameOrAddress, required) - Order object ID or name
|
|
44
|
-
│ ├── agents (ManyAccountOrMark_Address, optional) - Order agents
|
|
45
|
-
│ │ └── entities (AccountOrMark_Address[]) - Array of agent references
|
|
46
|
-
│ │ └── Each item: string (name/address) or { name_or_address, local_mark_first }
|
|
47
|
-
│ ├── required_info (NameOrAddress | null, optional) - Contact object ID for secure messaging with service staff
|
|
48
|
-
│ ├── progress (OperateSchema, optional) - Advance order workflow
|
|
49
|
-
│ │ ├── operation (ProgressNext, required)
|
|
50
|
-
│ │ │ ├── next_node_name (string, required) - Target node name
|
|
51
|
-
│ │ │ └── forward (string, required) - Forward transition name
|
|
52
|
-
│ │ ├── hold (boolean, optional) - Lock operation permission
|
|
53
|
-
│ │ ├── adminUnhold (boolean, optional) - Allow admin unlock
|
|
54
|
-
│ │ └── message (string, optional) - Operation result message
|
|
55
|
-
│ ├── arb_confirm (ArbConfirmSchema, optional) - Submit arbitration request
|
|
56
|
-
│ │ ├── arb (NameOrAddress, required) - Arb object ID or name
|
|
57
|
-
│ │ ├── confirm (boolean, required) - Confirm materials valid
|
|
58
|
-
│ │ ├── description (string, optional) - Compensation description (max 4000 bcs characters)
|
|
59
|
-
│ │ └── proposition (string[], optional) - Compensation claims array
|
|
60
|
-
│ ├── arb_objection (ArbObjectionSchema, optional) - Appeal arbitration result
|
|
61
|
-
│ │ ├── arb (NameOrAddress, required) - Arb object ID or name
|
|
62
|
-
│ │ └── objection (string, required) - Objection description (max 4000 chars)
|
|
63
|
-
│ ├── arb_claim_compensation (ArbClaimCompensationSchema, optional) - Claim compensation
|
|
64
|
-
│ │ └── arb (NameOrAddress, required) - Adjudicated Arb object ID or name
|
|
65
|
-
│ ├── receive (QueryReceivedResult, optional) - Receive funds/objects
|
|
66
|
-
│ │ └── result: one of two options
|
|
67
|
-
│ │ ├── Option 1: ReceivedBalance - Token balance to receive
|
|
68
|
-
│ │ │ ├── balance (number|string)
|
|
69
|
-
│ │ │ ├── token_type (string)
|
|
70
|
-
│ │ │ └── received (array of { id, balance, payment })
|
|
71
|
-
│ │ └── Option 2: ReceivedObject[] - Specific objects to receive
|
|
72
|
-
│ │ └── [{ id: string, type: string, content_raw?: any }]
|
|
73
|
-
│ └── transfer_to (AccountOrMark_Address, optional) - New owner
|
|
74
|
-
│ └── string (name/address) or { name_or_address, local_mark_first }
|
|
75
|
-
├── env (optional, execution environment)
|
|
76
|
-
│ ├── account (string, optional) - account name/address, "" for default
|
|
77
|
-
│ ├── network (string, optional) - "localnet" or "testnet"
|
|
78
|
-
│ ├── permission_guard (string[], optional) - list of permission guard IDs
|
|
79
|
-
│ ├── no_cache (boolean, optional) - disable caching
|
|
80
|
-
│ └── referrer (string, optional) - referrer ID
|
|
81
|
-
└── submission (optional, submission data)
|
|
82
|
-
├── type: "submission" (fixed)
|
|
83
|
-
├── guard (array) - guards to verify
|
|
84
|
-
│ └── [{ object: "guard_id", impack: boolean }]
|
|
85
|
-
└── submission (array) - guard submissions
|
|
86
|
-
└── [{ guard: "guard_id", submission: [items] }]
|
|
87
|
-
└── guard_submission_items
|
|
88
|
-
├── identifier (number, 0-255)
|
|
89
|
-
├── b_submission (boolean)
|
|
90
|
-
├── value_type (number|string)
|
|
91
|
-
├── value (any)
|
|
92
|
-
└── name (string, optional)
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
### ⚠️ Important Note About Submission
|
|
98
|
-
|
|
99
|
-
If the execution returns a `submission` field in the response, it indicates that additional Guard verification data is required. You must:
|
|
100
|
-
|
|
101
|
-
1. Complete all required submission data within the `submission` structure
|
|
102
|
-
2. Resubmit the operation with the completed submission data
|
|
103
|
-
3. **Do not modify any other parts of the structure** - only fill in the required submission values
|
|
104
|
-
|
|
105
|
-
The submission structure will specify which Guard objects need verification and what data needs to be provided for each Guard table item.
|
|
106
|
-
|
|
107
|
-
**Query Value Types**: Use the `wowok_buildin_info` tool with `{ "info": "value types" }` to query all supported value types with their numeric and string representations. This helps you understand what `value_type` values are valid for submission data.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Complete Tool Call Structure
|
|
112
|
-
|
|
113
|
-
Order operations use the following top-level structure:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"operation_type": "order",
|
|
118
|
-
"data": { ... },
|
|
119
|
-
"env": { ... },
|
|
120
|
-
"submission": { ... }
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Function 1: Set Order Agents (agents)
|
|
127
|
-
|
|
128
|
-
### Description
|
|
129
|
-
|
|
130
|
-
Set order agents. Agents can operate the order (such as canceling, modifying status, etc.) but cannot receive funds received by the order.
|
|
131
|
-
|
|
132
|
-
### Parameters
|
|
133
|
-
|
|
134
|
-
| Path | Type | Required | Description |
|
|
135
|
-
|------|------|----------|-------------|
|
|
136
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
137
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
138
|
-
| `data.agents` | array | No | Array of agent names/addresses. Set to empty array [] to clear all agents |
|
|
139
|
-
| `env` | object | No | Execution environment |
|
|
140
|
-
|
|
141
|
-
### Important Notes
|
|
142
|
-
|
|
143
|
-
⚠️ **Agents can operate orders but cannot receive funds!** Ensure the agent's permission scope matches expectations.
|
|
144
|
-
|
|
145
|
-
### Return Value
|
|
146
|
-
|
|
147
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
### Examples
|
|
152
|
-
|
|
153
|
-
#### Example 1.1: Set Single Agent
|
|
154
|
-
|
|
155
|
-
**Prompt**: Set agent "order_manager" for order "customer_order_123".
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{
|
|
159
|
-
"operation_type": "order",
|
|
160
|
-
"data": {
|
|
161
|
-
"object": "customer_order_123",
|
|
162
|
-
"agents": ["order_manager"]
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
#### Example 1.2: Set Multiple Agents
|
|
170
|
-
|
|
171
|
-
**Prompt**: Set three agents for order "service_order_456": "agent_alice", "agent_bob", and "agent_charlie".
|
|
172
|
-
|
|
173
|
-
```json
|
|
174
|
-
{
|
|
175
|
-
"operation_type": "order",
|
|
176
|
-
"data": {
|
|
177
|
-
"object": "service_order_456",
|
|
178
|
-
"agents": ["agent_alice", "agent_bob", "agent_charlie"]
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
#### Example 1.3: Clear All Agents
|
|
186
|
-
|
|
187
|
-
**Prompt**: Clear all agents from order "old_order_789".
|
|
188
|
-
|
|
189
|
-
```json
|
|
190
|
-
{
|
|
191
|
-
"operation_type": "order",
|
|
192
|
-
"data": {
|
|
193
|
-
"object": "old_order_789",
|
|
194
|
-
"agents": []
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Function 2: Set Required Information (required_info)
|
|
202
|
-
|
|
203
|
-
### Description
|
|
204
|
-
|
|
205
|
-
Set the Contact object for secure communication with service staff. When a service requires personal information (shipping address, phone number, email, etc.), customers use this field to specify their Contact object, which enables encrypted messaging with the service provider through [Messenger](messenger.md).
|
|
206
|
-
|
|
207
|
-
**How it works:**
|
|
208
|
-
1. Customer creates a Contact object (see [Contact](contact.md))
|
|
209
|
-
2. Customer attaches their Contact to the order via `required_info`
|
|
210
|
-
3. Customer uses [Messenger](messenger.md) to send private information directly to the service staff
|
|
211
|
-
4. All communication is **end-to-end encrypted** - information is never exposed on-chain and remains private between the parties
|
|
212
|
-
|
|
213
|
-
### Parameters
|
|
214
|
-
|
|
215
|
-
| Path | Type | Required | Description |
|
|
216
|
-
|------|------|----------|-------------|
|
|
217
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
218
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
219
|
-
| `data.required_info` | string/null | No | Contact object ID for secure messaging, or null to clear |
|
|
220
|
-
| `env` | object | No | Execution environment |
|
|
221
|
-
|
|
222
|
-
### Important Notes
|
|
223
|
-
|
|
224
|
-
⚠️ **Privacy & Security:**
|
|
225
|
-
- All sensitive information is transmitted through **end-to-end encrypted** [Messenger](messenger.md) channels
|
|
226
|
-
- Information is **never stored on-chain** - only the Contact object reference is recorded
|
|
227
|
-
- Customers retain full control over their private information
|
|
228
|
-
- Service staff can only access the information through secure Messenger conversations
|
|
229
|
-
- **Verifiable Communication**: Messenger supports [WTS (Witness Timestamped Snapshot)](messenger.md#example-7-generate-wts) generation, which creates cryptographically verifiable records of conversations that can prove the authenticity and integrity of chat content
|
|
230
|
-
|
|
231
|
-
⚠️ **Arbitration Evidence:**
|
|
232
|
-
- In case of disputes, WTS files from Messenger conversations can serve as **legal evidence** in [Arbitration](arbitration.md)
|
|
233
|
-
- WTS provides cryptographic proof that messages were sent/received at specific times and have not been tampered with
|
|
234
|
-
- Both parties can sign WTS files to create non-repudiable records (see [Sign WTS](messenger.md#example-9-sign-wts))
|
|
235
|
-
- This ensures fair dispute resolution based on verifiable communication history
|
|
236
|
-
|
|
237
|
-
⚠️ **Prerequisites:**
|
|
238
|
-
- Service must have configured a Contact object (see [Service Configuration](service.md#sub-feature-7-configure-contact-um))
|
|
239
|
-
- Customer must have created their own Contact object (see [Contact](contact.md))
|
|
240
|
-
- Both parties must have enabled Messenger functionality
|
|
241
|
-
|
|
242
|
-
### Return Value
|
|
243
|
-
|
|
244
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
### Examples
|
|
249
|
-
|
|
250
|
-
#### Example 2.1: Set Contact for Secure Communication
|
|
251
|
-
|
|
252
|
-
**Prompt**: Set Contact object "customer_contact" for order "delivery_order_001" to enable encrypted messaging with service staff for sharing shipping address.
|
|
253
|
-
|
|
254
|
-
```json
|
|
255
|
-
{
|
|
256
|
-
"operation_type": "order",
|
|
257
|
-
"data": {
|
|
258
|
-
"object": "delivery_order_001",
|
|
259
|
-
"required_info": "customer_contact"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
**Next Steps:**
|
|
265
|
-
After setting the Contact, use [Messenger](messenger.md) to send your private information:
|
|
266
|
-
1. Identify the service's Contact object from the Service configuration
|
|
267
|
-
2. Send an encrypted message containing your shipping details, phone number, etc.
|
|
268
|
-
3. The service staff will receive your information securely
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
#### Example 2.2: Send Private Information via Messenger
|
|
273
|
-
|
|
274
|
-
**Scenario**: After attaching your Contact to the order, send your shipping address to the service staff securely.
|
|
275
|
-
|
|
276
|
-
**Step 1**: Query the Service to find its Contact object
|
|
277
|
-
**Step 2**: Use Messenger to send encrypted message:
|
|
278
|
-
|
|
279
|
-
```json
|
|
280
|
-
{
|
|
281
|
-
"operation": "send_message",
|
|
282
|
-
"from": "customer_account",
|
|
283
|
-
"to": "service_contact_object",
|
|
284
|
-
"content": "Order: order_123\nShipping Address: 123 Main St, City, Country\nPhone: +1234567890\nEmail: customer@example.com"
|
|
285
|
-
}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
⚠️ **Security Note**: This message is end-to-end encrypted and only readable by you and the service staff. It is never stored on the blockchain.
|
|
289
|
-
|
|
290
|
-
**WTS for Arbitration:**
|
|
291
|
-
If a dispute arises, you can generate a WTS (Witness Timestamped Snapshot) of this conversation:
|
|
292
|
-
1. Use [Generate WTS](messenger.md#example-7-generate-wts) to create a verifiable record of the chat history
|
|
293
|
-
2. [Sign WTS](messenger.md#example-9-sign-wts) to add your cryptographic signature
|
|
294
|
-
3. Submit the WTS as evidence in [Arbitration](arbitration.md) to prove what was agreed upon
|
|
295
|
-
|
|
296
|
-
This ensures that all communication about order details (shipping address, delivery requirements, etc.) can be cryptographically verified during dispute resolution.
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
#### Example 2.3: Clear Required Information
|
|
301
|
-
|
|
302
|
-
**Prompt**: Remove required info from order "completed_order_003".
|
|
303
|
-
|
|
304
|
-
```json
|
|
305
|
-
{
|
|
306
|
-
"operation_type": "order",
|
|
307
|
-
"data": {
|
|
308
|
-
"object": "completed_order_003",
|
|
309
|
-
"required_info": null
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Function 3: Advance Order Progress (progress)
|
|
317
|
-
|
|
318
|
-
### Description
|
|
319
|
-
|
|
320
|
-
Advance the order's Progress workflow, moving from current node to next node.
|
|
321
|
-
|
|
322
|
-
### Parameters
|
|
323
|
-
|
|
324
|
-
| Path | Type | Required | Description |
|
|
325
|
-
|------|------|----------|-------------|
|
|
326
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
327
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
328
|
-
| `data.progress.operation` | object | Yes | Operation definition |
|
|
329
|
-
| `data.progress.operation.next_node_name` | string | Yes | Next node name (defined in Machine) |
|
|
330
|
-
| `data.progress.operation.forward` | string | Yes | Forward direction (defined in Machine) |
|
|
331
|
-
| `data.progress.hold` | boolean | No | Whether to lock (true=lock, false=submit). Defaults to false if omitted |
|
|
332
|
-
| `data.progress.adminUnhold` | boolean | No | Allow admin unlock (when hold=true) |
|
|
333
|
-
| `data.progress.message` | string | No | Operation result message |
|
|
334
|
-
| `env` | object | No | Execution environment |
|
|
335
|
-
|
|
336
|
-
### Important Notes
|
|
337
|
-
|
|
338
|
-
⚠️ **hold field determines operation type!**
|
|
339
|
-
- **`hold: true`**: Lock operation permissions to prevent race conditions
|
|
340
|
-
- **`hold: false`**: Submit operation result and advance to next node
|
|
341
|
-
|
|
342
|
-
⚠️ **next_node_name and forward must be valid values defined in Machine!** Ensure node and transition names are correct.
|
|
343
|
-
|
|
344
|
-
### Return Value
|
|
345
|
-
|
|
346
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
### Examples
|
|
351
|
-
|
|
352
|
-
#### Example 3.1: Submit Operation Result
|
|
353
|
-
|
|
354
|
-
**Prompt**: Advance order "workflow_order_101" Progress to next node "in_review" via "submit_review" path, without locking.
|
|
355
|
-
|
|
356
|
-
```json
|
|
357
|
-
{
|
|
358
|
-
"operation_type": "order",
|
|
359
|
-
"data": {
|
|
360
|
-
"object": "workflow_order_101",
|
|
361
|
-
"progress": {
|
|
362
|
-
"operation": {
|
|
363
|
-
"next_node_name": "in_review",
|
|
364
|
-
"forward": "submit_review"
|
|
365
|
-
},
|
|
366
|
-
"hold": false,
|
|
367
|
-
"message": "Order submitted for review successfully"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
375
|
-
#### Example 3.2: Lock Operation Permissions
|
|
376
|
-
|
|
377
|
-
**Prompt**: Lock Progress operation for order "critical_order_102" to prevent race conditions, allow admin unlock.
|
|
378
|
-
|
|
379
|
-
```json
|
|
380
|
-
{
|
|
381
|
-
"operation_type": "order",
|
|
382
|
-
"data": {
|
|
383
|
-
"object": "critical_order_102",
|
|
384
|
-
"progress": {
|
|
385
|
-
"operation": {
|
|
386
|
-
"next_node_name": "processing",
|
|
387
|
-
"forward": "start_process"
|
|
388
|
-
},
|
|
389
|
-
"hold": true,
|
|
390
|
-
"adminUnhold": true,
|
|
391
|
-
"message": "Locking for exclusive processing"
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
---
|
|
398
|
-
|
|
399
|
-
#### Example 3.3: Minimal Progress Advance
|
|
400
|
-
|
|
401
|
-
**Prompt**: Advance order "simple_order_103" Progress with minimal required parameters.
|
|
402
|
-
|
|
403
|
-
```json
|
|
404
|
-
{
|
|
405
|
-
"operation_type": "order",
|
|
406
|
-
"data": {
|
|
407
|
-
"object": "simple_order_103",
|
|
408
|
-
"progress": {
|
|
409
|
-
"operation": {
|
|
410
|
-
"next_node_name": "completed",
|
|
411
|
-
"forward": "finish"
|
|
412
|
-
},
|
|
413
|
-
"hold": false
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
---
|
|
420
|
-
|
|
421
|
-
## Function 4: Submit Arbitration Request (arb_confirm)
|
|
422
|
-
|
|
423
|
-
### Description
|
|
424
|
-
|
|
425
|
-
Submit arbitration request, apply for arbitration compensation. Confirm that submitted arbitration materials are valid.
|
|
426
|
-
|
|
427
|
-
### Parameters
|
|
428
|
-
|
|
429
|
-
| Path | Type | Required | Description |
|
|
430
|
-
|------|------|----------|-------------|
|
|
431
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
432
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
433
|
-
| `data.arb_confirm.arb` | string | Yes | Arb object ID or name |
|
|
434
|
-
| `data.arb_confirm.confirm` | boolean | Yes | Confirm arbitration materials are valid |
|
|
435
|
-
| `data.arb_confirm.description` | string | No | Compensation application description (max 4000 chars) |
|
|
436
|
-
| `data.arb_confirm.proposition` | array | No | Compensation claims array |
|
|
437
|
-
| `env` | object | No | Execution environment |
|
|
438
|
-
|
|
439
|
-
### Important Notes
|
|
440
|
-
|
|
441
|
-
⚠️ **Arbitration materials must be prepared in Arb object first!** Ensure Arb object is properly configured.
|
|
442
|
-
|
|
443
|
-
⚠️ **confirm must be set to true to proceed with arbitration!**
|
|
444
|
-
|
|
445
|
-
### Return Value
|
|
446
|
-
|
|
447
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
448
|
-
|
|
449
|
-
---
|
|
450
|
-
|
|
451
|
-
### Examples
|
|
452
|
-
|
|
453
|
-
#### Example 4.1: Submit Arbitration Request
|
|
454
|
-
|
|
455
|
-
**Prompt**: Submit arbitration request for order "dispute_order_201", use Arb object "order_dispute_arb", confirm materials valid, add description and propositions.
|
|
456
|
-
|
|
457
|
-
```json
|
|
458
|
-
{
|
|
459
|
-
"operation_type": "order",
|
|
460
|
-
"data": {
|
|
461
|
-
"object": "dispute_order_201",
|
|
462
|
-
"arb_confirm": {
|
|
463
|
-
"arb": "order_dispute_arb",
|
|
464
|
-
"confirm": true,
|
|
465
|
-
"description": "Requesting arbitration compensation as product was not delivered on time",
|
|
466
|
-
"proposition": ["Full payment refund", "Late delivery penalty compensation"]
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
|
|
474
|
-
#### Example 4.2: Minimal Arbitration Request
|
|
475
|
-
|
|
476
|
-
**Prompt**: Submit minimal arbitration request for order "simple_dispute_202", only confirm arbitration materials.
|
|
477
|
-
|
|
478
|
-
```json
|
|
479
|
-
{
|
|
480
|
-
"operation_type": "order",
|
|
481
|
-
"data": {
|
|
482
|
-
"object": "simple_dispute_202",
|
|
483
|
-
"arb_confirm": {
|
|
484
|
-
"arb": "simple_arb",
|
|
485
|
-
"confirm": true
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
---
|
|
492
|
-
|
|
493
|
-
## Function 5: Object to Arbitration Result (arb_objection)
|
|
494
|
-
|
|
495
|
-
### Description
|
|
496
|
-
|
|
497
|
-
Oppose arbitration result, file an appeal, request re-arbitration.
|
|
498
|
-
|
|
499
|
-
### Parameters
|
|
500
|
-
|
|
501
|
-
| Path | Type | Required | Description |
|
|
502
|
-
|------|------|----------|-------------|
|
|
503
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
504
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
505
|
-
| `data.arb_objection.arb` | string | Yes | Arb object ID or name |
|
|
506
|
-
| `data.arb_objection.objection` | string | Yes | Objection description (max 4000 bcs characters) |
|
|
507
|
-
| `env` | object | No | Execution environment |
|
|
508
|
-
|
|
509
|
-
### Important Notes
|
|
510
|
-
|
|
511
|
-
⚠️ **Objection must be filed within validity period after arbitration result is published!** Ensure you operate within the time limit.
|
|
512
|
-
|
|
513
|
-
### Return Value
|
|
514
|
-
|
|
515
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
516
|
-
|
|
517
|
-
---
|
|
518
|
-
|
|
519
|
-
### Examples
|
|
520
|
-
|
|
521
|
-
#### Example 5.1: File Arbitration Objection
|
|
522
|
-
|
|
523
|
-
**Prompt**: File objection to arbitration result for order "appeal_order_301", explain opposition reasons with new evidence.
|
|
524
|
-
|
|
525
|
-
```json
|
|
526
|
-
{
|
|
527
|
-
"operation_type": "order",
|
|
528
|
-
"data": {
|
|
529
|
-
"object": "appeal_order_301",
|
|
530
|
-
"arb_objection": {
|
|
531
|
-
"arb": "dispute_arb_result",
|
|
532
|
-
"objection": "Arbitration result is unfair. I have new evidence proving the product has quality issues. Requesting re-arbitration."
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
---
|
|
539
|
-
|
|
540
|
-
## Function 6: Claim Arbitration Compensation (arb_claim_compensation)
|
|
541
|
-
|
|
542
|
-
### Description
|
|
543
|
-
|
|
544
|
-
Specify adjudicated Arb object to obtain order compensation. This is the **final step** in the arbitration workflow where the order owner receives the awarded compensation.
|
|
545
|
-
|
|
546
|
-
👉 **For complete arbitration workflow, see [Arbitration - Complete Workflow](arbitration.md#complete-arbitration-workflow-example)**
|
|
547
|
-
|
|
548
|
-
**Quick Overview:**
|
|
549
|
-
1. Service provider adds compensation fund
|
|
550
|
-
2. Buyer creates dispute via Arbitration
|
|
551
|
-
3. Arbitration process completes with ruling
|
|
552
|
-
4. **Buyer claims compensation via this operation** ← You are here
|
|
553
|
-
|
|
554
|
-
### Parameters
|
|
555
|
-
|
|
556
|
-
| Path | Type | Required | Description |
|
|
557
|
-
|------|------|----------|-------------|
|
|
558
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
559
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
560
|
-
| `data.arb_claim_compensation.arb` | string | Yes | Adjudicated Arb object ID or name |
|
|
561
|
-
| `env` | object | No | Execution environment |
|
|
562
|
-
|
|
563
|
-
### Important Notes
|
|
564
|
-
|
|
565
|
-
⚠️ **Arb object must already be adjudicated!** Only adjudicated Arb objects can claim compensation.
|
|
566
|
-
|
|
567
|
-
### Return Value
|
|
568
|
-
|
|
569
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
570
|
-
|
|
571
|
-
---
|
|
572
|
-
|
|
573
|
-
### Examples
|
|
574
|
-
|
|
575
|
-
#### Example 6.1: Claim Arbitration Compensation
|
|
576
|
-
|
|
577
|
-
**Prompt**: Claim arbitration compensation for order "compensation_order_401" using adjudicated Arb object "awarded_arb".
|
|
578
|
-
|
|
579
|
-
```json
|
|
580
|
-
{
|
|
581
|
-
"operation_type": "order",
|
|
582
|
-
"data": {
|
|
583
|
-
"object": "compensation_order_401",
|
|
584
|
-
"arb_claim_compensation": {
|
|
585
|
-
"arb": "awarded_arb"
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
---
|
|
592
|
-
|
|
593
|
-
## Function 7: Receive Funds (receive)
|
|
594
|
-
|
|
595
|
-
### Description
|
|
596
|
-
|
|
597
|
-
Unwrap CoinWrapper objects and other objects received by the order, transfer them to the order owner.
|
|
598
|
-
|
|
599
|
-
### Parameters
|
|
600
|
-
|
|
601
|
-
| Path | Type | Required | Description |
|
|
602
|
-
|------|------|----------|-------------|
|
|
603
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
604
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
605
|
-
| `data.receive` | object | No | Received objects or balance object (`{ result: ReceivedBalance | ReceivedObject[] }`) |
|
|
606
|
-
| `env` | object | No | Execution environment |
|
|
607
|
-
|
|
608
|
-
### Important Notes
|
|
609
|
-
|
|
610
|
-
⚠️ **Funds will be transferred to the order owner!** Ensure you are the order owner.
|
|
611
|
-
|
|
612
|
-
### Return Value
|
|
613
|
-
|
|
614
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
615
|
-
|
|
616
|
-
---
|
|
617
|
-
|
|
618
|
-
### Examples
|
|
619
|
-
|
|
620
|
-
#### Example 7.1: Receive Token Balance
|
|
621
|
-
|
|
622
|
-
**Prompt**: Receive token balance for order "payment_order_501".
|
|
623
|
-
|
|
624
|
-
```json
|
|
625
|
-
{
|
|
626
|
-
"operation_type": "order",
|
|
627
|
-
"data": {
|
|
628
|
-
"object": "payment_order_501",
|
|
629
|
-
"receive": {
|
|
630
|
-
"balance": "10000000000",
|
|
631
|
-
"token_type": "CoinWrapper<0x2::wow::WOW>",
|
|
632
|
-
"received": [
|
|
633
|
-
{
|
|
634
|
-
"id": "coin_wrapper_1",
|
|
635
|
-
"balance": "10000000000",
|
|
636
|
-
"payment": "payment_obj_1"
|
|
637
|
-
}
|
|
638
|
-
]
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
#### Example 7.2: Receive Specific Objects
|
|
647
|
-
|
|
648
|
-
**Prompt**: Receive specified object list for order "asset_order_502".
|
|
649
|
-
|
|
650
|
-
```json
|
|
651
|
-
{
|
|
652
|
-
"operation_type": "order",
|
|
653
|
-
"data": {
|
|
654
|
-
"object": "asset_order_502",
|
|
655
|
-
"receive": [
|
|
656
|
-
{
|
|
657
|
-
"id": "nft_object_1",
|
|
658
|
-
"type": "0x2::nft::NFT"
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
"id": "document_object_1",
|
|
662
|
-
"type": "0x2::doc::Document"
|
|
663
|
-
}
|
|
664
|
-
]
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
---
|
|
670
|
-
|
|
671
|
-
## Function 8: Transfer Ownership (transfer_to)
|
|
672
|
-
|
|
673
|
-
### Description
|
|
674
|
-
|
|
675
|
-
Set new owner of the order. Requires order owner permission to set.
|
|
676
|
-
|
|
677
|
-
### Parameters
|
|
678
|
-
|
|
679
|
-
| Path | Type | Required | Description |
|
|
680
|
-
|------|------|----------|-------------|
|
|
681
|
-
| `operation_type` | string | Yes | Fixed value "order" |
|
|
682
|
-
| `data.object` | string | Yes | Order object ID or name |
|
|
683
|
-
| `data.transfer_to` | string/object | No | New owner name/address, or object with { name_or_address, local_mark_first } |
|
|
684
|
-
| `env` | object | No | Execution environment |
|
|
685
|
-
|
|
686
|
-
### Important Notes
|
|
687
|
-
|
|
688
|
-
⚠️ **Requires order owner permission!** Only current owner can transfer ownership.
|
|
689
|
-
|
|
690
|
-
⚠️ **After ownership transfer, new owner will have all order permissions!** Confirm target address is correct.
|
|
691
|
-
|
|
692
|
-
### Return Value
|
|
693
|
-
|
|
694
|
-
Returns transaction block information (WowTransactionBlockSchema).
|
|
695
|
-
|
|
696
|
-
---
|
|
697
|
-
|
|
698
|
-
### Examples
|
|
699
|
-
|
|
700
|
-
#### Example 8.1: Transfer Order Ownership
|
|
701
|
-
|
|
702
|
-
**Prompt**: Transfer ownership of order "transfer_order_601" to "new_owner_account".
|
|
703
|
-
|
|
704
|
-
```json
|
|
705
|
-
{
|
|
706
|
-
"operation_type": "order",
|
|
707
|
-
"data": {
|
|
708
|
-
"object": "transfer_order_601",
|
|
709
|
-
"transfer_to": "new_owner_account"
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
```
|
|
713
|
-
|
|
714
|
-
---
|
|
715
|
-
|
|
716
|
-
## Function 9: Combined Operations
|
|
717
|
-
|
|
718
|
-
### Description
|
|
719
|
-
|
|
720
|
-
Execute multiple Order operations in one transaction, such as setting agents and advancing Progress simultaneously.
|
|
721
|
-
|
|
722
|
-
### Important Notes
|
|
723
|
-
|
|
724
|
-
⚠️ **Combined operations execute in same transaction!** All operations are atomic - either all succeed or all fail.
|
|
725
|
-
|
|
726
|
-
### Examples
|
|
727
|
-
|
|
728
|
-
#### Example 9.1: Set Agents + Advance Progress
|
|
729
|
-
|
|
730
|
-
**Prompt**: Set agents and advance Progress for order "combined_order_701".
|
|
731
|
-
|
|
732
|
-
```json
|
|
733
|
-
{
|
|
734
|
-
"operation_type": "order",
|
|
735
|
-
"data": {
|
|
736
|
-
"object": "combined_order_701",
|
|
737
|
-
"agents": ["operations_manager"],
|
|
738
|
-
"progress": {
|
|
739
|
-
"operation": {
|
|
740
|
-
"next_node_name": "active",
|
|
741
|
-
"forward": "activate"
|
|
742
|
-
},
|
|
743
|
-
"hold": false
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
```
|
|
748
|
-
|
|
749
|
-
---
|
|
750
|
-
|
|
751
|
-
#### Example 9.2: Set Contact + Receive Funds
|
|
752
|
-
|
|
753
|
-
**Prompt**: Set Contact object for secure communication and receive funds for order "fulfillment_order_702".
|
|
754
|
-
|
|
755
|
-
```json
|
|
756
|
-
{
|
|
757
|
-
"operation_type": "order",
|
|
758
|
-
"data": {
|
|
759
|
-
"object": "fulfillment_order_702",
|
|
760
|
-
"required_info": "shipping_contact",
|
|
761
|
-
"receive": [
|
|
762
|
-
{
|
|
763
|
-
"id": "delivery_nft",
|
|
764
|
-
"type": "0x2::nft::NFT"
|
|
765
|
-
}
|
|
766
|
-
]
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
---
|
|
772
|
-
|
|
773
|
-
#### Example 9.3: Full Parameters Example
|
|
774
|
-
|
|
775
|
-
**Prompt**: On testnet network, set agents, set Contact for secure messaging, advance Progress, and receive funds for order "full_order_703" using default account.
|
|
776
|
-
|
|
777
|
-
```json
|
|
778
|
-
{
|
|
779
|
-
"operation_type": "order",
|
|
780
|
-
"data": {
|
|
781
|
-
"object": "full_order_703",
|
|
782
|
-
"agents": ["agent_1", "agent_2"],
|
|
783
|
-
"required_info": "customer_contact",
|
|
784
|
-
"progress": {
|
|
785
|
-
"operation": {
|
|
786
|
-
"next_node_name": "delivered",
|
|
787
|
-
"forward": "confirm_delivery"
|
|
788
|
-
},
|
|
789
|
-
"hold": false,
|
|
790
|
-
"message": "Order delivery confirmed"
|
|
791
|
-
},
|
|
792
|
-
"receive": {
|
|
793
|
-
"balance": "25000000000",
|
|
794
|
-
"token_type": "CoinWrapper<0x2::wow::WOW>",
|
|
795
|
-
"received": [
|
|
796
|
-
{
|
|
797
|
-
"id": "payment_wrapper",
|
|
798
|
-
"balance": "25000000000",
|
|
799
|
-
"payment": "order_payment"
|
|
800
|
-
}
|
|
801
|
-
]
|
|
802
|
-
}
|
|
803
|
-
},
|
|
804
|
-
"env": {
|
|
805
|
-
"account": "",
|
|
806
|
-
"network": "testnet"
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
```
|
|
810
|
-
|
|
811
|
-
---
|
|
812
|
-
|
|
813
|
-
## 👤 User Operations Guide
|
|
814
|
-
|
|
815
|
-
This section provides a quick reference for order owners (buyers). For detailed arbitration state machine and process, see [Arbitration - State Machine](arbitration.md#complete-arbitration-state-machine).
|
|
816
|
-
|
|
817
|
-
### Common Scenarios
|
|
818
|
-
|
|
819
|
-
#### Scenario 1: Order Has Issues
|
|
820
|
-
|
|
821
|
-
**Step 1**: Contact service provider via [Messenger](messenger.md)
|
|
822
|
-
**Step 2**: If unresolved, file a dispute:
|
|
823
|
-
|
|
824
|
-
```json
|
|
825
|
-
{
|
|
826
|
-
"operation_type": "arbitration",
|
|
827
|
-
"data": {
|
|
828
|
-
"object": "arbitration_object_id",
|
|
829
|
-
"dispute": {
|
|
830
|
-
"order": "your_order_id",
|
|
831
|
-
"description": "Issue description",
|
|
832
|
-
"proposition": ["Full refund", "Partial refund"],
|
|
833
|
-
"fee": {"balance": 1000000000}
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
👉 **See [Arbitration - File Dispute](arbitration.md#sub-feature-2-create-dispute-dispute) for complete guide**
|
|
840
|
-
|
|
841
|
-
#### Scenario 2: Claim Compensation After Ruling
|
|
842
|
-
|
|
843
|
-
```json
|
|
844
|
-
{
|
|
845
|
-
"operation_type": "order",
|
|
846
|
-
"data": {
|
|
847
|
-
"object": "your_order_id",
|
|
848
|
-
"arb_claim_compensation": {
|
|
849
|
-
"arb": "your_arb_object_id"
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
```
|
|
854
|
-
|
|
855
|
-
#### Scenario 3: Object to Ruling (Appeal)
|
|
856
|
-
|
|
857
|
-
```json
|
|
858
|
-
{
|
|
859
|
-
"operation_type": "order",
|
|
860
|
-
"data": {
|
|
861
|
-
"object": "your_order_id",
|
|
862
|
-
"arb_objection": {
|
|
863
|
-
"arb": "your_arb_object_id",
|
|
864
|
-
"objection": "Reason for objection with new evidence"
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
```
|
|
869
|
-
|
|
870
|
-
### Time Limits Summary
|
|
871
|
-
|
|
872
|
-
| Stage | Time Limit | Consequence If Missed |
|
|
873
|
-
|-------|------------|----------------------|
|
|
874
|
-
| File Dispute | Before order completion | Cannot dispute |
|
|
875
|
-
| Object to Ruling | Within objection window | Lose appeal right |
|
|
876
|
-
|
|
877
|
-
👉 **See [Arbitration - State Machine](arbitration.md#complete-arbitration-state-machine) for complete state transitions and time constraints**
|
|
878
|
-
|
|
879
|
-
### Scenario 4: Submitting Personal Information Securely
|
|
880
|
-
|
|
881
|
-
When the service needs your personal information (shipping address, phone number, ID for verification):
|
|
882
|
-
|
|
883
|
-
**⚠️ NEVER submit personal information directly on-chain!**
|
|
884
|
-
|
|
885
|
-
Instead, use the secure Contact/Messenger system:
|
|
886
|
-
|
|
887
|
-
#### Method 1: Via Order required_info (Recommended)
|
|
888
|
-
|
|
889
|
-
```json
|
|
890
|
-
{
|
|
891
|
-
"operation_type": "order",
|
|
892
|
-
"data": {
|
|
893
|
-
"object": "your_order_id",
|
|
894
|
-
"required_info": "your_contact_object_id"
|
|
895
|
-
},
|
|
896
|
-
"env": {"account": "your_account", "network": "testnet"}
|
|
897
|
-
}
|
|
898
|
-
```
|
|
899
|
-
|
|
900
|
-
**How it works:**
|
|
901
|
-
1. Create a Contact object with your information (stored locally, not on-chain)
|
|
902
|
-
2. Reference it in the order via `required_info`
|
|
903
|
-
3. Service provider receives notification via Messenger
|
|
904
|
-
4. Information is transmitted end-to-end encrypted
|
|
905
|
-
|
|
906
|
-
#### Method 2: Direct Messenger Communication
|
|
907
|
-
|
|
908
|
-
```json
|
|
909
|
-
{
|
|
910
|
-
"operation_type": "messenger",
|
|
911
|
-
"data": {
|
|
912
|
-
"action": "send_message",
|
|
913
|
-
"conversation_id": "service_conversation_id",
|
|
914
|
-
"content": "Order #12345 - Delivery Information",
|
|
915
|
-
"attachments": [
|
|
916
|
-
{
|
|
917
|
-
"type": "contact_info",
|
|
918
|
-
"data": {
|
|
919
|
-
"name": "John Doe",
|
|
920
|
-
"address": "123 Main St, City, Country",
|
|
921
|
-
"phone": "+1234567890"
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
]
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
```
|
|
928
|
-
|
|
929
|
-
**Security Features:**
|
|
930
|
-
- End-to-end encryption
|
|
931
|
-
- Only you and service staff can decrypt
|
|
932
|
-
- Not stored on public blockchain
|
|
933
|
-
- Message hash can be referenced in disputes as evidence
|
|
934
|
-
|
|
935
|
-
### Complete Arbitration Timeline Example
|
|
936
|
-
|
|
937
|
-
```
|
|
938
|
-
Day 0: Order created and paid
|
|
939
|
-
Day 3: Issue discovered, contacted service provider
|
|
940
|
-
Day 5: No resolution, filed dispute (Status 0 → 1)
|
|
941
|
-
Day 6: Arbitrator confirmed case (Status 1 → 2)
|
|
942
|
-
Day 6-13: Voting period (7 days)
|
|
943
|
-
Day 14: Arbitrator issued ruling (Status 2 → 3)
|
|
944
|
-
Day 14: Claimed compensation (Status 3 → 5)
|
|
945
|
-
Day 14: Process complete, received funds
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
### User Action Checklist
|
|
949
|
-
|
|
950
|
-
**Before Filing Dispute:**
|
|
951
|
-
- [ ] Attempted to resolve with service provider
|
|
952
|
-
- [ ] Gathered evidence (photos, screenshots, communication logs)
|
|
953
|
-
- [ ] Verified service has arbitration and compensation fund
|
|
954
|
-
- [ ] Prepared dispute fee
|
|
955
|
-
|
|
956
|
-
**During Arbitration:**
|
|
957
|
-
- [ ] Submitted clear description and propositions
|
|
958
|
-
- [ ] Provided evidence via Messenger
|
|
959
|
-
- [ ] Monitored voting deadline
|
|
960
|
-
- [ ] Responded to arbitrator requests
|
|
961
|
-
|
|
962
|
-
**After Ruling:**
|
|
963
|
-
- [ ] Reviewed ruling and compensation amount
|
|
964
|
-
- [ ] Decision: Accept or Object
|
|
965
|
-
- [ ] If accepting: Claimed compensation immediately
|
|
966
|
-
- [ ] If objecting: Filed within objection window with new evidence
|
|
967
|
-
|
|
968
|
-
---
|
|
969
|
-
|
|
970
|
-
## Important Notes
|
|
971
|
-
|
|
972
|
-
⚠️ **Agents can operate orders but cannot receive funds!**
|
|
973
|
-
|
|
974
|
-
⚠️ **progress field uses OperateSchema structure!**
|
|
975
|
-
- `operation`: Contains `next_node_name` and `forward` specifying next node and direction
|
|
976
|
-
- `hold`: true = lock operation permission, false = submit operation result
|
|
977
|
-
- `adminUnhold`: Optional when hold=true, allows admin force unlock
|
|
978
|
-
- `message`: Optional operation result message
|
|
979
|
-
|
|
980
|
-
⚠️ **next_node_name and forward must be valid values defined in Machine!**
|
|
981
|
-
|
|
982
|
-
⚠️ **Arbitration materials must be prepared in Arb object first!**
|
|
983
|
-
|
|
984
|
-
⚠️ **Ownership transfer requires order owner permission!**
|
|
985
|
-
|
|
986
|
-
⚠️ **Funds will be transferred to order owner!**
|
|
987
|
-
|
|
988
|
-
⚠️ **Use [Messenger](messenger.md) for sending private information - end-to-end encrypted, never stored on-chain, and only accessible to you and the service staff!**
|
|
989
|
-
|
|
990
|
-
---
|
|
991
|
-
|
|
992
|
-
## Related Components
|
|
993
|
-
|
|
994
|
-
| Component | Description |
|
|
995
|
-
|-----------|-------------|
|
|
996
|
-
| **[Service](service.md)** | WYSIWYG product trading (orders usually created automatically by Service) |
|
|
997
|
-
| **[Progress](progress.md)** | Order progress |
|
|
998
|
-
| **[Machine](machine.md)** | Workflow template |
|
|
999
|
-
| **[Arbitration](arbitration.md)** | Dispute resolution |
|
|
1000
|
-
| **[Contact](contact.md)** | Public contact information for secure communication |
|
|
1001
|
-
| **[Messenger](messenger.md)** | End-to-end encrypted messaging for private information exchange |
|