@wowok/skills 1.0.6

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.
Files changed (70) hide show
  1. package/README.md +156 -0
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +177 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +19 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/skills.d.ts +5 -0
  11. package/dist/skills.d.ts.map +1 -0
  12. package/dist/skills.js +46 -0
  13. package/dist/skills.js.map +1 -0
  14. package/dist/types.d.ts +9 -0
  15. package/dist/types.d.ts.map +1 -0
  16. package/dist/types.js +3 -0
  17. package/dist/types.js.map +1 -0
  18. package/examples/Insurance/Insurance.md +594 -0
  19. package/examples/Insurance/Insurance_TestResults.md +481 -0
  20. package/examples/Insurance/insurance_complete_guard_v1.json +50 -0
  21. package/examples/MyShop/MyShop.md +1353 -0
  22. package/examples/MyShop/MyShop_TestResults.md +1003 -0
  23. package/examples/MyShop_Advanced/MyShop_Advanced.md +1898 -0
  24. package/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +1297 -0
  25. package/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +743 -0
  26. package/examples/MyShop_Advanced/machine_nodes.json +222 -0
  27. package/examples/ThreeBody_Signature/ThreeBody_Signature.md +776 -0
  28. package/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +599 -0
  29. package/examples/Travel/Travel.md +1157 -0
  30. package/examples/Travel/Travel_TestResults.md +743 -0
  31. package/examples/Travel/calc-weather-timestamps.js +8 -0
  32. package/examples/Travel/travel_machine_v2_export.json +104 -0
  33. package/examples/Travel/weather_check_guard_v1.json +51 -0
  34. package/package.json +56 -0
  35. package/schemas/onchain_operations/_common.md +236 -0
  36. package/schemas/onchain_operations/_index.md +22 -0
  37. package/schemas/onchain_operations/allocation.md +50 -0
  38. package/schemas/onchain_operations/arbitration.md +95 -0
  39. package/schemas/onchain_operations/contact.md +36 -0
  40. package/schemas/onchain_operations/demand.md +52 -0
  41. package/schemas/onchain_operations/gen_passport.md +43 -0
  42. package/schemas/onchain_operations/guard.md +136 -0
  43. package/schemas/onchain_operations/machine.md +70 -0
  44. package/schemas/onchain_operations/order.md +57 -0
  45. package/schemas/onchain_operations/payment.md +32 -0
  46. package/schemas/onchain_operations/permission.md +57 -0
  47. package/schemas/onchain_operations/personal.md +59 -0
  48. package/schemas/onchain_operations/progress.md +35 -0
  49. package/schemas/onchain_operations/repository.md +81 -0
  50. package/schemas/onchain_operations/reward.md +40 -0
  51. package/schemas/onchain_operations/service.md +104 -0
  52. package/schemas/onchain_operations/treasury.md +74 -0
  53. package/schemas/schema-account_operation.md +402 -0
  54. package/schemas/schema-guard2file.md +153 -0
  55. package/schemas/schema-local_info_operation.md +160 -0
  56. package/schemas/schema-local_mark_operation.md +148 -0
  57. package/schemas/schema-machineNode2file.md +155 -0
  58. package/schemas/schema-messenger_operation.md +547 -0
  59. package/schemas/schema-onchain_events.md +201 -0
  60. package/schemas/schema-onchain_table_data.md +334 -0
  61. package/schemas/schema-query_toolkit.md +375 -0
  62. package/schemas/schema-wip_file.md +240 -0
  63. package/schemas/schema-wowok_buildin_info.md +296 -0
  64. package/scripts/install.js +113 -0
  65. package/wowok-build/SKILL.md +606 -0
  66. package/wowok-guard/SKILL.md +374 -0
  67. package/wowok-machine/SKILL.md +512 -0
  68. package/wowok-order/SKILL.md +499 -0
  69. package/wowok-safety/SKILL.md +381 -0
  70. package/wowok-tools/SKILL.md +635 -0
