@wowok/agent-mcp 3.4.1 → 3.4.2
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/chain-semantics/composition-truth.js +1 -1
- package/dist/extensions/capability.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +2 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +17 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/fee-param-bindings.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/param-schema.js +1 -1
- package/dist/knowledge/pattern-resolutions.js +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/template-test-profiles.js +1 -1
- package/dist/participation/customer-interest.d.ts +4 -0
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/node-action-advisor.d.ts +4 -0
- package/dist/participation/node-action-advisor.js +1 -1
- package/dist/participation/time-window.d.ts +11 -0
- package/dist/participation/time-window.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/proof.js +1 -1
- package/dist/schema/call/service.d.ts +15 -5
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/operations.d.ts +3 -1
- package/dist/schema/query/index.js +1 -1
- package/dist/schemas/benchmark_migration_operation.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +16 -6
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_service.schema.json +12 -2
- package/dist/schemas/query_toolkit.output.json +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +9 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +10 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe).\x20Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.\x20'+'S12-③\x20witness\x20boundary\x20(v139):\x20the\x20100-cap\x20applies\x20to\x20THIS\x20guard-table\x20vector;\x20the\x20guard\x27s\x20inline\x20WITNESS\x20is\x20'+'separately\x20capped\x20at\x204096\x20BCS\x20bytes\x20total\x20(passport\x20MAX_SUBMISSION_SIZE\x20—\x20a\x20100-address\x20roster\x20fits),\x20so\x20keep\x20'+'roster-style\x20attestation\x20here\x20in\x20the\x20vector\x20and\x20reserve\x20the\x20witness\x20for\x20per-call\x20attestation.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'alloc_batch':NameOrAddressSchema['array']()['min'](0x1)['optional']()['describe']('Q8-F01\x20AGGREGATE\x20RELEASE\x20—\x20sweep\x20SEVERAL\x20pools\x20in\x20ONE\x20transaction\x20(allocation::alloc_batch).\x20'+'Provide\x20the\x20COMPLETE\x20pool\x20list\x20INCLUDING\x20\x27object\x27:\x20the\x20anchor\x20Allocation\x20addressed\x20by\x20this\x20operation\x20must\x20'+'appear\x20in\x20the\x20list,\x20and\x20the\x20SDK\x20refuses\x20a\x20list\x20that\x20omits\x20it.\x20REQUIRES\x20alloc_by_guard\x20—\x20that\x20one\x20Guard\x20'+'defines\x20the\x20release\x20and\x20is\x20applied\x20to\x20every\x20pool.\x20'+'WHY\x20THIS\x20EXISTS:\x20a\x20crowdfunding\x20settlement\x20holds\x20each\x20backer\x27s\x20escrow\x20in\x20its\x20own\x20Allocation\x20under\x20the\x20SAME\x20'+'release/refund\x20Guard;\x20with\x20single-pool\x20calls\x20a\x20keeper\x20needs\x20N\x20ordered\x20transactions,\x20and\x20any\x20keeper\x20that\x20stops\x20'+'at\x20the\x20first\x20failure\x20strands\x20the\x20remaining\x20pools\x20while\x20the\x20release\x20reports\x20done.\x20'+'ALL-OR-NOTHING:\x20one\x20pool\x20aborting\x20reverts\x20the\x20whole\x20batch.\x20'+'PRE-FILTER\x20drained\x20pools\x20before\x20building\x20the\x20call\x20—\x20a\x20zero-balance\x20pool\x20aborts\x20the\x20ENTIRE\x20batch\x20with\x20'+'EZERO_DISTRIBUTION\x20(14)\x20and\x20nothing\x20is\x20released;\x20an\x20empty\x20candidate\x20set\x20means\x20there\x20is\x20genuinely\x20nothing\x20to\x20'+'release\x20(an\x20empty\x20list\x20is\x20refused\x20with\x20EEMPTY_POOL_BATCH\x2026\x20instead\x20of\x20a\x20fake\x20success).\x20'+'EVERY\x20pool\x20must\x20carry\x20an\x20allocator\x20BOUND\x20to\x20alloc_by_guard:\x20an\x20unbound\x20pool\x20completes\x20the\x20sweep\x20having\x20'+'distributed\x20NOTHING,\x20so\x20the\x20SDK\x20verifies\x20membership\x20pool-by-pool\x20and\x20REFUSES\x20the\x20call\x20before\x20any\x20gas\x20is\x20spent.\x20'+'Each\x20recipient\x20still\x20receives\x20a\x20CoinWrapper\x20and\x20claims\x20it\x20through\x20the\x20normal\x20POST-DISTRIBUTION\x20CLAIM\x20step\x20—\x20'+'batching\x20changes\x20the\x20release\x20atomicity,\x20not\x20the\x20claim\x20path.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023;\x20keeper\x20posture\x20拍板⑧\x20dm-mtw-261027)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.\x20AUTOMATION\x20RULE:\x20this\x20flag\x20'+'is\x20the\x20HUMAN\x20operator\x27s\x20netting\x20decision\x20—\x20an\x20automated\x20keeper\x20that\x20receives\x20dual_payout_unconfirmed\x20must\x20STOP\x20'+'retrying\x20and\x20escalate\x20(never\x20set\x20the\x20flag\x20itself);\x20a\x20retry\x20loop\x20wastes\x20gas\x20and\x20a\x20silent\x20stop\x20strands\x20the\x20payout.\x20D-1\x20(ksr\x205R-08):\x20the\x20flag\x20is\x20additionally\x20honored\x20ONLY\x20when\x20the\x20'+'executing\x20store\x20carries\x20a\x20human-recorded\x20preauthorization\x20(config_operation\x20store_dual_payout_set\x20{account,\x20'+'confirm:true},\x20then\x20store_dual_payout_get\x20shows\x20preauthorized=true);\x20without\x20it\x20the\x20gate\x20answers\x20'+'dual_payout_preauthorization_required\x20—\x20record\x20the\x20standing\x20decision\x20first,\x20then\x20re-send.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{CoinParamSchema,CallEnvSchema,SubmissionCallSchema,TypeNamedObjectSchema}from'./base.js';import{AllocatorsSchema,PaymentInfoSchema,RepositoryDataWhereSchema}from'../query/index.js';import{NameOrAddressSchema,ReceivedBalanceOrRecentlySchema,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';export const CallAllocation_CreateSchema=z['object']({'object':TypeNamedObjectSchema['describe']('REQUIRED\x20for\x20creating\x20new\x20object.\x20Provide\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20create\x20and\x20name\x20the\x20new\x20Allocation\x20object.'),'allocators':AllocatorsSchema,'coin':CoinParamSchema,'payment_info':PaymentInfoSchema,'allow_unanchored':z['boolean']()['optional']()['describe']('docs#11\x20escape\x20hatch:\x20explicitly\x20allow\x20creating\x20an\x20Allocation\x20whose\x20payment_info\x20has\x20NO\x20for_object\x20anchor\x20while\x20any\x20sharing\x20row\x20uses\x20a\x20GuardIdentifier\x20recipient.\x20'+'Unanchored\x20+\x20GuardIdentifier\x20lets\x20any\x20guard-passing\x20caller\x20redirect\x20the\x20submitted\x20payout\x20address\x20to\x20an\x20arbitrary\x20address\x20—\x20'+'anchor\x20it\x20with\x20payment_info.for_object\x20instead.\x20Set\x20true\x20ONLY\x20after\x20the\x20user\x20explicitly\x20accepts\x20that\x20risk.\x20Default:\x20blocked.')})['strict']()['describe']('Create\x20a\x20new\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20{name:\x20\x27yourName\x27,\x20type:\x20\x27Allocation\x27}\x20to\x20name\x20the\x20new\x20object.\x20Notice:\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.');export const FormulaSpecSchema=z['object']({'repo':NameOrAddressSchema['describe']('Repository\x20object\x20(ID\x20or\x20LocalMark\x20name)\x20whose\x20policy-key\x20data\x20table\x20is\x20scanned\x20at\x20alloc()\x20time\x20to\x20produce\x20the\x20scalar.\x20'+'Resolved\x20to\x20an\x20address\x20before\x20the\x20call.'),'key':z['string']()['describe']('Policy\x20key\x20(String)\x20inside\x20that\x20Repository\x20whose\x20data\x20rows\x20are\x20the\x20candidate\x20set.\x20Max\x2064\x20bytes.'),'selector':z['union']([z['literal'](0x0),z['literal'](0x1)])['describe']('Which\x20aggregate\x20produces\x20the\x20scalar:\x200\x20=\x20RECORD\x20COUNT\x20(u64\x20—\x20how\x20many\x20candidate\x20rows\x20match\x20the\x20predicate),\x20'+'1\x20=\x20VALUE\x20SUM\x20(u256\x20—\x20sum\x20of\x20the\x20matching\x20rows\x27\x20numeric\x20payloads,\x20overflow-safe).\x20Any\x20other\x20value\x20is\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'predicate':RepositoryDataWhereSchema['describe']('Predicate\x20filter\x20applied\x20to\x20each\x20candidate\x27s\x20stored\x20value\x20—\x20SAME\x20wire\x20format\x20as\x20the\x20repository\x20count/sum-where\x20guard\x20queries\x20(1173/1174).\x20'+'kind\x20must\x20match\x20the\x20policy\x20value\x20type;\x20mismatching\x20entries\x20are\x20skipped\x20honestly\x20(never\x20an\x20error).'),'ids':z['array'](z['string']())['describe']('EXPLICIT\x20candidate\x20object\x20IDs\x20(vector<address>)\x20to\x20scan.\x20Duplicates\x20are\x20deduped;\x20max\x20100\x20candidates;\x20'+'an\x20EMPTY\x20list\x20matches\x20no\x20records\x20(scalar\x200)\x20—\x20there\x20is\x20no\x20\x27all\x20objects\x27\x20wildcard.\x20'+'S12-③\x20witness\x20boundary\x20(v140):\x20the\x20100-cap\x20applies\x20to\x20THIS\x20guard-table\x20vector;\x20the\x20guard\x27s\x20inline\x20WITNESS\x20is\x20'+'separately\x20capped\x20at\x204096\x20BCS\x20bytes\x20total\x20(passport\x20MAX_SUBMISSION_SIZE\x20—\x20a\x20100-address\x20roster\x20fits),\x20so\x20keep\x20'+'roster-style\x20attestation\x20here\x20in\x20the\x20vector\x20and\x20reserve\x20the\x20witness\x20for\x20per-call\x20attestation.')})['strict']()['describe']('Runtime\x20pricing\x20spec\x20for\x20one\x20Formula\x20sharing\x20slot\x20(FormulaSpec).\x20Payout\x20for\x20that\x20leg\x20=\x20clamp(sharing_coefficient_bps\x20×\x20scalar\x20/\x2010000,\x200,\x20headroom),\x20'+'where\x20scalar\x20=\x20the\x20selected\x20aggregate\x20over\x20the\x20Repository\x20rows.\x20Binding\x20REPLACES\x20any\x20previous\x20spec\x20for\x20the\x20slot;\x20the\x20plan\x20shape\x20itself\x20'+'(which\x20slots\x20are\x20Formula,\x20coefficients)\x20is\x20immutable\x20and\x20was\x20fixed\x20when\x20the\x20allocator\x20was\x20declared.');export const CallAllocation_OperateSchema=z['object']({'object':NameOrAddressSchema['describe']('REQUIRED\x20for\x20operating\x20existing\x20object.\x20Provide\x20the\x20Allocation\x20object\x20ID\x20or\x20existing\x20name\x20to\x20reference\x20the\x20target\x20object.'),'received_coins':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Unwrap\x20the\x20CoinWrapper\x20objects\x20received\x20by\x20the\x20Allocation\x20object\x20and\x20deposit\x20them\x20into\x20the\x20pending\x20allocation\x20balance.'+RECEIVE_FORMAT_BLOCK_BALANCE),'alloc_by_guard':NameOrAddressSchema['optional']()['describe']('Verify\x20the\x20specified\x20Guard\x20and\x20execute\x20the\x20corresponding\x20fund\x20distribution.\x20'+'GENERIC\x20SEMANTICS:\x20an\x20Allocation\x20distributes\x20whatever\x20balance\x20it\x20holds\x20—\x20order\x20funds,\x20payroll,\x20dividends,\x20bounties.\x20'+'It\x20defines\x20no\x20scenario-specific\x20rule:\x20eligibility\x20(including\x20issuer\x20identity\x20for\x20standalone\x20use,\x20e.g.\x20an\x20org\x20admin)\x20'+'and\x20differentiation\x20inputs\x20are\x20expressed\x20as\x20Guard\x20constraints,\x20all\x20public\x20and\x20auditable.\x20'+'RECIPIENT\x20RESOLUTION\x20(Recipient\x20enum):\x20'+'Entity\x20→\x20fixed\x20address;\x20Signer\x20→\x20transaction\x20sender;\x20GuardIdentifier\x20n\x20→\x20the\x20address\x20submitted\x20for\x20identifier\x20n\x20(resolved\x20from\x20the\x20passport\x27s\x20submission\x20record).\x20'+'ORDER\x20PATTERN\x20(canonical):\x20the\x20Guard\x20table\x20needs\x20ONE\x20submitted\x20Order,\x20constrained\x20by\x20the\x20Guard\x20(e.g.\x20order.service\x20==\x20host\x20service,\x20'+'progress\x20at\x20a\x20qualifying\x20node,\x20signer\x20==\x20order.owner);\x20that\x20order\x20submission\x20IS\x20the\x20recipient\x20slot.\x20Whoever\x20triggers\x20the\x20distribution,\x20funds\x20necessarily\x20'+'land\x20at\x20an\x20Order\x20OBJECT;\x20delivered\x20CoinWrappers\x20are\x20owned\x20by\x20the\x20order\x20and\x20can\x20be\x20extracted\x20only\x20by\x20the\x20Order\x20object\x20itself\x20'+'(Wow\x20ownership)\x20—\x20the\x20coins\x20then\x20go\x20to\x20the\x20order\x27s\x20current\x20owner.\x20Object\x20receipt\x20=\x20owner\x20receipt.\x20'+'POST-DISTRIBUTION\x20CLAIM\x20(required\x20step):\x20each\x20recipient\x20gets\x20a\x20CoinWrapper\x20(not\x20spendable\x20coins)\x20—\x20EOA\x20wallet\x20→\x20operation_type=\x27payment\x27\x20RECEIVE\x20mode\x20'+'{object:\x27<coinwrapper_id>\x27,\x20receive:true};\x20Order\x20object\x20→\x20operation_type=\x27order\x27\x20{object:\x27<order_id>\x27,\x20receive:\x27recently\x27};\x20Treasury\x20object\x20→\x20treasury\x20receive.\x20'+'Find\x20pending\x20CoinWrappers\x20via\x20query_toolkit\x20query_type=\x27onchain_received\x27;\x20verify\x20via\x20the\x20immutable\x20Payment\x20object\x20(allocation.payment\x20array).\x20'+'RISK:\x20safety\x20follows\x20from\x20the\x20sufficiency\x20of\x20the\x20Guard\x20constraints,\x20not\x20the\x20recipient\x20form\x20—\x20analyze\x20the\x20recipient\x20constraint\x20audit\x20before\x20publish;\x20'+'structural\x20residuals\x20(unavoidable):\x20permissionless\x20alloc\x20allows\x20forced\x20settlement\x20timing,\x20the\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation,\x20'+'and\x20allocators/guards\x20are\x20immutable\x20after\x20publish.'),'alloc_batch':NameOrAddressSchema['array']()['min'](0x1)['optional']()['describe']('Q8-F01\x20AGGREGATE\x20RELEASE\x20—\x20sweep\x20SEVERAL\x20pools\x20in\x20ONE\x20transaction\x20(allocation::alloc_batch).\x20'+'Provide\x20the\x20COMPLETE\x20pool\x20list\x20INCLUDING\x20\x27object\x27:\x20the\x20anchor\x20Allocation\x20addressed\x20by\x20this\x20operation\x20must\x20'+'appear\x20in\x20the\x20list,\x20and\x20the\x20SDK\x20refuses\x20a\x20list\x20that\x20omits\x20it.\x20REQUIRES\x20alloc_by_guard\x20—\x20that\x20one\x20Guard\x20'+'defines\x20the\x20release\x20and\x20is\x20applied\x20to\x20every\x20pool.\x20'+'WHY\x20THIS\x20EXISTS:\x20a\x20crowdfunding\x20settlement\x20holds\x20each\x20backer\x27s\x20escrow\x20in\x20its\x20own\x20Allocation\x20under\x20the\x20SAME\x20'+'release/refund\x20Guard;\x20with\x20single-pool\x20calls\x20a\x20keeper\x20needs\x20N\x20ordered\x20transactions,\x20and\x20any\x20keeper\x20that\x20stops\x20'+'at\x20the\x20first\x20failure\x20strands\x20the\x20remaining\x20pools\x20while\x20the\x20release\x20reports\x20done.\x20'+'ALL-OR-NOTHING:\x20one\x20pool\x20aborting\x20reverts\x20the\x20whole\x20batch.\x20'+'PRE-FILTER\x20drained\x20pools\x20before\x20building\x20the\x20call\x20—\x20a\x20zero-balance\x20pool\x20aborts\x20the\x20ENTIRE\x20batch\x20with\x20'+'EZERO_DISTRIBUTION\x20(14)\x20and\x20nothing\x20is\x20released;\x20an\x20empty\x20candidate\x20set\x20means\x20there\x20is\x20genuinely\x20nothing\x20to\x20'+'release\x20(an\x20empty\x20list\x20is\x20refused\x20with\x20EEMPTY_POOL_BATCH\x2026\x20instead\x20of\x20a\x20fake\x20success).\x20'+'EVERY\x20pool\x20must\x20carry\x20an\x20allocator\x20BOUND\x20to\x20alloc_by_guard:\x20an\x20unbound\x20pool\x20completes\x20the\x20sweep\x20having\x20'+'distributed\x20NOTHING,\x20so\x20the\x20SDK\x20verifies\x20membership\x20pool-by-pool\x20and\x20REFUSES\x20the\x20call\x20before\x20any\x20gas\x20is\x20spent.\x20'+'Each\x20recipient\x20still\x20receives\x20a\x20CoinWrapper\x20and\x20claims\x20it\x20through\x20the\x20normal\x20POST-DISTRIBUTION\x20CLAIM\x20step\x20—\x20'+'batching\x20changes\x20the\x20release\x20atomicity,\x20not\x20the\x20claim\x20path.'),'acknowledge_dual_payout':z['boolean']()['optional']()['describe']('A-1\x20(amz9-ln-261023;\x20keeper\x20posture\x20拍板⑧\x20dm-mtw-261027)\x20explicit\x20opt-in\x20for\x20a\x20KNOWN\x20double\x20payout:\x20when\x20a\x20submitted\x20order\x20already\x20received\x20'+'arbitration\x20compensation\x20(order.claimed_by\x20set)\x20and\x20this\x20call\x20would\x20ALSO\x20release\x20its\x20escrow\x20(refund\x20track),\x20'+'the\x20call\x20is\x20REFUSED\x20unless\x20this\x20flag\x20is\x20true.\x20The\x20two\x20payout\x20tracks\x20are\x20independent\x20by\x20design\x20—\x20the\x20chain\x20'+'will\x20not\x20net\x20or\x20stop\x20the\x20second\x20payout\x20(the\x20escrow\x20receive\x20path\x20has\x20no\x20claimed_by\x20gate),\x20BUT\x20a\x20rail\x20paired\x20'+'on\x20order.claimed_by\x20(refund\x20none\x20/\x20recover\x20some)\x20may\x20guard-reject\x20the\x20second\x20payout\x20on-chain;\x20that\x20rejection\x20'+'is\x20the\x20designed\x20mutual\x20exclusion,\x20and\x20the\x20escrow\x20exits\x20via\x20the\x20paired\x20rail.\x20Buyer\x20NET\x20view:\x20total\x20received\x20=\x20'+'compensation\x20+\x20escrow\x20refund.\x20Leave\x20unset\x20for\x20normal\x20refunds\x20of\x20un-awarded\x20orders.\x20AUTOMATION\x20RULE:\x20this\x20flag\x20'+'is\x20the\x20HUMAN\x20operator\x27s\x20netting\x20decision\x20—\x20an\x20automated\x20keeper\x20that\x20receives\x20dual_payout_unconfirmed\x20must\x20STOP\x20'+'retrying\x20and\x20escalate\x20(never\x20set\x20the\x20flag\x20itself);\x20a\x20retry\x20loop\x20wastes\x20gas\x20and\x20a\x20silent\x20stop\x20strands\x20the\x20payout.\x20D-1\x20(ksr\x205R-08):\x20the\x20flag\x20is\x20additionally\x20honored\x20ONLY\x20when\x20the\x20'+'executing\x20store\x20carries\x20a\x20human-recorded\x20preauthorization\x20(config_operation\x20store_dual_payout_set\x20{account,\x20'+'confirm:true},\x20then\x20store_dual_payout_get\x20shows\x20preauthorized=true);\x20without\x20it\x20the\x20gate\x20answers\x20'+'dual_payout_preauthorization_required\x20—\x20record\x20the\x20standing\x20decision\x20first,\x20then\x20re-send.'),'formula_spec_set':z['object']({'allocator_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20allocator\x20within\x20allocators.allocators\x20(0-based).\x20Must\x20address\x20an\x20EXISTING\x20allocator,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'slot_index':z['number']()['int']()['min'](0x0)['describe']('Index\x20of\x20the\x20sharing\x20row\x20within\x20that\x20allocator\x27s\x20sharing[]\x20(0-based).\x20Must\x20address\x20a\x20slot\x20whose\x20mode\x20is\x20Formula,\x20else\x20refused\x20on-chain\x20(EFORMULA_SPEC_INVALID=24).'),'spec':FormulaSpecSchema})['strict']()['optional']()['describe']('Bind\x20(or\x20replace)\x20the\x20runtime\x20pricing\x20spec\x20of\x20ONE\x20Formula\x20sharing\x20slot\x20of\x20this\x20Allocation\x20—\x20no\x20re-declaration\x20of\x20the\x20allocator\x20plan,\x20'+'no\x20fund\x20movement.\x20Only\x20the\x20DATA\x20SOURCE\x20(which\x20repository\x20aggregate\x20prices\x20the\x20slot)\x20is\x20set\x20here;\x20the\x20slot\x20itself\x20must\x20already\x20be\x20declared\x20as\x20a\x20'+'Formula\x20leg\x20(mode\x204).\x20An\x20unbound\x20Formula\x20slot\x20prices\x20its\x20scalar\x20as\x200.')})['strict']()['describe']('Operate\x20on\x20an\x20existing\x20Allocation\x20object.\x20Set\x20\x27object\x27\x20field\x20with\x20the\x20object\x20ID\x20or\x20existing\x20name\x20to\x20specify\x20the\x20target.');export const CallAllocation_DataSchema=z['union']([CallAllocation_CreateSchema,CallAllocation_OperateSchema])['describe']('On-chain\x20Allocation\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Use\x20CallAllocation_CreateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20...}.\x20(2)\x20OPERATE\x20EXISTING:\x20Use\x20CallAllocation_OperateSchema\x20by\x20setting\x20\x27object\x27\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20');export const CallAllocation_InputSchema=z['object']({'data':CallAllocation_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CallEnvSchema,NamedObjectSchema}from'./base.js';import{DescriptionSchema,WowAddressSchema}from'../common/index.js';import{MAX_PROOF_SIZE,MAX_SERVER_PUBKEY_SIZE,MAX_SERVER_SIGNATURE_SIZE,WOWOK_WTS_PROOF_TYPE}from'@wowok/wowok';const ProofTypeSchema=z['union']([z['number']()['int']()['min'](0x1,'proof_type\x20number\x20must\x20be\x20>=\x201\x20(WOWOK_WTS_PROOF_TYPE=1\x20is\x20the\x20minimum)'),z['string']()['regex'](/^\d+$/,'proof_type\x20string\x20must\x20be\x20numeric\x20(digits\x20only)')['refine'](a=>BigInt(a)>=0x1n,'proof_type\x20must\x20be\x20>=\x201')])['describe']('Proof\x20type.\x20'+WOWOK_WTS_PROOF_TYPE+':\x20WOWOK_WTS_PROOF_TYPE\x20(WTS\x20proof);\x201-100\x20reserved\x20for\x20Wowok;\x20user-defined\x20must\x20be\x20>\x20100.\x20Numeric\x20string\x20accepted.');export const CallProof_DataSchema=z['object']({'namedNew':NamedObjectSchema['optional'](),'description':DescriptionSchema['describe']('Human-readable\x20description\x20of\x20this\x20Proof.\x20Required\x20field.'),'proof':z['string']()['max'](MAX_PROOF_SIZE)['describe']('Proof\x20content.\x20e.g.\x20merkle\x20tree\x20root'),'server_pubkey':z['string']()['max'](MAX_SERVER_PUBKEY_SIZE)['describe']('Server\x20public\x20key'),'server_signature':z['string']()['max'](MAX_SERVER_SIGNATURE_SIZE)['describe']('Server\x20signature'),'proof_type':ProofTypeSchema,'item_count':z['union']([z['number']()['int']()['min'](0x0),z['string'](),z['null']()])['optional']()['describe']('Item\x20count.\x20e.g.\x20number\x20of\x20items\x20in\x20the\x20merkle\x20tree'),'about_address':z['union']([WowAddressSchema,z['null']()])['optional']()['describe']('About\x20binding\x20(K3\x20contract):\x20ONLY\x20the\x20counterparty\x20ACCOUNT\x20address\x20(address\x20first\x20byte\x20=\x20account\x20type)\x20or\x20a\x20Proof\x20object\x20address\x20(first\x20byte\x20=\x20Proof\x20type)\x20—\x20a\x20messenger\x20contact\x20record.\x20NEVER\x20a\x20business\x20object\x20(Progress/
|
|
1
|
+
import{z}from'zod';import{CallEnvSchema,NamedObjectSchema}from'./base.js';import{DescriptionSchema,WowAddressSchema}from'../common/index.js';import{MAX_PROOF_SIZE,MAX_SERVER_PUBKEY_SIZE,MAX_SERVER_SIGNATURE_SIZE,WOWOK_WTS_PROOF_TYPE}from'@wowok/wowok';const ProofTypeSchema=z['union']([z['number']()['int']()['min'](0x1,'proof_type\x20number\x20must\x20be\x20>=\x201\x20(WOWOK_WTS_PROOF_TYPE=1\x20is\x20the\x20minimum)'),z['string']()['regex'](/^\d+$/,'proof_type\x20string\x20must\x20be\x20numeric\x20(digits\x20only)')['refine'](a=>BigInt(a)>=0x1n,'proof_type\x20must\x20be\x20>=\x201')])['describe']('Proof\x20type.\x20'+WOWOK_WTS_PROOF_TYPE+':\x20WOWOK_WTS_PROOF_TYPE\x20(WTS\x20proof);\x201-100\x20reserved\x20for\x20Wowok;\x20user-defined\x20must\x20be\x20>\x20100.\x20Numeric\x20string\x20accepted.');export const CallProof_DataSchema=z['object']({'namedNew':NamedObjectSchema['optional'](),'description':DescriptionSchema['describe']('Human-readable\x20description\x20of\x20this\x20Proof.\x20Required\x20field.'),'proof':z['string']()['max'](MAX_PROOF_SIZE)['describe']('Proof\x20content.\x20e.g.\x20merkle\x20tree\x20root'),'server_pubkey':z['string']()['max'](MAX_SERVER_PUBKEY_SIZE)['describe']('Server\x20public\x20key'),'server_signature':z['string']()['max'](MAX_SERVER_SIGNATURE_SIZE)['describe']('Server\x20signature'),'proof_type':ProofTypeSchema,'item_count':z['union']([z['number']()['int']()['min'](0x0),z['string'](),z['null']()])['optional']()['describe']('Item\x20count.\x20e.g.\x20number\x20of\x20items\x20in\x20the\x20merkle\x20tree'),'about_address':z['union']([WowAddressSchema,z['null']()])['optional']()['describe']('About\x20binding\x20(K3\x20contract):\x20ONLY\x20the\x20counterparty\x20ACCOUNT\x20address\x20(address\x20first\x20byte\x20=\x20account\x20type)\x20or\x20a\x20Proof\x20object\x20address\x20(first\x20byte\x20=\x20Proof\x20type)\x20—\x20a\x20messenger\x20contact\x20record.\x20NEVER\x20a\x20business\x20object\x20(Progress/Arb)\x20and\x20never\x20a\x20guard\x20decision\x20condition.\x20ONE\x20EXCEPTION\x20(F-27,\x20Move\x20truth\x20—\x20the\x20order\x27s\x20required_info_bind\x20entry):\x20a\x20Proof\x20intended\x20for\x20order.required_info_bind\x20MUST\x20carry\x20about\x20=\x20the\x20ORDER\x27s\x20own\x20address,\x20with\x20the\x20Proof\x20creator\x20=\x20the\x20order\x20owner\x20(E_REQUIRED_INFO_PROOF_NOT_BOUND,\x20abort\x2011\x20—\x20the\x20messenger-contact\x20restriction\x20does\x20not\x20apply\x20to\x20that\x20flow).\x20Accepts\x20null/undefined\x20(→\x20Move\x20Option::none).\x20When\x20provided,\x20must\x20be\x20a\x20raw\x200x-prefixed\x20address\x20(NOT\x20a\x20name).\x20e.g.\x20the\x20peer\x20account\x20being\x20proved\x20with.')})['strict']()['describe']('On-chain\x20Proof\x20creation.\x20USAGE:\x20Set\x20\x27namedNew\x27\x20field\x20with\x20{name,\x20tag?}\x20to\x20create\x20a\x20named\x20Proof.\x20Proof\x20is\x20an\x20immutable\x20object\x20-\x20it\x20can\x20only\x20be\x20created,\x20not\x20modified.\x20The\x20\x27namedNew\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED.');export const CallProof_InputSchema=z['object']({'data':CallProof_DataSchema,'env':CallEnvSchema['optional']()})['strict']()['describe']('On-chain,\x20create\x20a\x20new\x20Proof\x20object');export const CallGenProof_InputSchema=z['object']({'proof':z['string']()['max'](MAX_PROOF_SIZE)['describe']('Proof\x20content.\x20e.g.\x20merkle\x20tree\x20root'),'server_pubkey':z['string']()['max'](MAX_SERVER_PUBKEY_SIZE)['describe']('Server\x20public\x20key'),'server_signature':z['string']()['max'](MAX_SERVER_SIGNATURE_SIZE)['describe']('Server\x20signature'),'proof_type':ProofTypeSchema,'description':DescriptionSchema['describe']('Human-readable\x20description\x20of\x20this\x20Proof.\x20Required\x20field.'),'item_count':z['union']([z['number']()['int']()['min'](0x0),z['string'](),z['null']()])['optional']()['describe']('Item\x20count.\x20e.g.\x20number\x20of\x20items\x20in\x20the\x20merkle\x20tree'),'about_address':z['union']([WowAddressSchema,z['null']()])['optional']()['describe']('About\x20binding\x20(K3\x20contract):\x20ONLY\x20the\x20counterparty\x20ACCOUNT\x20address\x20(address\x20first\x20byte\x20=\x20account\x20type)\x20or\x20a\x20Proof\x20object\x20address\x20(first\x20byte\x20=\x20Proof\x20type)\x20—\x20a\x20messenger\x20contact\x20record.\x20NEVER\x20a\x20business\x20object\x20(Progress/Order/Arb)\x20and\x20never\x20a\x20guard\x20decision\x20condition.\x20ONE\x20EXCEPTION\x20(bstn-tn-261024\x20F-30,\x20live-proven):\x20a\x20Proof\x20intended\x20for\x20order.required_info_bind\x20MUST\x20carry\x20about\x20=\x20the\x20ORDER\x27s\x20own\x20address,\x20with\x20the\x20Proof\x20creator\x20=\x20the\x20order\x20owner\x20(the\x20owner-signed\x20contact/attn\x20proof\x20the\x20bind\x20entry\x20demands;\x20the\x20messenger-contact\x20restriction\x20does\x20not\x20apply\x20to\x20that\x20flow).\x20Accepts\x20null/undefined\x20(→\x20Move\x20Option::none).\x20When\x20provided,\x20must\x20be\x20a\x20raw\x200x-prefixed\x20address\x20(NOT\x20a\x20name).'),'env':CallEnvSchema['optional']()})['strict']()['describe']('Generate\x20a\x20new\x20Proof\x20object\x20on-chain');
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const ServiceBuyItemSchema: z.ZodPreprocess<z.ZodObject<{
|
|
3
|
-
name: z.ZodString
|
|
3
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
4
6
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
5
7
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
6
8
|
}, z.core.$strict>>;
|
|
7
9
|
export declare const BuySchema: z.ZodObject<{
|
|
8
10
|
items: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
9
|
-
name: z.ZodString
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
10
14
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
11
15
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
12
16
|
}, z.core.$strict>>>;
|
|
@@ -50,7 +54,9 @@ export declare const DiscountSchema: z.ZodObject<{
|
|
|
50
54
|
export declare const OrderNewSchema: z.ZodObject<{
|
|
51
55
|
buy: z.ZodObject<{
|
|
52
56
|
items: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
53
|
-
name: z.ZodString
|
|
57
|
+
name: z.ZodOptional<z.ZodString>;
|
|
58
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
54
60
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
55
61
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
56
62
|
}, z.core.$strict>>>;
|
|
@@ -181,7 +187,9 @@ export declare const CallService_DataSchema: z.ZodObject<{
|
|
|
181
187
|
order_new: z.ZodOptional<z.ZodObject<{
|
|
182
188
|
buy: z.ZodObject<{
|
|
183
189
|
items: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
184
|
-
name: z.ZodString
|
|
190
|
+
name: z.ZodOptional<z.ZodString>;
|
|
191
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
185
193
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
186
194
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
187
195
|
}, z.core.$strict>>>;
|
|
@@ -513,7 +521,9 @@ export declare const CallService_InputSchema: z.ZodObject<{
|
|
|
513
521
|
order_new: z.ZodOptional<z.ZodObject<{
|
|
514
522
|
buy: z.ZodObject<{
|
|
515
523
|
items: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
516
|
-
name: z.ZodString
|
|
524
|
+
name: z.ZodOptional<z.ZodString>;
|
|
525
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
526
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
517
527
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
518
528
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
519
529
|
}, z.core.$strict>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AllocatorsSchema,DiscountTypeSchema,ServiceSaleSchema,PaymentInfoSchema}from'../query/index.js';import{AccountOrMark_AddressAISchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressAISchema,NameOrAddressSchema,NotEmptyNameSchema,ReceivedBalanceOrRecentlySchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';import{BalanceTypeSchema}from'../common/index.js';export const ServiceBuyItemSchema=z['preprocess'](a=>{if(a&&typeof a==='object'&&'stock'in a&&!('quantity'in a)){const {stock:b,...c}=a;return{...c,'quantity':b};}return a;},z['object']({'name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase.\x20Must\x20match\x20a\x20listed\x20sale\x20name\x20EXACTLY\x20'+'(the\x20buy\x20path\x20resolves\x20each\x20item\x20by\x20exact\x20name\x20match)\x20and\x20MUST\x20be\x20≤\x2064\x20bytes\x20(UTF-8):\x20the\x20on-chain\x20'+'buy\x20path\x20caps\x20buyer-sent\x20item\x20names\x20at\x2064\x20bytes\x20even\x20though\x20the\x20merchant\x20side\x20lists\x20names\x20up\x20to\x20'+'256\x20bytes\x20—\x20a\x20longer\x20name\x20aborts\x20E_NAME_LENGTH_EXCEEDED\x20(abort\x201)\x20before\x20anything\x20else\x20runs\x20(F-RQ-01).'),'quantity':BalanceTypeSchema['describe']('⚠️\x20PURCHASE\x20QUANTITY,\x20NOT\x20inventory.\x20This\x20is\x20the\x20number\x20of\x20units\x20you\x20are\x20'+'buying;\x20the\x20on-chain\x20order\x20total\x20=\x20sale.price\x20x\x20this\x20value.\x20Do\x20NOT\x20put\x20the\x20'+'product\x27s\x20available\x20stock\x20here\x20—\x20inventory\x20is\x20the\x20separate\x20`stock`\x20field\x20on\x20'+'the\x20Service\x27s\x20sales\x20list.\x20To\x20buy\x20one\x20unit,\x20set\x20quantity:\x201.\x20'+'(Legacy\x20callers\x20may\x20still\x20send\x20this\x20as\x20`stock`;\x20it\x20is\x20accepted\x20and\x20treated\x20'+'identically\x20as\x20the\x20purchase\x20quantity.)'),'wip_hash':z['string']()['default']('')['describe']('WIP\x20pin\x20hash.\x20HARD\x20RULE\x20(h1z9\x20card\x2013\x20#17,\x20unified\x20doctrine):\x20when\x20the\x20product\x27s\x20wip_hash\x20is\x20'+'NON-EMPTY,\x20the\x20buyer\x20MUST\x20pass\x20this\x20exact\x20value\x20—\x20NEVER\x20\x22\x22.\x20The\x20chain\x20quote\x20aborts\x20'+'(E_WIP_HASH_NOT_MATCH)\x20when\x20the\x20pin\x20mismatches,\x20which\x20is\x20the\x20delivery-integrity\x20guarantee.\x20'+'To\x20skip\x20copying\x20the\x20hash,\x20set\x20derive_wip_from_listing:true\x20on\x20the\x20order_new\x20object\x20instead\x20'+'(explicit\x20opt-in;\x20the\x20response\x20then\x20warns\x20\x27wip_pin:\x20auto-filled\x20—\x20no\x20WYSIWYG\x20guarantee\x27).\x20'+'Only\x20pass\x20an\x20explicit\x20hash\x20when\x20pinning\x20a\x20value\x20seen\x20earlier:\x20that\x20protects\x20against\x20a\x20legitimate\x20'+'merchant\x20WIP\x20update\x20between\x20viewing\x20the\x20product\x20and\x20placing\x20the\x20order.')})['strict']());export const BuySchema=z['object']({'items':z['array'](ServiceBuyItemSchema)['describe']('List\x20of\x20products\x20or\x20services\x20to\x20purchase'),'total_pay':CoinParamSchema['optional']()['describe']('Actual\x20payment\x20amount.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20or\x20{coin:\x20<coin_object_id>}.\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'OPTIONAL\x20without\x20a\x20discount\x20(M-K17):\x20omit\x20it\x20and\x20the\x20handler\x20derives\x20the\x20EXACT\x20total\x20Σ(sale\x20price\x20×\x20quantity)\x20'+'from\x20the\x20Service\x27s\x20on-chain\x20sales\x20list\x20and\x20discloses\x20the\x20derived\x20value\x20—\x20no\x20transcription,\x20no\x20drift.\x20'+'REQUIRED\x20when\x20\x27discount\x27\x20is\x20set\x20(the\x20discounted\x20total\x20depends\x20on\x20the\x20coupon\x27s\x20live\x20value:\x20run\x20'+'query_toolkit\x20query_type=\x27service_quote\x27\x20and\x20pass\x20total_pay.balance\x20=\x20the\x20quoted\x20final_total).\x20'+'An\x20explicit\x20value\x20is\x20always\x20honored\x20as-is.\x20'+'AMOUNT\x20GATE\x20(M-K11-a):\x20a\x20total\x20that\x20EXACTLY\x20equals\x20Σ\x20published\x20sale\x20price\x20×\x20quantity\x20(catalog-priced\x20buy,\x20'+'in\x20the\x20Service\x27s\x20own\x20payment\x20coin\x20—\x20WOW\x20or\x20bridged\x20USDT/USDC/ETH/BTC)\x20bypasses\x20the\x20harness\x20pre-sign\x20amount\x20gate;\x20'+'any\x20other\x20amount\x20above\x20the\x20threshold\x20is\x20blocked\x20until\x20WOWOK_AMOUNT_THRESHOLD\x20is\x20raised\x20after\x20explicit\x20user\x20confirmation.'),'discount':z['string']()['optional']()['describe']('Discount\x20object\x20ID\x20or\x20name.\x20'+'⚠️\x20COUPON\x20OWNERSHIP\x20RULE\x20(KB-02,\x20disclose\x20BEFORE\x20checkout):\x20a\x20coupon\x20held\x20by\x20another\x20address\x20'+'cannot\x20be\x20applied\x20to\x20your\x20order\x20—\x20only\x20the\x20coupon\x27s\x20current\x20holder\x20can\x20redeem\x20it,\x20and\x20the\x20buy\x20'+'is\x20signed\x20by\x20the\x20buyer,\x20so\x20have\x20the\x20owner\x20transfer\x20the\x20coupon\x20to\x20the\x20buyer\x20first\x20'+'(call\x20service\x20discount_send),\x20then\x20attach\x20it\x20here.\x20Attaching\x20the\x20coupon\x20BURNS\x20it\x20'+'(every\x20coupon\x20is\x20single-use),\x20and\x20any\x20later\x20refund\x20settles\x20the\x20POST-coupon\x20amount\x20only\x20'+'(the\x20escrowed\x20discounted\x20total)\x20—\x20the\x20coupon\x27s\x20face\x20value\x20is\x20never\x20restored.'),'payment_remark':z['string']()['optional']()['describe']('Payment\x20remark'),'payment_index':z['number']()['optional']()['describe']('Payment\x20index'),'derive_wip_from_listing':z['boolean']()['optional']()['describe']('EXPLICIT\x20OPT-IN\x20to\x20wip-hash\x20auto-fill\x20(h1z9\x20card\x2013\x20#17:\x20the\x20ONLY\x20sanctioned\x20auto-fill\x20path).\x20'+'true\x20=\x20for\x20every\x20item\x20whose\x20wip_hash\x20is\x20empty,\x20the\x20CURRENT\x20listing\x20hash\x20is\x20injected\x20at\x20order\x20'+'time\x20and\x20the\x20response\x20warns\x20\x27wip_pin:\x20auto-filled\x20—\x20no\x20WYSIWYG\x20guarantee\x27:\x20the\x20merchant\x20may\x20'+'rebind\x20the\x20.wip\x20file\x20later,\x20and\x20an\x20injected\x20hash\x20follows\x20the\x20listing\x20while\x20an\x20explicitly\x20passed\x20'+'hash\x20stays\x20pinned.\x20Absent/false\x20=\x20the\x20hard\x20rule\x20applies:\x20pass\x20each\x20product\x27s\x20wip_hash\x20EXACTLY\x20'+'(NEVER\x20\x22\x22\x20when\x20the\x20product\x20has\x20a\x20pin)\x20or\x20the\x20order\x20is\x20refused\x20before\x20send.\x20'+'This\x20flag\x20is\x20consumed\x20by\x20the\x20MCP\x20gate\x20and\x20never\x20reaches\x20the\x20chain.')})['strict']();export const DiscountSchema=z['object']({'name':z['string']()['describe']('Discount\x20name.\x20MUST\x20be\x20≤\x2064\x20bytes\x20(UTF-8):\x20the\x20chain\x20applies\x20the\x20same\x20'+'64-byte\x20name\x20cap\x20to\x20discount\x20rows\x20as\x20to\x20SKU\x20names,\x20at\x20listing\x20time\x20—\x20a\x20longer\x20name\x20aborts\x20'+'E_NAME_LENGTH_EXCEEDED\x20(abort\x201)\x20at\x20creation\x20(F-RQ-01).'),'discount_type':DiscountTypeSchema,'discount_value':BalanceTypeSchema['describe']('Discount\x20magnitude,\x20meaning\x20depends\x20on\x20discount_type.\x20'+'RATES\x20(0):\x20per-10000\x20off\x20rate\x20—\x2010\x20=\x200.1%\x20off,\x201000\x20=\x2010%\x20off,\x2010000\x20=\x20100%\x20off;\x20values\x20above\x2010000\x20are\x20rejected.\x20'+'FIXED\x20(1):\x20fixed\x20deduction\x20from\x20the\x20order\x20total\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x201000000000\x20=\x201\x20WOW\x20at\x209\x20decimals).'),'benchmark':z['union']([z['number'](),z['string']()])['optional']()['describe']('Minimum\x20order\x20total\x20(in\x20the\x20Service\x20token\x27s\x20smallest\x20units)\x20for\x20the\x20discount\x20to\x20apply\x20—\x20'+'when\x20set,\x20the\x20discount\x20is\x20applied\x20only\x20if\x20the\x20PRE-discount\x20order\x20total\x20is\x20GREATER\x20THAN\x20OR\x20EQUAL\x20TO\x20this\x20value.\x20'+'✅\x20OMITTING\x20this\x20field\x20(or\x20passing\x20null,\x20or\x200)\x20means\x20NO\x20threshold\x20—\x20the\x20discount\x20applies\x20UNCONDITIONALLY,\x20and\x20that\x20is\x20the\x20common,\x20correct\x20case.\x20'+'This\x20is\x20the\x20on-chain\x20behaviour:\x20benchmark_met\x20=\x20if\x20(option::is_some(&discount.benchmark))\x20'+'{\x20total\x20>=\x20benchmark\x20}\x20else\x20{\x20true\x20}\x20(inside\x20the\x20on-chain\x20discount-application\x20step).\x20'+'⚠️\x20SHARP\x20EDGE\x20when\x20you\x20DO\x20set\x20a\x20threshold:\x20an\x20order\x20below\x20the\x20threshold\x20CANNOT\x20use\x20the\x20coupon\x20—\x20'+'attaching\x20it\x20at\x20buy\x20aborts\x20(error\x2038:\x20the\x20transaction\x20rolls\x20back,\x20nothing\x20is\x20paid,\x20and\x20the\x20coupon\x20is\x20preserved);\x20'+'dropping\x20it\x20means\x20the\x20buyer\x20pays\x20FULL\x20price\x20and\x20keeps\x20the\x20coupon\x20for\x20a\x20future\x20order.\x20'+'Keep\x20thresholds\x20low\x20enough\x20that\x20your\x20typical\x20basket\x20clears\x20them.\x20'+'If\x20the\x20order\x20total\x20is\x20below\x20the\x20discounted\x20price\x20the\x20payment\x20aborts\x20—\x20pay\x20the\x20list\x20price;\x20the\x20excess\x20is\x20returned\x20as\x20a\x20new\x20Coin.'),'time_ms_start':z['number']()['optional']()['describe']('Discount\x20start\x20time\x20(milliseconds).\x20⚠️\x20A\x20FUTURE\x20start\x20mints\x20a\x20coupon\x20that\x20is\x20listed\x20as\x20usable\x20but\x20'+'CANNOT\x20be\x20spent\x20until\x20the\x20window\x20opens\x20(every\x20spend\x20aborts\x20E_DISCOUNT_TIME_INVALID\x20/\x20buy\x20code\x2035).\x20'+'Legitimate\x20for\x20scheduled\x20campaigns\x20—\x20the\x20mint\x20carries\x20a\x20loud\x20warning;\x20do\x20not\x20distribute\x20the\x20coupon\x20'+'to\x20recipients\x20before\x20the\x20window\x20opens.'),'allow_zero_total':z['boolean']()['optional']()['describe']('NO\x20EFFECT\x20—\x20DO\x20NOT\x20SET\x20(BSX-F07:\x20the\x20former\x20escape\x20hatch\x20is\x20removed).\x20This\x20flag\x20has\x20no\x20on-chain\x20field\x20'+'(the\x20on-chain\x20Discount\x20struct\x20never\x20carried\x20it;\x20a\x20coupon\x20minted\x20with\x20it\x20is\x20byte-identical\x20to\x20one\x20without),\x20'+'and\x20it\x20NO\x20LONGER\x20downgrades\x20the\x20MCP\x20issuance\x20block\x20for\x20a\x20coupon\x20that\x20zeroes\x20the\x20cheapest\x20SKU\x20—\x20the\x20block\x20'+'is\x20unconditional:\x20a\x20zeroing\x20coupon\x20can\x20only\x20dead-end\x20at\x20the\x20buyer\x27s\x20checkout\x20(order_new_zero_total_dead_order\x20'+'client-side,\x20abort\x2042\x20on-chain).\x20For\x20a\x20deliberate\x20free\x20tier:\x20price\x20the\x20SKU\x20at\x201\x20smallest\x20unit\x20(never\x200\x20—\x20'+'a\x20zero-priced\x20sale\x20is\x20permanently\x20unbuyable)\x20or\x20deliver\x20it\x20outside\x20the\x20sales\x20rails\x20(e.g.\x20a\x20Demand\x20with\x20'+'Signature\x20fulfillment).\x20Omit\x20this\x20field.'),'time_ms_end':z['number']()['describe']('Discount\x20end\x20time\x20(milliseconds)'),'count':z['number']()['describe']('Number\x20of\x20SEPARATE\x20Discount\x20(coupon)\x20objects\x20minted\x20—\x20total\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.\x20'+'Each\x20coupon\x20object\x20is\x20SINGLE-USE\x20(consumed\x20on\x20first\x20use).\x20This\x20is\x20NOT\x20a\x20per-coupon\x20reuse\x20count:\x20'+'count:2\x20creates\x202\x20independent\x20one-time\x20coupons,\x20not\x201\x20coupon\x20usable\x20twice.'),'recipient':ManyAccountOrMark_AddressAISchema['describe']('Discount\x20recipient.\x20OBJECT\x20FORM\x20REQUIRED\x20(T9\x20az3-mn-261013):\x20a\x20bare\x20string\x20is\x20REJECTED\x20here\x20—\x20'+'pass\x20{entities:\x20[{name_or_address:\x20\x27<account_name_or_0x_address>\x27}]}\x20'+'(example:\x20{entities:\x20[{name_or_address:\x20\x27buyer1\x27}]}).\x20'+'Total\x20coupons\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.'),'transferable':z['boolean']()['describe']('Whether\x20the\x20discount\x20object\x20recipient\x20can\x20transfer\x20the\x20discount\x20object')})['strict']();export const OrderNewSchema=z['object']({'buy':BuySchema,'agents':ManyAccountOrMark_AddressAISchema['optional']()['describe']('Order\x20agents.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'order_required_info':z['string']()['optional']()['describe']('Contact\x20object\x20ID\x20or\x20WTS\x20Proof\x20object,\x20RECORDED\x20on\x20the\x20Order\x20as\x20evidence\x20that\x20the\x20order\x20holder\x20'+'delivered\x20the\x20private\x20information\x20the\x20Service\x20declares\x20in\x20customer_required\x20(e.g.\x20phone/email/shipping_address).\x20'+'ACCEPTED\x20FORMS\x20(upwc-cat-261017\x20T10\x20live\x20probe):\x20an\x20on-chain\x20object\x20ADDRESS\x20(0x…),\x20a\x20REGISTERED\x20mark\x20name,\x20'+'or\x20the\x20Contact/Proof\x20object\x20itself\x20—\x20a\x20bare\x20account\x20name\x20is\x20NOT\x20an\x20object\x20reference\x20and\x20fails\x20with\x20\x27not\x20found\x27;\x20'+'RECORD-ONLY,\x20NOT\x20ENFORCED:\x20nothing\x20on-chain\x20reads\x20this\x20field\x20—\x20the\x20purchase\x20entry\x20never\x20requires\x20it,\x20and\x20an\x20order\x20'+'supplying\x20none\x20of\x20the\x20declared\x20fields\x20is\x20still\x20created.\x20FLOW:\x20the\x20order\x20holder\x20sends\x20the\x20information\x20to\x20the\x20'+'Service\x27s\x20Contact\x20(um)\x20via\x20end-to-end\x20encrypted\x20Messenger,\x20then\x20passes\x20the\x20Contact\x20object\x20ID\x20or\x20the\x20generated\x20'+'WTS\x20Proof\x20here.\x20To\x20ENFORCE\x20delivery\x20on-chain,\x20mount\x20the\x20pattern.required_info_evidence_gate\x20Guard\x20on\x20the\x20forward\x20'+'that\x20hands\x20over\x20goods\x20or\x20funds,\x20asserting\x20order.required_info\x20is\x20some\x20(presence-only\x20—\x20the\x20recorded\x20address\x20value\x20'+'is\x20never\x20a\x20guard\x20condition;\x20accepting\x20the\x20delivered\x20information\x20is\x20the\x20merchant\x27s\x20confirming\x20forward).\x20'+'ATTESTATION-ONLY:\x20the\x20recorded\x20value\x20is\x20self-attested,\x20has\x20no\x20on-chain\x20readback,\x20and\x20MUST\x20NOT\x20be\x20used\x20as\x20a\x20gate\x20condition.\x20'+'PER-ORDER\x20BINDING:\x20when\x20the\x20listing\x20genuinely\x20promises\x20a\x20per-order\x20credential,\x20use\x20the\x20dedicated\x20controlled\x20bind\x20'+'operation\x20(order_required_info_bind)\x20with\x20a\x20Proof\x20whose\x20about\x20is\x20THIS\x20order\x20and\x20whose\x20creator\x20is\x20the\x20order\x20holder\x20—\x20'+'the\x20chain\x20verifies\x20both\x20at\x20write\x20time\x20and\x20rejects\x20a\x20mismatch\x20without\x20writing\x20anything.\x20The\x20reuse\x20model\x20(one\x20Contact\x20'+'Proof\x20across\x20orders)\x20stays\x20the\x20default\x20for\x20this\x20plain\x20record\x20field;\x20pick\x20per\x20listing\x20promise,\x20not\x20per\x20habit.\x20'+'BOUNDARY:\x20that\x20binding\x20proves\x20the\x20credential\x20AUTHOR\x20only,\x20never\x20its\x20content\x20or\x20any\x20rating\x20—\x20do\x20not\x20mirror\x20it\x20onto\x20'+'review/reward\x20claims;\x20public\x20reviews\x20are\x20Repository\x20rows\x20whose\x20values\x20are\x20enforced\x20guard-side\x20via\x20data-value\x20probes,\x20'+'not\x20through\x20Proof\x20objects.'),'transfer':AccountOrMark_AddressAISchema['optional']()['describe']('Set\x20the\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.'),'namedNewOrder':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Order\x20object.\x20'+'Without\x20this,\x20the\x20Order\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_order_v1\x27}\x20allows\x20subsequent\x20operations\x20to\x20use\x20\x27my_order_v1\x27\x20instead\x20of\x20the\x20address.\x20'+'PLACEMENT:\x20this\x20field\x20MUST\x20be\x20inside\x20data.order_new\x20(it\x20is\x20an\x20OrderNew\x20field)\x20—\x20putting\x20namedNewOrder\x20at\x20'+'the\x20data\x20root\x20fails\x20schema\x20validation\x20with\x20\x27Unrecognized\x20key\x27.\x20'+'MIGRATION\x20TIP:\x20for\x20batch/migration\x20order\x20creation,\x20always\x20auto-generate\x20readable\x20names\x20'+'(e.g.\x20\x27<source>_<service>_<seq>\x27\x20like\x20\x27my_shop_svc_v1_0001\x27)\x20—\x20unnamed\x20orders\x20(head.name\x20=\x20null)\x20are\x20'+'only\x20address-referenceable,\x20which\x20breaks\x20downstream\x20queries,\x20displays\x20and\x20audits\x20(E-8).'),'namedNewAllocation':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Allocation\x20object.\x20'+'Without\x20this,\x20the\x20Allocation\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_allocation_v1\x27}\x20allows\x20alloc_by_guard\x20to\x20reference\x20\x27my_allocation_v1\x27.'),'namedNewProgress':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Progress\x20object.\x20'+'Without\x20this,\x20the\x20Progress\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_progress_v1\x27}\x20allows\x20progress\x20operations\x20to\x20use\x20\x27my_progress_v1\x27.')})['strict']();export const SalesSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Add\x20new\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('set'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Replaces\x20the\x20ENTIRE\x20sales\x20list:\x20every\x20product\x20NOT\x20included\x20is\x20REMOVED\x20from\x20the\x20Service\x20'+'(its\x20stock\x20and\x20wip\x20binding\x20go\x20with\x20it).\x20To\x20change\x20ONE\x20product,\x20prefer\x20the\x20per-item\x20ops\x20'+'(price_add\x20/\x20price_reduce\x20/\x20stock_add\x20/\x20stock_reduce\x20/\x20sale_suspension)\x20over\x20re-sending\x20'+'the\x20full\x20list;\x20with\x20op:set\x20you\x20MUST\x20resend\x20ALL\x20unchanged\x20products\x20too.\x20'+'Removal\x20is\x20immediate\x20and\x20cannot\x20be\x20undone.'),z['object']({'op':z['literal']('remove'),'sales_name':z['array'](LongNameSchema['describe']('Sales\x20name'))})['strict']()['describe']('Remove\x20existing\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20all\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('price_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20INCREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20+0.1\x20WOW).\x20'+'Added\x20to\x20the\x20current\x20price\x20(on-chain\x20saturating\x20add).\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Raise\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20resolves\x20the\x20name\x20against\x20'+'the\x20live\x20sales\x20list\x20and\x20refuses\x20the\x20call\x20before\x20send,\x20and\x20the\x20response\x20carries\x20a\x20'+'{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('price_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20DECREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20-0.1\x20WOW).\x20'+'Must\x20not\x20exceed\x20the\x20current\x20price:\x20an\x20oversized\x20reduce\x20ABORTS\x20on\x20chain\x20(code\x2041)\x20and\x20does\x20NOT\x20clamp.\x20'+'NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Lower\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'an\x20oversized\x20delta\x20is\x20refused\x20by\x20the\x20chain\x20(code\x2041)\x20instead\x20of\x20clamping;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('stock_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20INCREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2050\x20=\x20+50\x20units.')})['strict']()['describe']('Restock\x20one\x20product\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('stock_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20DECREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2010\x20=\x20-10\x20units.\x20'+'If\x20the\x20delta\x20exceeds\x20current\x20stock,\x20the\x20stock\x20clamps\x20to\x200\x20(product\x20becomes\x20unsellable).')})['strict']()['describe']('Reduce\x20one\x20product\x27s\x20stock\x20by\x20a\x20delta\x20(e.g.\x20write-off\x20damaged\x20units).\x20'+'Only\x20the\x20named\x20product\x20is\x20touched;\x20an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20'+'the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send.'),z['object']({'op':z['literal']('sale_suspension'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20suspend\x20or\x20resume'),'suspension':z['boolean']()['describe']('true\x20=\x20suspend\x20the\x20product\x20(buy/quote\x20abort\x20with\x20E_SALE_SUSPENDED);\x20false\x20=\x20resume\x20selling.')})['strict']()['describe']('Suspend\x20or\x20resume\x20ONE\x20product\x20without\x20removing\x20it\x20(keeps\x20price/stock/WIP\x20binding).\x20'+'The\x20retail-style\x20\x27out\x20of\x20stock\x20/\x20listing\x20inactive\x27\x20state.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('wip_set'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20whose\x20WIP\x20file\x20is\x20(re)bound'),'wip':z['string']()['describe']('New\x20WIP\x20file\x20URL\x20for\x20the\x20product.\x20Same\x20network-deployment\x20rule\x20as\x20the\x20add/set\x20wip\x20field:\x20'+'production\x20MUST\x20use\x20a\x20public\x20HTTP\x20URL\x20to\x20a\x20.wip\x20file\x20(a\x20local\x20path,\x20localhost/loopback\x20or\x20'+'LAN\x20URL\x20passes\x20the\x20merchant-side\x20set-time\x20verification\x20but\x20aborts\x20order_new\x20for\x20every\x20'+'customer).\x20\x22\x22\x20clears\x20WIP\x20verification\x20(TESTING\x20ONLY\x20—\x20the\x20product\x20then\x20has\x20no\x20pin).'),'wip_hash':z['string']()['optional']()['describe']('Expected\x20meta.hash\x20embedded\x20in\x20the\x20new\x20WIP\x20file\x20—\x20when\x20provided\x20it\x20is\x20VERIFIED\x20against\x20the\x20'+'file\x20before\x20send\x20(mismatch\x20aborts\x20pre-send);\x20the\x20on-chain\x20pin\x20is\x20always\x20derived\x20from\x20the\x20'+'file\x27s\x20own\x20meta.hash.\x20Pass\x20it\x20whenever\x20the\x20value\x20is\x20known:\x20after\x20the\x20rebind,\x20buyers\x20pinning\x20'+'the\x20OLD\x20hash\x20abort\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)\x20until\x20they\x20re-copy\x20the\x20NEW\x20hash.')})['strict']()['describe']('Rebind\x20ONE\x20product\x27s\x20WIP\x20file\x20(and\x20pin)\x20without\x20touching\x20its\x20price,\x20stock\x20or\x20suspension\x20—\x20'+'fields\x20not\x20supplied\x20here\x20keep\x20the\x20live\x20on-chain\x20values.\x20An\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20'+'(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20resolves\x20the\x20name\x20against\x20the\x20live\x20sales\x20list\x20and\x20refuses\x20the\x20'+'call\x20before\x20send.\x20Executed\x20as\x20read-merge-rewrite:\x20the\x20handler\x20reads\x20the\x20live\x20sales\x20list,\x20'+'changes\x20only\x20the\x20named\x20product\x27s\x20wip/wip_hash,\x20and\x20replays\x20the\x20full\x20table\x20as\x20an\x20op:set\x20—\x20'+'a\x20concurrent\x20catalog\x20edit\x20between\x20read\x20and\x20rewrite\x20would\x20be\x20overwritten,\x20so\x20run\x20this\x20when\x20no\x20'+'other\x20catalog\x20change\x20is\x20in\x20flight.\x20Announce\x20the\x20new\x20pin\x20hash\x20to\x20holders\x20of\x20the\x20old\x20one:\x20their\x20'+'orders\x20abort\x20E_WIP_HASH_NOT_MATCH\x20after\x20the\x20rebind\x20until\x20they\x20re-copy\x20it.')]);export const RestockSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('flag'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20LIVE\x20product\x20whose\x20restock-on-refund\x20flag\x20is\x20set'),'flagged':z['boolean']()['describe']('true\x20=\x20refunded\x20orders\x20of\x20this\x20SKU\x20put\x20their\x20purchased\x20units\x20back\x20on\x20shelf;\x20false\x20=\x20opt\x20out.')})['strict']()['describe']('Opt\x20ONE\x20live\x20product\x20in/out\x20of\x20restock-on-refund.\x20An\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032);\x20'+'delisting\x20the\x20product\x20is\x20the\x20kill\x20switch.\x20Without\x20the\x20flag,\x20the\x20order-level\x20restock\x20op\x20refuses\x20that\x20line\x20(code\x2046).\x20'+'Flagging\x20a\x20SKU\x20does\x20not\x20itself\x20touch\x20stock\x20—\x20the\x20order-level\x20op\x20below\x20does\x20the\x20restoration,\x20and\x20it\x20is\x20'+'once-per-order\x20per\x20order\x20(code\x2049)\x20and\x20bound\x20to\x20orders\x20of\x20THIS\x20service\x20(foreign\x20orders\x20abort\x20code\x2026).'),z['object']({'op':z['literal']('order'),'order':z['string']()['min'](0x1)['describe']('Address\x20or\x20local\x20name\x20of\x20the\x20REFUNDED\x20order\x20whose\x20purchased\x20units\x20go\x20back\x20on\x20shelf.\x20'+'Must\x20be\x20an\x20order\x20of\x20THIS\x20service\x20(a\x20foreign\x20order\x20aborts\x20code\x2026),\x20and\x20each\x20order\x20can\x20be\x20'+'restocked\x20exactly\x20once\x20—\x20a\x20second\x20call\x20for\x20the\x20same\x20order\x20aborts\x20code\x2049\x20(no\x20retry\x20succeeds;\x20'+'the\x20restoration\x20is\x20already\x20complete).')})['strict']()['describe']('Put\x20back\x20the\x20units\x20one\x20refunded\x20order\x20purchased,\x20read\x20from\x20the\x20order\x27s\x20own\x20purchase\x20lines\x20'+'(the\x20caller\x20cannot\x20add\x20extra\x20units).\x20Two-pass\x20all-or-nothing\x20on\x20chain:\x20every\x20line\x20must\x20be\x20'+'restock-flagged\x20and\x20still\x20live\x20before\x20the\x20first\x20unit\x20moves\x20(unflagged\x20→\x20code\x2046,\x20delisted\x20→\x20code\x2032),\x20'+'so\x20a\x20partial\x20restock\x20is\x20impossible.\x20Once-per-order\x20(code\x2049\x20on\x20replay)\x20and\x20ownership-bound\x20'+'(a\x20foreign\x20order\x20aborts\x20code\x2026);\x20the\x20applied\x20state\x20lives\x20in\x20a\x20RestockStamp\x20dynamic\x20field\x20on\x20the\x20'+'service\x20(no\x20public\x20query\x20primitive)\x20—\x20the\x20MCP\x20pre-gate\x20reads\x20that\x20stamp\x20before\x20send\x20and\x20refuses\x20a\x20'+'replay\x20(restock_order_already_applied)\x20so\x20no\x20gas\x20is\x20burned.\x20'+'Emits\x20one\x20stock-restocked\x20event\x20per\x20line.')]);export const CallService_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'order_new':OrderNewSchema['optional']()['describe']('Create\x20new\x20order.\x20RETRY\x20DISCIPLINE:\x20the\x20order\x20creation\x20is\x20atomic\x20on-chain\x20but\x20NOT\x20in\x20'+'observability\x20—\x20a\x20transport\x20drop\x20after\x20submit\x20leaves\x20the\x20commit\x20state\x20UNKNOWN,\x20and\x20a\x20blind\x20'+'resubmit\x20creates\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20(live\x20mainnet\x20incident).\x20On\x20any\x20'+'failure/timeout,\x20verify\x20whether\x20an\x20order\x20with\x20this\x20exact\x20signature\x20(service\x20+\x20buyer\x20+\x20items)\x20'+'already\x20landed\x20—\x20via\x20the\x20in-flight\x20marker\x20in\x20the\x20failure\x20envelope,\x20the\x20sender\x27s\x20recent\x20'+'on-chain\x20objects,\x20or\x20onchain_events\x20—\x20and\x20adopt\x20it\x20if\x20present;\x20resubmit\x20only\x20if\x20confirmed\x20absent.'),'description':DescriptionSchema['optional'](),'location':LongNameSchema['optional']()['describe']('The\x20service\x20area\x20and\x20scope\x20as\x20stated\x20by\x20the\x20merchant.\x20'+'IMPORTANT:\x20If\x20the\x20service\x20has\x20a\x20geographic\x20scope,\x20ALWAYS\x20specify\x20this\x20field.\x20'+'Use\x20a\x20complete\x20hierarchical\x20address\x20'+'(e.g.\x20\x27US\x20→\x20California\x20→\x20Los\x20Angeles\x20→\x20Koreatown\x27).\x20'+'If\x20only\x20a\x20partial\x20location\x20is\x20known,\x20EXPAND\x20it\x20to\x20the\x20full\x20standardized\x20form\x20'+'(country\x20→\x20province/state\x20→\x20city\x20→\x20district,\x20worldwide)\x20—\x20when\x20ambiguous,\x20offer\x202-4\x20candidate\x20completions\x20and\x20let\x20the\x20user\x20pick.'),'sales':SalesSchema['optional']()['describe']('Service\x20sales\x20products\x20or\x20services\x20list.\x20'+'⚠️\x20WIP\x20(PRODUCT-DETAIL\x20FILE)\x20—\x20HOW\x20TO\x20PROVIDE\x20IT:\x20'+'(1)\x20EASIEST\x20—\x20official\x20free\x20hosting:\x20upload\x20the\x20detail\x20file\x20with\x20the\x20wip_file\x20tool;\x20the\x20default\x20endpoint\x20is\x20'+'https://wip.store.wowok.net\x20(free:\x2010\x20files\x20per\x20account,\x20180-day\x20retention,\x2012MB\x20per\x20file,\x20rate-limited;\x20files\x20'+'stay\x20until\x20you\x20purge\x20them).\x20Put\x20the\x20returned\x20URL\x20into\x20sale.wip.\x20'+'(2)\x20Your\x20own\x20hosting:\x20any\x20publicly\x20reachable\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20your\x20own\x20website)\x20—\x20pass\x20customBaseUrl\x20'+'to\x20wip_file\x20when\x20uploading\x20to\x20a\x20non-default\x20endpoint,\x20or\x20host\x20the\x20file\x20yourself\x20and\x20put\x20that\x20URL\x20into\x20sale.wip.\x20'+'For\x20long-lived\x20MAINNET\x20listings\x20prefer\x20your\x20own\x20endpoint\x20so\x20the\x20detail\x20page\x20outlives\x20the\x20free\x20retention\x20window.\x20'+'⚠️\x20REACHABILITY\x20RULE:\x20a\x20non-empty\x20sale.wip\x20MUST\x20be\x20a\x20publicly\x20reachable\x20URL.\x20The\x20URL\x20is\x20stored\x20ON-CHAIN\x20and\x20'+'every\x20customer\x20fetches\x20it\x20at\x20order\x20time\x20—\x20a\x20local\x20file\x20path,\x20localhost/loopback\x20URL,\x20or\x20LAN\x20private-IP\x20URL\x20is\x20'+'unreachable\x20by\x20customers\x20on\x20other\x20machines\x20and\x20aborts\x20order_new\x20100%.\x20Local-network\x20URLs\x20are\x20INTERNAL\x20TEST\x20USE\x20'+'ONLY\x20(env.network\x20=\x20localnet).\x20'+'⚠️\x20SCORING:\x20on\x20mainnet,\x20a\x20sale\x20item\x20without\x20a\x20product-detail\x20file\x20is\x20an\x20incomplete\x20listing\x20—\x20it\x20hurts\x20the\x20'+'service\x27s\x20market\x20completeness\x20score.\x20Leave\x20sale.wip\x20empty\x20(\x22\x22)\x20only\x20for\x20quick\x20local\x20testing.'),'restock':RestockSchema['optional']()['describe']('Refund\x20restocking\x20(permission\x20305\x20SERVICE_SALES).\x20'+'op:\x27flag\x27\x20opts\x20ONE\x20live\x20product\x20into\x20restock-on-refund;\x20op:\x27order\x27\x20puts\x20the\x20units\x20a\x20REFUNDED\x20order\x20'+'purchased\x20back\x20on\x20shelf.\x20The\x20order\x20path\x20is\x20all-or-nothing:\x20every\x20purchased\x20line\x20must\x20be\x20flagged\x20and\x20still\x20'+'live\x20before\x20any\x20unit\x20moves\x20(otherwise\x20the\x20chain\x20aborts\x2046/32),\x20so\x20half\x20a\x20restock\x20is\x20impossible.\x20'+'The\x20order\x20path\x20is\x20once-per-order\x20(replay\x20aborts\x2049)\x20and\x20bound\x20to\x20THIS\x20service\x20(foreign\x20order\x20aborts\x2026).\x20'+'Do\x20NOT\x20fake\x20a\x20restock\x20with\x20stock_add\x20when\x20the\x20order\x20carries\x20several\x20lines\x20—\x20use\x20op:\x27order\x27\x20so\x20quantities\x20'+'come\x20from\x20the\x20order\x20itself.\x20DISCLOSURE:\x20restock\x20reopens\x20sales\x20—\x20if\x20the\x20machine\x20(or\x20its\x20template)\x20has\x20no\x20'+'refund-terminal\x20gate,\x20orders\x20inside\x20their\x20refund\x20window\x20may\x20lose\x20refund\x20eligibility\x20or\x20create\x20'+'fund-accounting\x20ambiguity\x20once\x20restocked\x20units\x20are\x20resold;\x20confirm\x20the\x20machine\x27s\x20refund\x20rail\x20remains\x20'+'reachable\x20after\x20restocking.'),'repositories':ObjectsSchema['optional']()['describe']('Service\x20Repository\x20object\x20list.'),'rewards':ObjectsSchema['optional']()['describe']('Service\x20Reward\x20object\x20list.\x20'+'May\x20share\x20the\x20Service\x27s\x20Permission\x20(no\x20conflict\x20check\x20—\x20intentional:\x20rewards\x20are\x20the\x20provider\x27s\x20own\x20'+'incentive\x20tool;\x20only\x20Arbitration\x20requires\x20a\x20different\x20Permission\x20for\x20neutrality).\x20'+'⚠️\x20OP\x20SEMANTICS\x20(SDK\x20translation,\x20etm-mn-261013\x20E-06):\x20op:\x27set\x27\x20executes\x20as\x20clear\x20+\x20add\x20—\x20and\x20'+'reward\x20clear\x20is\x20TIME-LOCKED\x20after\x20publish\x20(E_LOCKED_TIME_NOT_ENOUGH\x20=\x20abort\x2024:\x20requires\x20pause\x20+\x20'+'setting_lock_duration\x20elapsed,\x20default\x2030\x20days).\x20BEFORE\x20publish\x20op:\x27set\x27\x20is\x20fine;\x20AFTER\x20publish\x20'+'attach\x20rewards\x20with\x20op:\x27add\x27\x20ONLY\x20(add\x20has\x20no\x20lock).'),'arbitrations':ObjectsSchema['optional']()['describe']('Service\x20Arbitration\x20object\x20list.\x20'+'FORMAT:\x20same\x20as\x20repositories\x20—\x20use\x20the\x20`objects`\x20field\x20name\x20inside\x20the\x20operation\x20data.\x20'+'Example:\x20{arbitrations:\x20{op:\x20\x27add\x27,\x20objects:\x20[{name:\x20\x27my_arb_1\x27}]}}.\x20'+'Each\x20item\x20is\x20a\x20NameOrAddress\x20(object\x20ID\x20or\x20local\x20mark\x20name).\x20'+'⚠️\x20OP\x20SEMANTICS\x20(SDK\x20translation,\x20etm-mn-261013\x20E-06\x20+\x20crs\x20P3-1):\x20op:\x27add\x27\x20appends\x20and\x20is\x20the\x20ONLY\x20'+'\x20unlocked\x20path\x20after\x20publish\x20(add\x20has\x20no\x20publish\x20assert\x20on-chain).\x20op:\x27set\x27\x20executes\x20as\x20'+'clear\x20+\x20add\x20and\x20REPLACES\x20the\x20entire\x20allowlist\x20(pass\x20EVERY\x20Arbitration\x20that\x20must\x20remain\x20bound)\x20—\x20'+'clear\x20is\x20TIME-LOCKED\x20after\x20publish\x20(E_LOCKED_TIME_NOT_ENOUGH\x20=\x20abort\x2024:\x20requires\x20pause\x20+\x20'+'setting_lock_duration\x20elapsed,\x20default\x2030\x20days),\x20so\x20use\x20op:\x27set\x27\x20BEFORE\x20publish\x20only.\x20'+'(The\x202026-10-08\x20op:\x27add\x27\x20disable\x20was\x20lifted:\x20the\x20unparseable-success-response\x20SDK\x20bug\x20it\x20responded\x20'+'to\x20is\x20fixed\x20—\x20safeTextJson\x20+\x20big-int\x20conversion.)\x20'+'⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20every\x20Arbitration\x20bound\x20here\x20'+'MUST\x20use\x20a\x20Permission\x20object\x20DIFFERENT\x20from\x20THIS\x20Service\x27s\x20permission\x20—\x20binding\x20an\x20Arbitration\x20that\x20shares\x20'+'the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20'+'Create\x20a\x20dedicated\x20Permission\x20for\x20each\x20Arbitration\x20BEFORE\x20binding.\x20'+'DESIGN\x20RATIONALE\x20(confirmed\x20intentional):\x20dispute\x20resolution\x20requires\x20NEUTRALITY\x20—\x20an\x20Arbitration\x20controlled\x20'+'by\x20the\x20same\x20Permission\x20admins\x20as\x20the\x20Service\x20it\x20judges\x20would\x20be\x20a\x20conflict\x20of\x20interest.\x20ONLY\x20Arbitration\x20has\x20'+'this\x20check:\x20Reward\x20and\x20Treasury\x20objects\x20MAY\x20share\x20the\x20Service\x27s\x20Permission\x20(they\x20are\x20the\x20provider\x27s\x20own\x20tools).'),'machine':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Service\x20Machine\x20object\x20ID\x20or\x20name.\x20The\x20Machine\x20object\x20must\x20be\x20in\x20published\x20state.'),'discount':DiscountSchema['optional']()['describe']('Issue\x20discount\x20(mint\x20coupons\x20bound\x20to\x20this\x20Service).\x20'+'⚠️\x20ISSUANCE\x20PRESCRIPTION\x20(KB-02):\x20issuing\x20=\x20MINT\x20then\x20TRANSFER.\x20This\x20field\x20mints\x20the\x20coupon\x20'+'objects\x20under\x20THIS\x20account\x20—\x20its\x20`recipient`\x20field\x20delivers\x20them\x20directly\x20when\x20you\x20know\x20the\x20'+'recipients;\x20for\x20pre-minted\x20campaign\x20coupons\x20held\x20for\x20later\x20handout,\x20the\x20handout\x20itself\x20is\x20'+'discount_send\x20(mint\x20first,\x20transfer\x20to\x20the\x20recipient\x20at\x20distribution\x20time).\x20'+'COUPON\x20SEMANTICS\x20to\x20disclose:\x20HOLDING\x20IS\x20THE\x20CREDENTIAL\x20—\x20the\x20coupon\x20belongs\x20to\x20whoever\x20HOLDS\x20'+'it,\x20only\x20the\x20holder\x27s\x20own\x20signature\x20can\x20spend\x20it,\x20and\x20sharing\x20the\x20coupon\x27s\x20object\x20ID\x20confers\x20'+'nothing;\x20ONE\x20COUPON,\x20ONE\x20BURN\x20—\x20every\x20coupon\x20is\x20single-use\x20and\x20is\x20destroyed\x20on\x20first\x20spend;\x20'+'REFUNDS\x20SETTLE\x20THE\x20POST-COUPON\x20AMOUNT\x20—\x20refund\x20rails\x20pay\x20back\x20the\x20escrowed\x20discounted\x20total\x20'+'only,\x20a\x20cancelled\x20order\x20never\x20restores\x20the\x20coupon\x27s\x20face\x20value.\x20A\x20coupon\x20held\x20by\x20another\x20'+'address\x20cannot\x20be\x20applied\x20to\x20a\x20buyer\x27s\x20order\x20—\x20the\x20owner\x20must\x20discount_send\x20it\x20to\x20the\x20buyer\x20first.'),'discount_destroy':z['array'](NameOrAddressSchema)['optional']()['describe']('Destroy\x20existing\x20discount\x20object\x20ID\x20list.'),'discount_send':z['object']({'discounts':z['array'](NameOrAddressSchema)['min'](0x1)['describe']('Coupon\x20object\x20IDs\x20or\x20local\x20names\x20to\x20transfer.\x20You\x20MUST\x20own\x20these\x20Discount\x20objects.\x20'+'Each\x20coupon\x20must\x20have\x20been\x20minted\x20with\x20transferable:true\x20—\x20otherwise\x20the\x20chain\x20aborts\x20with\x20'+'E_DISCOUNT_NOT_TRANSFERABLE\x20(semantic\x20code\x20service:10).\x20Coupons\x20stay\x20single-use;\x20'+'the\x20transfer\x20does\x20not\x20change\x20that.\x20There\x20is\x20NO\x20batch\x20entry\x20on-chain\x20—\x20each\x20coupon\x20is\x20'+'delivered\x20by\x20its\x20own\x20singleton\x20call\x20(fanned\x20out\x20automatically);\x20prefer\x20ONE\x20coupon\x20per\x20'+'transaction\x20for\x20coupon\x20migrations\x20(SDK\x20cap\x20MAX_DISCOUNT_COUNT_ONCE\x20still\x20applies).'),'recipient':AccountOrMark_AddressAISchema['describe']('Destination\x20address\x20(or\x20account/local\x20mark\x20resolvable\x20to\x20one).\x20ALL\x20listed\x20coupons\x20'+'are\x20moved\x20to\x20this\x20single\x20address\x20in\x20one\x20call.')})['strict']()['optional']()['describe']('Transfer\x20ALREADY-MINTED\x20coupons\x20you\x20own\x20to\x20another\x20address,\x20instead\x20of\x20destroying\x20them\x20'+'(discount_destroy)\x20or\x20minting\x20new\x20ones\x20(discount).\x20This\x20is\x20a\x20pure\x20ownership\x20handover:\x20'+'the\x20on-chain\x20entry\x20points\x20are\x20public\x20funs\x20with\x20NO\x20Service\x20permission\x20requirement\x20—\x20'+'the\x20only\x20preconditions\x20are\x20that\x20the\x20sender\x20owns\x20each\x20coupon\x20and\x20each\x20was\x20minted\x20'+'transferable:true.\x20Typical\x20use:\x20hand\x20out\x20pre-minted\x20campaign\x20coupons,\x20or\x20move\x20coupons\x20'+'between\x20your\x20own\x20accounts.\x20'+'KB-02\x20COUPON\x20SEMANTICS:\x20this\x20transfer\x20is\x20the\x20second\x20half\x20of\x20coupon\x20ISSUANCE\x20'+'(mint\x20via\x20`discount`,\x20then\x20transfer\x20here\x20at\x20distribution\x20time).\x20HOLDING\x20IS\x20THE\x20CREDENTIAL:\x20'+'the\x20coupon\x20belongs\x20to\x20whoever\x20HOLDS\x20it\x20—\x20only\x20the\x20holder\x27s\x20own\x20signature\x20can\x20spend\x20it,\x20and\x20'+'sharing\x20the\x20object\x20ID\x20confers\x20nothing.\x20ONE\x20COUPON,\x20ONE\x20BURN:\x20each\x20coupon\x20stays\x20single-use\x20and\x20'+'is\x20destroyed\x20on\x20first\x20spend\x20—\x20transfer\x20does\x20not\x20reset\x20that.\x20REFUNDS\x20SETTLE\x20THE\x20POST-COUPON\x20'+'AMOUNT:\x20refund\x20rails\x20pay\x20the\x20escrowed\x20discounted\x20total\x20only,\x20never\x20the\x20coupon\x27s\x20face\x20value.\x20'+'Until\x20you\x20transfer\x20a\x20gifted\x20coupon,\x20the\x20recipient\x20CANNOT\x20use\x20it\x20on\x20their\x20own\x20orders\x20—\x20'+'a\x20coupon\x20held\x20by\x20another\x20address\x20cannot\x20be\x20applied\x20to\x20their\x20buy.'),'customer_required':z['array'](NotEmptyNameSchema)['optional']()['describe']('Customer\x20required\x20information\x20labels.\x20Such\x20as\x20phone,\x20email,\x20shipping_address,\x20etc.\x20'+'DECLARATIVE\x20ONLY:\x20nothing\x20on-chain\x20or\x20in\x20the\x20SDK\x20reads\x20this\x20field\x20—\x20it\x20is\x20a\x20pure\x20'+'listing\x20declaration\x20of\x20what\x20the\x20customer\x20will\x20be\x20asked\x20to\x20provide.\x20It\x20is\x20NOT\x20enforced\x20against\x20'+'order_new\x20and\x20NOT\x20linked\x20to\x20any\x20delivery\x20path\x20by\x20the\x20SDK.\x20'+'OPERATIONAL\x20PAIRING\x20(convention,\x20not\x20enforcement):\x20deliver\x20the\x20actual\x20private\x20information\x20via\x20'+'end-to-end\x20encrypted\x20Messenger\x20to\x20the\x20Service\x27s\x20Contact\x20bound\x20as\x20`um`\x20—\x20bind\x20`um`\x20when\x20you\x20use\x20'+'customer_required,\x20or\x20the\x20customer\x20has\x20no\x20encrypted\x20channel\x20to\x20send\x20it\x20through.\x20To\x20ENFORCE\x20delivery\x20'+'on-chain,\x20mount\x20the\x20pattern.required_info_evidence_gate\x20Guard\x20on\x20the\x20goods/funds\x20forward\x20(see\x20'+'order_new.order_required_info).'),'order_allocators':z['union']([AllocatorsSchema,z['null']()])['optional']()['describe']('Order\x20fund\x20allocator.\x20Max\x20100\x20allocators\x20(MAX_ALLOCATOR_COUNT).\x20'+'✅\x20EACH\x20allocator\x20has\x20a\x20guard,\x20and\x20EVERY\x20allocator\x20whose\x20guard\x20address\x20matches\x20the\x20supplied\x20guard\x20RUNS\x20—\x20'+'they\x20are\x20NOT\x20mutually\x20exclusive\x20and\x20NOT\x20first-match-wins.\x20'+'One\x20guard\x20may\x20legitimately\x20authorize\x20several\x20distribution\x20rules\x20(different\x20fix\x20/\x20rate\x20/\x20cap);\x20each\x20contributes\x20'+'its\x20own\x20Payment\x20and\x20consumes\x20its\x20own\x20once-slot\x20(keyed\x20by\x20the\x20allocator\x20index).\x20Allocators\x20are\x20evaluated\x20in\x20vector\x20'+'order\x20against\x20the\x20SHRINKING\x20pool,\x20so\x20a\x20later\x20allocator\x20only\x20sees\x20the\x20balance\x20left\x20by\x20the\x20earlier\x20ones\x20—\x20which\x20is\x20'+'exactly\x20how\x20a\x20waterfall\x20(e.g.\x20Amount\x20fee\x20+\x20net\x20Rate\x20split)\x20is\x20built.\x20'+'On-chain\x20truth:\x20the\x20allocation\x20module\x20runs\x20a\x20while\x20loop\x20over\x20all\x20allocators,\x20firing\x20those\x20whose\x20guard\x20address\x20matches\x20the\x20submitted\x20one.\x20'+'⚠️\x20If\x20you\x20WANT\x20mutual\x20exclusion\x20you\x20must\x20express\x20it\x20inside\x20the\x20Guard\x20itself\x20(make\x20the\x20conditions\x20logically\x20exclusive).\x20'+'Set\x20to\x20null\x20to\x20clear.\x20'+'⚠️\x20IMMUTABLE\x20after\x20publish\x20except\x20APPEND:\x20order_allocators\x20full\x20replacement\x20can\x20ONLY\x20be\x20done\x20BEFORE\x20publish=true\x20'+'(on-chain\x20check\x20rejects\x20after\x20publish\x20—\x20E_ALREADY_PUBLISHED).\x20'+'After\x20publish,\x20the\x20ONLY\x20mutation\x20is\x20order_allocators_append\x20(prefix-frozen\x20extension\x20—\x20see\x20that\x20field).\x20'+'There\x20is\x20NO\x20pause+lock\x20exception\x20for\x20order_allocators\x20(unlike\x20arbitrations/rewards\x20which\x20have\x20time-lock\x20removal).\x20'+'PRE-PUBLISH\x20CHECKLIST:\x20verify\x20all\x20guard\x20names\x20resolve,\x20all\x20sharing\x20amounts\x20are\x20correct,\x20'+'threshold\x20is\x20set,\x20and\x20recipient\x20types\x20(Entity/Signer/GuardIdentifier)\x20are\x20intended\x20before\x20calling\x20publish=true.\x20'+'GuardIdentifier\x20sharing\x20mode:\x20{who:\x20{GuardIdentifier:\x20<u8>},\x20sharing:\x20<rate>,\x20mode:\x20\x27Rate\x27}\x20—\x20'+'resolves\x20recipient\x20from\x20the\x20Guard\x20table\x20submission\x20at\x20allocation\x20time.\x20BINDING\x20SEMANTICS\x20(contract-enforced,\x20abort\x20code\x2015):\x20'+'in\x20a\x20Service-created\x20Allocation\x20EVERY\x20GuardIdentifier\x20submission\x20must\x20equal\x20the\x20PAYING\x20order\x20—\x20it\x20is\x20always\x20\x27the\x20order\x27,\x20'+'never\x20a\x20third\x20party\x20whose\x20address\x20is\x20supplied\x20at\x20trigger\x20time;\x20use\x20{who:{Entity:...}}\x20for\x20named\x20parties.\x20'+'Canonical\x20order\x20pattern:\x20the\x20recipient\x20slot\x20is\x20the\x20single\x20'+'submitted\x20Order\x20(constrained\x20by\x20the\x20Guard\x20—\x20service\x20binding,\x20qualifying\x20node,\x20signer==order.owner);\x20funds\x20land\x20at\x20that\x20order\x20object\x20and\x20'+'are\x20receivable\x20only\x20by\x20its\x20owner\x20(object\x20receipt\x20=\x20owner\x20receipt).\x20Safety\x20is\x20determined\x20by\x20constraint\x20sufficiency\x20—\x20run\x20the\x20recipient\x20'+'constraint\x20audit\x20before\x20publish.\x20Fixed\x20recipients\x20should\x20use\x20{who:{Entity:...}};\x20unbound\x20Signer\x20recipients\x20are\x20a\x20CRITICAL\x20theft\x20risk.\x20'+'MULTI-CALL\x20ALLOCATION:\x20an\x20allocation\x20can\x20be\x20executed\x20MULTIPLE\x20times\x20(no\x20consumed\x20flag\x20in\x20contract).\x20'+'Use\x20Amount\x20mode\x20(not\x20Surplus)\x20for\x20recurring\x20allocations\x20—\x20an\x20uncapped\x20Surplus\x20sweeps\x20the\x20entire\x20remaining\x20balance\x20on\x20first\x20run.\x20'+'For\x20monthly\x20payment\x20scenarios,\x20create\x20multiple\x20Allocators\x20with\x20time-based\x20Guards\x20+\x20Amount\x20mode\x20sharing\x20items.'),'order_allocators_append':AllocatorsSchema['optional']()['describe']('Append-only\x20correction\x20window\x20for\x20order_allocators\x20—\x20the\x20ONLY\x20allocator\x20mutation\x20allowed\x20AFTER\x20publish\x20(J1).\x20'+'REQUIREMENTS\x20(chain-enforced,\x20allocation\x20abort\x20code\x2020\x20EALLOCATORS_NOT_EXTENSION):\x20the\x20supplied\x20Allocators\x20must\x20be\x20a\x20pure\x20'+'EXTENSION\x20of\x20the\x20current\x20on-chain\x20plan\x20—\x20every\x20existing\x20allocator\x20appears\x20VERBATIM\x20as\x20a\x20prefix\x20(same\x20guard,\x20same\x20sharing,\x20'+'same\x20fix/max),\x20threshold\x20must\x20be\x20UNCHANGED;\x20only\x20description\x20may\x20change\x20freely.\x20New\x20allocators\x20are\x20appended\x20after\x20the\x20prefix.\x20'+'WHY:\x20rewriting\x20an\x20existing\x20allocator\x20or\x20changing\x20the\x20threshold\x20would\x20retroactively\x20alter\x20payout\x20rules\x20for\x20orders\x20already\x20'+'escrowed\x20against\x20the\x20old\x20plan.\x20Clearing\x20the\x20plan\x20(null)\x20is\x20NOT\x20possible\x20here\x20—\x20that\x20would\x20strand\x20in-flight\x20orders.\x20'+'Permission:\x20same\x20index\x20313\x20as\x20order_allocators.\x20'+'USE\x20CASE:\x20you\x20forgot\x20one\x20allocator\x20guard\x20(e.g.\x20the\x20refund\x20exit\x20for\x20a\x20review\x20node)\x20and\x20the\x20Service\x20is\x20already\x20published\x20—\x20'+'instead\x20of\x20abandoning\x20the\x20Service,\x20append\x20the\x20missing\x20allocator.\x20'+'⚠️\x20SCOPE\x20—\x20NEW\x20ORDERS\x20ONLY:\x20each\x20order\x20instantiates\x20its\x20own\x20Allocation\x20from\x20this\x20plan\x20AT\x20BUY\x20TIME,\x20so\x20appending\x20'+'changes\x20the\x20template\x20for\x20FUTURE\x20orders\x20only.\x20Orders\x20already\x20escrowed\x20under\x20the\x20previous\x20plan\x20do\x20NOT\x20gain\x20the\x20'+'appended\x20allocator\x20—\x20their\x20Allocation\x20(and\x20its\x20fund\x20exits)\x20is\x20frozen\x20as\x20originally\x20instantiated;\x20if\x20in-flight\x20orders\x20'+'are\x20already\x20stranded,\x20this\x20append\x20does\x20NOT\x20rescue\x20them.\x20'+'⚠️\x20Appended\x20allocators\x20are\x20evaluated\x20AFTER\x20the\x20existing\x20ones\x20against\x20the\x20shrinking\x20pool\x20(vector\x20order),\x20so\x20they\x20see\x20the\x20'+'balance\x20left\x20by\x20earlier\x20allocators\x20—\x20design\x20appended\x20waterfall\x20tails\x20accordingly.\x20'+'⚠️\x20Once\x20appended,\x20an\x20allocator\x20can\x20NEVER\x20be\x20edited\x20or\x20removed\x20—\x20same\x20permanence\x20as\x20the\x20original\x20plan.'),'buy_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Buy\x20guard\x20object\x20ID\x20or\x20name\x20(null\x20CLEARS\x20the\x20mount).\x20RUNTIME\x20SWITCH\x20(permission\x20307\x20SERVICE_BUY_GUARD\x20—\x20the\x20guard\x20OBJECT\x20is\x20immutable\x20but\x20its\x20MOUNT\x20on\x20the\x20Service\x20is\x20mutable\x20at\x20any\x20time).\x20'+'ROUND-ROTATION\x20DUTY\x20(拍板②\x20dm-mtw-261027):\x20for\x20daily/group\x20rounds\x20whose\x20cutoff\x20is\x20an\x20absolute\x20timestamp,\x20the\x20precise\x20batch\x20boundary\x20is\x20THIS\x20mount,\x20not\x20the\x20time\x20guard\x20—\x20at\x20the\x20cutoff\x20instant\x20the\x20keeper\x20cron\x20SETS\x20the\x20buy_guard\x20(new\x20entrants\x20refused\x20at\x20BUY\x20time)\x20and\x20CLEARs/re-arms\x20it\x20when\x20the\x20next\x20round\x20opens;\x20the\x20on-chain\x20Clock\x20>=\x20cutoff\x20comparison\x20stays\x20the\x20settlement/advance\x20authority.\x20Disclose\x20the\x20publisher\x27s\x20time\x20source\x20the\x20cron\x20fires\x20on.\x20Full\x20Machine\x20reuse\x20across\x20rounds\x20(advance\x20gate\x20re-reading\x20a\x20repository\x20cutoff\x20row)\x20is\x20filed\x20for\x20a\x20protocol\x20window.'),'compensation_fund_add':CoinParamSchema['optional']()['describe']('Deposit\x20funds\x20into\x20the\x20Service\x20compensation_fund.\x20Used\x20to\x20pay\x20indemnity\x20when\x20arbitration\x20resolves\x20in\x20customer\x27s\x20favor.\x20'+'FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20the\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x201000000}\x20=\x201\x20USDC).\x20'+'REQUIRES:\x20Permission\x20index\x20315\x20(SERVICE_COMPENSATION_FUND_DEPOSIT)\x20for\x20NON-ADMIN\x20callers.\x20The\x20Permission\x20owner\x20and\x20admin\x20short-circuit\x20every\x20builtin\x20index\x20check\x20(no\x20grant\x20needed);\x20only\x20non-admin\x20callers\x20must\x20be\x20granted\x20315\x20first.\x20'+'COMMON\x20MISTAKE:\x20using\x20{amount:\x20...}\x20or\x20{amount:\x20...,\x20type:\x20\x27WOW\x27}\x20—\x20these\x20will\x20fail.\x20The\x20correct\x20field\x20is\x20\x27balance\x27.'),'compensation_fund_withdraw':z['object']({'receipt':AccountOrMark_AddressAISchema['describe']('Receipt\x20address\x20that\x20will\x20receive\x20the\x20withdrawn\x20funds\x20(as\x20a\x20new\x20Payment\x20object)'),'payment_info':PaymentInfoSchema['describe']('Payment\x20info\x20for\x20the\x20new\x20Payment\x20object\x20created\x20to\x20hold\x20the\x20withdrawn\x20funds')})['strict']()['optional']()['describe']('Withdraw\x20ALL\x20funds\x20from\x20the\x20compensation_fund\x20to\x20a\x20new\x20Payment\x20object\x20owned\x20by\x20`receipt`.\x20'+'REQUIRES:\x20Service\x20must\x20be\x20paused\x20AND\x20setting_lock_duration\x20must\x20have\x20elapsed\x20since\x20pause\x20(the\x20unpublished-state\x20check).\x20'+'Withdraws\x20the\x20ENTIRE\x20compensation_fund\x20balance\x20via\x20balance::withdraw_all.\x20'+'DIFFERENT\x20from\x20the\x20order-side\x20compensation\x20claim\x20(for\x20arbitration-winning\x20users,\x20no\x20pause+lock\x20required).'),'setting_lock_duration_add':z['number']()['optional']()['describe']('Additional\x20lock\x20duration\x20to\x20ADD\x20to\x20\x27setting_lock_duration\x27\x20(Move\x20field\x20name).\x20'+'UNIT:\x20milliseconds\x20(ms).\x20Example:\x202592000000\x20=\x2030\x20days,\x207776000000\x20=\x2090\x20days,\x2086400000\x20=\x201\x20day.\x20'+'DEFAULT:\x202592000000\x20(30\x20days,\x20DEFAULT_LOCK_DURATION).\x20This\x20is\x20the\x20initial\x20value\x20when\x20a\x20Service\x20is\x20created.\x20'+'Behavior:\x20additive\x20(safe_add)\x20—\x20only\x20increases,\x20never\x20decreases.\x20'+'Can\x20be\x20called\x20BEFORE\x20or\x20AFTER\x20publish\x20(no\x20publish\x20check).\x20'+'Affects\x20the\x20waiting\x20time\x20required\x20by:\x20compensation_fund_withdraw,\x20arbitrations\x20remove/clear,\x20rewards\x20remove/clear\x20'+'(all\x20require\x20pause\x20+\x20setting_lock_duration\x20elapsed\x20since\x20pause).'),'compensation_fund_receive':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Receive\x20order\x20compensation\x20funds\x20from\x20this\x20Service\x20object.'+RECEIVE_FORMAT_BLOCK_BALANCE),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Service\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name\x20—\x20the\x20Service\x27s\x20customer-service\x20channel.\x20'+'This\x20is\x20the\x20object\x20that\x20Messenger\x20routes\x20encrypted\x20messages\x20to\x20for\x20pre-order\x20negotiation,\x20'+'private-info\x20delivery\x20(see\x20customer_required),\x20and\x20post-sale\x20support.\x20'+'⚠️\x20REQUIRED\x20whenever\x20customer_required\x20is\x20set:\x20without\x20um,\x20the\x20customer\x27s\x20private\x20information\x20'+'has\x20no\x20channel\x20to\x20reach\x20the\x20merchant.'),'arb_statement':z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20(case)\x20to\x20attach\x20the\x20statement\x20to.'),'order':NameOrAddressSchema['describe']('The\x20order\x20the\x20case\x20was\x20opened\x20against\x20—\x20must\x20belong\x20to\x20this\x20Service.'),'statement':z['string']()['max'](0xfa0)['describe']('Seller\x27s\x20text\x20statement\x20appended\x20to\x20the\x20case\x20record\x20(ArbStatementEvent).\x20'+'Event-only:\x20nothing\x20on\x20the\x20Arb\x20object\x20is\x20mutated;\x20the\x20record\x20cannot\x20be\x20rewritten\x20or\x20deleted.\x20'+'Use\x20to\x20declare\x20facts\x20or\x20report\x20the\x20customer\x27s\x20behavior\x20(e.g.\x20absence,\x20non-cooperation).\x20'+'PRIMARY\x20evidence\x20channel\x20is\x20Messenger\x20(encrypted\x20WTS\x20records\x20with\x20the\x20customer);\x20'+'this\x20is\x20the\x20SECONDARY\x20on-chain\x20declare/report\x20channel.')})['optional']()['describe']('Service\x20(defendant-side)\x20statement\x20on\x20an\x20arbitration\x20case\x20—\x20permission\x20index\x20321.\x20'+'Lets\x20the\x20Service\x20permission\x20holder\x20put\x20a\x20bounded\x20text\x20on\x20the\x20record\x20for\x20any\x20case\x20against\x20'+'an\x20order\x20of\x20this\x20service\x20WITHOUT\x20holding\x20the\x20order.\x20Callable\x20in\x20ANY\x20case\x20status.\x20'+'The\x20Arb\x27s\x20coin\x20type\x20is\x20derived\x20automatically\x20from\x20the\x20arb\x20object\x20on-chain.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20accepting\x20new\x20orders.'),'publish':z['boolean']()['optional']()['describe']('Whether\x20to\x20publish\x20the\x20Service.\x20After\x20publishing,\x20customers\x20can\x20place\x20orders.\x20'+'⚠️\x20PRE-PUBLISH\x20EVALUATION\x20(mandatory,\x20stop-node\x20fund-exit\x20coverage):\x20service.allocators\x20MUST\x20cover\x20EVERY\x20stop\x20node\x20of\x20the\x20bound\x20Machine\x20—\x20every\x20node\x20where\x20an\x20order\x20can\x20rest\x20(terminal\x20nodes\x20AND\x20waiting\x20states:\x20review\x20windows,\x20handovers,\x20open\x20disputes)\x20needs\x20BOTH\x20a\x20withdrawal\x20(release)\x20AND\x20a\x20refund\x20allocation\x20rule,\x20and\x20each\x20mapping\x20guard\x20must\x20be\x20satisfiable\x20in\x20BOTH\x20directions.\x20An\x20uncovered\x20stop\x20node\x20strands\x20escrowed\x20funds\x20permanently\x20(order_allocators\x20is\x20L1-immutable).\x20Review-gated\x20release\x20is\x20a\x20TIME\x20VARIANT\x20inside\x20ONE\x20exit\x20guard\x20(\x27reviewed\x20OR\x20unreviewed\x20after\x20T\x27),\x20never\x20parallel\x20outgoing\x20edges\x20(race\x20deadlock).\x20See\x20pattern.fund_flow_stop_node_coverage\x20+\x20rules\x20R-M5-03\x20/\x20R-M5-09.\x20'+'VERIFIED\x20against\x20Move\x20source\x20+\x20SDK\x20(4-level\x20immutability\x20matrix):\x0a'+'\x20\x20L1\x20—\x20PERMANENTLY\x20LOCKED\x20after\x20publish\x20(assert!(!bPublished),\x20no\x20pause+lock\x20exception):\x0a'+'\x20\x20\x20\x20•\x20machine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(workflow\x20template)\x0a'+'\x20\x20\x20\x20•\x20order_allocators\x20(fund\x20distribution\x20rules\x20—\x20full\x20replacement\x20locked;\x20APPEND-ONLY\x20additions\x20'+'remain\x20possible\x20via\x20order_allocators_append,\x20prefix/threshold\x20frozen)\x0a'+'\x20\x20L2\x20—\x20TIME-LOCKED\x20after\x20publish\x20(unpublished-state\x20check\x20—\x20requires\x20pause\x20+\x20setting_lock_duration\x20elapsed):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20remove/clear\x20(dispute\x20resolution\x20objects)\x0a'+'\x20\x20\x20\x20•\x20rewards\x20remove/clear\x20\x20\x20\x20\x20\x20\x20(reward\x20objects)\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_withdraw\x20(withdraw\x20ALL\x20funds)\x0a'+'\x20\x20\x20\x20RATIONALE\x20(deliberate\x20design,\x20NOT\x20a\x20defect):\x20these\x20three\x20REVOKE\x20buyer-facing\x20guarantees\x20that\x20placed\x20orders\x20already\x20rely\x20on\x20—\x20the\x20lock\x20protects\x20buyer\x20expectations.\x20Daily\x20operations\x20(sales\x20add/remove,\x20price,\x20stock,\x20description)\x20are\x20NEVER\x20gated\x20by\x20this\x20lock.\x0a'+'\x20\x20L3\x20—\x20REMAIN\x20MUTABLE\x20after\x20publish\x20(no\x20SDK\x20check,\x20no\x20Move\x20check):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20add,\x20rewards\x20add\x20(no\x20assert\x20—\x20can\x20add\x20after\x20publish)\x0a'+'\x20\x20\x20\x20•\x20buy_guard,\x20sales,\x20discount,\x20description,\x20location,\x20pause,\x20repositories,\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_add,\x20setting_lock_duration_add,\x20customer_required,\x20um\x20(Contact)\x0a'+'These\x202\x20L1-LOCKED\x20fields\x20(machine/order_allocators)\x20MUST\x20be\x20set\x20BEFORE\x20publish=true.\x0a'+'arbitrations/rewards\x20can\x20be\x20ADDED\x20after\x20publish\x20but\x20remove/clear\x20requires\x20pause+lock.\x0a'+'\x0a'+'⚠️\x20COMPENSATION_FUND\x20+\x20ARBITRATION\x20LINKAGE:\x0a'+'\x20\x20At\x20publish\x20time,\x20if\x20compensation_fund\x20>\x200,\x20Arbitration\x20MUST\x20be\x20bound:\x0a'+'\x20\x20\x20\x20if\x20(balance::value(&self.compensation_fund)\x20>\x200)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20assert!(arbitration_count\x20>\x200,\x20E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\x0a'+'\x20\x20\x20\x20}\x0a'+'\x20\x20The\x20MCP\x20handler\x20enforces\x20this\x20as\x20a\x20HARD\x20PRE-CHECK:\x20if\x20publish=true\x20AND\x20compensation_fund_add\x20'+'\x20\x20is\x20set\x20in\x20the\x20same\x20call\x20AND\x20arbitrations\x20is\x20empty,\x20the\x20call\x20is\x20REJECTED\x20before\x20submission.\x20'+'\x20\x20If\x20compensation_fund\x20was\x20deposited\x20in\x20a\x20prior\x20call,\x20a\x20SOFT\x20WARNING\x20is\x20issued.\x0a'+'\x0a'+'SCHEMA-03\x20/\x20P0-01\x20fix\x20—\x20DEPLOYMENT\x20WORKFLOW\x20(two-phase,\x20avoids\x20circular\x20dependency):\x0a'+'\x20\x20Phase\x201\x20—\x20CREATE\x20(no\x20publish):\x20object={name:\x27my-service\x27,\x20type_parameter,\x20permission}\x20+\x20machine\x20+\x20order_allocators\x20+\x20arbitrations.\x0a'+'\x20\x20\x20\x20NOTE:\x20buy_guard\x20can\x20use\x20a\x20LocalMark\x20NAME\x20(not\x20address)\x20to\x20break\x20the\x20Guard→Service\x20circular\x20dependency.\x0a'+'\x20\x20\x20\x20The\x20name\x20is\x20resolved\x20to\x20an\x20address\x20at\x20transaction\x20build\x20time.\x0a'+'\x20\x20Phase\x202\x20—\x20PUBLISH:\x20object=\x27my-service\x27\x20(string\x20ref)\x20+\x20publish=true.\x0a'+'\x20\x20\x20\x20All\x20L1-LOCKED\x20fields\x20must\x20be\x20set\x20in\x20Phase\x201;\x20Phase\x202\x20only\x20flips\x20the\x20publish\x20flag.\x0a'+'\x20\x20Post-publish\x20updates:\x20buy_guard,\x20sales,\x20description,\x20repositories\x20(add),\x20rewards\x20(add),\x20arbitrations\x20(add),\x20etc.'),'creation_plan':z['any']()['optional']()['describe']('WIZARD\x20CONTRACT:\x20the\x20Plan\x20JSON\x20that\x20merchant_guide\x20delivered\x20(its\x20creation_plan\x20/\x20plan\x20field),\x20'+'passed\x20back\x20VERBATIM\x20on\x20the\x20Service\x20publish\x20call\x20(data.publish=true).\x20The\x20publish\x20gate\x20replays\x20the\x20'+'plan\x27s\x20freeze\x20matrix\x20(preflight)\x20right\x20before\x20submission\x20and\x20REJECTS\x20the\x20publish\x20when\x20any\x20gate\x20fails\x20'+'(structural\x20issues,\x20critical\x20audit\x20findings,\x20or\x20a\x20failed\x20rule\x20check)\x20—\x20this\x20closes\x20the\x20preflight\x20bypass\x20'+'where\x20a\x20plan\x20that\x20failed\x20merchant_guide\x27s\x20audit\x20could\x20still\x20be\x20materialized\x20manually.\x20'+'OMIT\x20this\x20field\x20on\x20every\x20NON-publish\x20call\x20and\x20on\x20fully\x20manual\x20(non-wizard)\x20builds\x20—\x20the\x20manual\x20path\x20is\x20'+'unchanged\x20and\x20never\x20gated\x20by\x20this\x20field.\x20Do\x20NOT\x20edit,\x20trim,\x20or\x20\x27improve\x27\x20the\x20plan\x20in\x20transit:\x20a\x20mutated\x20'+'plan\x20is\x20rejected\x20(target\x20cross-check)\x20and\x20the\x20publish\x20must\x20be\x20redone\x20from\x20merchant_guide.'),'reentry_kind':z['enum'](['none','review-loop','paid-cycle'])['optional']()['describe']('AP-3\x20loop-semantics\x20declaration\x20for\x20the\x20publish\x20audit\x20(ctra\x20F-06\x20root\x20cure):\x20overrides\x20the\x20'+'word-stem\x20loop\x20classifier\x20when\x20the\x20machine\x20graph\x20contains\x20a\x20cycle.\x20'+'\x27none\x27\x20=\x20default\x20(word-stem\x20classification)\x20/\x20\x27review-loop\x27\x20=\x20same-order\x20no-charge\x20revisits\x20/\x20'+'\x27paid-cycle\x27\x20=\x20per-revisit\x20fee,\x20fund\x20gate\x20required.\x20'+'MCP-side\x20audit\x20declaration\x20ONLY\x20(pre_publish\x20harness\x20hook)\x20—\x20never\x20sent\x20on-chain;\x20the\x20handler\x20strips\x20it\x20'+'before\x20the\x20SDK\x20call.\x20Mirror\x20of\x20the\x20template\x20frontmatter\x20twin\x20(template-loader).')})['strict']()['describe']('On-chain\x20Service\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20a\x20Service.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallService_InputSchema=z['object']({'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{TypedPermissionObjectSchema,CoinParamSchema,NamedObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AllocatorsSchema,DiscountTypeSchema,ServiceSaleSchema,PaymentInfoSchema}from'../query/index.js';import{AccountOrMark_AddressAISchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressAISchema,NameOrAddressSchema,NotEmptyNameSchema,ReceivedBalanceOrRecentlySchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS,RECEIVE_FORMAT_BLOCK_BALANCE}from'../common/index.js';import{BalanceTypeSchema}from'../common/index.js';export const ServiceBuyItemSchema=z['preprocess'](a=>{if(a&&typeof a==='object'&&'stock'in a&&!('quantity'in a)){const {stock:b,...c}=a;return{...c,'quantity':b};}return a;},z['object']({'name':LongNameSchema['optional']()['describe']('Name\x20of\x20the\x20product\x20or\x20service\x20to\x20purchase.\x20Must\x20match\x20a\x20listed\x20sale\x20name\x20EXACTLY\x20'+'(the\x20buy\x20path\x20resolves\x20each\x20item\x20by\x20exact\x20name\x20match)\x20and\x20MUST\x20be\x20≤\x2064\x20bytes\x20(UTF-8):\x20the\x20on-chain\x20'+'buy\x20path\x20caps\x20buyer-sent\x20item\x20names\x20at\x2064\x20bytes\x20even\x20though\x20the\x20merchant\x20side\x20lists\x20names\x20up\x20to\x20'+'256\x20bytes\x20—\x20a\x20longer\x20name\x20aborts\x20E_NAME_LENGTH_EXCEEDED\x20(abort\x201)\x20before\x20anything\x20else\x20runs\x20(F-RQ-01).\x20'+'When\x20the\x20exact\x20name\x20is\x20impractical\x20(long/CJK\x20names\x20that\x20risk\x20transport\x20corruption),\x20OMIT\x20it\x20and\x20use\x20'+'sale_id\x20or\x20sale_name\x20instead\x20—\x20the\x20handler\x20resolves\x20the\x20reference\x20against\x20the\x20Service\x27s\x20LIVE\x20sales\x20'+'list\x20and\x20fills\x20this\x20name\x20for\x20you\x20(CHAN-P1-16).'),'sale_id':z['number']()['int']()['min'](0x0)['optional']()['describe']('CHAN-P1-16:\x20buy\x20by\x20the\x20SKU\x27s\x200-based\x20INDEX\x20in\x20the\x20Service\x27s\x20live\x20sales\x20list\x20(the\x20order\x20the\x20'+'service_quote\x20/\x20query\x20lists\x20them).\x20The\x20handler\x20resolves\x20the\x20index\x20to\x20the\x20live\x20sale\x20(name\x20+\x20price),\x20'+'rewrites\x20item.name\x20on\x20your\x20behalf,\x20and\x20echoes\x20`sale_index\x20+\x20sale_name\x20+\x20price`\x20in\x20the\x20response\x20—\x20'+'the\x20exact\x20name\x20never\x20crosses\x20the\x20wire.\x20Out-of-range\x20index\x20→\x20refused\x20with\x20the\x20full\x20live\x20index\x20table\x20'+'(index\x20+\x20name\x20+\x20price)\x20so\x20one\x20retry\x20lands.\x20Consumed\x20by\x20the\x20MCP\x20gate,\x20never\x20reaches\x20the\x20chain.'),'sale_name':z['string']()['min'](0x1)['optional']()['describe']('CHAN-P1-16:\x20buy\x20by\x20SKU\x20NAME\x20matched\x20against\x20the\x20Service\x27s\x20LIVE\x20sales\x20list\x20(exact\x20match\x20first;\x20'+'whitespace/case-tolerant,\x20then\x20containment\x20when\x20the\x20name\x20was\x20corrupted\x20in\x20transport).\x20Exactly\x20one\x20'+'live\x20match\x20→\x20the\x20handler\x20fills\x20item.name\x20and\x20echoes\x20`sale_index\x20+\x20sale_name\x20+\x20price`;\x20several\x20'+'candidates\x20→\x20refused\x20with\x20every\x20candidate\x27s\x20index;\x20none\x20→\x20refused\x20with\x20the\x20full\x20live\x20index\x20table.\x20'+'Consumed\x20by\x20the\x20MCP\x20gate,\x20never\x20reaches\x20the\x20chain.'),'quantity':BalanceTypeSchema['describe']('⚠️\x20PURCHASE\x20QUANTITY,\x20NOT\x20inventory.\x20This\x20is\x20the\x20number\x20of\x20units\x20you\x20are\x20'+'buying;\x20the\x20on-chain\x20order\x20total\x20=\x20sale.price\x20x\x20this\x20value.\x20Do\x20NOT\x20put\x20the\x20'+'product\x27s\x20available\x20stock\x20here\x20—\x20inventory\x20is\x20the\x20separate\x20`stock`\x20field\x20on\x20'+'the\x20Service\x27s\x20sales\x20list.\x20To\x20buy\x20one\x20unit,\x20set\x20quantity:\x201.\x20'+'(Legacy\x20callers\x20may\x20still\x20send\x20this\x20as\x20`stock`;\x20it\x20is\x20accepted\x20and\x20treated\x20'+'identically\x20as\x20the\x20purchase\x20quantity.)'),'wip_hash':z['string']()['default']('')['describe']('WIP\x20pin\x20hash.\x20HARD\x20RULE\x20(h1z9\x20card\x2013\x20#17,\x20unified\x20doctrine):\x20when\x20the\x20product\x27s\x20wip_hash\x20is\x20'+'NON-EMPTY,\x20the\x20buyer\x20MUST\x20pass\x20this\x20exact\x20value\x20—\x20NEVER\x20\x22\x22.\x20The\x20chain\x20quote\x20aborts\x20'+'(E_WIP_HASH_NOT_MATCH)\x20when\x20the\x20pin\x20mismatches,\x20which\x20is\x20the\x20delivery-integrity\x20guarantee.\x20'+'To\x20skip\x20copying\x20the\x20hash,\x20set\x20derive_wip_from_listing:true\x20on\x20the\x20order_new\x20object\x20instead\x20'+'(explicit\x20opt-in;\x20the\x20response\x20then\x20warns\x20\x27wip_pin:\x20auto-filled\x20—\x20no\x20WYSIWYG\x20guarantee\x27).\x20'+'Only\x20pass\x20an\x20explicit\x20hash\x20when\x20pinning\x20a\x20value\x20seen\x20earlier:\x20that\x20protects\x20against\x20a\x20legitimate\x20'+'merchant\x20WIP\x20update\x20between\x20viewing\x20the\x20product\x20and\x20placing\x20the\x20order.')})['strict']()['superRefine']((a,b)=>{const c=typeof a['name']==='string'&&a['name']['trim']()!=='';!c&&a['sale_id']==null&&!(typeof a['sale_name']==='string'&&a['sale_name']['trim']()!=='')&&b['addIssue']({'code':z['ZodIssueCode']['custom'],'path':['name'],'message':'Each\x20buy\x20item\x20needs\x20a\x20product\x20reference:\x20`name`\x20(exact\x20listed\x20sale\x20name),\x20or\x20`sale_id`\x20'+'(0-based\x20index\x20into\x20the\x20Service\x27s\x20live\x20sales\x20list),\x20or\x20`sale_name`\x20(matched\x20against\x20the\x20live\x20list)\x20—\x20'+'all\x20three\x20are\x20absent\x20(CHAN-P1-16).'});}));export const BuySchema=z['object']({'items':z['array'](ServiceBuyItemSchema)['describe']('List\x20of\x20products\x20or\x20services\x20to\x20purchase'),'total_pay':CoinParamSchema['optional']()['describe']('Actual\x20payment\x20amount.\x20FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20or\x20{coin:\x20<coin_object_id>}.\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'OPTIONAL\x20without\x20a\x20discount\x20(M-K17):\x20omit\x20it\x20and\x20the\x20handler\x20derives\x20the\x20EXACT\x20total\x20Σ(sale\x20price\x20×\x20quantity)\x20'+'from\x20the\x20Service\x27s\x20on-chain\x20sales\x20list\x20and\x20discloses\x20the\x20derived\x20value\x20—\x20no\x20transcription,\x20no\x20drift.\x20'+'REQUIRED\x20when\x20\x27discount\x27\x20is\x20set\x20(the\x20discounted\x20total\x20depends\x20on\x20the\x20coupon\x27s\x20live\x20value:\x20run\x20'+'query_toolkit\x20query_type=\x27service_quote\x27\x20and\x20pass\x20total_pay.balance\x20=\x20the\x20quoted\x20final_total).\x20'+'An\x20explicit\x20value\x20is\x20always\x20honored\x20as-is.\x20'+'AMOUNT\x20GATE\x20(M-K11-a):\x20a\x20total\x20that\x20EXACTLY\x20equals\x20Σ\x20published\x20sale\x20price\x20×\x20quantity\x20(catalog-priced\x20buy,\x20'+'in\x20the\x20Service\x27s\x20own\x20payment\x20coin\x20—\x20WOW\x20or\x20bridged\x20USDT/USDC/ETH/BTC)\x20bypasses\x20the\x20harness\x20pre-sign\x20amount\x20gate;\x20'+'any\x20other\x20amount\x20above\x20the\x20threshold\x20is\x20blocked\x20until\x20WOWOK_AMOUNT_THRESHOLD\x20is\x20raised\x20after\x20explicit\x20user\x20confirmation.'),'discount':z['string']()['optional']()['describe']('Discount\x20object\x20ID\x20or\x20name.\x20'+'⚠️\x20COUPON\x20OWNERSHIP\x20RULE\x20(KB-02,\x20disclose\x20BEFORE\x20checkout):\x20a\x20coupon\x20held\x20by\x20another\x20address\x20'+'cannot\x20be\x20applied\x20to\x20your\x20order\x20—\x20only\x20the\x20coupon\x27s\x20current\x20holder\x20can\x20redeem\x20it,\x20and\x20the\x20buy\x20'+'is\x20signed\x20by\x20the\x20buyer,\x20so\x20have\x20the\x20owner\x20transfer\x20the\x20coupon\x20to\x20the\x20buyer\x20first\x20'+'(call\x20service\x20discount_send),\x20then\x20attach\x20it\x20here.\x20Attaching\x20the\x20coupon\x20BURNS\x20it\x20'+'(every\x20coupon\x20is\x20single-use),\x20and\x20any\x20later\x20refund\x20settles\x20the\x20POST-coupon\x20amount\x20only\x20'+'(the\x20escrowed\x20discounted\x20total)\x20—\x20the\x20coupon\x27s\x20face\x20value\x20is\x20never\x20restored.'),'payment_remark':z['string']()['optional']()['describe']('Payment\x20remark'),'payment_index':z['number']()['optional']()['describe']('Payment\x20index'),'derive_wip_from_listing':z['boolean']()['optional']()['describe']('EXPLICIT\x20OPT-IN\x20to\x20wip-hash\x20auto-fill\x20(h1z9\x20card\x2013\x20#17:\x20the\x20ONLY\x20sanctioned\x20auto-fill\x20path).\x20'+'true\x20=\x20for\x20every\x20item\x20whose\x20wip_hash\x20is\x20empty,\x20the\x20CURRENT\x20listing\x20hash\x20is\x20injected\x20at\x20order\x20'+'time\x20and\x20the\x20response\x20warns\x20\x27wip_pin:\x20auto-filled\x20—\x20no\x20WYSIWYG\x20guarantee\x27:\x20the\x20merchant\x20may\x20'+'rebind\x20the\x20.wip\x20file\x20later,\x20and\x20an\x20injected\x20hash\x20follows\x20the\x20listing\x20while\x20an\x20explicitly\x20passed\x20'+'hash\x20stays\x20pinned.\x20Absent/false\x20=\x20the\x20hard\x20rule\x20applies:\x20pass\x20each\x20product\x27s\x20wip_hash\x20EXACTLY\x20'+'(NEVER\x20\x22\x22\x20when\x20the\x20product\x20has\x20a\x20pin)\x20or\x20the\x20order\x20is\x20refused\x20before\x20send.\x20'+'This\x20flag\x20is\x20consumed\x20by\x20the\x20MCP\x20gate\x20and\x20never\x20reaches\x20the\x20chain.')})['strict']();export const DiscountSchema=z['object']({'name':z['string']()['describe']('Discount\x20name.\x20MUST\x20be\x20≤\x2064\x20bytes\x20(UTF-8):\x20the\x20chain\x20applies\x20the\x20same\x20'+'64-byte\x20name\x20cap\x20to\x20discount\x20rows\x20as\x20to\x20SKU\x20names,\x20at\x20listing\x20time\x20—\x20a\x20longer\x20name\x20aborts\x20'+'E_NAME_LENGTH_EXCEEDED\x20(abort\x201)\x20at\x20creation\x20(F-RQ-01).'),'discount_type':DiscountTypeSchema,'discount_value':BalanceTypeSchema['describe']('Discount\x20magnitude,\x20meaning\x20depends\x20on\x20discount_type.\x20'+'RATES\x20(0):\x20per-10000\x20off\x20rate\x20—\x2010\x20=\x200.1%\x20off,\x201000\x20=\x2010%\x20off,\x2010000\x20=\x20100%\x20off;\x20values\x20above\x2010000\x20are\x20rejected.\x20'+'FIXED\x20(1):\x20fixed\x20deduction\x20from\x20the\x20order\x20total\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x201000000000\x20=\x201\x20WOW\x20at\x209\x20decimals).'),'benchmark':z['union']([z['number'](),z['string']()])['optional']()['describe']('Minimum\x20order\x20total\x20(in\x20the\x20Service\x20token\x27s\x20smallest\x20units)\x20for\x20the\x20discount\x20to\x20apply\x20—\x20'+'when\x20set,\x20the\x20discount\x20is\x20applied\x20only\x20if\x20the\x20PRE-discount\x20order\x20total\x20is\x20GREATER\x20THAN\x20OR\x20EQUAL\x20TO\x20this\x20value.\x20'+'✅\x20OMITTING\x20this\x20field\x20(or\x20passing\x20null,\x20or\x200)\x20means\x20NO\x20threshold\x20—\x20the\x20discount\x20applies\x20UNCONDITIONALLY,\x20and\x20that\x20is\x20the\x20common,\x20correct\x20case.\x20'+'This\x20is\x20the\x20on-chain\x20behaviour:\x20benchmark_met\x20=\x20if\x20(option::is_some(&discount.benchmark))\x20'+'{\x20total\x20>=\x20benchmark\x20}\x20else\x20{\x20true\x20}\x20(inside\x20the\x20on-chain\x20discount-application\x20step).\x20'+'⚠️\x20SHARP\x20EDGE\x20when\x20you\x20DO\x20set\x20a\x20threshold:\x20an\x20order\x20below\x20the\x20threshold\x20CANNOT\x20use\x20the\x20coupon\x20—\x20'+'attaching\x20it\x20at\x20buy\x20aborts\x20(error\x2038:\x20the\x20transaction\x20rolls\x20back,\x20nothing\x20is\x20paid,\x20and\x20the\x20coupon\x20is\x20preserved);\x20'+'dropping\x20it\x20means\x20the\x20buyer\x20pays\x20FULL\x20price\x20and\x20keeps\x20the\x20coupon\x20for\x20a\x20future\x20order.\x20'+'Keep\x20thresholds\x20low\x20enough\x20that\x20your\x20typical\x20basket\x20clears\x20them.\x20'+'If\x20the\x20order\x20total\x20is\x20below\x20the\x20discounted\x20price\x20the\x20payment\x20aborts\x20—\x20pay\x20the\x20list\x20price;\x20the\x20excess\x20is\x20returned\x20as\x20a\x20new\x20Coin.'),'time_ms_start':z['number']()['optional']()['describe']('Discount\x20start\x20time\x20(milliseconds).\x20⚠️\x20A\x20FUTURE\x20start\x20mints\x20a\x20coupon\x20that\x20is\x20listed\x20as\x20usable\x20but\x20'+'CANNOT\x20be\x20spent\x20until\x20the\x20window\x20opens\x20(every\x20spend\x20aborts\x20E_DISCOUNT_TIME_INVALID\x20/\x20buy\x20code\x2035).\x20'+'Legitimate\x20for\x20scheduled\x20campaigns\x20—\x20the\x20mint\x20carries\x20a\x20loud\x20warning;\x20do\x20not\x20distribute\x20the\x20coupon\x20'+'to\x20recipients\x20before\x20the\x20window\x20opens.'),'allow_zero_total':z['boolean']()['optional']()['describe']('NO\x20EFFECT\x20—\x20DO\x20NOT\x20SET\x20(BSX-F07:\x20the\x20former\x20escape\x20hatch\x20is\x20removed).\x20This\x20flag\x20has\x20no\x20on-chain\x20field\x20'+'(the\x20on-chain\x20Discount\x20struct\x20never\x20carried\x20it;\x20a\x20coupon\x20minted\x20with\x20it\x20is\x20byte-identical\x20to\x20one\x20without),\x20'+'and\x20it\x20NO\x20LONGER\x20downgrades\x20the\x20MCP\x20issuance\x20block\x20for\x20a\x20coupon\x20that\x20zeroes\x20the\x20cheapest\x20SKU\x20—\x20the\x20block\x20'+'is\x20unconditional:\x20a\x20zeroing\x20coupon\x20can\x20only\x20dead-end\x20at\x20the\x20buyer\x27s\x20checkout\x20(order_new_zero_total_dead_order\x20'+'client-side,\x20abort\x2042\x20on-chain).\x20For\x20a\x20deliberate\x20free\x20tier:\x20price\x20the\x20SKU\x20at\x201\x20smallest\x20unit\x20(never\x200\x20—\x20'+'a\x20zero-priced\x20sale\x20is\x20permanently\x20unbuyable)\x20or\x20deliver\x20it\x20outside\x20the\x20sales\x20rails\x20(e.g.\x20a\x20Demand\x20with\x20'+'Signature\x20fulfillment).\x20Omit\x20this\x20field.'),'time_ms_end':z['number']()['describe']('Discount\x20end\x20time\x20(milliseconds)'),'count':z['number']()['describe']('Number\x20of\x20SEPARATE\x20Discount\x20(coupon)\x20objects\x20minted\x20—\x20total\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.\x20'+'Each\x20coupon\x20object\x20is\x20SINGLE-USE\x20(consumed\x20on\x20first\x20use).\x20This\x20is\x20NOT\x20a\x20per-coupon\x20reuse\x20count:\x20'+'count:2\x20creates\x202\x20independent\x20one-time\x20coupons,\x20not\x201\x20coupon\x20usable\x20twice.'),'recipient':ManyAccountOrMark_AddressAISchema['describe']('Discount\x20recipient.\x20OBJECT\x20FORM\x20REQUIRED\x20(T9\x20az3-mn-261013):\x20a\x20bare\x20string\x20is\x20REJECTED\x20here\x20—\x20'+'pass\x20{entities:\x20[{name_or_address:\x20\x27<account_name_or_0x_address>\x27}]}\x20'+'(example:\x20{entities:\x20[{name_or_address:\x20\x27buyer1\x27}]}).\x20'+'Total\x20coupons\x20delivered\x20=\x20count\x20×\x20number\x20of\x20recipients.'),'transferable':z['boolean']()['describe']('Whether\x20the\x20discount\x20object\x20recipient\x20can\x20transfer\x20the\x20discount\x20object')})['strict']();export const OrderNewSchema=z['object']({'buy':BuySchema,'agents':ManyAccountOrMark_AddressAISchema['optional']()['describe']('Order\x20agents.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'order_required_info':z['string']()['optional']()['describe']('Contact\x20object\x20ID\x20or\x20WTS\x20Proof\x20object,\x20RECORDED\x20on\x20the\x20Order\x20as\x20evidence\x20that\x20the\x20order\x20holder\x20'+'delivered\x20the\x20private\x20information\x20the\x20Service\x20declares\x20in\x20customer_required\x20(e.g.\x20phone/email/shipping_address).\x20'+'ACCEPTED\x20FORMS\x20(upwc-cat-261017\x20T10\x20live\x20probe):\x20an\x20on-chain\x20object\x20ADDRESS\x20(0x…),\x20a\x20REGISTERED\x20mark\x20name,\x20'+'or\x20the\x20Contact/Proof\x20object\x20itself\x20—\x20a\x20bare\x20account\x20name\x20is\x20NOT\x20an\x20object\x20reference\x20and\x20fails\x20with\x20\x27not\x20found\x27;\x20'+'RECORD-ONLY,\x20NOT\x20ENFORCED:\x20nothing\x20on-chain\x20reads\x20this\x20field\x20—\x20the\x20purchase\x20entry\x20never\x20requires\x20it,\x20and\x20an\x20order\x20'+'supplying\x20none\x20of\x20the\x20declared\x20fields\x20is\x20still\x20created.\x20FLOW:\x20the\x20order\x20holder\x20sends\x20the\x20information\x20to\x20the\x20'+'Service\x27s\x20Contact\x20(um)\x20via\x20end-to-end\x20encrypted\x20Messenger,\x20then\x20passes\x20the\x20Contact\x20object\x20ID\x20or\x20the\x20generated\x20'+'WTS\x20Proof\x20here.\x20To\x20ENFORCE\x20delivery\x20on-chain,\x20mount\x20the\x20pattern.required_info_evidence_gate\x20Guard\x20on\x20the\x20forward\x20'+'that\x20hands\x20over\x20goods\x20or\x20funds,\x20asserting\x20order.required_info\x20is\x20some\x20(presence-only\x20—\x20the\x20recorded\x20address\x20value\x20'+'is\x20never\x20a\x20guard\x20condition;\x20accepting\x20the\x20delivered\x20information\x20is\x20the\x20merchant\x27s\x20confirming\x20forward).\x20'+'ATTESTATION-ONLY:\x20the\x20recorded\x20value\x20is\x20self-attested,\x20has\x20no\x20on-chain\x20readback,\x20and\x20MUST\x20NOT\x20be\x20used\x20as\x20a\x20gate\x20condition.\x20'+'PER-ORDER\x20BINDING:\x20when\x20the\x20listing\x20genuinely\x20promises\x20a\x20per-order\x20credential,\x20use\x20the\x20dedicated\x20controlled\x20bind\x20'+'operation\x20(order_required_info_bind)\x20with\x20a\x20Proof\x20whose\x20about\x20is\x20THIS\x20order\x20and\x20whose\x20creator\x20is\x20the\x20order\x20holder\x20—\x20'+'the\x20chain\x20verifies\x20both\x20at\x20write\x20time\x20and\x20rejects\x20a\x20mismatch\x20without\x20writing\x20anything.\x20The\x20reuse\x20model\x20(one\x20Contact\x20'+'Proof\x20across\x20orders)\x20stays\x20the\x20default\x20for\x20this\x20plain\x20record\x20field;\x20pick\x20per\x20listing\x20promise,\x20not\x20per\x20habit.\x20'+'BOUNDARY:\x20that\x20binding\x20proves\x20the\x20credential\x20AUTHOR\x20only,\x20never\x20its\x20content\x20or\x20any\x20rating\x20—\x20do\x20not\x20mirror\x20it\x20onto\x20'+'review/reward\x20claims;\x20public\x20reviews\x20are\x20Repository\x20rows\x20whose\x20values\x20are\x20enforced\x20guard-side\x20via\x20data-value\x20probes,\x20'+'not\x20through\x20Proof\x20objects.'),'transfer':AccountOrMark_AddressAISchema['optional']()['describe']('Set\x20the\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.'),'namedNewOrder':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20newly\x20created\x20Order\x20object.\x20'+'Without\x20this,\x20the\x20Order\x20is\x20only\x20referenceable\x20by\x20its\x20on-chain\x20address.\x20'+'Example:\x20{name:\x20\x27my_order_v1\x27}\x20allows\x20subsequent\x20operations\x20to\x20use\x20\x27my_order_v1\x27\x20instead\x20of\x20the\x20address.\x20'+'PLACEMENT:\x20this\x20field\x20MUST\x20be\x20inside\x20data.order_new\x20(it\x20is\x20an\x20OrderNew\x20field)\x20—\x20putting\x20namedNewOrder\x20at\x20'+'the\x20data\x20root\x20fails\x20schema\x20validation\x20with\x20\x27Unrecognized\x20key\x27.\x20'+'MIGRATION\x20TIP:\x20for\x20batch/migration\x20order\x20creation,\x20always\x20auto-generate\x20readable\x20names\x20'+'(e.g.\x20\x27<source>_<service>_<seq>\x27\x20like\x20\x27my_shop_svc_v1_0001\x27)\x20—\x20unnamed\x20orders\x20(head.name\x20=\x20null)\x20are\x20'+'only\x20address-referenceable,\x20which\x20breaks\x20downstream\x20queries,\x20displays\x20and\x20audits\x20(E-8).'),'namedNewAllocation':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Allocation\x20object.\x20'+'Without\x20this,\x20the\x20Allocation\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_allocation_v1\x27}\x20allows\x20alloc_by_guard\x20to\x20reference\x20\x27my_allocation_v1\x27.'),'namedNewProgress':NamedObjectSchema['optional']()['describe']('RECOMMENDED:\x20Set\x20a\x20local\x20name\x20for\x20the\x20order\x27s\x20Progress\x20object.\x20'+'Without\x20this,\x20the\x20Progress\x20is\x20only\x20referenceable\x20by\x20its\x20address.\x20'+'Example:\x20{name:\x20\x27my_progress_v1\x27}\x20allows\x20progress\x20operations\x20to\x20use\x20\x27my_progress_v1\x27.')})['strict']();export const SalesSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Add\x20new\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('set'),'sales':z['array'](ServiceSaleSchema)})['strict']()['describe']('Replaces\x20the\x20ENTIRE\x20sales\x20list:\x20every\x20product\x20NOT\x20included\x20is\x20REMOVED\x20from\x20the\x20Service\x20'+'(its\x20stock\x20and\x20wip\x20binding\x20go\x20with\x20it).\x20To\x20change\x20ONE\x20product,\x20prefer\x20the\x20per-item\x20ops\x20'+'(price_add\x20/\x20price_reduce\x20/\x20stock_add\x20/\x20stock_reduce\x20/\x20sale_suspension)\x20over\x20re-sending\x20'+'the\x20full\x20list;\x20with\x20op:set\x20you\x20MUST\x20resend\x20ALL\x20unchanged\x20products\x20too.\x20'+'Removal\x20is\x20immediate\x20and\x20cannot\x20be\x20undone.'),z['object']({'op':z['literal']('remove'),'sales_name':z['array'](LongNameSchema['describe']('Sales\x20name'))})['strict']()['describe']('Remove\x20existing\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20all\x20sales\x20products\x20or\x20services.'),z['object']({'op':z['literal']('price_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20INCREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20+0.1\x20WOW).\x20'+'Added\x20to\x20the\x20current\x20price\x20(on-chain\x20saturating\x20add).\x20NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Raise\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20resolves\x20the\x20name\x20against\x20'+'the\x20live\x20sales\x20list\x20and\x20refuses\x20the\x20call\x20before\x20send,\x20and\x20the\x20response\x20carries\x20a\x20'+'{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('price_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Price\x20DECREASE\x20delta\x20in\x20the\x20Service\x20token\x27s\x20smallest\x20units\x20(e.g.\x20100000000\x20=\x20-0.1\x20WOW).\x20'+'Must\x20not\x20exceed\x20the\x20current\x20price:\x20an\x20oversized\x20reduce\x20ABORTS\x20on\x20chain\x20(code\x2041)\x20and\x20does\x20NOT\x20clamp.\x20'+'NOT\x20the\x20new\x20absolute\x20price.')})['strict']()['describe']('Lower\x20one\x20product\x27s\x20price\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'an\x20oversized\x20delta\x20is\x20refused\x20by\x20the\x20chain\x20(code\x2041)\x20instead\x20of\x20clamping;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('stock_add'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20INCREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2050\x20=\x20+50\x20units.')})['strict']()['describe']('Restock\x20one\x20product\x20by\x20a\x20delta.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('stock_reduce'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20update'),'value':BalanceTypeSchema['describe']('Stock\x20DECREASE\x20delta\x20(a\x20unit\x20COUNT,\x20not\x20money),\x20e.g.\x2010\x20=\x20-10\x20units.\x20'+'If\x20the\x20delta\x20exceeds\x20current\x20stock,\x20the\x20stock\x20clamps\x20to\x200\x20(product\x20becomes\x20unsellable).')})['strict']()['describe']('Reduce\x20one\x20product\x27s\x20stock\x20by\x20a\x20delta\x20(e.g.\x20write-off\x20damaged\x20units).\x20'+'Only\x20the\x20named\x20product\x20is\x20touched;\x20an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20'+'the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send.'),z['object']({'op':z['literal']('sale_suspension'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20to\x20suspend\x20or\x20resume'),'suspension':z['boolean']()['describe']('true\x20=\x20suspend\x20the\x20product\x20(buy/quote\x20abort\x20with\x20E_SALE_SUSPENDED);\x20false\x20=\x20resume\x20selling.')})['strict']()['describe']('Suspend\x20or\x20resume\x20ONE\x20product\x20without\x20removing\x20it\x20(keeps\x20price/stock/WIP\x20binding).\x20'+'The\x20retail-style\x20\x27out\x20of\x20stock\x20/\x20listing\x20inactive\x27\x20state.\x20Only\x20the\x20named\x20product\x20is\x20touched;\x20'+'an\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20refuses\x20unknown\x20names\x20before\x20send;\x20'+'the\x20response\x20carries\x20a\x20{field,\x20before,\x20after}\x20read-back\x20delta.'),z['object']({'op':z['literal']('wip_set'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20product\x20whose\x20WIP\x20file\x20is\x20(re)bound'),'wip':z['string']()['describe']('New\x20WIP\x20file\x20URL\x20for\x20the\x20product.\x20Same\x20network-deployment\x20rule\x20as\x20the\x20add/set\x20wip\x20field:\x20'+'production\x20MUST\x20use\x20a\x20public\x20HTTP\x20URL\x20to\x20a\x20.wip\x20file\x20(a\x20local\x20path,\x20localhost/loopback\x20or\x20'+'LAN\x20URL\x20passes\x20the\x20merchant-side\x20set-time\x20verification\x20but\x20aborts\x20order_new\x20for\x20every\x20'+'customer).\x20\x22\x22\x20clears\x20WIP\x20verification\x20(TESTING\x20ONLY\x20—\x20the\x20product\x20then\x20has\x20no\x20pin).'),'wip_hash':z['string']()['optional']()['describe']('Expected\x20meta.hash\x20embedded\x20in\x20the\x20new\x20WIP\x20file\x20—\x20when\x20provided\x20it\x20is\x20VERIFIED\x20against\x20the\x20'+'file\x20before\x20send\x20(mismatch\x20aborts\x20pre-send);\x20the\x20on-chain\x20pin\x20is\x20always\x20derived\x20from\x20the\x20'+'file\x27s\x20own\x20meta.hash.\x20Pass\x20it\x20whenever\x20the\x20value\x20is\x20known:\x20after\x20the\x20rebind,\x20buyers\x20pinning\x20'+'the\x20OLD\x20hash\x20abort\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)\x20until\x20they\x20re-copy\x20the\x20NEW\x20hash.')})['strict']()['describe']('Rebind\x20ONE\x20product\x27s\x20WIP\x20file\x20(and\x20pin)\x20without\x20touching\x20its\x20price,\x20stock\x20or\x20suspension\x20—\x20'+'fields\x20not\x20supplied\x20here\x20keep\x20the\x20live\x20on-chain\x20values.\x20An\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20'+'(code\x2032)\x20—\x20the\x20MCP\x20pre-gate\x20resolves\x20the\x20name\x20against\x20the\x20live\x20sales\x20list\x20and\x20refuses\x20the\x20'+'call\x20before\x20send.\x20Executed\x20as\x20read-merge-rewrite:\x20the\x20handler\x20reads\x20the\x20live\x20sales\x20list,\x20'+'changes\x20only\x20the\x20named\x20product\x27s\x20wip/wip_hash,\x20and\x20replays\x20the\x20full\x20table\x20as\x20an\x20op:set\x20—\x20'+'a\x20concurrent\x20catalog\x20edit\x20between\x20read\x20and\x20rewrite\x20would\x20be\x20overwritten,\x20so\x20run\x20this\x20when\x20no\x20'+'other\x20catalog\x20change\x20is\x20in\x20flight.\x20Announce\x20the\x20new\x20pin\x20hash\x20to\x20holders\x20of\x20the\x20old\x20one:\x20their\x20'+'orders\x20abort\x20E_WIP_HASH_NOT_MATCH\x20after\x20the\x20rebind\x20until\x20they\x20re-copy\x20it.')]);export const RestockSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('flag'),'sale_name':LongNameSchema['describe']('Name\x20of\x20the\x20LIVE\x20product\x20whose\x20restock-on-refund\x20flag\x20is\x20set'),'flagged':z['boolean']()['describe']('true\x20=\x20refunded\x20orders\x20of\x20this\x20SKU\x20put\x20their\x20purchased\x20units\x20back\x20on\x20shelf;\x20false\x20=\x20opt\x20out.')})['strict']()['describe']('Opt\x20ONE\x20live\x20product\x20in/out\x20of\x20restock-on-refund.\x20An\x20unknown\x20sale_name\x20aborts\x20on\x20chain\x20(code\x2032);\x20'+'delisting\x20the\x20product\x20is\x20the\x20kill\x20switch.\x20Without\x20the\x20flag,\x20the\x20order-level\x20restock\x20op\x20refuses\x20that\x20line\x20(code\x2046).\x20'+'Flagging\x20a\x20SKU\x20does\x20not\x20itself\x20touch\x20stock\x20—\x20the\x20order-level\x20op\x20below\x20does\x20the\x20restoration,\x20and\x20it\x20is\x20'+'once-per-order\x20per\x20order\x20(code\x2049)\x20and\x20bound\x20to\x20orders\x20of\x20THIS\x20service\x20(foreign\x20orders\x20abort\x20code\x2026).'),z['object']({'op':z['literal']('order'),'order':z['string']()['min'](0x1)['describe']('Address\x20or\x20local\x20name\x20of\x20the\x20REFUNDED\x20order\x20whose\x20purchased\x20units\x20go\x20back\x20on\x20shelf.\x20'+'Must\x20be\x20an\x20order\x20of\x20THIS\x20service\x20(a\x20foreign\x20order\x20aborts\x20code\x2026),\x20and\x20each\x20order\x20can\x20be\x20'+'restocked\x20exactly\x20once\x20—\x20a\x20second\x20call\x20for\x20the\x20same\x20order\x20aborts\x20code\x2049\x20(no\x20retry\x20succeeds;\x20'+'the\x20restoration\x20is\x20already\x20complete).')})['strict']()['describe']('Put\x20back\x20the\x20units\x20one\x20refunded\x20order\x20purchased,\x20read\x20from\x20the\x20order\x27s\x20own\x20purchase\x20lines\x20'+'(the\x20caller\x20cannot\x20add\x20extra\x20units).\x20Two-pass\x20all-or-nothing\x20on\x20chain:\x20every\x20line\x20must\x20be\x20'+'restock-flagged\x20and\x20still\x20live\x20before\x20the\x20first\x20unit\x20moves\x20(unflagged\x20→\x20code\x2046,\x20delisted\x20→\x20code\x2032),\x20'+'so\x20a\x20partial\x20restock\x20is\x20impossible.\x20Once-per-order\x20(code\x2049\x20on\x20replay)\x20and\x20ownership-bound\x20'+'(a\x20foreign\x20order\x20aborts\x20code\x2026);\x20the\x20applied\x20state\x20lives\x20in\x20a\x20RestockStamp\x20dynamic\x20field\x20on\x20the\x20'+'service\x20(no\x20public\x20query\x20primitive)\x20—\x20the\x20MCP\x20pre-gate\x20reads\x20that\x20stamp\x20before\x20send\x20and\x20refuses\x20a\x20'+'replay\x20(restock_order_already_applied)\x20so\x20no\x20gas\x20is\x20burned.\x20'+'Emits\x20one\x20stock-restocked\x20event\x20per\x20line.')]);export const CallService_DataSchema=z['object']({'object':TypedPermissionObjectSchema,'order_new':OrderNewSchema['optional']()['describe']('Create\x20new\x20order.\x20RETRY\x20DISCIPLINE:\x20the\x20order\x20creation\x20is\x20atomic\x20on-chain\x20but\x20NOT\x20in\x20'+'observability\x20—\x20a\x20transport\x20drop\x20after\x20submit\x20leaves\x20the\x20commit\x20state\x20UNKNOWN,\x20and\x20a\x20blind\x20'+'resubmit\x20creates\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20(live\x20mainnet\x20incident).\x20On\x20any\x20'+'failure/timeout,\x20verify\x20whether\x20an\x20order\x20with\x20this\x20exact\x20signature\x20(service\x20+\x20buyer\x20+\x20items)\x20'+'already\x20landed\x20—\x20via\x20the\x20in-flight\x20marker\x20in\x20the\x20failure\x20envelope,\x20the\x20sender\x27s\x20recent\x20'+'on-chain\x20objects,\x20or\x20onchain_events\x20—\x20and\x20adopt\x20it\x20if\x20present;\x20resubmit\x20only\x20if\x20confirmed\x20absent.'),'description':DescriptionSchema['optional'](),'location':LongNameSchema['optional']()['describe']('The\x20service\x20area\x20and\x20scope\x20as\x20stated\x20by\x20the\x20merchant.\x20'+'IMPORTANT:\x20If\x20the\x20service\x20has\x20a\x20geographic\x20scope,\x20ALWAYS\x20specify\x20this\x20field.\x20'+'Use\x20a\x20complete\x20hierarchical\x20address\x20'+'(e.g.\x20\x27US\x20→\x20California\x20→\x20Los\x20Angeles\x20→\x20Koreatown\x27).\x20'+'If\x20only\x20a\x20partial\x20location\x20is\x20known,\x20EXPAND\x20it\x20to\x20the\x20full\x20standardized\x20form\x20'+'(country\x20→\x20province/state\x20→\x20city\x20→\x20district,\x20worldwide)\x20—\x20when\x20ambiguous,\x20offer\x202-4\x20candidate\x20completions\x20and\x20let\x20the\x20user\x20pick.'),'sales':SalesSchema['optional']()['describe']('Service\x20sales\x20products\x20or\x20services\x20list.\x20'+'⚠️\x20WIP\x20(PRODUCT-DETAIL\x20FILE)\x20—\x20HOW\x20TO\x20PROVIDE\x20IT:\x20'+'(1)\x20EASIEST\x20—\x20official\x20free\x20hosting:\x20upload\x20the\x20detail\x20file\x20with\x20the\x20wip_file\x20tool;\x20the\x20default\x20endpoint\x20is\x20'+'https://wip.store.wowok.net\x20(free:\x2010\x20files\x20per\x20account,\x20180-day\x20retention,\x2012MB\x20per\x20file,\x20rate-limited;\x20files\x20'+'stay\x20until\x20you\x20purge\x20them).\x20Put\x20the\x20returned\x20URL\x20into\x20sale.wip.\x20'+'(2)\x20Your\x20own\x20hosting:\x20any\x20publicly\x20reachable\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20your\x20own\x20website)\x20—\x20pass\x20customBaseUrl\x20'+'to\x20wip_file\x20when\x20uploading\x20to\x20a\x20non-default\x20endpoint,\x20or\x20host\x20the\x20file\x20yourself\x20and\x20put\x20that\x20URL\x20into\x20sale.wip.\x20'+'For\x20long-lived\x20MAINNET\x20listings\x20prefer\x20your\x20own\x20endpoint\x20so\x20the\x20detail\x20page\x20outlives\x20the\x20free\x20retention\x20window.\x20'+'⚠️\x20REACHABILITY\x20RULE:\x20a\x20non-empty\x20sale.wip\x20MUST\x20be\x20a\x20publicly\x20reachable\x20URL.\x20The\x20URL\x20is\x20stored\x20ON-CHAIN\x20and\x20'+'every\x20customer\x20fetches\x20it\x20at\x20order\x20time\x20—\x20a\x20local\x20file\x20path,\x20localhost/loopback\x20URL,\x20or\x20LAN\x20private-IP\x20URL\x20is\x20'+'unreachable\x20by\x20customers\x20on\x20other\x20machines\x20and\x20aborts\x20order_new\x20100%.\x20Local-network\x20URLs\x20are\x20INTERNAL\x20TEST\x20USE\x20'+'ONLY\x20(env.network\x20=\x20localnet).\x20'+'⚠️\x20SCORING:\x20on\x20mainnet,\x20a\x20sale\x20item\x20without\x20a\x20product-detail\x20file\x20is\x20an\x20incomplete\x20listing\x20—\x20it\x20hurts\x20the\x20'+'service\x27s\x20market\x20completeness\x20score.\x20Leave\x20sale.wip\x20empty\x20(\x22\x22)\x20only\x20for\x20quick\x20local\x20testing.'),'restock':RestockSchema['optional']()['describe']('Refund\x20restocking\x20(permission\x20305\x20SERVICE_SALES).\x20'+'op:\x27flag\x27\x20opts\x20ONE\x20live\x20product\x20into\x20restock-on-refund;\x20op:\x27order\x27\x20puts\x20the\x20units\x20a\x20REFUNDED\x20order\x20'+'purchased\x20back\x20on\x20shelf.\x20The\x20order\x20path\x20is\x20all-or-nothing:\x20every\x20purchased\x20line\x20must\x20be\x20flagged\x20and\x20still\x20'+'live\x20before\x20any\x20unit\x20moves\x20(otherwise\x20the\x20chain\x20aborts\x2046/32),\x20so\x20half\x20a\x20restock\x20is\x20impossible.\x20'+'The\x20order\x20path\x20is\x20once-per-order\x20(replay\x20aborts\x2049)\x20and\x20bound\x20to\x20THIS\x20service\x20(foreign\x20order\x20aborts\x2026).\x20'+'Do\x20NOT\x20fake\x20a\x20restock\x20with\x20stock_add\x20when\x20the\x20order\x20carries\x20several\x20lines\x20—\x20use\x20op:\x27order\x27\x20so\x20quantities\x20'+'come\x20from\x20the\x20order\x20itself.\x20DISCLOSURE:\x20restock\x20reopens\x20sales\x20—\x20if\x20the\x20machine\x20(or\x20its\x20template)\x20has\x20no\x20'+'refund-terminal\x20gate,\x20orders\x20inside\x20their\x20refund\x20window\x20may\x20lose\x20refund\x20eligibility\x20or\x20create\x20'+'fund-accounting\x20ambiguity\x20once\x20restocked\x20units\x20are\x20resold;\x20confirm\x20the\x20machine\x27s\x20refund\x20rail\x20remains\x20'+'reachable\x20after\x20restocking.'),'repositories':ObjectsSchema['optional']()['describe']('Service\x20Repository\x20object\x20list.'),'rewards':ObjectsSchema['optional']()['describe']('Service\x20Reward\x20object\x20list.\x20'+'May\x20share\x20the\x20Service\x27s\x20Permission\x20(no\x20conflict\x20check\x20—\x20intentional:\x20rewards\x20are\x20the\x20provider\x27s\x20own\x20'+'incentive\x20tool;\x20only\x20Arbitration\x20requires\x20a\x20different\x20Permission\x20for\x20neutrality).\x20'+'⚠️\x20OP\x20SEMANTICS\x20(SDK\x20translation,\x20etm-mn-261013\x20E-06):\x20op:\x27set\x27\x20executes\x20as\x20clear\x20+\x20add\x20—\x20and\x20'+'reward\x20clear\x20is\x20TIME-LOCKED\x20after\x20publish\x20(E_LOCKED_TIME_NOT_ENOUGH\x20=\x20abort\x2024:\x20requires\x20pause\x20+\x20'+'setting_lock_duration\x20elapsed,\x20default\x2030\x20days).\x20BEFORE\x20publish\x20op:\x27set\x27\x20is\x20fine;\x20AFTER\x20publish\x20'+'attach\x20rewards\x20with\x20op:\x27add\x27\x20ONLY\x20(add\x20has\x20no\x20lock).'),'arbitrations':ObjectsSchema['optional']()['describe']('Service\x20Arbitration\x20object\x20list.\x20'+'FORMAT:\x20same\x20as\x20repositories\x20—\x20use\x20the\x20`objects`\x20field\x20name\x20inside\x20the\x20operation\x20data.\x20'+'Example:\x20{arbitrations:\x20{op:\x20\x27add\x27,\x20objects:\x20[{name:\x20\x27my_arb_1\x27}]}}.\x20'+'Each\x20item\x20is\x20a\x20NameOrAddress\x20(object\x20ID\x20or\x20local\x20mark\x20name).\x20'+'⚠️\x20OP\x20SEMANTICS\x20(SDK\x20translation,\x20etm-mn-261013\x20E-06\x20+\x20crs\x20P3-1):\x20op:\x27add\x27\x20appends\x20and\x20is\x20the\x20ONLY\x20'+'\x20unlocked\x20path\x20after\x20publish\x20(add\x20has\x20no\x20publish\x20assert\x20on-chain).\x20op:\x27set\x27\x20executes\x20as\x20'+'clear\x20+\x20add\x20and\x20REPLACES\x20the\x20entire\x20allowlist\x20(pass\x20EVERY\x20Arbitration\x20that\x20must\x20remain\x20bound)\x20—\x20'+'clear\x20is\x20TIME-LOCKED\x20after\x20publish\x20(E_LOCKED_TIME_NOT_ENOUGH\x20=\x20abort\x2024:\x20requires\x20pause\x20+\x20'+'setting_lock_duration\x20elapsed,\x20default\x2030\x20days),\x20so\x20use\x20op:\x27set\x27\x20BEFORE\x20publish\x20only.\x20'+'(The\x202026-10-08\x20op:\x27add\x27\x20disable\x20was\x20lifted:\x20the\x20unparseable-success-response\x20SDK\x20bug\x20it\x20responded\x20'+'to\x20is\x20fixed\x20—\x20safeTextJson\x20+\x20big-int\x20conversion.)\x20'+'⚠️\x20PERMISSION\x20RULE\x20(contract-enforced):\x20every\x20Arbitration\x20bound\x20here\x20'+'MUST\x20use\x20a\x20Permission\x20object\x20DIFFERENT\x20from\x20THIS\x20Service\x27s\x20permission\x20—\x20binding\x20an\x20Arbitration\x20that\x20shares\x20'+'the\x20Service\x27s\x20Permission\x20aborts\x20with\x20E_ARBITRATION_PERMISSION_CONFLICT\x20(error\x2033).\x20'+'Create\x20a\x20dedicated\x20Permission\x20for\x20each\x20Arbitration\x20BEFORE\x20binding.\x20'+'DESIGN\x20RATIONALE\x20(confirmed\x20intentional):\x20dispute\x20resolution\x20requires\x20NEUTRALITY\x20—\x20an\x20Arbitration\x20controlled\x20'+'by\x20the\x20same\x20Permission\x20admins\x20as\x20the\x20Service\x20it\x20judges\x20would\x20be\x20a\x20conflict\x20of\x20interest.\x20ONLY\x20Arbitration\x20has\x20'+'this\x20check:\x20Reward\x20and\x20Treasury\x20objects\x20MAY\x20share\x20the\x20Service\x27s\x20Permission\x20(they\x20are\x20the\x20provider\x27s\x20own\x20tools).'),'machine':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Service\x20Machine\x20object\x20ID\x20or\x20name.\x20The\x20Machine\x20object\x20must\x20be\x20in\x20published\x20state.'),'discount':DiscountSchema['optional']()['describe']('Issue\x20discount\x20(mint\x20coupons\x20bound\x20to\x20this\x20Service).\x20'+'⚠️\x20ISSUANCE\x20PRESCRIPTION\x20(KB-02):\x20issuing\x20=\x20MINT\x20then\x20TRANSFER.\x20This\x20field\x20mints\x20the\x20coupon\x20'+'objects\x20under\x20THIS\x20account\x20—\x20its\x20`recipient`\x20field\x20delivers\x20them\x20directly\x20when\x20you\x20know\x20the\x20'+'recipients;\x20for\x20pre-minted\x20campaign\x20coupons\x20held\x20for\x20later\x20handout,\x20the\x20handout\x20itself\x20is\x20'+'discount_send\x20(mint\x20first,\x20transfer\x20to\x20the\x20recipient\x20at\x20distribution\x20time).\x20'+'COUPON\x20SEMANTICS\x20to\x20disclose:\x20HOLDING\x20IS\x20THE\x20CREDENTIAL\x20—\x20the\x20coupon\x20belongs\x20to\x20whoever\x20HOLDS\x20'+'it,\x20only\x20the\x20holder\x27s\x20own\x20signature\x20can\x20spend\x20it,\x20and\x20sharing\x20the\x20coupon\x27s\x20object\x20ID\x20confers\x20'+'nothing;\x20ONE\x20COUPON,\x20ONE\x20BURN\x20—\x20every\x20coupon\x20is\x20single-use\x20and\x20is\x20destroyed\x20on\x20first\x20spend;\x20'+'REFUNDS\x20SETTLE\x20THE\x20POST-COUPON\x20AMOUNT\x20—\x20refund\x20rails\x20pay\x20back\x20the\x20escrowed\x20discounted\x20total\x20'+'only,\x20a\x20cancelled\x20order\x20never\x20restores\x20the\x20coupon\x27s\x20face\x20value.\x20A\x20coupon\x20held\x20by\x20another\x20'+'address\x20cannot\x20be\x20applied\x20to\x20a\x20buyer\x27s\x20order\x20—\x20the\x20owner\x20must\x20discount_send\x20it\x20to\x20the\x20buyer\x20first.'),'discount_destroy':z['array'](NameOrAddressSchema)['optional']()['describe']('Destroy\x20existing\x20discount\x20object\x20ID\x20list.'),'discount_send':z['object']({'discounts':z['array'](NameOrAddressSchema)['min'](0x1)['describe']('Coupon\x20object\x20IDs\x20or\x20local\x20names\x20to\x20transfer.\x20You\x20MUST\x20own\x20these\x20Discount\x20objects.\x20'+'Each\x20coupon\x20must\x20have\x20been\x20minted\x20with\x20transferable:true\x20—\x20otherwise\x20the\x20chain\x20aborts\x20with\x20'+'E_DISCOUNT_NOT_TRANSFERABLE\x20(semantic\x20code\x20service:10).\x20Coupons\x20stay\x20single-use;\x20'+'the\x20transfer\x20does\x20not\x20change\x20that.\x20There\x20is\x20NO\x20batch\x20entry\x20on-chain\x20—\x20each\x20coupon\x20is\x20'+'delivered\x20by\x20its\x20own\x20singleton\x20call\x20(fanned\x20out\x20automatically);\x20prefer\x20ONE\x20coupon\x20per\x20'+'transaction\x20for\x20coupon\x20migrations\x20(SDK\x20cap\x20MAX_DISCOUNT_COUNT_ONCE\x20still\x20applies).'),'recipient':AccountOrMark_AddressAISchema['describe']('Destination\x20address\x20(or\x20account/local\x20mark\x20resolvable\x20to\x20one).\x20ALL\x20listed\x20coupons\x20'+'are\x20moved\x20to\x20this\x20single\x20address\x20in\x20one\x20call.')})['strict']()['optional']()['describe']('Transfer\x20ALREADY-MINTED\x20coupons\x20you\x20own\x20to\x20another\x20address,\x20instead\x20of\x20destroying\x20them\x20'+'(discount_destroy)\x20or\x20minting\x20new\x20ones\x20(discount).\x20This\x20is\x20a\x20pure\x20ownership\x20handover:\x20'+'the\x20on-chain\x20entry\x20points\x20are\x20public\x20funs\x20with\x20NO\x20Service\x20permission\x20requirement\x20—\x20'+'the\x20only\x20preconditions\x20are\x20that\x20the\x20sender\x20owns\x20each\x20coupon\x20and\x20each\x20was\x20minted\x20'+'transferable:true.\x20Typical\x20use:\x20hand\x20out\x20pre-minted\x20campaign\x20coupons,\x20or\x20move\x20coupons\x20'+'between\x20your\x20own\x20accounts.\x20'+'KB-02\x20COUPON\x20SEMANTICS:\x20this\x20transfer\x20is\x20the\x20second\x20half\x20of\x20coupon\x20ISSUANCE\x20'+'(mint\x20via\x20`discount`,\x20then\x20transfer\x20here\x20at\x20distribution\x20time).\x20HOLDING\x20IS\x20THE\x20CREDENTIAL:\x20'+'the\x20coupon\x20belongs\x20to\x20whoever\x20HOLDS\x20it\x20—\x20only\x20the\x20holder\x27s\x20own\x20signature\x20can\x20spend\x20it,\x20and\x20'+'sharing\x20the\x20object\x20ID\x20confers\x20nothing.\x20ONE\x20COUPON,\x20ONE\x20BURN:\x20each\x20coupon\x20stays\x20single-use\x20and\x20'+'is\x20destroyed\x20on\x20first\x20spend\x20—\x20transfer\x20does\x20not\x20reset\x20that.\x20REFUNDS\x20SETTLE\x20THE\x20POST-COUPON\x20'+'AMOUNT:\x20refund\x20rails\x20pay\x20the\x20escrowed\x20discounted\x20total\x20only,\x20never\x20the\x20coupon\x27s\x20face\x20value.\x20'+'Until\x20you\x20transfer\x20a\x20gifted\x20coupon,\x20the\x20recipient\x20CANNOT\x20use\x20it\x20on\x20their\x20own\x20orders\x20—\x20'+'a\x20coupon\x20held\x20by\x20another\x20address\x20cannot\x20be\x20applied\x20to\x20their\x20buy.'),'customer_required':z['array'](NotEmptyNameSchema)['optional']()['describe']('Customer\x20required\x20information\x20labels.\x20Such\x20as\x20phone,\x20email,\x20shipping_address,\x20etc.\x20'+'DECLARATIVE\x20ONLY:\x20nothing\x20on-chain\x20or\x20in\x20the\x20SDK\x20reads\x20this\x20field\x20—\x20it\x20is\x20a\x20pure\x20'+'listing\x20declaration\x20of\x20what\x20the\x20customer\x20will\x20be\x20asked\x20to\x20provide.\x20It\x20is\x20NOT\x20enforced\x20against\x20'+'order_new\x20and\x20NOT\x20linked\x20to\x20any\x20delivery\x20path\x20by\x20the\x20SDK.\x20'+'OPERATIONAL\x20PAIRING\x20(convention,\x20not\x20enforcement):\x20deliver\x20the\x20actual\x20private\x20information\x20via\x20'+'end-to-end\x20encrypted\x20Messenger\x20to\x20the\x20Service\x27s\x20Contact\x20bound\x20as\x20`um`\x20—\x20bind\x20`um`\x20when\x20you\x20use\x20'+'customer_required,\x20or\x20the\x20customer\x20has\x20no\x20encrypted\x20channel\x20to\x20send\x20it\x20through.\x20To\x20ENFORCE\x20delivery\x20'+'on-chain,\x20mount\x20the\x20pattern.required_info_evidence_gate\x20Guard\x20on\x20the\x20goods/funds\x20forward\x20(see\x20'+'order_new.order_required_info).'),'order_allocators':z['union']([AllocatorsSchema,z['null']()])['optional']()['describe']('Order\x20fund\x20allocator.\x20Max\x20100\x20allocators\x20(MAX_ALLOCATOR_COUNT).\x20'+'✅\x20EACH\x20allocator\x20has\x20a\x20guard,\x20and\x20EVERY\x20allocator\x20whose\x20guard\x20address\x20matches\x20the\x20supplied\x20guard\x20RUNS\x20—\x20'+'they\x20are\x20NOT\x20mutually\x20exclusive\x20and\x20NOT\x20first-match-wins.\x20'+'One\x20guard\x20may\x20legitimately\x20authorize\x20several\x20distribution\x20rules\x20(different\x20fix\x20/\x20rate\x20/\x20cap);\x20each\x20contributes\x20'+'its\x20own\x20Payment\x20and\x20consumes\x20its\x20own\x20once-slot\x20(keyed\x20by\x20the\x20allocator\x20index).\x20Allocators\x20are\x20evaluated\x20in\x20vector\x20'+'order\x20against\x20the\x20SHRINKING\x20pool,\x20so\x20a\x20later\x20allocator\x20only\x20sees\x20the\x20balance\x20left\x20by\x20the\x20earlier\x20ones\x20—\x20which\x20is\x20'+'exactly\x20how\x20a\x20waterfall\x20(e.g.\x20Amount\x20fee\x20+\x20net\x20Rate\x20split)\x20is\x20built.\x20'+'On-chain\x20truth:\x20the\x20allocation\x20module\x20runs\x20a\x20while\x20loop\x20over\x20all\x20allocators,\x20firing\x20those\x20whose\x20guard\x20address\x20matches\x20the\x20submitted\x20one.\x20'+'⚠️\x20If\x20you\x20WANT\x20mutual\x20exclusion\x20you\x20must\x20express\x20it\x20inside\x20the\x20Guard\x20itself\x20(make\x20the\x20conditions\x20logically\x20exclusive).\x20'+'Set\x20to\x20null\x20to\x20clear.\x20'+'⚠️\x20IMMUTABLE\x20after\x20publish\x20except\x20APPEND:\x20order_allocators\x20full\x20replacement\x20can\x20ONLY\x20be\x20done\x20BEFORE\x20publish=true\x20'+'(on-chain\x20check\x20rejects\x20after\x20publish\x20—\x20E_ALREADY_PUBLISHED).\x20'+'After\x20publish,\x20the\x20ONLY\x20mutation\x20is\x20order_allocators_append\x20(prefix-frozen\x20extension\x20—\x20see\x20that\x20field).\x20'+'There\x20is\x20NO\x20pause+lock\x20exception\x20for\x20order_allocators\x20(unlike\x20arbitrations/rewards\x20which\x20have\x20time-lock\x20removal).\x20'+'PRE-PUBLISH\x20CHECKLIST:\x20verify\x20all\x20guard\x20names\x20resolve,\x20all\x20sharing\x20amounts\x20are\x20correct,\x20'+'threshold\x20is\x20set,\x20and\x20recipient\x20types\x20(Entity/Signer/GuardIdentifier)\x20are\x20intended\x20before\x20calling\x20publish=true.\x20'+'GuardIdentifier\x20sharing\x20mode:\x20{who:\x20{GuardIdentifier:\x20<u8>},\x20sharing:\x20<rate>,\x20mode:\x20\x27Rate\x27}\x20—\x20'+'resolves\x20recipient\x20from\x20the\x20Guard\x20table\x20submission\x20at\x20allocation\x20time.\x20BINDING\x20SEMANTICS\x20(contract-enforced,\x20abort\x20code\x2015):\x20'+'in\x20a\x20Service-created\x20Allocation\x20EVERY\x20GuardIdentifier\x20submission\x20must\x20equal\x20the\x20PAYING\x20order\x20—\x20it\x20is\x20always\x20\x27the\x20order\x27,\x20'+'never\x20a\x20third\x20party\x20whose\x20address\x20is\x20supplied\x20at\x20trigger\x20time;\x20use\x20{who:{Entity:...}}\x20for\x20named\x20parties.\x20'+'Canonical\x20order\x20pattern:\x20the\x20recipient\x20slot\x20is\x20the\x20single\x20'+'submitted\x20Order\x20(constrained\x20by\x20the\x20Guard\x20—\x20service\x20binding,\x20qualifying\x20node,\x20signer==order.owner);\x20funds\x20land\x20at\x20that\x20order\x20object\x20and\x20'+'are\x20receivable\x20only\x20by\x20its\x20owner\x20(object\x20receipt\x20=\x20owner\x20receipt).\x20Safety\x20is\x20determined\x20by\x20constraint\x20sufficiency\x20—\x20run\x20the\x20recipient\x20'+'constraint\x20audit\x20before\x20publish.\x20Fixed\x20recipients\x20should\x20use\x20{who:{Entity:...}};\x20unbound\x20Signer\x20recipients\x20are\x20a\x20CRITICAL\x20theft\x20risk.\x20'+'MULTI-CALL\x20ALLOCATION:\x20an\x20allocation\x20can\x20be\x20executed\x20MULTIPLE\x20times\x20(no\x20consumed\x20flag\x20in\x20contract).\x20'+'Use\x20Amount\x20mode\x20(not\x20Surplus)\x20for\x20recurring\x20allocations\x20—\x20an\x20uncapped\x20Surplus\x20sweeps\x20the\x20entire\x20remaining\x20balance\x20on\x20first\x20run.\x20'+'For\x20monthly\x20payment\x20scenarios,\x20create\x20multiple\x20Allocators\x20with\x20time-based\x20Guards\x20+\x20Amount\x20mode\x20sharing\x20items.'),'order_allocators_append':AllocatorsSchema['optional']()['describe']('Append-only\x20correction\x20window\x20for\x20order_allocators\x20—\x20the\x20ONLY\x20allocator\x20mutation\x20allowed\x20AFTER\x20publish\x20(J1).\x20'+'REQUIREMENTS\x20(chain-enforced,\x20allocation\x20abort\x20code\x2020\x20EALLOCATORS_NOT_EXTENSION):\x20the\x20supplied\x20Allocators\x20must\x20be\x20a\x20pure\x20'+'EXTENSION\x20of\x20the\x20current\x20on-chain\x20plan\x20—\x20every\x20existing\x20allocator\x20appears\x20VERBATIM\x20as\x20a\x20prefix\x20(same\x20guard,\x20same\x20sharing,\x20'+'same\x20fix/max),\x20threshold\x20must\x20be\x20UNCHANGED;\x20only\x20description\x20may\x20change\x20freely.\x20New\x20allocators\x20are\x20appended\x20after\x20the\x20prefix.\x20'+'WHY:\x20rewriting\x20an\x20existing\x20allocator\x20or\x20changing\x20the\x20threshold\x20would\x20retroactively\x20alter\x20payout\x20rules\x20for\x20orders\x20already\x20'+'escrowed\x20against\x20the\x20old\x20plan.\x20Clearing\x20the\x20plan\x20(null)\x20is\x20NOT\x20possible\x20here\x20—\x20that\x20would\x20strand\x20in-flight\x20orders.\x20'+'Permission:\x20same\x20index\x20313\x20as\x20order_allocators.\x20'+'USE\x20CASE:\x20you\x20forgot\x20one\x20allocator\x20guard\x20(e.g.\x20the\x20refund\x20exit\x20for\x20a\x20review\x20node)\x20and\x20the\x20Service\x20is\x20already\x20published\x20—\x20'+'instead\x20of\x20abandoning\x20the\x20Service,\x20append\x20the\x20missing\x20allocator.\x20'+'⚠️\x20SCOPE\x20—\x20NEW\x20ORDERS\x20ONLY:\x20each\x20order\x20instantiates\x20its\x20own\x20Allocation\x20from\x20this\x20plan\x20AT\x20BUY\x20TIME,\x20so\x20appending\x20'+'changes\x20the\x20template\x20for\x20FUTURE\x20orders\x20only.\x20Orders\x20already\x20escrowed\x20under\x20the\x20previous\x20plan\x20do\x20NOT\x20gain\x20the\x20'+'appended\x20allocator\x20—\x20their\x20Allocation\x20(and\x20its\x20fund\x20exits)\x20is\x20frozen\x20as\x20originally\x20instantiated;\x20if\x20in-flight\x20orders\x20'+'are\x20already\x20stranded,\x20this\x20append\x20does\x20NOT\x20rescue\x20them.\x20'+'⚠️\x20Appended\x20allocators\x20are\x20evaluated\x20AFTER\x20the\x20existing\x20ones\x20against\x20the\x20shrinking\x20pool\x20(vector\x20order),\x20so\x20they\x20see\x20the\x20'+'balance\x20left\x20by\x20earlier\x20allocators\x20—\x20design\x20appended\x20waterfall\x20tails\x20accordingly.\x20'+'⚠️\x20Once\x20appended,\x20an\x20allocator\x20can\x20NEVER\x20be\x20edited\x20or\x20removed\x20—\x20same\x20permanence\x20as\x20the\x20original\x20plan.'),'buy_guard':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Buy\x20guard\x20object\x20ID\x20or\x20name\x20(null\x20CLEARS\x20the\x20mount).\x20RUNTIME\x20SWITCH\x20(permission\x20307\x20SERVICE_BUY_GUARD\x20—\x20the\x20guard\x20OBJECT\x20is\x20immutable\x20but\x20its\x20MOUNT\x20on\x20the\x20Service\x20is\x20mutable\x20at\x20any\x20time).\x20'+'ROUND-ROTATION\x20DUTY\x20(拍板②\x20dm-mtw-261027):\x20for\x20daily/group\x20rounds\x20whose\x20cutoff\x20is\x20an\x20absolute\x20timestamp,\x20the\x20precise\x20batch\x20boundary\x20is\x20THIS\x20mount,\x20not\x20the\x20time\x20guard\x20—\x20at\x20the\x20cutoff\x20instant\x20the\x20keeper\x20cron\x20SETS\x20the\x20buy_guard\x20(new\x20entrants\x20refused\x20at\x20BUY\x20time)\x20and\x20CLEARs/re-arms\x20it\x20when\x20the\x20next\x20round\x20opens;\x20the\x20on-chain\x20Clock\x20>=\x20cutoff\x20comparison\x20stays\x20the\x20settlement/advance\x20authority.\x20Disclose\x20the\x20publisher\x27s\x20time\x20source\x20the\x20cron\x20fires\x20on.\x20Full\x20Machine\x20reuse\x20across\x20rounds\x20(advance\x20gate\x20re-reading\x20a\x20repository\x20cutoff\x20row)\x20is\x20filed\x20for\x20a\x20protocol\x20window.'),'compensation_fund_add':CoinParamSchema['optional']()['describe']('Deposit\x20funds\x20into\x20the\x20Service\x20compensation_fund.\x20Used\x20to\x20pay\x20indemnity\x20when\x20arbitration\x20resolves\x20in\x20customer\x27s\x20favor.\x20'+'FORMAT:\x20{balance:\x20<amount_in_smallest_unit>}\x20—\x20the\x20field\x20name\x20is\x20\x27balance\x27\x20(NOT\x20\x27amount\x27).\x20'+'The\x20token\x20type\x20and\x20precision\x20are\x20determined\x20by\x20the\x20Service\x20object\x27s\x20type_parameter\x20(the\x20generic\x20type\x20set\x20when\x20the\x20Service\x20was\x20created).\x20'+'For\x20WOW\x20(9\x20decimals):\x20{balance:\x201000000000}\x20=\x201\x20WOW.\x20'+'For\x20tokens\x20with\x20different\x20decimals,\x20adjust\x20accordingly\x20(e.g.\x20USDC\x20has\x206\x20decimals,\x20so\x20{balance:\x201000000}\x20=\x201\x20USDC).\x20'+'REQUIRES:\x20Permission\x20index\x20315\x20(SERVICE_COMPENSATION_FUND_DEPOSIT)\x20for\x20NON-ADMIN\x20callers.\x20The\x20Permission\x20owner\x20and\x20admin\x20short-circuit\x20every\x20builtin\x20index\x20check\x20(no\x20grant\x20needed);\x20only\x20non-admin\x20callers\x20must\x20be\x20granted\x20315\x20first.\x20'+'COMMON\x20MISTAKE:\x20using\x20{amount:\x20...}\x20or\x20{amount:\x20...,\x20type:\x20\x27WOW\x27}\x20—\x20these\x20will\x20fail.\x20The\x20correct\x20field\x20is\x20\x27balance\x27.'),'compensation_fund_withdraw':z['object']({'receipt':AccountOrMark_AddressAISchema['describe']('Receipt\x20address\x20that\x20will\x20receive\x20the\x20withdrawn\x20funds\x20(as\x20a\x20new\x20Payment\x20object)'),'payment_info':PaymentInfoSchema['describe']('Payment\x20info\x20for\x20the\x20new\x20Payment\x20object\x20created\x20to\x20hold\x20the\x20withdrawn\x20funds')})['strict']()['optional']()['describe']('Withdraw\x20ALL\x20funds\x20from\x20the\x20compensation_fund\x20to\x20a\x20new\x20Payment\x20object\x20owned\x20by\x20`receipt`.\x20'+'REQUIRES:\x20Service\x20must\x20be\x20paused\x20AND\x20setting_lock_duration\x20must\x20have\x20elapsed\x20since\x20pause\x20(the\x20unpublished-state\x20check).\x20'+'Withdraws\x20the\x20ENTIRE\x20compensation_fund\x20balance\x20via\x20balance::withdraw_all.\x20'+'DIFFERENT\x20from\x20the\x20order-side\x20compensation\x20claim\x20(for\x20arbitration-winning\x20users,\x20no\x20pause+lock\x20required).'),'setting_lock_duration_add':z['number']()['optional']()['describe']('Additional\x20lock\x20duration\x20to\x20ADD\x20to\x20\x27setting_lock_duration\x27\x20(Move\x20field\x20name).\x20'+'UNIT:\x20milliseconds\x20(ms).\x20Example:\x202592000000\x20=\x2030\x20days,\x207776000000\x20=\x2090\x20days,\x2086400000\x20=\x201\x20day.\x20'+'DEFAULT:\x202592000000\x20(30\x20days,\x20DEFAULT_LOCK_DURATION).\x20This\x20is\x20the\x20initial\x20value\x20when\x20a\x20Service\x20is\x20created.\x20'+'Behavior:\x20additive\x20(safe_add)\x20—\x20only\x20increases,\x20never\x20decreases.\x20'+'Can\x20be\x20called\x20BEFORE\x20or\x20AFTER\x20publish\x20(no\x20publish\x20check).\x20'+'Affects\x20the\x20waiting\x20time\x20required\x20by:\x20compensation_fund_withdraw,\x20arbitrations\x20remove/clear,\x20rewards\x20remove/clear\x20'+'(all\x20require\x20pause\x20+\x20setting_lock_duration\x20elapsed\x20since\x20pause).'),'compensation_fund_receive':ReceivedBalanceOrRecentlySchema['optional']()['describe']('Receive\x20order\x20compensation\x20funds\x20from\x20this\x20Service\x20object.'+RECEIVE_FORMAT_BLOCK_BALANCE),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Service\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name\x20—\x20the\x20Service\x27s\x20customer-service\x20channel.\x20'+'This\x20is\x20the\x20object\x20that\x20Messenger\x20routes\x20encrypted\x20messages\x20to\x20for\x20pre-order\x20negotiation,\x20'+'private-info\x20delivery\x20(see\x20customer_required),\x20and\x20post-sale\x20support.\x20'+'⚠️\x20REQUIRED\x20whenever\x20customer_required\x20is\x20set:\x20without\x20um,\x20the\x20customer\x27s\x20private\x20information\x20'+'has\x20no\x20channel\x20to\x20reach\x20the\x20merchant.'),'arb_statement':z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20(case)\x20to\x20attach\x20the\x20statement\x20to.'),'order':NameOrAddressSchema['describe']('The\x20order\x20the\x20case\x20was\x20opened\x20against\x20—\x20must\x20belong\x20to\x20this\x20Service.'),'statement':z['string']()['max'](0xfa0)['describe']('Seller\x27s\x20text\x20statement\x20appended\x20to\x20the\x20case\x20record\x20(ArbStatementEvent).\x20'+'Event-only:\x20nothing\x20on\x20the\x20Arb\x20object\x20is\x20mutated;\x20the\x20record\x20cannot\x20be\x20rewritten\x20or\x20deleted.\x20'+'Use\x20to\x20declare\x20facts\x20or\x20report\x20the\x20customer\x27s\x20behavior\x20(e.g.\x20absence,\x20non-cooperation).\x20'+'PRIMARY\x20evidence\x20channel\x20is\x20Messenger\x20(encrypted\x20WTS\x20records\x20with\x20the\x20customer);\x20'+'this\x20is\x20the\x20SECONDARY\x20on-chain\x20declare/report\x20channel.')})['optional']()['describe']('Service\x20(defendant-side)\x20statement\x20on\x20an\x20arbitration\x20case\x20—\x20permission\x20index\x20321.\x20'+'Lets\x20the\x20Service\x20permission\x20holder\x20put\x20a\x20bounded\x20text\x20on\x20the\x20record\x20for\x20any\x20case\x20against\x20'+'an\x20order\x20of\x20this\x20service\x20WITHOUT\x20holding\x20the\x20order.\x20Callable\x20in\x20ANY\x20case\x20status.\x20'+'The\x20Arb\x27s\x20coin\x20type\x20is\x20derived\x20automatically\x20from\x20the\x20arb\x20object\x20on-chain.'),'pause':z['boolean']()['optional']()['describe']('Whether\x20to\x20pause\x20accepting\x20new\x20orders.'),'publish':z['boolean']()['optional']()['describe']('Whether\x20to\x20publish\x20the\x20Service.\x20After\x20publishing,\x20customers\x20can\x20place\x20orders.\x20'+'⚠️\x20PRE-PUBLISH\x20EVALUATION\x20(mandatory,\x20stop-node\x20fund-exit\x20coverage):\x20service.allocators\x20MUST\x20cover\x20EVERY\x20stop\x20node\x20of\x20the\x20bound\x20Machine\x20—\x20every\x20node\x20where\x20an\x20order\x20can\x20rest\x20(terminal\x20nodes\x20AND\x20waiting\x20states:\x20review\x20windows,\x20handovers,\x20open\x20disputes)\x20needs\x20BOTH\x20a\x20withdrawal\x20(release)\x20AND\x20a\x20refund\x20allocation\x20rule,\x20and\x20each\x20mapping\x20guard\x20must\x20be\x20satisfiable\x20in\x20BOTH\x20directions.\x20An\x20uncovered\x20stop\x20node\x20strands\x20escrowed\x20funds\x20permanently\x20(order_allocators\x20is\x20L1-immutable).\x20Review-gated\x20release\x20is\x20a\x20TIME\x20VARIANT\x20inside\x20ONE\x20exit\x20guard\x20(\x27reviewed\x20OR\x20unreviewed\x20after\x20T\x27),\x20never\x20parallel\x20outgoing\x20edges\x20(race\x20deadlock).\x20See\x20pattern.fund_flow_stop_node_coverage\x20+\x20rules\x20R-M5-03\x20/\x20R-M5-09.\x20'+'VERIFIED\x20against\x20Move\x20source\x20+\x20SDK\x20(4-level\x20immutability\x20matrix):\x0a'+'\x20\x20L1\x20—\x20PERMANENTLY\x20LOCKED\x20after\x20publish\x20(assert!(!bPublished),\x20no\x20pause+lock\x20exception):\x0a'+'\x20\x20\x20\x20•\x20machine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(workflow\x20template)\x0a'+'\x20\x20\x20\x20•\x20order_allocators\x20(fund\x20distribution\x20rules\x20—\x20full\x20replacement\x20locked;\x20APPEND-ONLY\x20additions\x20'+'remain\x20possible\x20via\x20order_allocators_append,\x20prefix/threshold\x20frozen)\x0a'+'\x20\x20L2\x20—\x20TIME-LOCKED\x20after\x20publish\x20(unpublished-state\x20check\x20—\x20requires\x20pause\x20+\x20setting_lock_duration\x20elapsed):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20remove/clear\x20(dispute\x20resolution\x20objects)\x0a'+'\x20\x20\x20\x20•\x20rewards\x20remove/clear\x20\x20\x20\x20\x20\x20\x20(reward\x20objects)\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_withdraw\x20(withdraw\x20ALL\x20funds)\x0a'+'\x20\x20\x20\x20RATIONALE\x20(deliberate\x20design,\x20NOT\x20a\x20defect):\x20these\x20three\x20REVOKE\x20buyer-facing\x20guarantees\x20that\x20placed\x20orders\x20already\x20rely\x20on\x20—\x20the\x20lock\x20protects\x20buyer\x20expectations.\x20Daily\x20operations\x20(sales\x20add/remove,\x20price,\x20stock,\x20description)\x20are\x20NEVER\x20gated\x20by\x20this\x20lock.\x0a'+'\x20\x20L3\x20—\x20REMAIN\x20MUTABLE\x20after\x20publish\x20(no\x20SDK\x20check,\x20no\x20Move\x20check):\x0a'+'\x20\x20\x20\x20•\x20arbitrations\x20add,\x20rewards\x20add\x20(no\x20assert\x20—\x20can\x20add\x20after\x20publish)\x0a'+'\x20\x20\x20\x20•\x20buy_guard,\x20sales,\x20discount,\x20description,\x20location,\x20pause,\x20repositories,\x0a'+'\x20\x20\x20\x20•\x20compensation_fund_add,\x20setting_lock_duration_add,\x20customer_required,\x20um\x20(Contact)\x0a'+'These\x202\x20L1-LOCKED\x20fields\x20(machine/order_allocators)\x20MUST\x20be\x20set\x20BEFORE\x20publish=true.\x0a'+'arbitrations/rewards\x20can\x20be\x20ADDED\x20after\x20publish\x20but\x20remove/clear\x20requires\x20pause+lock.\x0a'+'\x0a'+'⚠️\x20COMPENSATION_FUND\x20+\x20ARBITRATION\x20LINKAGE:\x0a'+'\x20\x20At\x20publish\x20time,\x20if\x20compensation_fund\x20>\x200,\x20Arbitration\x20MUST\x20be\x20bound:\x0a'+'\x20\x20\x20\x20if\x20(balance::value(&self.compensation_fund)\x20>\x200)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20assert!(arbitration_count\x20>\x200,\x20E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\x0a'+'\x20\x20\x20\x20}\x0a'+'\x20\x20The\x20MCP\x20handler\x20enforces\x20this\x20as\x20a\x20HARD\x20PRE-CHECK:\x20if\x20publish=true\x20AND\x20compensation_fund_add\x20'+'\x20\x20is\x20set\x20in\x20the\x20same\x20call\x20AND\x20arbitrations\x20is\x20empty,\x20the\x20call\x20is\x20REJECTED\x20before\x20submission.\x20'+'\x20\x20If\x20compensation_fund\x20was\x20deposited\x20in\x20a\x20prior\x20call,\x20a\x20SOFT\x20WARNING\x20is\x20issued.\x0a'+'\x0a'+'SCHEMA-03\x20/\x20P0-01\x20fix\x20—\x20DEPLOYMENT\x20WORKFLOW\x20(two-phase,\x20avoids\x20circular\x20dependency):\x0a'+'\x20\x20Phase\x201\x20—\x20CREATE\x20(no\x20publish):\x20object={name:\x27my-service\x27,\x20type_parameter,\x20permission}\x20+\x20machine\x20+\x20order_allocators\x20+\x20arbitrations.\x0a'+'\x20\x20\x20\x20NOTE:\x20buy_guard\x20can\x20use\x20a\x20LocalMark\x20NAME\x20(not\x20address)\x20to\x20break\x20the\x20Guard→Service\x20circular\x20dependency.\x0a'+'\x20\x20\x20\x20The\x20name\x20is\x20resolved\x20to\x20an\x20address\x20at\x20transaction\x20build\x20time.\x0a'+'\x20\x20Phase\x202\x20—\x20PUBLISH:\x20object=\x27my-service\x27\x20(string\x20ref)\x20+\x20publish=true.\x0a'+'\x20\x20\x20\x20All\x20L1-LOCKED\x20fields\x20must\x20be\x20set\x20in\x20Phase\x201;\x20Phase\x202\x20only\x20flips\x20the\x20publish\x20flag.\x0a'+'\x20\x20Post-publish\x20updates:\x20buy_guard,\x20sales,\x20description,\x20repositories\x20(add),\x20rewards\x20(add),\x20arbitrations\x20(add),\x20etc.'),'creation_plan':z['any']()['optional']()['describe']('WIZARD\x20CONTRACT:\x20the\x20Plan\x20JSON\x20that\x20merchant_guide\x20delivered\x20(its\x20creation_plan\x20/\x20plan\x20field),\x20'+'passed\x20back\x20VERBATIM\x20on\x20the\x20Service\x20publish\x20call\x20(data.publish=true).\x20The\x20publish\x20gate\x20replays\x20the\x20'+'plan\x27s\x20freeze\x20matrix\x20(preflight)\x20right\x20before\x20submission\x20and\x20REJECTS\x20the\x20publish\x20when\x20any\x20gate\x20fails\x20'+'(structural\x20issues,\x20critical\x20audit\x20findings,\x20or\x20a\x20failed\x20rule\x20check)\x20—\x20this\x20closes\x20the\x20preflight\x20bypass\x20'+'where\x20a\x20plan\x20that\x20failed\x20merchant_guide\x27s\x20audit\x20could\x20still\x20be\x20materialized\x20manually.\x20'+'OMIT\x20this\x20field\x20on\x20every\x20NON-publish\x20call\x20and\x20on\x20fully\x20manual\x20(non-wizard)\x20builds\x20—\x20the\x20manual\x20path\x20is\x20'+'unchanged\x20and\x20never\x20gated\x20by\x20this\x20field.\x20Do\x20NOT\x20edit,\x20trim,\x20or\x20\x27improve\x27\x20the\x20plan\x20in\x20transit:\x20a\x20mutated\x20'+'plan\x20is\x20rejected\x20(target\x20cross-check)\x20and\x20the\x20publish\x20must\x20be\x20redone\x20from\x20merchant_guide.'),'reentry_kind':z['enum'](['none','review-loop','paid-cycle'])['optional']()['describe']('AP-3\x20loop-semantics\x20declaration\x20for\x20the\x20publish\x20audit\x20(ctra\x20F-06\x20root\x20cure):\x20overrides\x20the\x20'+'word-stem\x20loop\x20classifier\x20when\x20the\x20machine\x20graph\x20contains\x20a\x20cycle.\x20'+'\x27none\x27\x20=\x20default\x20(word-stem\x20classification)\x20/\x20\x27review-loop\x27\x20=\x20same-order\x20no-charge\x20revisits\x20/\x20'+'\x27paid-cycle\x27\x20=\x20per-revisit\x20fee,\x20fund\x20gate\x20required.\x20'+'MCP-side\x20audit\x20declaration\x20ONLY\x20(pre_publish\x20harness\x20hook)\x20—\x20never\x20sent\x20on-chain;\x20the\x20handler\x20strips\x20it\x20'+'before\x20the\x20SDK\x20call.\x20Mirror\x20of\x20the\x20template\x20frontmatter\x20twin\x20(template-loader).')})['strict']()['describe']('On-chain\x20Service\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20type_parameter,\x20permission,\x20...}\x20to\x20create\x20a\x20Service.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallService_InputSchema=z['object']({'data':CallService_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -19,7 +19,9 @@ export declare const OnchainOperationsSchema: z.ZodPreprocess<z.ZodDiscriminated
|
|
|
19
19
|
order_new: z.ZodOptional<z.ZodObject<{
|
|
20
20
|
buy: z.ZodObject<{
|
|
21
21
|
items: z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
22
|
-
name: z.ZodString
|
|
22
|
+
name: z.ZodOptional<z.ZodString>;
|
|
23
|
+
sale_id: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
sale_name: z.ZodOptional<z.ZodString>;
|
|
23
25
|
quantity: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
24
26
|
wip_hash: z.ZodDefault<z.ZodString>;
|
|
25
27
|
}, z.core.$strict>>>;
|