@wowok/skills 1.0.6 → 1.1.0

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.
@@ -1,6 +1,12 @@
1
1
  # onchain_operations / Index
2
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).
3
+ > **Structure**: [Operation Table](#operation-table) · [CREATE vs MODIFY](#create-vs-modify-pattern) · [Top-Level Structure](#top-level-structure) · [Guard Submission](#guard-submission-mechanism) · [Field Execution Order](#field-execution-order) · [Value Types](#value-types)
4
+ >
5
+ > Common schemas (CallEnv, SubmissionCall, sub-schemas like NamedObject, CoinParam, Recipient, etc.) are in [_common.md](./_common.md).
6
+
7
+ ## Operation Table
8
+
9
+ 16 discriminated operation types. Each links to its schema file.
4
10
 
5
11
  | operation_type | File | Description |
6
12
  |---|---|---|
@@ -19,4 +25,172 @@
19
25
  | `payment` | [payment.md](./payment.md) | Irreversible coin transfers to wallets |
20
26
  | `demand` | [demand.md](./demand.md) | Service request postings with reward pools |
21
27
  | `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 |
28
+ | `gen_passport` | [gen_passport.md](./gen_passport.md) | Immutable verified credentials after Guard validation |
29
+
30
+ ---
31
+
32
+ ## CREATE vs MODIFY Pattern
33
+
34
+ All on-chain object operations use a **unified discriminated pattern** for CREATE vs MODIFY:
35
+
36
+ ```typescript
37
+ // CREATE: object is an object with configuration
38
+ object: {
39
+ name?: string; // Optional name for the new object
40
+ tags?: string[]; // Optional tags
41
+ onChain?: boolean; // Whether to register name on-chain (public)
42
+ replaceExistName?: boolean; // Force claim existing name
43
+ permission?: DescriptionObject; // Permission (string or new object)
44
+ type_parameter?: string; // Token type (e.g., "0x2::wow::WOW")
45
+ }
46
+
47
+ // MODIFY: object is a string referencing existing object
48
+ object: "<object_name_or_id>" // Existing object name (local mark) or on-chain ID
49
+ ```
50
+
51
+ ### Key Rule
52
+
53
+ | Format | Meaning | Example |
54
+ |--------|---------|---------|
55
+ | **String** | Reference EXISTING object | `object: "my-service"` or `object: "0x1234..."` |
56
+ | **Object** | CREATE NEW object | `object: { name: "my-service", permission: "..." }` |
57
+
58
+ ### Type Mapping
59
+
60
+ | Type | Used By | CREATE Shape | MODIFY Shape |
61
+ |------|---------|--------------|--------------|
62
+ | `TypedPermissionObject` | `service`, `arbitration`, `treasury`, `reward` | `{ name?, tags?, onChain?, replaceExistName?, type_parameter, permission? }` | `string` |
63
+ | `WithPermissionObject` | `machine`, `repository`, `demand`, `contact` | `{ name?, tags?, onChain?, replaceExistName?, permission? }` | `string` |
64
+ | `TypedDescriptionObject` | *(not directly used by operations)* | `{ name?, tags?, onChain?, replaceExistName?, type_parameter }` | `string` |
65
+ | `TypeNamedObject` | `allocation` (CREATE), `payment` | `{ name?, tags?, onChain?, replaceExistName?, type_parameter? }` | N/A |
66
+ | `DescriptionObject` | `permission` field of other types | `{ name?, tags?, onChain?, replaceExistName?, description? }` | `string` |
67
+ | `NormalObject` | `permission` | `{ name?, tags?, onChain?, replaceExistName? }` | `string` |
68
+ | `NamedObject` | `namedNew*`, `guard.namedNew` | `{ name?, tags?, onChain?, replaceExistName? }` | N/A |
69
+
70
+ ### Guard Exception
71
+
72
+ `guard` operation is **CREATE-only** and immutable. Guards cannot be modified after creation. Create new Guard to update logic.
73
+
74
+ ---
75
+
76
+ ## Top-Level Structure
77
+
78
+ Most operations follow this standard wrapper:
79
+
80
+ ```typescript
81
+ OnchainOperations {
82
+ operation_type: string; // One of 16 types
83
+ data: object; // Type-specific data (required)
84
+ env?: CallEnv; // Optional environment
85
+ submission?: SubmissionCall; // Optional Guard submission data
86
+ }
87
+ ```
88
+
89
+ ### Exceptions
90
+
91
+ | Operation | Structure | Notes |
92
+ |-----------|-----------|-------|
93
+ | `gen_passport` | `{ guard, info?, env? }` | FLAT — no `data` wrapper, no `submission` |
94
+ | `guard` | `{ data, env? }` | No `submission` field |
95
+ | `payment` | `{ data, env? }` | No `submission` field |
96
+ | `personal` | `{ data, env? }` | No `submission` field |
97
+
98
+ ---
99
+
100
+ ## Guard Submission Mechanism
101
+
102
+ When calling `onchain_operations`, the tool returns one of the following:
103
+
104
+ - **Direct Result**: The operation completes immediately. Returns a transaction result, data, or error. No additional steps needed.
105
+ - **Submission Required**: Returns `type: "submission"` — the operation triggered a Guard requiring user-provided data. A second call is needed to complete it.
106
+
107
+ ### Direct Result Pattern
108
+
109
+ Most operations return a direct result when no Guard submission is required:
110
+
111
+ ```
112
+ onchain_operations({ operation_type: "<type>", data: { ... } })
113
+ → Returns transaction result or error directly
114
+ ```
115
+
116
+ ### Submission Required Pattern
117
+
118
+ When the operation triggers a Guard whose table contains entries with **`b_submission: true`**, the tool does **not** return a transaction result immediately. Instead, it returns a **`type: "submission"`** response containing the Guard's data requirements.
119
+
120
+ This is the **only scenario** where a second call is required to complete an operation.
121
+
122
+ **Two-Step Flow**:
123
+
124
+ ```
125
+ Step 1 — Initial Call
126
+ ├── onchain_operations (e.g., service, machine, progress, order, etc.)
127
+ └── Response: { type: "submission", ... }
128
+ ├── guard: [{ object, impack }] — Guards requiring verification
129
+ └── submission: [{ guard, submission: [{ identifier, value_type, value?, name }] }]
130
+ ↑ You ONLY fill the `value` field. Do NOT modify other fields.
131
+
132
+ Step 2 — Re-submit with Completed Data
133
+ ├── Same operation data (unchanged)
134
+ └── Add top-level `submission` field:
135
+ {
136
+ "type": "submission",
137
+ "guard": [{ "object": "guard_name", "impack": true }],
138
+ "submission": [{
139
+ "guard": "guard_name",
140
+ "submission": [
141
+ { "identifier": 0, "value_type": "String", "value": "your_data_here" }
142
+ ]
143
+ }]
144
+ }
145
+ ```
146
+
147
+ **Critical Rules**:
148
+ - **Only fill `value`**: The template has `identifier`, `value_type`, `name` pre-filled. You ONLY supply the `value` field matching the `value_type`. Never modify `identifier`, `value_type`, or `name`.
149
+ - **Value type matching**: `value_type` indicates the expected type (`String`, `Address`, `U64`, `Bool`, etc.). The `value` must match exactly.
150
+ - **Impack flag**: `impack: true` means this Guard's result affects the final outcome. All `impack=true` Guards must pass for the operation to proceed.
151
+ - **All fields required**: Fill every entry in the `submission` array. Incomplete submission data causes a validation error.
152
+ - **Do not change other fields**: The `data` and `env` portions of the original call must remain identical.
153
+
154
+ **Common Submission Scenarios**:
155
+ - **Merkle Root proof**: `value_type: "String"`, value = hex string.
156
+ - **Progress/Order address**: `value_type: "Address"`, value = object name or ID.
157
+
158
+ ---
159
+
160
+ ## Field Execution Order
161
+
162
+ **Rule**: Schema field order determines execution order, regardless of JSON field order.
163
+
164
+ **AI Guidelines**:
165
+ 1. Check schema field order against user's intended operation sequence
166
+ 2. If schema order conflicts with intent, split into multiple sequential calls
167
+ 3. When uncertain, use incremental steps rather than single batch operation
168
+ 4. Between incremental steps, verify the previous modification landed on-chain: use `query_toolkit({ query_type: "onchain_objects", objects: ["<name>"], no_cache: true })` to confirm the object's updated state before proceeding to the next call
169
+
170
+ ---
171
+
172
+ ## Value Types
173
+
174
+ All Guard `value_type` fields and `GuardTableItem.value_type` use these types:
175
+
176
+ | Type | ID | Description |
177
+ |------|-----|-------------|
178
+ | Bool | 0 | Boolean true/false |
179
+ | Address | 1 | Object or account address |
180
+ | String | 2 | UTF-8 string |
181
+ | U8 | 3 | 8-bit unsigned integer |
182
+ | U16 | 4 | 16-bit unsigned integer |
183
+ | U32 | 5 | 32-bit unsigned integer |
184
+ | U64 | 6 | 64-bit unsigned integer |
185
+ | U128 | 7 | 128-bit unsigned integer |
186
+ | U256 | 8 | 256-bit unsigned integer |
187
+ | VecBool | 9 | Vector of booleans |
188
+ | VecAddress | 10 | Vector of addresses |
189
+ | VecString | 11 | Vector of strings |
190
+ | VecU8 | 12 | Vector of U8 |
191
+ | VecU16 | 13 | Vector of U16 |
192
+ | VecU32 | 14 | Vector of U32 |
193
+ | VecU64 | 15 | Vector of U64 |
194
+ | VecU128 | 16 | Vector of U128 |
195
+ | VecU256 | 17 | Vector of U256 |
196
+ | VecVecU8 | 18 | Vector of VecU8 |
@@ -1,50 +1,28 @@
1
1
  # onchain_operations / allocation
2
2
 
3
- Create distribution plans to auto-distribute funds to multiple recipients.
3
+ Define token distribution plans with payment scheduling and Guard-triggered distribution.
4
+
5
+ > **Schema**: `CallAllocation_Data` is a **union** of two variants — CREATE or OPERATE.
4
6
 
5
7
  ## Data Schema
6
8
 
7
9
  ```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
- }
10
+ CallAllocation_Data =
11
+ // CREATE: Create a new Allocation object
12
+ | {
13
+ object: TypeNamedObject; // CREATE with {name, type_parameter?}
14
+ allocators: Allocators; // Fund allocator rules
15
+ coin: CoinParam; // Asset to allocate
16
+ payment_info: PaymentInfo; // Payment record info
17
+ }
18
+ // OPERATE: Operate on existing Allocation object
19
+ | {
20
+ object: NameOrAddress; // Allocation object ID or name
21
+ received_coins?: ReceivedBalanceOrRecently; // Unwrap received CoinWrappers into pending balance
22
+ alloc_by_guard?: NameOrAddress; // Verify Guard and execute fund allocation
23
+ };
46
24
  ```
47
25
 
48
26
  ---
49
27
 
50
- See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, CoinParam, Recipient, ReceivedBalanceOrRecently.
28
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypeNamedObject, Allocators, CoinParam, PaymentInfo, ReceivedBalanceOrRecently.
@@ -1,95 +1,106 @@
1
1
  # onchain_operations / arbitration
2
2
 
3
- Access a transparent on-chain arbitration system for resolving order conflicts.
3
+ Create arbitration rules for dispute resolution.
4
+
5
+ > **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
6
+ > Arbitration uses `TypedPermissionObject`: object shape = CREATE, string = MODIFY.
4
7
 
5
8
  ## Data Schema
6
9
 
7
10
  ```typescript