@@ -0,0 +1,8 @@
1
+
2
+ const now = Date.now();
3
+ const oneDay = 24 * 60 * 60 * 1000;
4
+
5
+ for (let i = 4; i >= 0; i--) {
6
+ const ts = now - i * oneDay;
7
+ console.log(`Day ${4 - i + 1}: ${ts}`);
8
+ }
@@ -0,0 +1,104 @@
1
+ [
2
+ {
3
+ "name": "Ice Scooting",
4
+ "pairs": [
5
+ {
6
+ "prev_node": "SPA",
7
+ "threshold": 1,
8
+ "forwards": [
9
+ {
10
+ "name": "complete_trip",
11
+ "weight": 1,
12
+ "namedOperator": null,
13
+ "permissionIndex": 1003,
14
+ "guard": {
15
+ "guard": "0xe00d9482b61fd7e7a4782f43d678a9fb19bd101737de92e453559b5e09565b51",
16
+ "retained_submission": []
17
+ }
18
+ },
19
+ {
20
+ "name": "cancel_trip",
21
+ "weight": 1,
22
+ "namedOperator": null,
23
+ "permissionIndex": 1004,
24
+ "guard": {
25
+ "guard": "0x831cb9cfe91f81cdcedef7811f4e9b48023cf95d25887c9639615613191e6595",
26
+ "retained_submission": []
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "name": "Start",
35
+ "pairs": [
36
+ {
37
+ "prev_node": "",
38
+ "threshold": 0,
39
+ "forwards": [
40
+ {
41
+ "name": "buy_insurance",
42
+ "weight": 1,
43
+ "namedOperator": null,
44
+ "permissionIndex": 1000
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "name": "Buy Insurance",
52
+ "pairs": [
53
+ {
54
+ "prev_node": "Start",
55
+ "threshold": 1,
56
+ "forwards": [
57
+ {
58
+ "name": "go_ice_scooting",
59
+ "weight": 1,
60
+ "namedOperator": null,
61
+ "permissionIndex": 1001
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "name": "Cancel",
69
+ "pairs": [
70
+ {
71
+ "prev_node": "Ice Scooting",
72
+ "threshold": 1,
73
+ "forwards": []
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "name": "Complete",
79
+ "pairs": [
80
+ {
81
+ "prev_node": "Ice Scooting",
82
+ "threshold": 1,
83
+ "forwards": []
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "name": "SPA",
89
+ "pairs": [
90
+ {
91
+ "prev_node": "Buy Insurance",
92
+ "threshold": 1,
93
+ "forwards": [
94
+ {
95
+ "name": "go_ice_scooting",
96
+ "weight": 1,
97
+ "namedOperator": null,
98
+ "permissionIndex": 1002
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ }
104
+ ]
@@ -0,0 +1,51 @@
1
+ {
2
+ "namedNew": {
3
+ "name": "weather_check_guard_v1",
4
+ "tags": ["weather", "check", "travel"],
5
+ "replaceExistName": true
6
+ },
7
+ "description": "Weather check guard for ice scooting activity. Checks if weather data exists for the activity date.",
8
+ "table": [
9
+ {
10
+ "identifier": 0,
11
+ "b_submission": false,
12
+ "value_type": "Address",
13
+ "value": "weather_repo_v2",
14
+ "name": "Weather Repository address"
15
+ },
16
+ {
17
+ "identifier": 1,
18
+ "b_submission": false,
19
+ "value_type": "String",
20
+ "value": "Condition",
21
+ "name": "Repository policy name"
22
+ },
23
+ {
24
+ "identifier": 2,
25
+ "b_submission": true,
26
+ "value_type": "U64",
27
+ "value": 0,
28
+ "name": "Activity date timestamp (submitted at runtime)"
29
+ }
30
+ ],
31
+ "root": {
32
+ "type": "query",
33
+ "query": 1166,
34
+ "object": {
35
+ "identifier": 0
36
+ },
37
+ "parameters": [
38
+ {
39
+ "type": "identifier",
40
+ "identifier": 1
41
+ },
42
+ {
43
+ "type": "convert_number_address",
44
+ "node": {
45
+ "type": "identifier",
46
+ "identifier": 2
47
+ }
48
+ }
49
+ ]
50
+ }
51
+ }
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@wowok/skills",
3
+ "version": "1.0.6",
4
+ "description": "WoWok AI Skills for Claude and other AI assistants - Helping AI use WoWok MCP tools correctly",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "wowok-skills": "dist/cli.js"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "wowok-build/",
13
+ "wowok-guard/",
14
+ "wowok-tools/",
15
+ "wowok-safety/",
16
+ "wowok-machine/",
17
+ "wowok-order/",
18
+ "examples/",
19
+ "schemas/",
20
+ "scripts/install.js",
21
+ "README.md"
22
+ ],
23
+ "scripts": {
24
+ "prebuild": "node scripts/copy-assets.js",
25
+ "build": "tsc",
26
+ "watch": "tsc --watch",
27
+ "prepublishOnly": "npm run build",
28
+ "postinstall": "node scripts/install.js",
29
+ "preuninstall": "node scripts/install.js"
30
+ },
31
+ "keywords": [
32
+ "wowok",
33
+ "ai",
34
+ "skills",
35
+ "claude",
36
+ "mcp",
37
+ "blockchain",
38
+ "web3",
39
+ "ai-agent"
40
+ ],
41
+ "author": "wowok <build@wowok.net>",
42
+ "license": "Apache-2.0",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/wowok-ai/skills.git"
46
+ },
47
+ "bugs": {
48
+ "url": "https://github.com/wowok-ai/skills/issues"
49
+ },
50
+ "homepage": "https://github.com/wowok-ai/skills#readme",
51
+ "devDependencies": {
52
+ "@types/node": "^22.0.0",
53
+ "typescript": "^5.8.0"
54
+ },
55
+ "dependencies": {}
56
+ }
@@ -0,0 +1,236 @@
1
+ # onchain_operations / Common Types
2
+
3
+ Shared types referenced by all `onchain_operations` operation types.
4
+
5
+ ---
6
+
7
+ ## Top-Level Structure
8
+
9
+ Most operations follow this standard wrapper:
10
+
11
+ ```typescript
12
+ OnchainOperations {
13
+ operation_type: string; // One of 16 types
14
+ data: object; // Type-specific data (required)
15
+ env?: CallEnv; // Optional environment
16
+ submission?: SubmissionCall; // Optional Guard submission data
17
+ }
18
+ ```
19
+
20
+ ### Exceptions
21
+
22
+ | Operation | Structure | Notes |
23
+ |-----------|-----------|-------|
24
+ | `gen_passport` | `{ guard, info?, env? }` | FLAT — no `data` wrapper, no `submission` |
25
+ | `guard` | `{ data, env? }` | No `submission` field |
26
+ | `payment` | `{ data, env? }` | No `submission` field |
27
+ | `personal` | `{ data, env? }` | No `submission` field |
28
+
29
+ ## CallEnv
30
+
31
+ ```typescript
32
+ CallEnv {
33
+ account?: string; // Operating account (empty = default)
34
+ permission_guard?: string[]; // Permission Guard ID list
35
+ no_cache?: boolean; // Disable cache
36
+ network?: "localnet" | "testnet"; // Target network
37
+ referrer?: string; // Referrer ID
38
+ }
39
+ ```
40
+
41
+ ## SubmissionCall
42
+
43
+ ```typescript
44
+ SubmissionCall {
45
+ type: "submission";
46
+ guard: {
47
+ object: string; // Guard object name or ID
48
+ impack: boolean; // Whether affects final outcome
49
+ }[];
50
+ submission: {
51
+ guard: string; // Guard object name or ID
52
+ submission: {
53
+ identifier: number; // 0-255
54
+ b_submission: boolean; // Whether user submission is required
55
+ value_type: ValueType; // Expected type
56
+ value?: SupportedValue; // User-provided value (optional)
57
+ name: string; // Name/description (default: "")
58
+ object_type?: ObjectType; // Object type when value is Address
59
+ }[];
60
+ }[];
61
+ }
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Common Sub-Schemas
67
+
68
+ ### TypedPermissionObject
69
+
70
+ ```typescript
71
+ TypedPermissionObject =
72
+ | string // Object ID or name (existing)
73
+ | {
74
+ name?: string; // Name for new object
75
+ tags?: string[]; // Tags for discoverability
76
+ onChain?: boolean; // Register name on-chain
77
+ replaceExistName?: boolean; // Force claim existing name
78
+ type_parameter: string; // Token type parameter (default: "0x2::wow::WOW")
79
+ permission?: DescriptionObject; // Permission for the new object
80
+ };
81
+ ```
82
+
83
+ ### WithPermissionObject
84
+
85
+ ```typescript
86
+ WithPermissionObject =
87
+ | string // Existing object ID or name
88
+ | {
89
+ name?: string;
90
+ tags?: string[];
91
+ onChain?: boolean;
92
+ replaceExistName?: boolean;
93
+ permission?: DescriptionObject;
94
+ };
95
+ ```
96
+
97
+ ### DescriptionObject
98
+
99
+ ```typescript
100
+ DescriptionObject =
101
+ | string // Existing object ID or name
102
+ | {
103
+ name?: string;
104
+ tags?: string[];
105
+ onChain?: boolean;
106
+ replaceExistName?: boolean;
107
+ description?: string;
108
+ };
109
+ ```
110
+
111
+ ### NormalObject
112
+
113
+ ```typescript
114
+ NormalObject =
115
+ | string // Existing object ID or name
116
+ | {
117
+ name?: string;
118
+ tags?: string[];
119
+ onChain?: boolean;
120
+ replaceExistName?: boolean;
121
+ };
122
+ ```
123
+
124
+ ### NamedObject
125
+
126
+ ```typescript
127
+ NamedObject {
128
+ name?: string;
129
+ tags?: string[];
130
+ onChain?: boolean;
131
+ replaceExistName?: boolean;
132
+ }
133
+ ```
134
+
135
+ ### CoinParam
136
+
137
+ ```typescript
138
+ CoinParam =
139
+ | { balance: string | number } // Amount (can include unit like "10WOW")
140
+ | { coin: string }; // Specific coin object ID
141
+ ```
142
+
143
+ ### ObjectsOp
144
+
145
+ ```typescript
146
+ ObjectsOp = {
147
+ op: "add" | "set" | "remove";
148
+ objects: string[];
149
+ } | {
150
+ op: "clear";
151
+ };
152
+ ```
153
+
154
+ ### AccountOrMark_Address
155
+
156
+ ```typescript
157
+ AccountOrMark_Address = {
158
+ name_or_address?: string;
159
+ local_mark_first?: boolean;
160
+ };
161
+ ```
162
+
163
+ ### ManyAccountOrMark_Address
164
+
165
+ ```typescript
166
+ ManyAccountOrMark_Address = {
167
+ entities: AccountOrMark_Address[];
168
+ check_all_founded?: boolean;
169
+ };
170
+ ```
171
+
172
+ ### ReceivedBalanceOrRecently
173
+
174
+ ```typescript
175
+ ReceivedBalanceOrRecently =
176
+ | {
177
+ balance: string | number; // Balance amount
178
+ token_type: string; // Token type
179
+ received: { // Unwrapped coin objects
180
+ id: string; // CoinWrapper object ID
181
+ balance: string | number; // Amount
182
+ payment: string; // Info string, usually the payment object ID @any
183
+ }[];
184
+ }
185
+ | "recently"; // Shortcut: automatically unwrap most recently received CoinWrapper
186
+ ```
187
+
188
+ ### ReceivedObjectsOrRecently
189
+
190
+ ```typescript
191
+ ReceivedObjectsOrRecently =
192
+ | {
193
+ id: string; // Object ID
194
+ type: string; // Object type
195
+ content_raw?: any; // Raw content (optional)
196
+ }[]
197
+ | ReceivedBalanceOrRecently; // Or: empty/clear then receive CoinWrapper objects
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Value Types
203
+
204
+ | Type | ID | Description |
205
+ |------|-----|-------------|
206
+ | Bool | 0 | Boolean true/false |
207
+ | Address | 1 | Object or account address |
208
+ | String | 2 | UTF-8 string |
209
+ | U8 | 3 | 8-bit unsigned integer |
210
+ | U16 | 4 | 16-bit unsigned integer |
211
+ | U32 | 5 | 32-bit unsigned integer |
212
+ | U64 | 6 | 64-bit unsigned integer |
213
+ | U128 | 7 | 128-bit unsigned integer |
214
+ | U256 | 8 | 256-bit unsigned integer |
215
+ | VecBool | 9 | Vector of booleans |
216
+ | VecAddress | 10 | Vector of addresses |
217
+ | VecString | 11 | Vector of strings |
218
+ | VecU8 | 12 | Vector of U8 |
219
+ | VecU16 | 13 | Vector of U16 |
220
+ | VecU32 | 14 | Vector of U32 |
221
+ | VecU64 | 15 | Vector of U64 |
222
+ | VecU128 | 16 | Vector of U128 |
223
+ | VecU256 | 17 | Vector of U256 |
224
+ | VecVecU8 | 18 | Vector of VecU8 |
225
+
226
+ ---
227
+
228
+ ### Recipient
229
+ Used by `service` (order allocators), `reward` (guard recipients), and `allocation` (who field).
230
+
231
+ ```typescript
232
+ Recipient =
233
+ | { GuardIdentifier: number }
234
+ | { Entity: AccountOrMark_Address }
235
+ | { Signer: "signer" }
236
+ ```
@@ -0,0 +1,22 @@
1
+ # onchain_operations / Index
2
+
3
+ 16 discriminated operation types. Each links to its schema file. Common types (CallEnv, SubmissionCall, Recipient, NamedObject, CoinParam, ValueTypes, etc.) are in [_common.md](./_common.md).
4
+
5
+ | operation_type | File | Description |
6
+ |---|---|---|
7
+ | `service` | [service.md](./service.md) | Create/manage product listings, pricing, discounts, bind workflows, customer purchases via order_new |
8
+ | `machine` | [machine.md](./machine.md) | Design/deploy workflow templates with node/forward structures |
9
+ | `progress` | [progress.md](./progress.md) | Track active workflows, advance through nodes |
10
+ | `repository` | [repository.md](./repository.md) | Consensus database with typed policies and data read/write |
11
+ | `arbitration` | [arbitration.md](./arbitration.md) | Transparent on-chain arbitration, dispute/vote/resolve lifecycle |
12
+ | `contact` | [contact.md](./contact.md) | On-chain IM contact profiles |
13
+ | `treasury` | [treasury.md](./treasury.md) | Team fund management with deposit/withdraw Guard rules |
14
+ | `reward` | [reward.md](./reward.md) | Reward pools with Guard-verified claiming |
15
+ | `allocation` | [allocation.md](./allocation.md) | Auto-distribution plans to multiple recipients |
16
+ | `permission` | [permission.md](./permission.md) | Access control indices for object operations |
17
+ | `guard` | [guard.md](./guard.md) | Programmable boolean validation rules (recursive GuardNode tree) |
18
+ | `personal` | [personal.md](./personal.md) | PUBLIC on-chain identity — everything permanently visible |
19
+ | `payment` | [payment.md](./payment.md) | Irreversible coin transfers to wallets |
20
+ | `demand` | [demand.md](./demand.md) | Service request postings with reward pools |
21
+ | `order` | [order.md](./order.md) | Order lifecycle: progress, arbitration, refunds, ownership |
22
+ | `gen_passport` | [gen_passport.md](./gen_passport.md) | Immutable verified credentials after Guard validation |
@@ -0,0 +1,50 @@
1
+ # onchain_operations / allocation
2
+
3
+ Create distribution plans to auto-distribute funds to multiple recipients.
4
+
5
+ ## Data Schema
6
+
7
+ ```typescript
8
+ // Allocation has TWO modes — discriminated by object format
9
+
10
+ // MODE 1: Create a new Allocation with allocators
11
+ CallAllocation_Create {
12
+ object: {
13
+ name?: string; // Object name
14
+ tags?: string[]; // Tags
15
+ onChain?: boolean; // Public on-chain name
16
+ replaceExistName?: boolean; // Force claim name
17
+ type_parameter?: string; // Token type (default: "0x2::wow::WOW")
18
+ };
19
+ allocators: {
20
+ description: string; // Allocator list description
21
+ threshold: number; // Trigger threshold
22
+ allocators: {
23
+ guard: string; // Guard object ID — allocation triggers on verify
24
+ sharing: {
25
+ who: Recipient; // Recipient specification
26
+ sharing: number; // Amount or rate
27
+ mode: "Amount" | "Rate" | "Surplus";
28
+ }[];
29
+ fix?: number; // Fixed amount per recipient
30
+ max?: number | null; // Maximum allocation amount
31
+ }[];
32
+ };
33
+ coin: CoinParam; // Initial funding
34
+ payment_info: {
35
+ remark?: string;
36
+ index?: number;
37
+ };
38
+ }
39
+
40
+ // MODE 2: Operate existing Allocation
41
+ CallAllocation_Operate {
42
+ object: string; // Allocation object ID or name (required)
43
+ received_coins?: ReceivedBalanceOrRecently; // Unwrap CoinWrapper
44
+ alloc_by_guard?: string; // Verify Guard and trigger allocation
45
+ }
46
+ ```
47
+
48
+ ---
49
+
50
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, CoinParam, Recipient, ReceivedBalanceOrRecently.
@@ -0,0 +1,95 @@
1
+ # onchain_operations / arbitration
2
+
3
+ Access a transparent on-chain arbitration system for resolving order conflicts.
4
+
5
+ ## Data Schema
6
+
7
+ ```typescript
8
+ CallArbitration_Data {
9
+ // Object reference - string (existing) or object (create new)
10
+ object: TypedPermissionObject;
11
+
12
+ // Create new Arb for order
13
+ dispute?: {
14
+ order: string; // Order ID
15
+ description?: string;
16
+ proposition: string[]; // Dispute propositions
17
+ fee: CoinParam; // Arbitration fee
18
+ namedArb?: NamedObject; // Name for new Arb
19
+ };
20
+
21
+ description?: string; // Institution description
22
+ location?: string; // Arbitration location
23
+ fee?: number; // Arbitration fee
24
+ pause?: boolean; // Pause arbitration
25
+
26
+ // Confirm user's materials
27
+ confirm?: {
28
+ arb: string; // Arb object ID
29
+ voting_deadline: number | null;
30
+ };
31
+
32
+ // Modify voting deadline
33
+ voting_deadline_change?: {
34
+ arb: string;
35
+ voting_deadline: number | null;
36
+ };
37
+
38
+ // Vote on propositions
39
+ vote?: {
40
+ arb: string;
41
+ votes: number[]; // Supported proposition indices
42
+ voting_guard?: string; // Guard for voting
43
+ };
44
+
45
+ // Arbitration feedback
46
+ feedback?: {
47
+ arb: string;
48
+ feedback: string;
49
+ };
50
+
51
+ // Final arbitration result
52
+ arbitration?: {
53
+ arb: string;
54
+ feedback: string;
55
+ indemnity: number; // Compensation amount
56
+ };
57
+
58
+ // Request resubmission
59
+ reset?: {
60
+ arb: string;
61
+ feedback: string;
62
+ };
63
+
64
+ // Withdraw arbitration fee
65
+ arb_withdraw?: {
66
+ arb: string;
67
+ };
68
+
69
+ // Distribute fees
70
+ fees_transfer?: {
71
+ to: { allocation: string } | { treasury: string };
72
+ payment_remark: string;
73
+ payment_index: number;
74
+ newPayment?: NamedObject;
75
+ };
76
+
77
+ usage_guard?: string | null; // Guard for applying
78
+
79
+ // Guard for voting
80
+ voting_guard?: {
81
+ op: "add" | "set" | "remove" | "clear";
82
+ guards?: {
83
+ guard: string;
84
+ service_identifier?: number;
85
+ }[];
86
+ };
87
+
88
+ owner_receive?: ReceivedObjectsOrRecently;
89
+ um?: string | null; // Contact object
90
+ }
91
+ ```
92
+
93
+ ---
94
+
95
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, CoinParam, NamedObject, ReceivedObjectsOrRecently.
@@ -0,0 +1,36 @@
1
+ # onchain_operations / contact
2
+
3
+ Manage on-chain instant messaging contact profiles.
4
+
5
+ ## Data Schema
6
+
7
+ ```typescript
8
+ CallContact_Data {
9
+ // Object reference - string (existing) or object (create new)
10
+ object: WithPermissionObject;
11
+
12
+ my_status?: string; // Status message
13
+ description?: string; // Contact description
14
+ location?: string; // Location
15
+
16
+ // IM contact list (discriminated union)
17
+ ims?: {
18
+ op: "add" | "set";
19
+ im: { // Contact entries
20
+ at: string; // IM address
21
+ description?: string; // Optional note
22
+ }[];
23
+ } | {
24
+ op: "remove";
25
+ im: string[]; // Addresses/names to remove
26
+ } | {
27
+ op: "clear";
28
+ };
29
+
30
+ owner_receive?: ReceivedObjectsOrRecently;
31
+ }
32
+ ```
33
+
34
+ ---
35
+
36
+ See [_common.md](./_common.md) for shared types: CallEnv, WithPermissionObject, ReceivedObjectsOrRecently.