@wowok/agent-mcp 2.6.1 → 2.6.3
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/dist/customer/info-puzzle.d.ts +1 -1
- package/dist/customer/info-puzzle.js +4 -2
- package/dist/customer/risk-assessment.js +26 -4
- package/dist/customer/types.d.ts +2 -0
- package/dist/examples/guard-template-balance-check.json +38 -0
- package/dist/examples/guard-template-time-lock.json +39 -0
- package/dist/examples/machine-template-7node-rental.json +114 -0
- package/dist/examples/rental-ziroom-machine-create.json +137 -0
- package/dist/examples/rental-ziroom-permission-create.json +35 -0
- package/dist/examples/rental-ziroom-service-create.json +80 -0
- package/dist/examples/retail-myshop-service-create.json +88 -0
- package/dist/extensions/capability-manifest.js +24 -24
- package/dist/extensions/constraint-registry.js +18 -18
- package/dist/extensions/metric-registry.js +14 -14
- package/dist/extensions/mode-evaluator.js +16 -16
- package/dist/extensions/modes.js +131 -45
- package/dist/extensions/registry.d.ts +2 -0
- package/dist/extensions/registry.js +63 -30
- package/dist/extensions/types.d.ts +1 -0
- package/dist/index.js +50 -0
- package/dist/knowledge/deployment-scanner.js +1 -1
- package/dist/knowledge/fund-layer.d.ts +72 -0
- package/dist/knowledge/fund-layer.js +420 -0
- package/dist/knowledge/guard-render.d.ts +57 -0
- package/dist/knowledge/guard-render.js +700 -0
- package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
- package/dist/knowledge/guard-submission-prompt.js +171 -0
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-render.d.ts +41 -0
- package/dist/knowledge/machine-render.js +565 -0
- package/dist/knowledge/machine-templates.js +4 -4
- package/dist/knowledge/reward-confirm.js +2 -2
- package/dist/knowledge/reward-puzzle.js +1 -1
- package/dist/knowledge/reward-risk.js +9 -9
- package/dist/knowledge/reward-templates.js +2 -2
- package/dist/knowledge/service-confirm.d.ts +1 -1
- package/dist/knowledge/service-confirm.js +3 -3
- package/dist/knowledge/service-context.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.d.ts +1 -1
- package/dist/knowledge/service-risk.js +3 -3
- package/dist/knowledge/service-templates.js +2 -2
- package/dist/knowledge/service-translation.d.ts +1 -1
- package/dist/knowledge/service-translation.js +7 -7
- package/dist/project/deployment-bridge.js +6 -5
- package/dist/project/deployment-doc.js +5 -5
- package/dist/project/edit-planner.d.ts +123 -0
- package/dist/project/edit-planner.js +1371 -0
- package/dist/project/evaluation.js +314 -14
- package/dist/project/graph-builder.js +6 -1
- package/dist/project/handlers.d.ts +99 -2
- package/dist/project/handlers.js +358 -16
- package/dist/project/stage-gate.js +4 -4
- package/dist/schema/call/allocation.js +2 -2
- package/dist/schema/call/arbitration.js +19 -6
- package/dist/schema/call/contact.js +2 -2
- package/dist/schema/call/demand.js +2 -2
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/machine.d.ts +1975 -777
- package/dist/schema/call/machine.js +50 -4
- package/dist/schema/call/order.js +3 -6
- package/dist/schema/call/permission.js +2 -2
- package/dist/schema/call/repository.js +2 -2
- package/dist/schema/call/reward.js +3 -3
- package/dist/schema/call/semantic.js +7 -1
- package/dist/schema/call/service.d.ts +180 -8
- package/dist/schema/call/service.js +82 -27
- package/dist/schema/call/treasury.js +3 -3
- package/dist/schema/common/index.d.ts +2 -0
- package/dist/schema/common/index.js +46 -10
- package/dist/schema/local/index.js +5 -1
- package/dist/schema/operations.d.ts +755 -176
- package/dist/schema/operations.js +43 -7
- package/dist/schema/project/index.d.ts +969 -6
- package/dist/schema/project/index.js +268 -4
- package/dist/schema/query/index.d.ts +217 -0
- package/dist/schema/query/index.js +63 -33
- package/dist/schema/schema-query/index.d.ts +53 -3
- package/dist/schema/schema-query/index.js +17 -2
- package/dist/schema/utils/node-parser.js +13 -0
- package/dist/schema/utils/object-type-utils.d.ts +12 -0
- package/dist/schema/utils/object-type-utils.js +35 -0
- package/dist/schema/utils/permission-machine-check.d.ts +49 -0
- package/dist/schema/utils/permission-machine-check.js +121 -0
- package/dist/schema/utils/skills-recommendation.d.ts +2 -0
- package/dist/schema/utils/skills-recommendation.js +76 -0
- package/dist/schema-query/index.d.ts +14 -1
- package/dist/schema-query/index.js +104 -2
- package/dist/schemas/account_operation.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/onchain_events.output.json +1 -1
- package/dist/schemas/onchain_operations.output.json +2820 -0
- package/dist/schemas/onchain_operations.schema.json +115 -53
- package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
- package/dist/schemas/onchain_operations_arbitration.schema.json +9 -7
- package/dist/schemas/onchain_operations_contact.schema.json +3 -3
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
- package/dist/schemas/onchain_operations_guard.schema.json +1 -1
- package/dist/schemas/onchain_operations_machine.schema.json +4 -4
- package/dist/schemas/onchain_operations_order.schema.json +3 -3
- package/dist/schemas/onchain_operations_payment.schema.json +1 -1
- package/dist/schemas/onchain_operations_permission.schema.json +2 -2
- package/dist/schemas/onchain_operations_progress.schema.json +1 -1
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_repository.schema.json +3 -3
- package/dist/schemas/onchain_operations_reward.schema.json +6 -6
- package/dist/schemas/onchain_operations_service.schema.json +77 -17
- package/dist/schemas/onchain_operations_treasury.schema.json +4 -4
- package/dist/schemas/onchain_table_data.output.json +1 -1
- package/dist/schemas/onchain_table_data.schema.json +10 -9
- package/dist/schemas/project_operation.output.json +1026 -7
- package/dist/schemas/project_operation.schema.json +46 -4
- package/dist/schemas/query_toolkit.output.json +15 -15
- package/dist/schemas/query_toolkit.schema.json +3 -3
- package/dist/schemas/schema_query.output.json +64 -1
- package/dist/schemas/schema_query.schema.json +3 -2
- package/dist/schemas/wowok_buildin_info.output.json +81 -8
- package/dist/schemas/wowok_buildin_info.schema.json +46 -2
- package/dist/tools/handlers/onchain.js +571 -6
- package/dist/tools/handlers/project.js +25 -2
- package/dist/tools/handlers/schema-query.js +24 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +177 -6
- package/package.json +2 -2
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
},
|
|
271
271
|
"data": {
|
|
272
272
|
"type": "object",
|
|
273
|
-
"description": "On-chain Guard creation. IMPORTANT: All defined data (include all submitted data) must be defined in the 'table' field. USAGE: Set 'namedNew' field with {name, tags?, onChain?} to name the new Guard. The Guard is immutable once created. Define the validation logic in 'root' field. When root.type='file', the file can contain all Guard fields, and any fields defined in the schema will OVERRIDE the file content.",
|
|
273
|
+
"description": "On-chain Guard creation. IMPORTANT: All defined data (include all submitted data) must be defined in the 'table' field. USAGE: Set 'namedNew' field with {name, tags?, onChain?} to name the new Guard (you may also use 'object' as an alias for 'namedNew' — the MCP preprocess will convert it automatically). The Guard is immutable once created. Define the validation logic in 'root' field. When root.type='file', the file can contain all Guard fields, and any fields defined in the schema will OVERRIDE the file content.",
|
|
274
274
|
"properties": {
|
|
275
275
|
"namedNew": {
|
|
276
276
|
"$ref": "#/definitions/guard_namedNew",
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
},
|
|
516
516
|
"b_submission": {
|
|
517
517
|
"type": "boolean",
|
|
518
|
-
"description": "Whether user
|
|
518
|
+
"description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
|
|
519
519
|
},
|
|
520
520
|
"value_type": {
|
|
521
521
|
"anyOf": [
|
|
@@ -1328,7 +1328,7 @@
|
|
|
1328
1328
|
},
|
|
1329
1329
|
"b_submission": {
|
|
1330
1330
|
"type": "boolean",
|
|
1331
|
-
"description": "Whether user
|
|
1331
|
+
"description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
|
|
1332
1332
|
},
|
|
1333
1333
|
"value_type": {
|
|
1334
1334
|
"anyOf": [
|
|
@@ -1907,7 +1907,7 @@
|
|
|
1907
1907
|
"number",
|
|
1908
1908
|
"string"
|
|
1909
1909
|
],
|
|
1910
|
-
"description": "A coin/balance amount
|
|
1910
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
1911
1911
|
}
|
|
1912
1912
|
},
|
|
1913
1913
|
"required": [
|
|
@@ -1930,7 +1930,7 @@
|
|
|
1930
1930
|
"additionalProperties": false
|
|
1931
1931
|
}
|
|
1932
1932
|
],
|
|
1933
|
-
"description": "Actual payment amount"
|
|
1933
|
+
"description": "Actual payment amount. FORMAT: {balance: <amount_in_smallest_unit>} or {coin: <coin_object_id>}. The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI."
|
|
1934
1934
|
},
|
|
1935
1935
|
"discount": {
|
|
1936
1936
|
"type": "string",
|
|
@@ -2008,15 +2008,15 @@
|
|
|
2008
2008
|
}
|
|
2009
2009
|
},
|
|
2010
2010
|
"additionalProperties": false,
|
|
2011
|
-
"description": "Set
|
|
2011
|
+
"description": "RECOMMENDED: Set a local name for the newly created Order object. Without this, the Order is only referenceable by its on-chain address. Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address."
|
|
2012
2012
|
},
|
|
2013
2013
|
"namedNewAllocation": {
|
|
2014
2014
|
"$ref": "#/definitions/data_service/properties/order_new/properties/namedNewOrder",
|
|
2015
|
-
"description": "Set
|
|
2015
|
+
"description": "RECOMMENDED: Set a local name for the order's Allocation object. Without this, the Allocation is only referenceable by its address. Example: {name: 'my_allocation_v1'} allows alloc_by_guard to reference 'my_allocation_v1'."
|
|
2016
2016
|
},
|
|
2017
2017
|
"namedNewProgress": {
|
|
2018
2018
|
"$ref": "#/definitions/data_service/properties/order_new/properties/namedNewOrder",
|
|
2019
|
-
"description": "Set
|
|
2019
|
+
"description": "RECOMMENDED: Set a local name for the order's Progress object. Without this, the Progress is only referenceable by its address. Example: {name: 'my_progress_v1'} allows progress operations to use 'my_progress_v1'."
|
|
2020
2020
|
}
|
|
2021
2021
|
},
|
|
2022
2022
|
"required": [
|
|
@@ -2227,7 +2227,7 @@
|
|
|
2227
2227
|
},
|
|
2228
2228
|
"arbitrations": {
|
|
2229
2229
|
"$ref": "#/definitions/data_service/properties/repositories",
|
|
2230
|
-
"description": "Service Arbitration object list."
|
|
2230
|
+
"description": "Service Arbitration object list. FORMAT: same as repositories — use the `objects` field name inside the operation data. Example: {arbitrations: [{name: 'my_arb_1'}, {name: 'my_arb_2'}]}. Each item is a NameOrAddress (object ID or local mark name)."
|
|
2231
2231
|
},
|
|
2232
2232
|
"machine": {
|
|
2233
2233
|
"anyOf": [
|
|
@@ -2409,10 +2409,10 @@
|
|
|
2409
2409
|
"Signer"
|
|
2410
2410
|
],
|
|
2411
2411
|
"additionalProperties": false,
|
|
2412
|
-
"description": "Current transaction signer
|
|
2412
|
+
"description": "Current transaction signer (tx_context::sender) at the time of the alloc() call. For refunds, the Order owner must call alloc_by_guard themselves to receive the funds."
|
|
2413
2413
|
}
|
|
2414
2414
|
],
|
|
2415
|
-
"description": "Recipient of this allocation. Three forms:\n• { GuardIdentifier: u8 } — resolved from Passport at
|
|
2415
|
+
"description": "Recipient of this allocation. Three forms — each resolves the address at a DIFFERENT time:\n• { GuardIdentifier: u8 } — DYNAMIC address resolved from Passport at alloc() time (contract calls passport::submission_get). Use 0 for Order owner in Service-integrated mode (Customer who created the Order). The identifier must match a Guard table entry with b_submission=true. If Passport has no matching submission, contract aborts with E_VERIFY_FAILED. Use when the recipient address is not known at config time and must be supplied via Guard submission data.\n• { Entity: { name_or_address: '...' } } — FIXED address resolved via LocalMark at SDK build time (passed to contract as a literal address). Use for known recipients (e.g., 'turo_host', or a Treasury object address). Use when the recipient is a stable, known address (e.g., operator receives rent, platform fee to treasury).\n• 'Signer' — the transaction sender at the time of the alloc() call (tx_context::sender). RESOLVED AT EXECUTION TIME, not at config time. For refunds: the customer (Order owner) must call alloc_by_guard THEMSELVES so that tx_context::sender resolves to THEIR address — if the operator calls alloc_by_guard, the operator becomes the recipient (Signer = operator), NOT the customer. Use when the recipient is whoever submits the allocation transaction (e.g., customer receives refund)."
|
|
2416
2416
|
},
|
|
2417
2417
|
"sharing": {
|
|
2418
2418
|
"type": [
|
|
@@ -2463,7 +2463,7 @@
|
|
|
2463
2463
|
"type": "null"
|
|
2464
2464
|
}
|
|
2465
2465
|
],
|
|
2466
|
-
"description": "Maximum allocation cap (
|
|
2466
|
+
"description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> via allocator_add(): when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort."
|
|
2467
2467
|
}
|
|
2468
2468
|
},
|
|
2469
2469
|
"required": [
|
|
@@ -2487,7 +2487,7 @@
|
|
|
2487
2487
|
"type": "null"
|
|
2488
2488
|
}
|
|
2489
2489
|
],
|
|
2490
|
-
"description": "Order fund allocator."
|
|
2490
|
+
"description": "Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). Each allocator has a guard (first matching guard wins) and a sharing list. Set to null to clear. ⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true (Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). After publish, the ONLY way to change allocation rules is to create a NEW Service object. There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — resolves recipient from Guard table submission at allocation time (e.g., refund to customer). MULTI-CALL ALLOCATION: Allocation.alloc() can be called MULTIPLE times (no consumed flag in contract). Use Amount mode (not Surplus) for recurring allocations — Surplus calls balance::withdraw_all which drains the balance. For monthly payment scenarios, create multiple Allocators with time-based Guards + Amount mode sharing items."
|
|
2491
2491
|
},
|
|
2492
2492
|
"buy_guard": {
|
|
2493
2493
|
"anyOf": [
|
|
@@ -2509,11 +2509,71 @@
|
|
|
2509
2509
|
"$ref": "#/definitions/data_service/properties/order_new/properties/buy/properties/total_pay/anyOf/1"
|
|
2510
2510
|
}
|
|
2511
2511
|
],
|
|
2512
|
-
"description": "
|
|
2512
|
+
"description": "Deposit funds into the Service compensation_fund. Used to pay indemnity when arbitration resolves in customer's favor. FORMAT: {balance: <amount_in_smallest_unit>} — the field name is 'balance' (NOT 'amount'). The token type and precision are determined by the Service object's type_parameter (the generic type set when the Service was created). For WOW (9 decimals): {balance: 1000000000} = 1 WOW. For SUI (9 decimals): {balance: 1000000000} = 1 SUI. For tokens with different decimals, adjust accordingly (e.g. USDC has 6 decimals, so {balance: 1000000} = 1 USDC). REQUIRES: Permission index 315 (SERVICE_COMPENSATION_FUND_DEPOSIT) must be granted to the calling account first. COMMON MISTAKE: using {amount: ...} or {amount: ..., type: 'WOW'} — these will fail. The correct field is 'balance'."
|
|
2513
2513
|
},
|
|
2514
|
-
"
|
|
2514
|
+
"compensation_fund_withdraw": {
|
|
2515
|
+
"type": "object",
|
|
2516
|
+
"properties": {
|
|
2517
|
+
"receipt": {
|
|
2518
|
+
"type": "object",
|
|
2519
|
+
"properties": {
|
|
2520
|
+
"name_or_address": {
|
|
2521
|
+
"$ref": "#/definitions/data_service/properties/order_new/properties/agents/properties/entities/items/properties/name_or_address"
|
|
2522
|
+
},
|
|
2523
|
+
"local_mark_first": {
|
|
2524
|
+
"$ref": "#/definitions/data_service/properties/order_new/properties/agents/properties/entities/items/properties/local_mark_first"
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2527
|
+
"additionalProperties": false,
|
|
2528
|
+
"description": "Receipt address that will receive the withdrawn funds (as a new Payment object)"
|
|
2529
|
+
},
|
|
2530
|
+
"payment_info": {
|
|
2531
|
+
"type": "object",
|
|
2532
|
+
"properties": {
|
|
2533
|
+
"for_object": {
|
|
2534
|
+
"type": [
|
|
2535
|
+
"string",
|
|
2536
|
+
"null"
|
|
2537
|
+
],
|
|
2538
|
+
"description": "Payment for a specific object ID"
|
|
2539
|
+
},
|
|
2540
|
+
"for_guard": {
|
|
2541
|
+
"type": [
|
|
2542
|
+
"string",
|
|
2543
|
+
"null"
|
|
2544
|
+
],
|
|
2545
|
+
"description": "Payment to satisfy verification of a Guard object"
|
|
2546
|
+
},
|
|
2547
|
+
"remark": {
|
|
2548
|
+
"type": "string",
|
|
2549
|
+
"description": "Payment record remark"
|
|
2550
|
+
},
|
|
2551
|
+
"index": {
|
|
2552
|
+
"type": [
|
|
2553
|
+
"number",
|
|
2554
|
+
"string"
|
|
2555
|
+
],
|
|
2556
|
+
"description": "Payment record index"
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2559
|
+
"required": [
|
|
2560
|
+
"remark",
|
|
2561
|
+
"index"
|
|
2562
|
+
],
|
|
2563
|
+
"additionalProperties": false,
|
|
2564
|
+
"description": "Payment info for the new Payment object created to hold the withdrawn funds"
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
"required": [
|
|
2568
|
+
"receipt",
|
|
2569
|
+
"payment_info"
|
|
2570
|
+
],
|
|
2571
|
+
"additionalProperties": false,
|
|
2572
|
+
"description": "Withdraw ALL funds from the compensation_fund to a new Payment object owned by `receipt`. Move layer: service::compensation_fund_withdraw (service.move L383-390). REQUIRES: Service must be paused AND setting_lock_duration must have elapsed since pause (assert_not_published at L384-385). Withdraws the ENTIRE compensation_fund balance via balance::withdraw_all. DIFFERENT from compensation_claim (order-side, for arbitration-winning users, no pause+lock required)."
|
|
2573
|
+
},
|
|
2574
|
+
"setting_lock_duration_add": {
|
|
2515
2575
|
"type": "number",
|
|
2516
|
-
"description": "Additional lock duration
|
|
2576
|
+
"description": "Additional lock duration to ADD to 'setting_lock_duration' (Move field name). UNIT: milliseconds (ms). Example: 2592000000 = 30 days, 7776000000 = 90 days, 86400000 = 1 day. DEFAULT: 2592000000 (30 days, DEFAULT_LOCK_DURATION). This is the initial value when a Service is created. Behavior: additive (safe_add) — only increases, never decreases. Move entry: service::setting_lock_duration_add / setting_lock_duration_add_with_passport. Can be called BEFORE or AFTER publish (no publish check). Affects the waiting time required by: compensation_fund_withdraw, arbitrations remove/clear, rewards remove/clear (all require pause + setting_lock_duration elapsed since pause)."
|
|
2517
2577
|
},
|
|
2518
2578
|
"compensation_fund_receive": {
|
|
2519
2579
|
"anyOf": [
|
|
@@ -2568,7 +2628,7 @@
|
|
|
2568
2628
|
"const": "recently"
|
|
2569
2629
|
}
|
|
2570
2630
|
],
|
|
2571
|
-
"description": "Receive order compensation funds."
|
|
2631
|
+
"description": "Receive order compensation funds from this Service object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
2572
2632
|
},
|
|
2573
2633
|
"owner_receive": {
|
|
2574
2634
|
"anyOf": [
|
|
@@ -2607,7 +2667,7 @@
|
|
|
2607
2667
|
"const": "recently"
|
|
2608
2668
|
}
|
|
2609
2669
|
],
|
|
2610
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
2670
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Service object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
2611
2671
|
},
|
|
2612
2672
|
"um": {
|
|
2613
2673
|
"anyOf": [
|
|
@@ -2626,7 +2686,7 @@
|
|
|
2626
2686
|
},
|
|
2627
2687
|
"publish": {
|
|
2628
2688
|
"type": "boolean",
|
|
2629
|
-
"description": "Whether to publish the Service. After publishing, customers can place orders.
|
|
2689
|
+
"description": "Whether to publish the Service. After publishing, customers can place orders. VERIFIED against Move source service.move + SDK service.ts (4-level immutability matrix):\n L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n • machine (service.move L633/L653 — workflow template)\n • order_allocators (service.move L503 — fund distribution rules)\n L2 — TIME-LOCKED after publish (assert_not_published — requires pause + setting_lock_duration elapsed):\n • arbitrations remove/clear (service.move L433/L445 — dispute resolution objects)\n • rewards remove/clear (service.move L402/L414 — reward objects)\n • compensation_fund_withdraw (service.move L384-385 — withdraw ALL funds)\n L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n • arbitrations add, rewards add (no assert — can add after publish)\n • buy_guard, sales, discount, description, location, pause, repositories,\n • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\nThese 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\narbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n\n⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE (service.move:494-499):\n At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n if (balance::value(&self.compensation_fund) > 0) {\n assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n }\n The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add is set in the same call AND arbitrations is empty, the call is REJECTED before submission. If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n\nSCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n The name is resolved to an address at transaction build time.\n Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc."
|
|
2630
2690
|
}
|
|
2631
2691
|
},
|
|
2632
2692
|
"required": [
|
|
@@ -3006,7 +3066,7 @@
|
|
|
3006
3066
|
"additionalProperties": false,
|
|
3007
3067
|
"description": "Forward in Machine object"
|
|
3008
3068
|
},
|
|
3009
|
-
"description": "Forward list — operations to ENTER THIS NODE from prev_node. Example: pair {prev_node:'A', forwards:[{name:'Go'}]} means 'use Go to advance FROM A TO THIS NODE'. For initial node (prev_node=''), forwards are operations to enter this node from the start state. WARNING: forwards belong to the DESTINATION node's pair, NOT the source node. Placing a forward on the wrong pair will cause Progress to get stuck."
|
|
3069
|
+
"description": "Forward list — operations to ENTER THIS NODE from prev_node. SEMANTIC CLARIFICATION: forwards describe INCOMING transitions (how to ARRIVE at this node), NOT outgoing transitions. Think of each forward as an 'entry door' to this node. Example: pair {prev_node:'A', forwards:[{name:'Go'}]} means 'use Go to advance FROM A TO THIS NODE'. For initial node (prev_node=''), forwards are operations to enter this node from the start state. DIAGRAM: A --[Go]--> B means the pair belongs to node B (destination), with prev_node='A'. WARNING: forwards belong to the DESTINATION node's pair, NOT the source node. Placing a forward on the wrong pair will cause Progress to get stuck."
|
|
3010
3070
|
}
|
|
3011
3071
|
},
|
|
3012
3072
|
"required": [
|
|
@@ -3355,7 +3415,7 @@
|
|
|
3355
3415
|
"number",
|
|
3356
3416
|
"string"
|
|
3357
3417
|
],
|
|
3358
|
-
"description": "A coin/balance amount
|
|
3418
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
3359
3419
|
},
|
|
3360
3420
|
"token_type": {
|
|
3361
3421
|
"type": "string",
|
|
@@ -3402,7 +3462,7 @@
|
|
|
3402
3462
|
"const": "recently"
|
|
3403
3463
|
}
|
|
3404
3464
|
],
|
|
3405
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
3465
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Machine object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
3406
3466
|
},
|
|
3407
3467
|
"um": {
|
|
3408
3468
|
"anyOf": [
|
|
@@ -4538,7 +4598,7 @@
|
|
|
4538
4598
|
"number",
|
|
4539
4599
|
"string"
|
|
4540
4600
|
],
|
|
4541
|
-
"description": "A coin/balance amount
|
|
4601
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
4542
4602
|
},
|
|
4543
4603
|
"token_type": {
|
|
4544
4604
|
"type": "string",
|
|
@@ -4585,7 +4645,7 @@
|
|
|
4585
4645
|
"const": "recently"
|
|
4586
4646
|
}
|
|
4587
4647
|
],
|
|
4588
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
4648
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Repository object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
4589
4649
|
},
|
|
4590
4650
|
"um": {
|
|
4591
4651
|
"anyOf": [
|
|
@@ -4708,7 +4768,7 @@
|
|
|
4708
4768
|
"number",
|
|
4709
4769
|
"string"
|
|
4710
4770
|
],
|
|
4711
|
-
"description": "A coin/balance amount
|
|
4771
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
4712
4772
|
}
|
|
4713
4773
|
},
|
|
4714
4774
|
"required": [
|
|
@@ -4731,7 +4791,7 @@
|
|
|
4731
4791
|
"additionalProperties": false
|
|
4732
4792
|
}
|
|
4733
4793
|
],
|
|
4734
|
-
"description": "Dispute processing fee."
|
|
4794
|
+
"description": "Dispute processing fee. FORMAT: {balance: <amount_in_smallest_unit>} — field name is 'balance' (NOT 'amount'). The token type and precision are determined by the Arbitration object's type_parameter (the generic type set when the Arbitration was created). For WOW (9 decimals): {balance: 50000000} = 0.05 WOW. For SUI (9 decimals): {balance: 50000000} = 0.05 SUI. For tokens with different decimals, adjust accordingly (e.g. USDC has 6 decimals, so {balance: 50000} = 0.05 USDC)."
|
|
4735
4795
|
},
|
|
4736
4796
|
"namedArb": {
|
|
4737
4797
|
"type": "object",
|
|
@@ -4750,7 +4810,7 @@
|
|
|
4750
4810
|
}
|
|
4751
4811
|
},
|
|
4752
4812
|
"additionalProperties": false,
|
|
4753
|
-
"description": "
|
|
4813
|
+
"description": "RECOMMENDED: Set a local name for the newly created Arb (arbitration case) object. Without this, the Arb is only referenceable by its on-chain address. Example: {name: 'my_dispute_v1'} allows subsequent vote/feedback operations to use 'my_dispute_v1'."
|
|
4754
4814
|
}
|
|
4755
4815
|
},
|
|
4756
4816
|
"required": [
|
|
@@ -4793,7 +4853,8 @@
|
|
|
4793
4853
|
{
|
|
4794
4854
|
"type": "null"
|
|
4795
4855
|
}
|
|
4796
|
-
]
|
|
4856
|
+
],
|
|
4857
|
+
"description": "Voting deadline as Unix timestamp in MILLISECONDS (ms). MUST be in the future (recommended: now + at least 86400000 ms = 24 hours). Set to null to remove the deadline. COMMON MISTAKE: using seconds instead of milliseconds (multiply by 1000). Example: Date.now() + 259200000 for 3 days from now."
|
|
4797
4858
|
}
|
|
4798
4859
|
},
|
|
4799
4860
|
"required": [
|
|
@@ -4813,7 +4874,8 @@
|
|
|
4813
4874
|
"type": [
|
|
4814
4875
|
"number",
|
|
4815
4876
|
"null"
|
|
4816
|
-
]
|
|
4877
|
+
],
|
|
4878
|
+
"description": "New voting deadline as Unix timestamp in MILLISECONDS (ms). MUST be in the future (recommended: now + at least 86400000 ms = 24 hours). Set to null to remove the deadline. COMMON MISTAKE: using seconds instead of milliseconds (multiply by 1000). Example: Date.now() + 259200000 for 3 days from now."
|
|
4817
4879
|
}
|
|
4818
4880
|
},
|
|
4819
4881
|
"required": [
|
|
@@ -5178,7 +5240,7 @@
|
|
|
5178
5240
|
"const": "recently"
|
|
5179
5241
|
}
|
|
5180
5242
|
],
|
|
5181
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
5243
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Arbitration object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
5182
5244
|
},
|
|
5183
5245
|
"um": {
|
|
5184
5246
|
"anyOf": [
|
|
@@ -5422,7 +5484,7 @@
|
|
|
5422
5484
|
"number",
|
|
5423
5485
|
"string"
|
|
5424
5486
|
],
|
|
5425
|
-
"description": "A coin/balance amount
|
|
5487
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
5426
5488
|
},
|
|
5427
5489
|
"token_type": {
|
|
5428
5490
|
"type": "string",
|
|
@@ -5469,7 +5531,7 @@
|
|
|
5469
5531
|
"const": "recently"
|
|
5470
5532
|
}
|
|
5471
5533
|
],
|
|
5472
|
-
"description": "Receive objects sent to this
|
|
5534
|
+
"description": "Receive objects sent to this Contact object and unwrap them to the permission owner.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
5473
5535
|
}
|
|
5474
5536
|
},
|
|
5475
5537
|
"required": [
|
|
@@ -5567,7 +5629,7 @@
|
|
|
5567
5629
|
"number",
|
|
5568
5630
|
"string"
|
|
5569
5631
|
],
|
|
5570
|
-
"description": "A coin/balance amount
|
|
5632
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
5571
5633
|
},
|
|
5572
5634
|
"token_type": {
|
|
5573
5635
|
"type": "string",
|
|
@@ -5614,7 +5676,7 @@
|
|
|
5614
5676
|
"const": "recently"
|
|
5615
5677
|
}
|
|
5616
5678
|
],
|
|
5617
|
-
"description": "Receive CoinWrapper objects received by
|
|
5679
|
+
"description": "Receive CoinWrapper objects received by this Treasury object and deposit them into its balance.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
5618
5680
|
},
|
|
5619
5681
|
"deposit": {
|
|
5620
5682
|
"type": "object",
|
|
@@ -6040,7 +6102,7 @@
|
|
|
6040
6102
|
"const": "recently"
|
|
6041
6103
|
}
|
|
6042
6104
|
],
|
|
6043
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
6105
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Treasury object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
6044
6106
|
},
|
|
6045
6107
|
"um": {
|
|
6046
6108
|
"anyOf": [
|
|
@@ -6153,7 +6215,7 @@
|
|
|
6153
6215
|
"number",
|
|
6154
6216
|
"string"
|
|
6155
6217
|
],
|
|
6156
|
-
"description": "A coin/balance amount
|
|
6218
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
6157
6219
|
}
|
|
6158
6220
|
},
|
|
6159
6221
|
"required": [
|
|
@@ -6231,7 +6293,7 @@
|
|
|
6231
6293
|
"const": "recently"
|
|
6232
6294
|
}
|
|
6233
6295
|
],
|
|
6234
|
-
"description": "Unwrap CoinWrapper objects received by Reward object and store them in pending balance."
|
|
6296
|
+
"description": "Unwrap CoinWrapper objects received by Reward object and store them in pending balance.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
6235
6297
|
},
|
|
6236
6298
|
"guard_add": {
|
|
6237
6299
|
"type": "array",
|
|
@@ -6297,10 +6359,10 @@
|
|
|
6297
6359
|
"Signer"
|
|
6298
6360
|
],
|
|
6299
6361
|
"additionalProperties": false,
|
|
6300
|
-
"description": "Current transaction signer
|
|
6362
|
+
"description": "Current transaction signer (tx_context::sender) at the time of the alloc() call. For refunds, the Order owner must call alloc_by_guard themselves to receive the funds."
|
|
6301
6363
|
}
|
|
6302
6364
|
],
|
|
6303
|
-
"description": "Recipient ID. Three forms:\n - {GuardIdentifier: u8} — resolved from Passport at
|
|
6365
|
+
"description": "Recipient ID. Three forms:\n - {GuardIdentifier: u8} — DYNAMIC address resolved from Passport at alloc() time\n - {Entity: {name_or_address: 'mark_name'}} — FIXED static address via LocalMark (recommended)\n - {Signer: 'signer'} — transaction sender at alloc() time (e.g. self-refund; customer must call alloc_by_guard themselves)"
|
|
6304
6366
|
},
|
|
6305
6367
|
"amount": {
|
|
6306
6368
|
"anyOf": [
|
|
@@ -6422,7 +6484,7 @@
|
|
|
6422
6484
|
"const": "recently"
|
|
6423
6485
|
}
|
|
6424
6486
|
],
|
|
6425
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
6487
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Reward object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
6426
6488
|
},
|
|
6427
6489
|
"um": {
|
|
6428
6490
|
"anyOf": [
|
|
@@ -6562,10 +6624,10 @@
|
|
|
6562
6624
|
"Signer"
|
|
6563
6625
|
],
|
|
6564
6626
|
"additionalProperties": false,
|
|
6565
|
-
"description": "Current transaction signer
|
|
6627
|
+
"description": "Current transaction signer (tx_context::sender) at the time of the alloc() call. For refunds, the Order owner must call alloc_by_guard themselves to receive the funds."
|
|
6566
6628
|
}
|
|
6567
6629
|
],
|
|
6568
|
-
"description": "Recipient of this allocation. Three forms:\n• { GuardIdentifier: u8 } — resolved from Passport at
|
|
6630
|
+
"description": "Recipient of this allocation. Three forms — each resolves the address at a DIFFERENT time:\n• { GuardIdentifier: u8 } — DYNAMIC address resolved from Passport at alloc() time (contract calls passport::submission_get). Use 0 for Order owner in Service-integrated mode (Customer who created the Order). The identifier must match a Guard table entry with b_submission=true. If Passport has no matching submission, contract aborts with E_VERIFY_FAILED. Use when the recipient address is not known at config time and must be supplied via Guard submission data.\n• { Entity: { name_or_address: '...' } } — FIXED address resolved via LocalMark at SDK build time (passed to contract as a literal address). Use for known recipients (e.g., 'turo_host', or a Treasury object address). Use when the recipient is a stable, known address (e.g., operator receives rent, platform fee to treasury).\n• 'Signer' — the transaction sender at the time of the alloc() call (tx_context::sender). RESOLVED AT EXECUTION TIME, not at config time. For refunds: the customer (Order owner) must call alloc_by_guard THEMSELVES so that tx_context::sender resolves to THEIR address — if the operator calls alloc_by_guard, the operator becomes the recipient (Signer = operator), NOT the customer. Use when the recipient is whoever submits the allocation transaction (e.g., customer receives refund)."
|
|
6569
6631
|
},
|
|
6570
6632
|
"sharing": {
|
|
6571
6633
|
"type": [
|
|
@@ -6616,7 +6678,7 @@
|
|
|
6616
6678
|
"type": "null"
|
|
6617
6679
|
}
|
|
6618
6680
|
],
|
|
6619
|
-
"description": "Maximum allocation cap (
|
|
6681
|
+
"description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> via allocator_add(): when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort."
|
|
6620
6682
|
}
|
|
6621
6683
|
},
|
|
6622
6684
|
"required": [
|
|
@@ -6773,7 +6835,7 @@
|
|
|
6773
6835
|
"const": "recently"
|
|
6774
6836
|
}
|
|
6775
6837
|
],
|
|
6776
|
-
"description": "Unwrap the CoinWrapper objects received by the Allocation object and deposit them into the pending allocation balance"
|
|
6838
|
+
"description": "Unwrap the CoinWrapper objects received by the Allocation object and deposit them into the pending allocation balance.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received balance.\n Use this for the common case: \"deposit all recently received coins into pending balance.\"\n Example: receive: 'recently'\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a specific balance record from a Payment/payer.\n Use this when targeting a specific received balance (advanced).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
6777
6839
|
},
|
|
6778
6840
|
"alloc_by_guard": {
|
|
6779
6841
|
"$ref": "#/definitions/data_allocation/anyOf/0/properties/allocators/properties/allocators/items/properties/sharing/items/properties/who/anyOf/1/properties/Entity/properties/name_or_address",
|
|
@@ -7240,7 +7302,7 @@
|
|
|
7240
7302
|
"number",
|
|
7241
7303
|
"string"
|
|
7242
7304
|
],
|
|
7243
|
-
"description": "A coin/balance amount
|
|
7305
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
7244
7306
|
},
|
|
7245
7307
|
"token_type": {
|
|
7246
7308
|
"type": "string",
|
|
@@ -7287,7 +7349,7 @@
|
|
|
7287
7349
|
"const": "recently"
|
|
7288
7350
|
}
|
|
7289
7351
|
],
|
|
7290
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the builder(owner)."
|
|
7352
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Permission object and send them to the builder(owner).\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
7291
7353
|
},
|
|
7292
7354
|
"um": {
|
|
7293
7355
|
"anyOf": [
|
|
@@ -7368,7 +7430,7 @@
|
|
|
7368
7430
|
},
|
|
7369
7431
|
"b_submission": {
|
|
7370
7432
|
"type": "boolean",
|
|
7371
|
-
"description": "Whether user
|
|
7433
|
+
"description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
|
|
7372
7434
|
},
|
|
7373
7435
|
"value_type": {
|
|
7374
7436
|
"anyOf": [
|
|
@@ -8656,7 +8718,7 @@
|
|
|
8656
8718
|
"number",
|
|
8657
8719
|
"string"
|
|
8658
8720
|
],
|
|
8659
|
-
"description": "A coin/balance amount
|
|
8721
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
8660
8722
|
}
|
|
8661
8723
|
},
|
|
8662
8724
|
"required": [
|
|
@@ -9108,7 +9170,7 @@
|
|
|
9108
9170
|
"number",
|
|
9109
9171
|
"string"
|
|
9110
9172
|
],
|
|
9111
|
-
"description": "A coin/balance amount
|
|
9173
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
9112
9174
|
},
|
|
9113
9175
|
"token_type": {
|
|
9114
9176
|
"type": "string",
|
|
@@ -9155,7 +9217,7 @@
|
|
|
9155
9217
|
"const": "recently"
|
|
9156
9218
|
}
|
|
9157
9219
|
],
|
|
9158
|
-
"description": "Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."
|
|
9220
|
+
"description": "Unwrap CoinWrapper objects and other objects received by this Demand object and send them to the owner of its Permission object.\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
9159
9221
|
},
|
|
9160
9222
|
"um": {
|
|
9161
9223
|
"anyOf": [
|
|
@@ -9369,7 +9431,7 @@
|
|
|
9369
9431
|
"number",
|
|
9370
9432
|
"string"
|
|
9371
9433
|
],
|
|
9372
|
-
"description": "A coin/balance amount
|
|
9434
|
+
"description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05SUI\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is (loses precision above 2^53). PRECISION RULE: for values exceeding 2^53, ALWAYS use format (1) or (2) — JS numbers lose precision. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer. If multiple tokens share a symbol (ambiguity), specify the full type string in type_parameter. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
|
|
9373
9435
|
},
|
|
9374
9436
|
"token_type": {
|
|
9375
9437
|
"type": "string",
|
|
@@ -9416,7 +9478,7 @@
|
|
|
9416
9478
|
"const": "recently"
|
|
9417
9479
|
}
|
|
9418
9480
|
],
|
|
9419
|
-
"description": "Unwrap CoinWrapper objects or other objects received by the order and transfer them to the order owner.
|
|
9481
|
+
"description": "Unwrap CoinWrapper objects or other objects received by the order and transfer them to the order owner. Consistent with `owner_receive` on other objects (arbitration/contact/demand/machine/permission/repository/reward/service/treasury).\n\nACCEPTED FORMATS (F-06 unified receive operation block):\n• 'recently' (string literal) — auto-query and receive ALL recently received objects.\n Use this for the common case: \"withdraw everything the object has received.\"\n Example: receive: 'recently'\n• ReceivedNormal[] (array) — explicit list of received objects to unwrap.\n Use this when you want to receive specific objects only (not all).\n Example: receive: [{id: '0xobj1', type: '0x2::coin::Coin<0x2::sui::SUI>'}]\n• ReceivedBalance ({token_type, balance, received: [{id, balance, payment}]}) —\n receive a balance record from a specific Payment/payer.\n Use this for precise balance targeting (advanced — usually after querying\n the object's received history via query_received).\n Example: receive: {token_type: '0x2::sui::SUI', balance: 1000000, received: [{id: '0xrec1', balance: 1000000, payment: '0xpay1'}]}\nANTI-PATTERN: do NOT wrap in {result: ...} — pass the value directly."
|
|
9420
9482
|
},
|
|
9421
9483
|
"transfer_to": {
|
|
9422
9484
|
"$ref": "#/definitions/data_order/properties/agent/properties/entities/items",
|
|
@@ -9500,7 +9562,7 @@
|
|
|
9500
9562
|
},
|
|
9501
9563
|
"b_submission": {
|
|
9502
9564
|
"type": "boolean",
|
|
9503
|
-
"description": "Whether user
|
|
9565
|
+
"description": "Whether this table item's value is submitted dynamically at Guard trigger time (alloc_by_guard call). \n\ntrue = value is submitted by the caller when triggering the Guard. Use for runtime-context-dependent values like order address, user address. The 'value' field is ignored when b_submission=true; the caller must provide it via submissions[]. \n\nfalse = value is static, set at Guard creation time. Use for values known when the Guard is created: expected node names, expected merchant address, expected service address. The 'value' field must be populated and will be stored on-chain permanently. \n\nRule of thumb: if the value is the SAME for all future Guard triggers, use false. If the value DIFFERS per trigger (e.g., which order to release funds for), use true."
|
|
9504
9566
|
},
|
|
9505
9567
|
"value_type": {
|
|
9506
9568
|
"anyOf": [
|