8
11
  CallArbitration_Data {
9
12
  // Object reference - string (existing) or object (create new)
13
+ // See _common.md: TypedPermissionObject
10
14
  object: TypedPermissionObject;
11
15
 
12
- // Create new Arb for order
16
+ // Create new Arb object for an order
13
17
  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
18
+ order: NameOrAddress; // Order ID or name
19
+ description?: string; // Dispute description (max 4000 bcs chars)
20
+ proposition: string[]; // List of dispute propositions (each max 256 bcs chars)
21
+ fee: CoinParam; // Dispute processing fee
22
+ namedArb?: NamedObject; // Name for newly created arbitration object
19
23
  };
20
24
 
21
- description?: string; // Institution description
22
- location?: string; // Arbitration location
23
- fee?: number; // Arbitration fee
24
- pause?: boolean; // Pause arbitration
25
+ description?: string; // Introduction of the Arbitration object (max 4000 bcs chars)
26
+ location?: string; // Arbitration location (max 256 bcs chars)
27
+ fee?: string | number; // Arbitration fee
28
+ pause?: boolean; // Whether to pause arbitration
25
29
 
26
- // Confirm user's materials
30
+ // Confirm materials submitted for arbitration
27
31
  confirm?: {
28
- arb: string; // Arb object ID
29
- voting_deadline: number | null;
32
+ arb: NameOrAddress; // Arb object ID or name
33
+ voting_deadline: number | null; // Voting deadline
30
34
  };
