@wowok/agent-mcp 2.6.0 → 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/README.md +5 -3
- 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.d.ts +125 -0
- package/dist/extensions/capability-manifest.js +594 -0
- package/dist/extensions/constraint-registry.d.ts +24 -0
- package/dist/extensions/constraint-registry.js +196 -0
- package/dist/extensions/index.d.ts +12 -0
- package/dist/extensions/index.js +6 -0
- package/dist/extensions/metric-registry.d.ts +26 -0
- package/dist/extensions/metric-registry.js +257 -0
- package/dist/extensions/mode-evaluator.d.ts +15 -0
- package/dist/extensions/mode-evaluator.js +170 -0
- package/dist/extensions/modes.d.ts +2 -0
- package/dist/extensions/modes.js +493 -0
- package/dist/extensions/registry.d.ts +50 -0
- package/dist/extensions/registry.js +662 -0
- package/dist/extensions/types.d.ts +219 -0
- package/dist/extensions/types.js +1 -0
- package/dist/index.js +50 -0
- package/dist/knowledge/deployment-scanner.d.ts +3 -0
- package/dist/knowledge/deployment-scanner.js +64 -3
- 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-risk.d.ts +13 -0
- package/dist/knowledge/guard-risk.js +57 -0
- package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
- package/dist/knowledge/guard-submission-prompt.js +171 -0
- package/dist/knowledge/guard-templates.js +278 -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 +24 -5
- 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 +15 -6
- package/dist/knowledge/service-confirm.js +119 -11
- 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/knowledge/tool-constraints.js +6 -2
- package/dist/project/deployment-bridge.d.ts +1 -1
- package/dist/project/deployment-bridge.js +31 -7
- package/dist/project/deployment-doc.d.ts +3 -0
- package/dist/project/deployment-doc.js +76 -14
- package/dist/project/edit-planner.d.ts +123 -0
- package/dist/project/edit-planner.js +1371 -0
- package/dist/project/evaluation.d.ts +2 -0
- package/dist/project/evaluation.js +873 -88
- package/dist/project/graph-builder.d.ts +4 -1
- package/dist/project/graph-builder.js +132 -62
- package/dist/project/graph.d.ts +1 -0
- package/dist/project/handlers.d.ts +317 -6
- package/dist/project/handlers.js +1171 -19
- package/dist/project/stage-gate.d.ts +4 -0
- package/dist/project/stage-gate.js +64 -5
- package/dist/project/task-tracker.d.ts +26 -0
- package/dist/project/task-tracker.js +78 -0
- package/dist/safety/preview.js +16 -0
- package/dist/schema/call/allocation.d.ts +16 -16
- package/dist/schema/call/allocation.js +2 -2
- package/dist/schema/call/arbitration.js +19 -6
- package/dist/schema/call/base.d.ts +21 -13
- package/dist/schema/call/base.js +27 -6
- package/dist/schema/call/bridge.d.ts +5 -5
- package/dist/schema/call/bridge.js +3 -1
- package/dist/schema/call/contact.js +2 -2
- package/dist/schema/call/demand.d.ts +23 -31
- package/dist/schema/call/demand.js +2 -2
- package/dist/schema/call/guard.js +2 -2
- package/dist/schema/call/machine.d.ts +1976 -752
- package/dist/schema/call/machine.js +50 -4
- package/dist/schema/call/order.d.ts +149 -228
- package/dist/schema/call/order.js +4 -3
- package/dist/schema/call/payment.d.ts +183 -3
- package/dist/schema/call/payment.js +21 -3
- package/dist/schema/call/permission.js +2 -2
- package/dist/schema/call/personal.d.ts +241 -52
- package/dist/schema/call/progress.d.ts +53 -61
- package/dist/schema/call/progress.js +18 -4
- package/dist/schema/call/repository.d.ts +23 -31
- package/dist/schema/call/repository.js +2 -2
- package/dist/schema/call/reward.js +3 -3
- package/dist/schema/call/semantic.d.ts +1 -1
- package/dist/schema/call/semantic.js +37 -2
- package/dist/schema/call/service.d.ts +275 -127
- package/dist/schema/call/service.js +89 -13
- package/dist/schema/call/treasury.js +3 -3
- package/dist/schema/common/index.d.ts +13 -2
- package/dist/schema/common/index.js +80 -15
- package/dist/schema/local/index.d.ts +32 -35
- package/dist/schema/local/index.js +28 -6
- package/dist/schema/messenger/index.d.ts +274 -46
- package/dist/schema/operations.d.ts +1264 -544
- package/dist/schema/operations.js +65 -7
- package/dist/schema/project/index.d.ts +2846 -167
- package/dist/schema/project/index.js +570 -16
- package/dist/schema/query/index.d.ts +922 -349
- package/dist/schema/query/index.js +205 -42
- package/dist/schema/schema-query/index.d.ts +65 -3
- package/dist/schema/schema-query/index.js +38 -5
- package/dist/schema/utils/node-parser.js +20 -4
- 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 +20 -1
- package/dist/schema-query/index.js +306 -4
- package/dist/schemas/account_operation.output.json +7 -1
- package/dist/schemas/account_operation.schema.json +3 -3
- package/dist/schemas/bridge_operation.output.json +6 -0
- package/dist/schemas/bridge_operation.schema.json +1 -1
- package/dist/schemas/guard-templates.json +379 -0
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/local_info_operation.output.json +6 -0
- package/dist/schemas/local_mark_operation.output.json +7 -1
- package/dist/schemas/local_mark_operation.schema.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.schema.json +4 -4
- 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 +444 -330
- package/dist/schemas/onchain_operations_allocation.schema.json +37 -28
- package/dist/schemas/onchain_operations_arbitration.schema.json +16 -14
- package/dist/schemas/onchain_operations_contact.schema.json +10 -10
- package/dist/schemas/onchain_operations_demand.schema.json +10 -10
- package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -16
- package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_machine.schema.json +43 -35
- package/dist/schemas/onchain_operations_order.schema.json +72 -78
- package/dist/schemas/onchain_operations_payment.schema.json +141 -111
- package/dist/schemas/onchain_operations_permission.schema.json +3 -3
- package/dist/schemas/onchain_operations_personal.schema.json +7 -7
- package/dist/schemas/onchain_operations_progress.schema.json +9 -9
- package/dist/schemas/onchain_operations_proof.schema.json +8 -8
- package/dist/schemas/onchain_operations_repository.schema.json +10 -10
- package/dist/schemas/onchain_operations_reward.schema.json +14 -14
- package/dist/schemas/onchain_operations_service.schema.json +119 -48
- package/dist/schemas/onchain_operations_treasury.schema.json +11 -11
- package/dist/schemas/onchain_table_data.output.json +33 -25
- package/dist/schemas/onchain_table_data.schema.json +22 -21
- package/dist/schemas/project_operation.output.json +2194 -23
- package/dist/schemas/project_operation.schema.json +84 -6
- package/dist/schemas/query_toolkit.output.json +108 -80
- package/dist/schemas/query_toolkit.schema.json +12 -12
- package/dist/schemas/schema_query.output.json +70 -3
- package/dist/schemas/schema_query.schema.json +18 -3
- package/dist/schemas/wowok_buildin_info.output.json +81 -8
- package/dist/schemas/wowok_buildin_info.schema.json +46 -2
- package/dist/tools/handlers/local.js +20 -5
- package/dist/tools/handlers/onchain.js +594 -6
- package/dist/tools/handlers/project.js +76 -4
- package/dist/tools/handlers/query.js +27 -0
- package/dist/tools/handlers/schema-query.js +43 -1
- package/dist/tools/handlers/task-status.d.ts +170 -0
- package/dist/tools/handlers/task-status.js +55 -0
- package/dist/tools/handlers/wip.js +47 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +387 -12
- package/dist/tools/retry.d.ts +8 -0
- package/dist/tools/retry.js +85 -0
- package/dist/tools/wip-deploy-assist.d.ts +28 -0
- package/dist/tools/wip-deploy-assist.js +278 -0
- package/package.json +2 -2
- package/dist/schemas/guard-node-examples.md +0 -199
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
"address"
|
|
536
536
|
],
|
|
537
537
|
"additionalProperties": false,
|
|
538
|
-
"description": "LOCAL PRIVATE: Local mark data structure for storing address names and tags privately on your device. This data is NEVER published to the blockchain."
|
|
538
|
+
"description": "LOCAL PRIVATE: Local mark data structure for storing address names and tags privately on your device. This data is NEVER published to the blockchain. CROSS-NETWORK ISOLATION (DOC-02): LocalMark names are scoped per network — the same name 'my-service' can map to different addresses on testnet vs mainnet. When switching networks (e.g., testnet→mainnet deployment), re-create marks with the same names pointing to the new mainnet addresses. This enables name-based object references that work identically across networks without code changes."
|
|
539
539
|
},
|
|
540
540
|
"description": "Local mark list"
|
|
541
541
|
},
|
|
@@ -2648,11 +2648,11 @@
|
|
|
2648
2648
|
},
|
|
2649
2649
|
"wip": {
|
|
2650
2650
|
"type": "string",
|
|
2651
|
-
"description": "HTTP URL
|
|
2651
|
+
"description": "WIP file URL. EMPTY string \"\" skips verification (TESTING ONLY). Production MUST use a real HTTP URL pointing to a .wip file generated by the wip_file tool. Example: \"https://cdn.example.com/products/phone_v1.wip\""
|
|
2652
2652
|
},
|
|
2653
2653
|
"wip_hash": {
|
|
2654
2654
|
"type": "string",
|
|
2655
|
-
"description": "
|
|
2655
|
+
"description": "WIP file hash (hex string). EMPTY string \"\" skips hash comparison (TESTING ONLY). Production: fill with the hash you saw when viewing the product, to prevent merchant replacing the WIP file before order."
|
|
2656
2656
|
}
|
|
2657
2657
|
},
|
|
2658
2658
|
"required": [
|
|
@@ -2716,7 +2716,7 @@
|
|
|
2716
2716
|
"number",
|
|
2717
2717
|
"string"
|
|
2718
2718
|
],
|
|
2719
|
-
"description": "Compensation fund
|
|
2719
|
+
"description": "Compensation fund BALANCE (NOT a Treasury address). This field reports the total amount of funds currently held in the Service's compensation pool. To ADD funds, use `service.compensation_fund_add`. To RECEIVE funds (as order owner after arbitration), use `service.compensation_fund_receive`. P2-03 clarification: this is a balance value (e.g. {balance: '1000000000', token_type: '0x2::wow::WOW'}), NOT the Treasury object address. The Treasury address (if bound) is queried separately via the Service's `repositories` or `order_allocators` configuration."
|
|
2720
2720
|
},
|
|
2721
2721
|
"paused_time": {
|
|
2722
2722
|
"type": [
|
|
@@ -2747,7 +2747,7 @@
|
|
|
2747
2747
|
"number",
|
|
2748
2748
|
"string"
|
|
2749
2749
|
],
|
|
2750
|
-
"description": "
|
|
2750
|
+
"description": "Minimum balance required for allocation to fire. When the Allocation object's balance < threshold, allocation aborts with EINSUFFICIENT_BALANCE=7. Also: when an Allocator has only Amount items (no Rate, no Surplus), the sum of Amount items must be >= threshold (EAMOUNT_BELOW_THRESHOLD=12). Set to 0 (default) to allow any balance.",
|
|
2751
2751
|
"default": 0
|
|
2752
2752
|
},
|
|
2753
2753
|
"allocators": {
|
|
@@ -2757,7 +2757,7 @@
|
|
|
2757
2757
|
"properties": {
|
|
2758
2758
|
"guard": {
|
|
2759
2759
|
"type": "string",
|
|
2760
|
-
"description": "Guard object ID. If Guard verification passes, fund allocation
|
|
2760
|
+
"description": "Guard object ID or name. If Guard verification passes (via Passport), fund allocation for THIS Allocator fires. Each Allocator in an Allocators list can have a different Guard — the first Allocator whose Guard returns true wins. This enables mutually exclusive allocation paths (e.g., refund Guard on 'return_approved' node vs damage Guard on 'damage_confirmed' node)."
|
|
2761
2761
|
},
|
|
2762
2762
|
"sharing": {
|
|
2763
2763
|
"type": "array",
|
|
@@ -2805,7 +2805,7 @@
|
|
|
2805
2805
|
"Entity"
|
|
2806
2806
|
],
|
|
2807
2807
|
"additionalProperties": false,
|
|
2808
|
-
"description": "
|
|
2808
|
+
"description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
|
|
2809
2809
|
},
|
|
2810
2810
|
{
|
|
2811
2811
|
"type": "object",
|
|
@@ -2819,26 +2819,35 @@
|
|
|
2819
2819
|
"Signer"
|
|
2820
2820
|
],
|
|
2821
2821
|
"additionalProperties": false,
|
|
2822
|
-
"description": "Current transaction signer
|
|
2822
|
+
"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."
|
|
2823
2823
|
}
|
|
2824
2824
|
],
|
|
2825
|
-
"description": "Recipient
|
|
2825
|
+
"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)."
|
|
2826
2826
|
},
|
|
2827
2827
|
"sharing": {
|
|
2828
2828
|
"type": [
|
|
2829
2829
|
"number",
|
|
2830
2830
|
"string"
|
|
2831
2831
|
],
|
|
2832
|
-
"description": "
|
|
2832
|
+
"description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations."
|
|
2833
2833
|
},
|
|
2834
2834
|
"mode": {
|
|
2835
|
-
"
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2835
|
+
"anyOf": [
|
|
2836
|
+
{
|
|
2837
|
+
"type": "string",
|
|
2838
|
+
"enum": [
|
|
2839
|
+
"Amount",
|
|
2840
|
+
"Rate",
|
|
2841
|
+
"Surplus"
|
|
2842
|
+
]
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
"type": "integer",
|
|
2846
|
+
"minimum": 0,
|
|
2847
|
+
"maximum": 2
|
|
2848
|
+
}
|
|
2840
2849
|
],
|
|
2841
|
-
"description": "
|
|
2850
|
+
"description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
|
|
2842
2851
|
}
|
|
2843
2852
|
},
|
|
2844
2853
|
"required": [
|
|
@@ -2847,13 +2856,13 @@
|
|
|
2847
2856
|
"mode"
|
|
2848
2857
|
],
|
|
2849
2858
|
"additionalProperties": false,
|
|
2850
|
-
"description": "Fund allocation item"
|
|
2859
|
+
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
2851
2860
|
},
|
|
2852
|
-
"description": "Fund allocation item list. Each item
|
|
2861
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
2853
2862
|
},
|
|
2854
2863
|
"fix": {
|
|
2855
2864
|
"$ref": "#/definitions/object_service/properties/order_allocators/anyOf/0/properties/threshold",
|
|
2856
|
-
"description": "
|
|
2865
|
+
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation."
|
|
2857
2866
|
},
|
|
2858
2867
|
"max": {
|
|
2859
2868
|
"anyOf": [
|
|
@@ -2864,7 +2873,7 @@
|
|
|
2864
2873
|
"type": "null"
|
|
2865
2874
|
}
|
|
2866
2875
|
],
|
|
2867
|
-
"description": "Maximum allocation
|
|
2876
|
+
"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."
|
|
2868
2877
|
}
|
|
2869
2878
|
},
|
|
2870
2879
|
"required": [
|
|
@@ -2872,9 +2881,9 @@
|
|
|
2872
2881
|
"sharing"
|
|
2873
2882
|
],
|
|
2874
2883
|
"additionalProperties": false,
|
|
2875
|
-
"description": "Fund allocator"
|
|
2884
|
+
"description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
|
|
2876
2885
|
},
|
|
2877
|
-
"description": "Fund allocator list. Each
|
|
2886
|
+
"description": "Fund allocator list. Each allocator is evaluated in order; the FIRST allocator whose Guard passes wins. This enables mutually exclusive allocation paths (e.g., 3 allocators for 3 forward paths: refund / damage-deduct / arbitrate)."
|
|
2878
2887
|
}
|
|
2879
2888
|
},
|
|
2880
2889
|
"required": [
|
|
@@ -2882,7 +2891,7 @@
|
|
|
2882
2891
|
"allocators"
|
|
2883
2892
|
],
|
|
2884
2893
|
"additionalProperties": false,
|
|
2885
|
-
"description": "Fund allocator list"
|
|
2894
|
+
"description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus)."
|
|
2886
2895
|
},
|
|
2887
2896
|
{
|
|
2888
2897
|
"type": "null"
|
|
@@ -4879,7 +4888,7 @@
|
|
|
4879
4888
|
"properties": {
|
|
4880
4889
|
"guard": {
|
|
4881
4890
|
"type": "string",
|
|
4882
|
-
"description": "Guard object ID. If Guard verification passes, fund allocation
|
|
4891
|
+
"description": "Guard object ID or name. If Guard verification passes (via Passport), fund allocation for THIS Allocator fires. Each Allocator in an Allocators list can have a different Guard — the first Allocator whose Guard returns true wins. This enables mutually exclusive allocation paths (e.g., refund Guard on 'return_approved' node vs damage Guard on 'damage_confirmed' node)."
|
|
4883
4892
|
},
|
|
4884
4893
|
"sharing": {
|
|
4885
4894
|
"type": "array",
|
|
@@ -4927,7 +4936,7 @@
|
|
|
4927
4936
|
"Entity"
|
|
4928
4937
|
],
|
|
4929
4938
|
"additionalProperties": false,
|
|
4930
|
-
"description": "
|
|
4939
|
+
"description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
|
|
4931
4940
|
},
|
|
4932
4941
|
{
|
|
4933
4942
|
"type": "object",
|
|
@@ -4941,26 +4950,35 @@
|
|
|
4941
4950
|
"Signer"
|
|
4942
4951
|
],
|
|
4943
4952
|
"additionalProperties": false,
|
|
4944
|
-
"description": "Current transaction signer
|
|
4953
|
+
"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."
|
|
4945
4954
|
}
|
|
4946
4955
|
],
|
|
4947
|
-
"description": "Recipient
|
|
4956
|
+
"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)."
|
|
4948
4957
|
},
|
|
4949
4958
|
"sharing": {
|
|
4950
4959
|
"type": [
|
|
4951
4960
|
"number",
|
|
4952
4961
|
"string"
|
|
4953
4962
|
],
|
|
4954
|
-
"description": "
|
|
4963
|
+
"description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations."
|
|
4955
4964
|
},
|
|
4956
4965
|
"mode": {
|
|
4957
|
-
"
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4966
|
+
"anyOf": [
|
|
4967
|
+
{
|
|
4968
|
+
"type": "string",
|
|
4969
|
+
"enum": [
|
|
4970
|
+
"Amount",
|
|
4971
|
+
"Rate",
|
|
4972
|
+
"Surplus"
|
|
4973
|
+
]
|
|
4974
|
+
},
|
|
4975
|
+
{
|
|
4976
|
+
"type": "integer",
|
|
4977
|
+
"minimum": 0,
|
|
4978
|
+
"maximum": 2
|
|
4979
|
+
}
|
|
4962
4980
|
],
|
|
4963
|
-
"description": "
|
|
4981
|
+
"description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
|
|
4964
4982
|
}
|
|
4965
4983
|
},
|
|
4966
4984
|
"required": [
|
|
@@ -4969,16 +4987,16 @@
|
|
|
4969
4987
|
"mode"
|
|
4970
4988
|
],
|
|
4971
4989
|
"additionalProperties": false,
|
|
4972
|
-
"description": "Fund allocation item"
|
|
4990
|
+
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
4973
4991
|
},
|
|
4974
|
-
"description": "Fund allocation item list. Each item
|
|
4992
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
4975
4993
|
},
|
|
4976
4994
|
"fix": {
|
|
4977
4995
|
"type": [
|
|
4978
4996
|
"number",
|
|
4979
4997
|
"string"
|
|
4980
4998
|
],
|
|
4981
|
-
"description": "
|
|
4999
|
+
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation."
|
|
4982
5000
|
},
|
|
4983
5001
|
"max": {
|
|
4984
5002
|
"anyOf": [
|
|
@@ -4989,7 +5007,7 @@
|
|
|
4989
5007
|
"type": "null"
|
|
4990
5008
|
}
|
|
4991
5009
|
],
|
|
4992
|
-
"description": "Maximum allocation
|
|
5010
|
+
"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."
|
|
4993
5011
|
}
|
|
4994
5012
|
},
|
|
4995
5013
|
"required": [
|
|
@@ -4997,7 +5015,7 @@
|
|
|
4997
5015
|
"sharing"
|
|
4998
5016
|
],
|
|
4999
5017
|
"additionalProperties": false,
|
|
5000
|
-
"description": "Fund allocator"
|
|
5018
|
+
"description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
|
|
5001
5019
|
},
|
|
5002
5020
|
"description": "Fund allocation object allocator list"
|
|
5003
5021
|
},
|
|
@@ -5315,7 +5333,7 @@
|
|
|
5315
5333
|
"Entity"
|
|
5316
5334
|
],
|
|
5317
5335
|
"additionalProperties": false,
|
|
5318
|
-
"description": "
|
|
5336
|
+
"description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
|
|
5319
5337
|
},
|
|
5320
5338
|
{
|
|
5321
5339
|
"type": "object",
|
|
@@ -5329,10 +5347,10 @@
|
|
|
5329
5347
|
"Signer"
|
|
5330
5348
|
],
|
|
5331
5349
|
"additionalProperties": false,
|
|
5332
|
-
"description": "Current transaction signer
|
|
5350
|
+
"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."
|
|
5333
5351
|
}
|
|
5334
5352
|
],
|
|
5335
|
-
"description": "Recipient ID"
|
|
5353
|
+
"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)"
|
|
5336
5354
|
},
|
|
5337
5355
|
"amount": {
|
|
5338
5356
|
"anyOf": [
|
|
@@ -5366,7 +5384,7 @@
|
|
|
5366
5384
|
"number",
|
|
5367
5385
|
"string"
|
|
5368
5386
|
],
|
|
5369
|
-
"description": "
|
|
5387
|
+
"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."
|
|
5370
5388
|
}
|
|
5371
5389
|
},
|
|
5372
5390
|
"required": [
|
|
@@ -6352,7 +6370,7 @@
|
|
|
6352
6370
|
"Entity"
|
|
6353
6371
|
],
|
|
6354
6372
|
"additionalProperties": false,
|
|
6355
|
-
"description": "
|
|
6373
|
+
"description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
|
|
6356
6374
|
},
|
|
6357
6375
|
{
|
|
6358
6376
|
"type": "object",
|
|
@@ -6366,17 +6384,17 @@
|
|
|
6366
6384
|
"Signer"
|
|
6367
6385
|
],
|
|
6368
6386
|
"additionalProperties": false,
|
|
6369
|
-
"description": "Current transaction signer
|
|
6387
|
+
"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."
|
|
6370
6388
|
}
|
|
6371
6389
|
],
|
|
6372
|
-
"description": "Recipient ID"
|
|
6390
|
+
"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)"
|
|
6373
6391
|
},
|
|
6374
6392
|
"amount": {
|
|
6375
6393
|
"type": [
|
|
6376
6394
|
"number",
|
|
6377
6395
|
"string"
|
|
6378
6396
|
],
|
|
6379
|
-
"description": "
|
|
6397
|
+
"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."
|
|
6380
6398
|
}
|
|
6381
6399
|
},
|
|
6382
6400
|
"required": [
|
|
@@ -8406,14 +8424,16 @@
|
|
|
8406
8424
|
"discount_type": {
|
|
8407
8425
|
"anyOf": [
|
|
8408
8426
|
{
|
|
8409
|
-
"type": "
|
|
8410
|
-
"
|
|
8411
|
-
|
|
8427
|
+
"type": "string",
|
|
8428
|
+
"enum": [
|
|
8429
|
+
"RATES",
|
|
8430
|
+
"FIXED"
|
|
8431
|
+
]
|
|
8412
8432
|
},
|
|
8413
8433
|
{
|
|
8414
|
-
"type": "
|
|
8415
|
-
"
|
|
8416
|
-
"
|
|
8434
|
+
"type": "integer",
|
|
8435
|
+
"minimum": 0,
|
|
8436
|
+
"maximum": 1
|
|
8417
8437
|
}
|
|
8418
8438
|
],
|
|
8419
8439
|
"description": "Discount type. If rate(0), discount is based on proportion of product amount (e.g., 1000 means 10% discount); if fixed(1), discount is based on fixed value of product amount (e.g., 100 means 100 yuan discount)."
|
|
@@ -8425,7 +8445,7 @@
|
|
|
8425
8445
|
"number",
|
|
8426
8446
|
"string"
|
|
8427
8447
|
],
|
|
8428
|
-
"description": "
|
|
8448
|
+
"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."
|
|
8429
8449
|
},
|
|
8430
8450
|
{
|
|
8431
8451
|
"type": "null"
|
|
@@ -13013,7 +13033,7 @@
|
|
|
13013
13033
|
"properties": {
|
|
13014
13034
|
"prev_node": {
|
|
13015
13035
|
"type": "string",
|
|
13016
|
-
"description": "Previous node name"
|
|
13036
|
+
"description": "Previous node name. Empty string '' means initial entry node (the first node in the workflow)."
|
|
13017
13037
|
},
|
|
13018
13038
|
"threshold": {
|
|
13019
13039
|
"type": [
|
|
@@ -13073,38 +13093,46 @@
|
|
|
13073
13093
|
"guard": {
|
|
13074
13094
|
"anyOf": [
|
|
13075
13095
|
{
|
|
13076
|
-
"
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
"
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
"anyOf": [
|
|
13084
|
-
{
|
|
13085
|
-
"type": "array",
|
|
13086
|
-
"items": {
|
|
13087
|
-
"$ref": "#/definitions/query_result_onchain_table_item_machine_node/anyOf/0/properties/value/items/properties/threshold"
|
|
13088
|
-
}
|
|
13096
|
+
"anyOf": [
|
|
13097
|
+
{
|
|
13098
|
+
"type": "object",
|
|
13099
|
+
"properties": {
|
|
13100
|
+
"guard": {
|
|
13101
|
+
"type": "string",
|
|
13102
|
+
"description": "Guard object name or address (string). Example: 'my_attendance_guard' or '0x1234...'"
|
|
13089
13103
|
},
|
|
13090
|
-
{
|
|
13091
|
-
"
|
|
13104
|
+
"retained_submission": {
|
|
13105
|
+
"anyOf": [
|
|
13106
|
+
{
|
|
13107
|
+
"type": "array",
|
|
13108
|
+
"items": {
|
|
13109
|
+
"$ref": "#/definitions/query_result_onchain_table_item_machine_node/anyOf/0/properties/value/items/properties/threshold"
|
|
13110
|
+
}
|
|
13111
|
+
},
|
|
13112
|
+
{
|
|
13113
|
+
"type": "null"
|
|
13114
|
+
}
|
|
13115
|
+
],
|
|
13116
|
+
"description": "Data submitted by user during Guard object verification"
|
|
13092
13117
|
}
|
|
13118
|
+
},
|
|
13119
|
+
"required": [
|
|
13120
|
+
"guard"
|
|
13093
13121
|
],
|
|
13094
|
-
"
|
|
13122
|
+
"additionalProperties": false,
|
|
13123
|
+
"description": "OBJECT form: {guard: '<guard_name_or_address>', retained_submission?: number[]}. Use this form when you need to pass retained_submission data alongside the Guard reference."
|
|
13124
|
+
},
|
|
13125
|
+
{
|
|
13126
|
+
"type": "string",
|
|
13127
|
+
"description": "STRING form (shorthand): the Guard object's name or address as a plain string. Auto-wrapped to {guard: <string>} at runtime. Use this when you only need to reference a Guard without retained_submission."
|
|
13095
13128
|
}
|
|
13096
|
-
|
|
13097
|
-
"required": [
|
|
13098
|
-
"guard"
|
|
13099
|
-
],
|
|
13100
|
-
"additionalProperties": false,
|
|
13101
|
-
"description": "Record of Guard object in MachineForwardGuard object"
|
|
13129
|
+
]
|
|
13102
13130
|
},
|
|
13103
13131
|
{
|
|
13104
13132
|
"type": "null"
|
|
13105
13133
|
}
|
|
13106
13134
|
],
|
|
13107
|
-
"description": "Guard
|
|
13135
|
+
"description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes)."
|
|
13108
13136
|
}
|
|
13109
13137
|
},
|
|
13110
13138
|
"required": [
|
|
@@ -13114,7 +13142,7 @@
|
|
|
13114
13142
|
"additionalProperties": false,
|
|
13115
13143
|
"description": "Forward in Machine object"
|
|
13116
13144
|
},
|
|
13117
|
-
"description": "Forward list"
|
|
13145
|
+
"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."
|
|
13118
13146
|
}
|
|
13119
13147
|
},
|
|
13120
13148
|
"required": [
|
|
@@ -14173,7 +14201,7 @@
|
|
|
14173
14201
|
"number",
|
|
14174
14202
|
"string"
|
|
14175
14203
|
],
|
|
14176
|
-
"description": "
|
|
14204
|
+
"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."
|
|
14177
14205
|
},
|
|
14178
14206
|
"token_type": {
|
|
14179
14207
|
"type": "string",
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
},
|
|
253
253
|
"name_or_address": {
|
|
254
254
|
"type": "string",
|
|
255
|
-
"description": "Account name or address.
|
|
255
|
+
"description": "Account name or address to query. Examples: \"my_account\", \"0xabc123...\", or \"\" for the default account. NOTE: This field is NOT named 'filter' — use 'name_or_address' directly. Defaults to '' (default account) if omitted."
|
|
256
256
|
},
|
|
257
257
|
"balance": {
|
|
258
258
|
"type": "boolean",
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
},
|
|
282
282
|
"token_type": {
|
|
283
283
|
"type": "string",
|
|
284
|
-
"description": "Token type
|
|
284
|
+
"description": "Token type in Move format: 0x<package>::<module>::<struct>. Examples: \"0x2::wow::WOW\" (default, 9 decimals), \"0x2::sui::SUI\" (9 decimals). For custom tokens, use the full type string from the token's coin metadata. The Fund Processing Layer resolves precision from the official registry → cache → on-chain."
|
|
285
285
|
},
|
|
286
286
|
"network": {
|
|
287
287
|
"type": "string",
|
|
@@ -290,14 +290,14 @@
|
|
|
290
290
|
"testnet",
|
|
291
291
|
"mainnet"
|
|
292
292
|
],
|
|
293
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
293
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
"required": [
|
|
297
297
|
"query_type"
|
|
298
298
|
],
|
|
299
299
|
"additionalProperties": false,
|
|
300
|
-
"description": "Query an account's coin balance OR paginated coin objects. Use balance=true for total amount, or coin={cursor,limit} to list individual coin objects. Returns: { address, balance? | coin? }"
|
|
300
|
+
"description": "Query an account's coin balance OR paginated coin objects. PARAMETERS: Use 'name_or_address' to specify the account (NOT 'filter'). Use balance=true for total amount, or coin={cursor,limit} to list individual coin objects. Use token_type to query non-default tokens (format: 0x<package>::<module>::<struct>). Returns: { address, balance? | coin? }"
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
"type": "object",
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
},
|
|
339
339
|
"network": {
|
|
340
340
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
341
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
341
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
"required": [
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
},
|
|
368
368
|
"network": {
|
|
369
369
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
370
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
370
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
373
|
"required": [
|
|
@@ -387,8 +387,8 @@
|
|
|
387
387
|
"name_or_address": {
|
|
388
388
|
"anyOf": [
|
|
389
389
|
{
|
|
390
|
-
"
|
|
391
|
-
"description": "Account name, address (0x...), or mark name. When using string format, local marks are searched first. EXAMPLE: 'alice' - searches local marks first, then global; EXAMPLE: '
|
|
390
|
+
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/name_or_address",
|
|
391
|
+
"description": "Account name, address (0x...), or mark name. When using string format, local marks are searched first. EXAMPLE: 'alice' - searches local marks first, then global; EXAMPLE: '0x2...' (64 hex chars) - uses address directly; EXAMPLE: '' - uses the default local account"
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
"type": "object",
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
},
|
|
444
444
|
"network": {
|
|
445
445
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
446
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
446
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
"required": [
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
},
|
|
471
471
|
"network": {
|
|
472
472
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
473
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
473
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
"required": [
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
},
|
|
520
520
|
"network": {
|
|
521
521
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
522
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
522
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
523
523
|
}
|
|
524
524
|
},
|
|
525
525
|
"required": [
|
|
@@ -575,7 +575,7 @@
|
|
|
575
575
|
},
|
|
576
576
|
"network": {
|
|
577
577
|
"$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
|
|
578
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on"
|
|
578
|
+
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
|
|
579
579
|
}
|
|
580
580
|
},
|
|
581
581
|
"required": [
|