31
35
 
32
- // Modify voting deadline
36
+ // Change voting deadline
33
37
  voting_deadline_change?: {
34
- arb: string;
35
- voting_deadline: number | null;
38
+ arb: NameOrAddress; // Arb object ID or name
39
+ voting_deadline: number | null; // New voting deadline
36
40
  };
37
41
 
38
42
  // Vote on propositions
39
43
  vote?: {
40
- arb: string;
41
- votes: number[]; // Supported proposition indices
42
- voting_guard?: string; // Guard for voting
44
+ arb: NameOrAddress; // Arb object ID or name
45
+ votes: number[]; // Vote values (per proposition, 0-255)
46
+ voting_guard?: NameOrAddress; // Voting Guard object ID or name
43
47
  };
44
48
 
45
- // Arbitration feedback
49
+ // Provide arbitration feedback
46
50
  feedback?: {
47
- arb: string;
48
- feedback: string;
51
+ arb: NameOrAddress; // Arb object ID or name
52
+ feedback: string; // Arbitration feedback (max 4000 bcs chars)
49
53
  };
50
54
 
51
- // Final arbitration result
55
+ // Provide definitive arbitration result
52
56
  arbitration?: {
53
- arb: string;
54
- feedback: string;
55
- indemnity: number; // Compensation amount
57
+ arb: NameOrAddress; // Arb object ID or name
58
+ feedback: string; // Arbitration feedback (max 4000 bcs chars)
59
+ indemnity: number; // Indemnity amount (int >= 0)
56
60
  };
57
61
 
58
- // Request resubmission
62
+ // User applies to resubmit materials and restart arbitration
59
63
  reset?: {
60
- arb: string;
61
- feedback: string;
64
+ arb: NameOrAddress; // Arb object ID or name
65
+ feedback: string; // Arbitration feedback (max 4000 bcs chars)
62
66
  };
63
67
 
64
- // Withdraw arbitration fee
68
+ // Withdraw arbitration fees
65
69
  arb_withdraw?: {
66
- arb: string;
70
+ arb: NameOrAddress; // Arb object ID or name
67
71
  };
68
72
 
69
- // Distribute fees
73
+ // Distribute withdrawn arbitration fees
70
74
  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
- }[];
75
+ to:
76
+ | { allocation: NameOrAddress } // Transfer to Allocation object
77
+ | { treasury: NameOrAddress }; // Transfer to Treasury object
78
+ payment_remark: string; // Payment remark (max 64 bcs chars)
79
+ payment_index: number; // Payment index (int >= 0)
80
+ newPayment?: NamedObject; // Name for new payment object
86
81
  };
87
82
 
83
+ usage_guard?: NameOrAddress | null; // Guard for verifying when users apply
84
+ voting_guard?: VotingGuardAction; // Guard for verifying during voting
88
85
  owner_receive?: ReceivedObjectsOrRecently;
89
- um?: string | null; // Contact object
86
+ um?: NameOrAddress | null; // Contact object
90
87
  }
88
+
89
+ // Voting guard operations (discriminated union)
90
+ VotingGuardAction =
91
+ | {
92
+ op: "add" | "set";
93
+ guards: VotingGuard[]; // Array of voting guard configs
94
+ }
95
+ | {
96
+ op: "remove";
97
+ guards: NameOrAddress[]; // Guard IDs or names to remove
98
+ }
99
+ | {
100
+ op: "clear";
101
+ };
91
102
  ```
92
103
 
93
104
  ---
94
105
 
95
- See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, CoinParam, NamedObject, ReceivedObjectsOrRecently.
106
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, CoinParam, NamedObject, VotingGuard, ReceivedObjectsOrRecently.
@@ -1,28 +1,32 @@
1
1
  # onchain_operations / contact
2
2
 
3
- Manage on-chain instant messaging contact profiles.
3
+ Create Contact objects linking social signals to on-chain rewards.
4
+
5
+ > **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
6
+ > Contact uses `WithPermissionObject`: object shape = CREATE, string = MODIFY.
4
7
 
5
8
  ## Data Schema
6
9
 
7
10
  ```typescript
8
11
  CallContact_Data {
9
12
  // Object reference - string (existing) or object (create new)
13
+ // See _common.md: WithPermissionObject
10
14
  object: WithPermissionObject;
11
15
 
12
- my_status?: string; // Status message
13
- description?: string; // Contact description
14
- location?: string; // Location
16
+ my_status?: string; // Set your status message in this contact list (max 64 bcs chars)
17
+ description?: string; // Contact object description or public information (max 4000 bcs chars)
18
+ location?: string; // Physical or virtual location information (max 256 bcs chars)
15
19
 
16
- // IM contact list (discriminated union)
20
+ // IM contact list operations (discriminated union)
17
21
  ims?: {
18
22
  op: "add" | "set";
19
- im: { // Contact entries
20
- at: string; // IM address
21
- description?: string; // Optional note
23
+ im: {
24
+ at: NameOrAddress; // Contact address or name for IM
25
+ description?: string; // Optional description (max 256 bcs chars)
22
26
  }[];
23
27
  } | {
24
28
  op: "remove";
25
- im: string[]; // Addresses/names to remove
29
+ im: NameOrAddress[]; // Contact addresses or names to remove
26
30
  } | {
27
31
  op: "clear";
28
32
  };
@@ -33,4 +37,4 @@ CallContact_Data {
33
37
 
34
38
  ---
35
39
 
36
- See [_common.md](./_common.md) for shared types: CallEnv, WithPermissionObject, ReceivedObjectsOrRecently.
40
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject, ReceivedObjectsOrRecently.
@@ -1,52 +1,53 @@
1
1
  # onchain_operations / demand
2
2
 
3
- Post service requests with reward pools on-chain.
3
+ Create and manage Demand objects for service procurement with Guard validation.
4
+
5
+ > **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
6
+ > Demand uses `WithPermissionObject`: object shape = CREATE, string = MODIFY.
4
7
 
5
8
  ## Data Schema
6
9
 
7
10
  ```typescript
8
11
  CallDemand_Data {
9
12
  // Object reference - string (existing) or object (create new)
13
+ // See _common.md: WithPermissionObject
10
14
  object: WithPermissionObject;
11
15
 
12
- // Recommend Service to Demand
16
+ // Recommend a Service to the Demand
13
17
  present?: {
14
- recommend: string; // Recommendation text
15
- by_guard?: string; // Guard to verify through
16
- service?: string; // Service ID or name
18
+ recommend: string; // Recommendation description (max 4000 bcs chars)
19
+ by_guard?: NameOrAddress; // Guard ID pass verification via Guard
20
+ service?: NameOrAddress; // Service ID or name to present
17
21
  };
18
22
 
19
- description?: string; // Demand description
20
- location?: string; // Demand location
23
+ description?: string; // Demand description (max 4000 bcs chars)
24
+ location?: string; // Service location (max 256 bcs chars)
25
+
26
+ rewards?: ObjectsOp; // Reward information
21
27
 
22
- rewards?: ObjectsOp; // Reward operations
28
+ // User feedback
29
+ feedback?: {
30
+ who: AccountOrMark_Address; // User being rated
31
+ acceptance_score?: number; // Acceptance score (0-255)
32
+ feedback?: string; // Feedback content (max 4000 bcs chars)
33
+ }[];
23
34
 
24
- // Service Guard list (discriminated union)
35
+ // Validation Guards (discriminated union)
25
36
  guards?: {
26
37
  op: "add" | "set";
27
- guard: {
28
- guard: string; // Guard object ID
29
- service_identifier?: number | null; // Service identifier in Guard
30
- }[];
38
+ guard: ServiceGuard[]; // Guard configs to add/set
31
39
  } | {
32
40
  op: "remove";
33
- guard: string[]; // Guard IDs/names to remove
41
+ guard: NameOrAddress[]; // Guard IDs or names to remove
34
42
  } | {
35
43
  op: "clear";
36
44
  };
37
45
 
38
- // Feedback on presenters (array — multiple feedback entries)
39
- feedback?: {
40
- who: AccountOrMark_Address; // Presenter's account
41
- acceptance_score?: number; // 0-255 acceptance score
42
- feedback?: string; // Feedback content
43
- }[];
44
-
45
46
  owner_receive?: ReceivedObjectsOrRecently;
46
- um?: string | null; // Contact object
47
+ um?: NameOrAddress | null; // Contact object
47
48
  }
48
49
  ```
49
50
 
50
51
  ---
51
52
 
52
- See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject, ObjectsOp, AccountOrMark_Address, ReceivedObjectsOrRecently.
53
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject, ObjectsOp, ServiceGuard, AccountOrMark_Address, ReceivedObjectsOrRecently.
@@ -1,43 +1,23 @@
1
1
  # onchain_operations / gen_passport
2
2
 
3
- Create immutable verified credentials after Guard validation passes.
3
+ Generate Verified Passport Object: Create immutable verified credentials (passport).
4
4
 
5
- > **IMPORTANT**: Unlike other onchain operations, `gen_passport` uses a FLAT input structure — fields `guard`, `info`, `env` are directly at the top level, NOT nested under a `data` wrapper.
5
+ > **Structure Exception**: `gen_passport` has a **FLAT** structure — no `data` wrapper, no `submission` field.
6
6
 
7
- ## Input Schema
7
+ ## Schema
8
8
 
9
9
  ```typescript
10
- CallGenPassport_Input {
11
- guard: string | string[]; // Guard object ID(s) to verify. Can be a single guard or an array of guards.
12
- info?: SubmissionCall; // Optional submission data
13
- env?: CallEnv; // Optional environment configuration
14
- }
15
- ```
16
-
17
- ## Features
18
-
19
- - **Single Guard**: Pass a single guard ID or name as a string
20
- - **Multiple Guards**: Pass an array of guard IDs or names to verify multiple guards at once
21
- - **Name Resolution**: Supports both guard addresses and LocalMark names
22
-
23
- ## Examples
24
-
25
- ### Single Guard
26
- ```typescript
27
- {
28
- guard: "my-guard-name", // or "0x1234567890abcdef..."
29
- env: { network: "testnet" }
30
- }
31
- ```
32
-
33
- ### Multiple Guards
34
- ```typescript
35
- {
36
- guard: ["guard-1", "guard-2", "0x1234567890abcdef..."],
37
- env: { network: "testnet" }
10
+ GenPassport {
11
+ // Guard verification
12
+ guard: NameOrAddress | NameOrAddress[]; // Guard object ID(s) to verify and embed
13
+
14
+ // Optional submission data during Guard verification
15
+ info?: SubmissionCall; // Submission data for Guards requiring user input
16
+
17
+ env?: CallEnv; // Optional execution environment
38
18
  }
39
19
  ```
40
20
 
41
21
  ---
42
22
 
43
- See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall.
23
+ See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall.