@wowok/agent-mcp 3.0.3 → 3.0.4
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/index.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +5 -0
- package/dist/schema/call/arbitration.d.ts +5 -0
- package/dist/schema/call/base.d.ts +5 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +25 -0
- package/dist/schema/call/contact.d.ts +5 -0
- package/dist/schema/call/demand.d.ts +5 -0
- package/dist/schema/call/guard.d.ts +15 -0
- package/dist/schema/call/machine.d.ts +10 -0
- package/dist/schema/call/order.d.ts +5 -0
- package/dist/schema/call/payment.d.ts +5 -0
- package/dist/schema/call/permission.d.ts +5 -0
- package/dist/schema/call/personal.d.ts +5 -0
- package/dist/schema/call/progress.d.ts +5 -0
- package/dist/schema/call/proof.d.ts +10 -0
- package/dist/schema/call/repository.d.ts +5 -0
- package/dist/schema/call/reward.d.ts +5 -0
- package/dist/schema/call/service.d.ts +5 -0
- package/dist/schema/call/treasury.d.ts +5 -0
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/interaction/index.d.ts +34 -0
- package/dist/schema/interaction/index.js +1 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +6 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +90 -0
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/ask_user.output.json +54 -0
- package/dist/schemas/ask_user.schema.json +78 -0
- package/dist/schemas/bridge_operation.schema.json +50 -5
- package/dist/schemas/guard2file.schema.json +10 -1
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/machineNode2file.schema.json +10 -1
- package/dist/schemas/messenger_operation.output.json +8 -0
- package/dist/schemas/messenger_operation.schema.json +8 -0
- package/dist/schemas/onchain_events.output.json +2 -2
- package/dist/schemas/onchain_operations.schema.json +180 -18
- package/dist/schemas/onchain_operations_allocation.schema.json +10 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +10 -1
- package/dist/schemas/onchain_operations_contact.schema.json +10 -1
- package/dist/schemas/onchain_operations_demand.schema.json +10 -1
- package/dist/schemas/onchain_operations_gen_passport.schema.json +10 -1
- package/dist/schemas/onchain_operations_gen_proof.schema.json +10 -1
- package/dist/schemas/onchain_operations_guard.schema.json +10 -1
- package/dist/schemas/onchain_operations_machine.schema.json +10 -1
- package/dist/schemas/onchain_operations_order.schema.json +10 -1
- package/dist/schemas/onchain_operations_payment.schema.json +10 -1
- package/dist/schemas/onchain_operations_permission.schema.json +10 -1
- package/dist/schemas/onchain_operations_personal.schema.json +10 -1
- package/dist/schemas/onchain_operations_progress.schema.json +10 -1
- package/dist/schemas/onchain_operations_proof.schema.json +10 -1
- package/dist/schemas/onchain_operations_repository.schema.json +10 -1
- package/dist/schemas/onchain_operations_reward.schema.json +10 -1
- package/dist/schemas/onchain_operations_service.schema.json +10 -1
- package/dist/schemas/onchain_operations_treasury.schema.json +10 -1
- package/dist/schemas/query_toolkit.schema.json +1 -1
- package/dist/tools/handlers/ask-user.d.ts +3 -0
- package/dist/tools/handlers/ask-user.js +1 -0
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/bridge.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/interaction.d.ts +2 -0
- package/dist/tools/registry/interaction.js +1 -0
- package/dist/tools/registry/local.js +1 -1
- package/dist/tools/registry/monitor.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/types.d.ts +7 -1
- package/dist/tools/wrap.d.ts +3 -3
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -429,6 +429,11 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
429
429
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
430
430
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
431
431
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
433
|
+
full: "full";
|
|
434
|
+
streamlined: "streamlined";
|
|
435
|
+
quiet: "quiet";
|
|
436
|
+
}>>;
|
|
432
437
|
}, z.core.$strict>>;
|
|
433
438
|
submission: z.ZodOptional<z.ZodObject<{
|
|
434
439
|
type: z.ZodLiteral<"submission">;
|
|
@@ -173,6 +173,11 @@ export declare const CallReward_InputSchema: z.ZodObject<{
|
|
|
173
173
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
174
174
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
175
175
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
full: "full";
|
|
178
|
+
streamlined: "streamlined";
|
|
179
|
+
quiet: "quiet";
|
|
180
|
+
}>>;
|
|
176
181
|
}, z.core.$strict>>;
|
|
177
182
|
submission: z.ZodOptional<z.ZodObject<{
|
|
178
183
|
type: z.ZodLiteral<"submission">;
|
|
@@ -570,6 +570,11 @@ export declare const CallService_InputSchema: z.ZodObject<{
|
|
|
570
570
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
571
571
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
572
572
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
573
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
574
|
+
full: "full";
|
|
575
|
+
streamlined: "streamlined";
|
|
576
|
+
quiet: "quiet";
|
|
577
|
+
}>>;
|
|
573
578
|
}, z.core.$strict>>;
|
|
574
579
|
submission: z.ZodOptional<z.ZodObject<{
|
|
575
580
|
type: z.ZodLiteral<"submission">;
|
|
@@ -362,6 +362,11 @@ export declare const CallTreasury_InputSchema: z.ZodObject<{
|
|
|
362
362
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
363
363
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
364
364
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
365
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
366
|
+
full: "full";
|
|
367
|
+
streamlined: "streamlined";
|
|
368
|
+
quiet: "quiet";
|
|
369
|
+
}>>;
|
|
365
370
|
}, z.core.$strict>>;
|
|
366
371
|
submission: z.ZodOptional<z.ZodObject<{
|
|
367
372
|
type: z.ZodLiteral<"submission">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{isValidAddress,ValueType as a278a,ObjectType as a278b,ENTRYPOINT,isValidWowAddress,isValidName,isValidDescription,MAX_DESCRIPTION_LENGTH,isValidLongName,MAX_LONG_NAME_LENGTH}from'@wowok/wowok';const isValidMoveIdentifier=a=>{if(a['length']===0x0)return![];const b=a[0x0];if(b==='_')return a['length']>0x1&&/^[a-zA-Z0-9_]+$/['test'](a['slice'](0x1));if(/^[a-zA-Z]$/['test'](b))return/^[a-zA-Z0-9_]*$/['test'](a['slice'](0x1));return![];};export const DescriptionSchema=z['string']()['trim']()['refine'](isValidDescription,{'message':'Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)'})['describe']('Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)');export const LongNameSchema=z['string']()['refine'](isValidLongName,{'message':'max\x20'+MAX_LONG_NAME_LENGTH+'\x20bcs\x20characters'});export const WowAddressSchema=z['string']()['refine'](isValidAddress,{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix\x20followed\x20by\x2064\x20hex\x20characters'})['describe']('Valid\x20ID:\x200x\x20prefix\x20+\x2064\x20hex\x20characters,\x20or\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)');const WOW_TOKEN_TYPE='0x2::wow::WOW';export const TokenTypeSchema=z['string']()['refine'](a=>{if(a===WOW_TOKEN_TYPE)return!![];const b=a['split']('::');if(b['length']!==0x3)return![];const [c,d,e]=b;if(!isValidWowAddress(c))return![];if(!isValidMoveIdentifier(d))return![];if(!isValidMoveIdentifier(e))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20{address}::{module}::{struct}\x20where\x20address\x20is\x200x+64hex,\x20module/struct\x20are\x20valid\x20Move\x20identifiers,\x20or\x20\x270x2::wow::WOW\x27'})['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20e.g.\x20\x270x2::wow::WOW\x27\x20(WOW),\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.');export const TokenTypeWithDefaultSchema=TokenTypeSchema['default'](WOW_TOKEN_TYPE)['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20Default:\x20\x270x2::wow::WOW\x27.\x20Other\x20examples:\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.');export const NameSchema=z['string']()['refine'](isValidName,'Name\x20string\x20(max\x2064\x20bcs\x20characters,\x20must\x20not\x20start\x20with\x20\x270x\x27)');export const NotEmptyNameSchema=z['string']()['nonempty']()['refine'](isValidName,'Name\x20string\x20(at\x20least\x201\x20character,\x20max\x20length\x2064\x20bcs\x20characters)');export const NameOrAddressSchema=z['string']()['refine'](a=>{if(isValidAddress(a))return!![];if(isValidName(a))return!![];return![];},{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix,\x20or\x20a\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)'})['describe']('Account/Object\x20name\x20or\x20ID.\x20If\x20specifying\x20an\x20account,\x20use\x20empty\x20string\x20\x27\x27\x20for\x20the\x20default\x20account.\x20'+'If\x20it\x20starts\x20with\x20\x270x\x27,\x20it\x20will\x20be\x20treated\x20as\x20an\x20ID.\x20'+'Otherwise,\x20it\x20will\x20be\x20treated\x20as\x20a\x20name\x20(max\x2064\x20bcs\x20characters).');export const AccountOrMark_AddressSchema=z['object']({'name_or_address':NameOrAddressSchema['optional'](),'local_mark_first':z['boolean']()['optional']()['describe']('Whether\x20to\x20prioritize\x20local\x20marks,\x20if\x20true,\x20prioritize\x20local\x20marks,\x20otherwise\x20prioritize\x20global\x20marks')})['strict']()['describe']('Account\x20or\x20address\x20lookup\x20object.\x20Use\x20this\x20to\x20specify\x20which\x20account\x20to\x20use\x20for\x20an\x20operation.\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x27testor2\x27\x20}\x20-\x20looks\x20up\x20account\x20by\x20name;\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x270x1234...\x27\x20}\x20-\x20uses\x20address\x20directly;\x20'+'If\x20name_or_address\x20is\x20empty\x20string\x20\x27\x27,\x20uses\x20the\x20default\x20local\x20account.');export const ManyAccountOrMark_AddressSchema=z['object']({'entities':z['array'](AccountOrMark_AddressSchema),'check_all_founded':z['boolean']()['optional']()['describe']('Whether\x20to\x20check\x20all\x20entities\x20are\x20found,\x20if\x20true,\x20all\x20entities\x20must\x20be\x20found\x20(abort\x20and\x20throw\x20exception\x20if\x20any\x20ID\x20not\x20found);\x20if\x20false,\x20only\x20return\x20found\x20IDs')})['strict']()['describe']('Used\x20to\x20batch\x20find\x20account\x20or\x20object\x20IDs\x20by\x20name');export const AccountOrMark_AddressAISchema=z['union']([NameOrAddressSchema['transform'](a=>({'name_or_address':a,'local_mark_first':!![]}))['describe']('Account\x20name,\x20address\x20(0x...),\x20or\x20mark\x20name.\x20'+'When\x20using\x20string\x20format,\x20local\x20marks\x20are\x20searched\x20first.\x20'+'EXAMPLE:\x20\x27alice\x27\x20-\x20searches\x20local\x20marks\x20first,\x20then\x20global;\x20'+'EXAMPLE:\x20\x270x2...\x27\x20(64\x20hex\x20chars)\x20-\x20uses\x20address\x20directly;\x20'+'EXAMPLE:\x20\x27\x27\x20-\x20uses\x20the\x20default\x20local\x20account'),AccountOrMark_AddressSchema])['describe']('Account\x20or\x20address\x20lookup.\x20Can\x20be\x20a\x20simple\x20string\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20local_mark_first\x20control.\x20'+'String\x20form\x20auto-converts\x20to\x20{\x20name_or_address:\x20<string>,\x20local_mark_first:\x20true\x20}.');export const ManyAccountOrMark_AddressAISchema=z['union']([z['array'](NameOrAddressSchema)['transform'](a=>({'entities':a['map'](b=>({'name_or_address':b,'local_mark_first':!![]})),'check_all_founded':!![]}))['describe']('Array\x20of\x20account\x20names,\x20addresses,\x20or\x20mark\x20names.\x20'+'Local\x20marks\x20are\x20searched\x20first\x20for\x20each\x20entry.\x20'+'EXAMPLE:\x20[\x27alice\x27,\x20\x270x2...\x27,\x20\x27bob\x27]'),ManyAccountOrMark_AddressSchema])['describe']('Batch\x20account\x20or\x20address\x20lookup.\x20Can\x20be\x20an\x20array\x20of\x20strings\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20control.\x20'+'Array\x20form\x20auto-converts\x20to\x20{\x20entities:\x20[...],\x20check_all_founded:\x20true\x20}.');export const ObjectOwnerSchema=z['union']([z['object']({'AddressOwner':z['string']()['describe']('Address\x20owner')})['strict'](),z['object']({'ObjectOwner':z['string']()['describe']('Object\x20owner')})['strict'](),z['object']({'Shared':z['object']({'initial_shared_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20became\x20shared')})['strict']()['describe']('Shared\x20object')})['strict'](),z['literal']('Immutable'),z['object']({'ConsensusAddressOwner':z['object']({'owner':z['string']()['describe']('Consensus\x20ID\x20owner'),'start_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20recently\x20became\x20consensus\x20object')})['strict']()['describe']('Consensus\x20ID\x20owner')})['strict']()])['describe']('Object\x20owner');export const ValueTypeUserSchema=z['union']([z['literal'](a278a['Bool'])['describe']('Bool\x20(0)'),z['literal'](a278a['Address'])['describe']('Address\x20(1)'),z['literal'](a278a['String'])['describe']('String\x20(2)'),z['literal'](a278a['U8'])['describe']('U8\x20(3)'),z['literal'](a278a['U16'])['describe']('U16\x20(4)'),z['literal'](a278a['U32'])['describe']('U32\x20(5)'),z['literal'](a278a['U64'])['describe']('U64\x20(6)'),z['literal'](a278a['U128'])['describe']('U128\x20(7)'),z['literal'](a278a['U256'])['describe']('U256\x20(8)'),z['literal'](a278a['VecBool'])['describe']('VecBool\x20(9)'),z['literal'](a278a['VecAddress'])['describe']('VecAddress\x20(10)'),z['literal'](a278a['VecString'])['describe']('VecString\x20(11)'),z['literal'](a278a['VecU8'])['describe']('VecU8\x20(12)'),z['literal'](a278a['VecU16'])['describe']('VecU16\x20(13)'),z['literal'](a278a['VecU32'])['describe']('VecU32\x20(14)'),z['literal'](a278a['VecU64'])['describe']('VecU64\x20(15)'),z['literal'](a278a['VecU128'])['describe']('VecU128\x20(16)'),z['literal'](a278a['VecU256'])['describe']('VecU256\x20(17)'),z['literal'](a278a['VecVecU8'])['describe']('VecVecU8\x20(18)'),z['literal']('Bool')['describe']('Bool'),z['literal']('Address')['describe']('Address'),z['literal']('String')['describe']('String'),z['literal']('U8')['describe']('U8'),z['literal']('U16')['describe']('U16'),z['literal']('U32')['describe']('U32'),z['literal']('U64')['describe']('U64'),z['literal']('U128')['describe']('U128'),z['literal']('U256')['describe']('U256'),z['literal']('VecBool')['describe']('VecBool'),z['literal']('VecAddress')['describe']('VecAddress'),z['literal']('VecString')['describe']('VecString'),z['literal']('VecU8')['describe']('VecU8'),z['literal']('VecU16')['describe']('VecU16'),z['literal']('VecU32')['describe']('VecU32'),z['literal']('VecU64')['describe']('VecU64'),z['literal']('VecU128')['describe']('VecU128'),z['literal']('VecU256')['describe']('VecU256'),z['literal']('VecVecU8')['describe']('VecVecU8'),z['literal']('bool')['describe']('bool'),z['literal']('address')['describe']('address'),z['literal']('string')['describe']('string'),z['literal']('u8')['describe']('u8'),z['literal']('u16')['describe']('u16'),z['literal']('u32')['describe']('u32'),z['literal']('u64')['describe']('u64'),z['literal']('u128')['describe']('u128'),z['literal']('u256')['describe']('u256'),z['literal']('vecbool')['describe']('vecbool'),z['literal']('vecaddress')['describe']('vecaddress'),z['literal']('vecstring')['describe']('vecstring'),z['literal']('vecu8')['describe']('vecu8'),z['literal']('vecu16')['describe']('vecu16'),z['literal']('vecu32')['describe']('vecu32'),z['literal']('vecu64')['describe']('vecu64'),z['literal']('vecu128')['describe']('vecu128'),z['literal']('vecu256')['describe']('vecu256'),z['literal']('vecvecu8')['describe']('vecvecu8')])['describe']('User\x20available\x20value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27\x20or\x20\x27u64\x27)');export const ValueTypeSchema=ValueTypeUserSchema['or'](z['literal'](a278a['Value'])['describe']('Value\x20(19)'))['or'](z['literal']('Value')['describe']('Value'))['describe']('Value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27)');export const ObjectTypeSchema=z['enum']([a278b['Permission'],a278b['Repository'],a278b['Arb'],a278b['Arbitration'],a278b['Service'],a278b['Machine'],a278b['Order'],a278b['Progress'],a278b['Payment'],a278b['Treasury'],a278b['Guard'],a278b['Demand'],a278b['Passport'],a278b['Allocation'],a278b['Resource'],a278b['Reward'],a278b['Discount'],a278b['EntityRegistrar'],a278b['EntityLinker'],a278b['Proof'],a278b['WReceivedObject'],a278b['Contact'],a278b['TableItem_ProgressHistory'],a278b['TableItem_PermissionPerm'],a278b['TableItem_DemandPresenter'],a278b['TableItem_MachineNode'],a278b['TableItem_TreasuryHistory'],a278b['TableItem_RepositoryData'],a278b['TableItem_RewardRecord'],a278b['TableItem_EntityLinker'],a278b['TableItem_AddressMark'],a278b['TableItem_EntityRegistrar']])['describe']('Wowok\x20object\x20type');export const BalanceTypeSchema=z['union']([z['number'](),z['string']()])['describe']('A\x20coin/balance\x20amount.\x20Accepts\x20three\x20formats:\x20'+'(1)\x20DISPLAY\x20FORMAT\x20with\x20token\x20symbol:\x20\x222.5WOW\x22,\x20\x2210USDC\x22,\x20\x220.05WOW\x22\x20—\x20'+'auto-converted\x20to\x20smallest\x20units\x20via\x20the\x20Fund\x20Processing\x20Layer\x20(token\x20precision\x20resolved\x20'+'from\x20official\x20registry\x20→\x20cache\x20→\x20on-chain).\x20The\x20symbol\x20MUST\x20match\x20the\x20token\x27s\x20type_parameter.\x20'+'(2)\x20SMALLEST\x20UNIT\x20(numeric\x20string):\x20\x2210000000000\x22\x20—\x20used\x20as-is,\x20no\x20conversion.\x20'+'(3)\x20SMALLEST\x20UNIT\x20(number):\x2010000000000\x20—\x20used\x20as-is\x20only\x20within\x20the\x20safe\x20integer\x20range\x20(±2^53);\x20numbers\x20outside\x20it\x20are\x20REJECTED,\x20use\x20a\x20numeric\x20string\x20instead.\x20'+'PRECISION\x20RULE:\x20for\x20values\x20exceeding\x202^53\x20(9007199254740991),\x20ALWAYS\x20use\x20format\x20(1)\x20or\x20(2)\x20—\x20JS\x20numbers\x20lose\x20integer\x20precision\x20silently\x20and\x20such\x20inputs\x20are\x20blocked.\x20'+'Raw\x20amounts\x20must\x20be\x20plain\x20non-negative\x20integers;\x20a\x20decimal\x20value\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22)\x20is\x20rejected\x20—\x20append\x20the\x20symbol\x20(\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20converts\x20it.\x20'+'Default\x20token:\x20WOW\x20(9\x20decimals,\x201\x20WOW\x20=\x2010^9\x20MIST).\x20'+'For\x20custom\x20tokens:\x20use\x20display\x20format\x20with\x20the\x20token\x27s\x20symbol,\x20or\x20pass\x20smallest\x20units\x20directly.\x20'+'MONEY\x20CONFIRMATION:\x20all\x20monetary\x20fields\x20trigger\x20user\x20confirmation\x20via\x20the\x20Fund\x20Processing\x20Layer,\x20where\x20the\x20token\x27s\x20FULL\x20type,\x20decimals\x20and\x20raw\x20amount\x20are\x20always\x20visible.\x20'+'MULTIPLE\x20ISSUERS:\x20several\x20on-chain\x20tokens\x20may\x20legally\x20share\x20the\x20same\x20symbol\x20(e.g.\x20multiple\x20\x22USDT\x22\x20coins).\x20When\x20a\x20bare\x20symbol\x20matches\x20more\x20than\x20one\x20token,\x20the\x20operation\x20is\x20BLOCKED\x20and\x20every\x20candidate\x20is\x20listed\x20with\x20full\x20details\x20(type,\x20name,\x20decimals,\x20verified\x20tag)\x20—\x20present\x20the\x20list\x20to\x20the\x20USER\x20and\x20let\x20them\x20choose\x20(they\x20may\x20answer\x20by\x20number),\x20then\x20re-issue\x20with\x20the\x20chosen\x20token\x27s\x20FULL\x20type\x20string\x20in\x20type_parameter;\x20never\x20guess\x20an\x20issuer\x20from\x20the\x20bare\x20symbol.\x20'+'MISSING\x20TOKEN\x20INFO:\x20when\x20a\x20token\x27s\x20precision\x20cannot\x20be\x20resolved,\x20the\x20operation\x20is\x20REFUSED\x20(raw\x20u64\x20included\x20—\x20amount\x20magnitude\x20could\x20not\x20be\x20verified).\x20Recovery:\x20provide\x20the\x20token\x27s\x20FULL\x20type\x20in\x20package::module::Name\x20form\x20in\x20type_parameter\x20(a\x20bare\x20symbol\x20like\x20\x22USDT\x22\x20cannot\x20be\x20resolved),\x20and\x20verify\x20the\x20WOW\x20network\x20is\x20correct.\x20'+'Examples:\x20\x222.5WOW\x22\x20(display\x20→\x202500000000),\x2010000000000\x20(number,\x20smallest\x20unit),\x20\x2250000000000\x22\x20(string,\x20smallest\x20unit).\x20'+'Used\x20for:\x20Service.sale.price,\x20Service.compensation_fund_add\x20balance,\x20Treasury.deposit,\x20Arbitration.fee,\x20Reward.amount,\x20stock\x20quantities.');export const QueryIdSchema=z['number']()['int']()['min'](0x0)['describe']('Query\x20ID');export const CacheExpireTypeSchema=z['union']([z['number'](),z['literal']('INFINITE')])['describe']('Cache\x20expiration\x20time\x20type');export const ValueContainerSchema=z['lazy'](()=>z['object']({'valueType':ValueTypeSchema['describe']('Value\x20type'),'value':SupportedValueSchema['describe']('Value')})['strict']()['describe']('Value\x20container\x20with\x20type\x20and\x20value'));export const SupportedValueUserSchema=z['union']([z['boolean'](),z['union']([AccountOrMark_AddressSchema,z['string']()]),z['string'](),z['number'](),z['array'](z['boolean']()),z['union']([ManyAccountOrMark_AddressSchema,z['array'](z['string']())]),z['array'](z['string']()),z['array'](z['number']()),z['array'](z['array'](z['number']()))])['describe']('User\x20available\x20supported\x20value\x20type');export const SupportedValueSchema=SupportedValueUserSchema['or'](ValueContainerSchema)['describe']('Supported\x20value\x20type');export const GuardIdentifierSchema=z['number']()['int']()['min'](0x0)['max'](0xff)['describe']('Identifier\x20(0-255)\x20for\x20data\x20lookup\x20in\x20Guard\x20table.');export const GuardTableItemBaseSchema=z['object']({'identifier':GuardIdentifierSchema,'b_submission':z['boolean']()['describe']('Whether\x20this\x20table\x20item\x27s\x20value\x20is\x20submitted\x20dynamically\x20at\x20Guard\x20trigger\x20time\x20(alloc_by_guard\x20call).\x20'+'\x0a\x0a'+'true\x20=\x20value\x20is\x20submitted\x20by\x20the\x20caller\x20when\x20triggering\x20the\x20Guard.\x20'+'Use\x20for\x20runtime-context-dependent\x20values\x20like\x20order\x20address,\x20user\x20address.\x20'+'The\x20\x27value\x27\x20field\x20is\x20ignored\x20when\x20b_submission=true;\x20the\x20caller\x20must\x20provide\x20it\x20via\x20submissions[].\x20'+'\x0a\x0a'+'false\x20=\x20value\x20is\x20static,\x20set\x20at\x20Guard\x20creation\x20time.\x20'+'Use\x20for\x20values\x20known\x20when\x20the\x20Guard\x20is\x20created:\x20expected\x20node\x20names,\x20expected\x20merchant\x20address,\x20expected\x20service\x20address.\x20'+'The\x20\x27value\x27\x20field\x20must\x20be\x20populated\x20and\x20will\x20be\x20stored\x20on-chain\x20permanently.\x20'+'\x0a\x0a'+'Rule\x20of\x20thumb:\x20if\x20the\x20value\x20is\x20the\x20SAME\x20for\x20all\x20future\x20Guard\x20triggers,\x20use\x20false.\x20'+'If\x20the\x20value\x20DIFFERS\x20per\x20trigger\x20(e.g.,\x20which\x20order\x20to\x20release\x20funds\x20for),\x20use\x20true.'),'value_type':ValueTypeUserSchema['describe']('Type\x20of\x20the\x20value\x20stored\x20in\x20`value`.\x20One\x20of:\x20Bool(0),\x20Address(1),\x20String(2),\x20U8(3),\x20U16(4),\x20U32(5),\x20U64(6),\x20U128(7),\x20U256(8),\x20VecBool(9),\x20VecAddress(10),\x20VecString(11),\x20VecU8(12),\x20VecU16(13),\x20VecU32(14),\x20VecU64(15),\x20VecU128(16),\x20VecU256(17),\x20VecVecU8(18).\x20'+'When\x20value_type=Address\x20(1),\x20the\x20`value`\x20field\x20accepts\x20a\x20hex\x20address\x20string,\x20a\x20LocalMark\x20name,\x20or\x20an\x20AccountOrMark_Address\x20object\x20—\x20see\x20`value`\x20field\x20description\x20for\x20details.'),'value':SupportedValueUserSchema['optional']()['describe']('The\x20actual\x20value\x20data.\x20Format\x20depends\x20on\x20`value_type`:\x0a'+'•\x20Bool:\x20true/false\x20(boolean)\x0a'+'•\x20Address\x20(CRITICAL\x20—\x20string\x20\x27Address\x27\x20is\x20NOT\x20a\x20placeholder):\x20a\x20hex\x20address\x20(e.g.\x20\x270x1234...\x27),\x20a\x20LocalMark\x20name\x20(e.g.\x20\x27my-service\x27\x20—\x20resolved\x20to\x20address\x20at\x20evaluation\x20time),\x20an\x20AccountOrMark_Address\x20object\x20(e.g.\x20{name_or_address:\x27my-service\x27}),\x20or\x20system\x20shorthand\x20(\x270xaaa\x27\x20=\x20EntityLinker,\x20\x270xaab\x27\x20=\x20EntityRegistrar).\x20The\x20literal\x20string\x20\x27Address\x27\x20itself\x20is\x20INVALID\x20—\x20it\x20would\x20be\x20treated\x20as\x20a\x20non-existent\x20LocalMark\x20name\x20and\x20fail.\x20Example:\x20value=\x270x2::wow::WOW<address>\x27\x20or\x20value=\x27my-permission\x27.\x0a'+'•\x20String:\x20any\x20string\x0a'+'•\x20U8/U16/U32/U64/U128/U256:\x20number\x20or\x20numeric\x20string\x20(e.g.\x2042\x20or\x20\x2742\x27)\x0a'+'•\x20Vec*\x20types:\x20arrays\x20of\x20the\x20corresponding\x20element\x20type\x0a'+'REQUIRED\x20when\x20b_submission=false.\x20OPTIONAL\x20when\x20b_submission=true\x20(value\x20is\x20supplied\x20at\x20evaluation\x20time\x20by\x20user\x20submission).'),'name':z['string']()['default']('')['describe']('Data\x20name\x20identifier.\x20MAX\x2064\x20BCS\x20characters\x20(Chinese\x20chars\x20count\x20as\x203-4\x20BCS\x20bytes\x20each).\x20'+'Use\x20short\x20identifiers\x20like\x20\x27order_id\x27,\x20\x27delivery_node\x27.\x20'+'Put\x20longer\x20descriptions\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20NOT\x20here.')})['strict']()['describe']('Guard\x20table\x20item\x20(INPUT/CREATION\x20form).\x20DO\x20NOT\x20include\x20`object_type`\x20field\x20—\x20it\x20is\x20query-output\x20only\x20and\x20will\x20be\x20rejected\x20here.');export const GuardTableItemSchema=GuardTableItemBaseSchema['extend']({'object_type':ObjectTypeSchema['optional']()['describe']('OUTPUT-ONLY\x20(query\x20side):\x20Object\x20type\x20when\x20value_type\x20is\x20Address\x20and\x20represents\x20a\x20specific\x20object.\x20Auto-derived\x20by\x20the\x20system\x20—\x20DO\x20NOT\x20set\x20this\x20field\x20at\x20Guard\x20creation.')})['strict']()['describe']('Guard\x20table\x20item\x20(QUERY/OUTPUT\x20form\x20—\x20includes\x20auto-derived\x20object_type\x20field)');export const EntrypointSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet'],ENTRYPOINT['Mainnet']])['describe']('Network\x20entrypoint:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on.\x20'+'FIX-010\x20cross-network\x20note:\x20LocalMark\x20names\x20are\x20scoped\x20per\x20network\x20(testnet\x20marks\x20are\x20invisible\x20on\x20mainnet\x20and\x20vice\x20versa).\x20'+'When\x20migrating\x20from\x20testnet\x20to\x20mainnet,\x20recreate\x20all\x20objects\x20on\x20mainnet\x20and\x20re-register\x20LocalMark\x20names\x20with\x20the\x20SAME\x20names\x20'+'to\x20keep\x20name-based\x20references\x20working\x20across\x20networks.\x20Recreate\x20all\x20objects\x20on\x20the\x20target\x20network\x20'+'via\x20onchain_operations\x20with\x20env.network=target_network,\x20then\x20re-register\x20the\x20LocalMark\x20names.');export const FaucetNetworkSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet']])['describe']('Network\x20entrypoint\x20for\x20Faucet:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on');export const ObjectBaseSchema=z['object']({'object':z['string']()['describe']('Object\x20ID'),'type':ObjectTypeSchema['optional']()['describe']('Object\x20type'),'type_raw':z['string']()['optional']()['describe']('Raw\x20object\x20type'),'owner':z['union']([ObjectOwnerSchema,z['null']()])['optional']()['describe']('Object\x20owner'),'version':z['union']([z['string'](),z['number']()])['optional']()['describe']('Object\x20version'),'previousTransaction':z['string']()['optional']()['describe']('Previous\x20transaction\x20ID'),'cache_expire':CacheExpireTypeSchema['optional']()['describe']('Cache\x20expiration\x20time'),'query_name':z['string']()['optional']()['describe']('Original\x20query\x20name\x20or\x20address\x20used\x20to\x20retrieve\x20this\x20object'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data\x20for\x20unknown\x20object\x20types'),'_guard_node_comments':z['array'](z['object']({'type':z['string'](),'description':z['string']()}))['optional']()['describe']('Additional\x20comments\x20for\x20Guard\x20node\x20instructions')})['passthrough']()['describe']('Object\x20base\x20information');export const QueryEnvSchema=z['object']({'no_cache':z['boolean']()['optional']()['describe']('Whether\x20to\x20disable\x20cache'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20environment\x20parameters');export const ReceivedBalanceObjectSchema=z['object']({'id':z['string']()['describe']('Received\x20CoinWrapper\x20object\x20ID'),'balance':BalanceTypeSchema,'payment':z['string']()['describe']('Payment\x20object\x20ID'),'type':z['string']()['optional']()['describe']('Type\x20of\x20the\x20received\x20object\x20(or\x20inner\x20coin\x20type);\x20used\x20for\x20token_type\x20detection'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20CoinWrapper\x20object\x20record');export const CoinWrapperTokenTypeSchema=z['string']()['refine'](a=>{const b=a['match'](/^CoinWrapper<(.+)>$/);if(b){const g=b[0x1];if(g===WOW_TOKEN_TYPE)return!![];const h=g['split']('::');if(h['length']!==0x3)return![];const [i,j,k]=h;if(!isValidWowAddress(i))return![];if(!isValidMoveIdentifier(j))return![];if(!isValidMoveIdentifier(k))return![];return!![];}if(a===WOW_TOKEN_TYPE)return!![];const c=a['split']('::');if(c['length']!==0x3)return![];const [d,e,f]=c;if(!isValidWowAddress(d))return![];if(!isValidMoveIdentifier(e))return![];if(!isValidMoveIdentifier(f))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>\x20or\x200x2::wow::WOW'})['describe']('Token\x20type\x20in\x20format:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>');export const ReceivedBalanceSchema=z['object']({'balance':BalanceTypeSchema,'token_type':CoinWrapperTokenTypeSchema['describe']('Asset\x20type\x20of\x20Coin\x20objects.\x20Supports\x20CoinWrapper<...>\x20format\x20for\x20order\x20receive\x20operations.'),'received':z['array'](ReceivedBalanceObjectSchema)['describe']('Received\x20records\x20of\x20Coin\x20objects')})['strict']()['describe']('Received\x20record\x20of\x20Coin\x20objects');export const ReceivedBalanceOrRecentlySchema=z['union']([ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20balance\x20record\x20or\x20all\x20recently\x20received\x20balance\x20record');export const ReceivedNormalSchema=z['object']({'id':z['string']()['nonempty']()['describe']('Received\x20object\x20ID'),'type':z['string']()['nonempty']()['describe']('Object\x20type'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20normal\x20object\x20record');export const ReceivedObjectsOrRecentlySchema=z['union']([z['array'](ReceivedNormalSchema),ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20object\x20records\x20or\x20all\x20recently\x20received\x20object\x20records');export const RECEIVE_FORMAT_BLOCK_OBJECTS='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20objects.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22withdraw\x20everything\x20the\x20object\x20has\x20received.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedNormal[]\x20(array)\x20—\x20explicit\x20list\x20of\x20received\x20objects\x20to\x20unwrap.\x0a'+'\x20\x20Use\x20this\x20when\x20you\x20want\x20to\x20receive\x20specific\x20objects\x20only\x20(not\x20all).\x0a'+'\x20\x20Example:\x20receive:\x20[{id:\x20\x270xobj1\x27,\x20type:\x20\x270x2::coin::Coin<0x2::wow::WOW>\x27}]\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20balance\x20record\x20from\x20a\x20specific\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20for\x20precise\x20balance\x20targeting\x20(advanced\x20—\x20usually\x20after\x20querying\x0a'+'\x20\x20the\x20object\x27s\x20received\x20history\x20via\x20query_received).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const RECEIVE_FORMAT_BLOCK_BALANCE='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20balance.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22deposit\x20all\x20recently\x20received\x20coins\x20into\x20pending\x20balance.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20specific\x20balance\x20record\x20from\x20a\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20when\x20targeting\x20a\x20specific\x20received\x20balance\x20(advanced).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const QueryReceivedResultSchema=z['object']({'result':z['union']([ReceivedBalanceSchema,z['array'](ReceivedNormalSchema)])['describe']('Received\x20CoinWrapper\x20object\x20record\x20or\x20received\x20other\x20objects\x20array')})['strict']()['describe']('Query\x20received\x20result');
|
|
1
|
+
import{z}from'zod';import{isValidAddress,ValueType as a278a,ObjectType as a278b,ENTRYPOINT,isValidWowAddress,isValidName,isValidDescription,MAX_DESCRIPTION_LENGTH,isValidLongName,MAX_LONG_NAME_LENGTH}from'@wowok/wowok';const isValidMoveIdentifier=a=>{if(a['length']===0x0)return![];const b=a[0x0];if(b==='_')return a['length']>0x1&&/^[a-zA-Z0-9_]+$/['test'](a['slice'](0x1));if(/^[a-zA-Z]$/['test'](b))return/^[a-zA-Z0-9_]*$/['test'](a['slice'](0x1));return![];};export const DescriptionSchema=z['string']()['trim']()['refine'](isValidDescription,{'message':'Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)'})['describe']('Description\x20string\x20(max\x20'+MAX_DESCRIPTION_LENGTH+'\x20bcs\x20characters)');export const LongNameSchema=z['string']()['refine'](isValidLongName,{'message':'max\x20'+MAX_LONG_NAME_LENGTH+'\x20bcs\x20characters'});export const WowAddressSchema=z['string']()['refine'](isValidAddress,{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix\x20followed\x20by\x2064\x20hex\x20characters'})['describe']('Valid\x20ID:\x200x\x20prefix\x20+\x2064\x20hex\x20characters,\x20or\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)');const WOW_TOKEN_TYPE='0x2::wow::WOW';export const TokenTypeSchema=z['string']()['refine'](a=>{if(a===WOW_TOKEN_TYPE)return!![];const b=a['split']('::');if(b['length']!==0x3)return![];const [c,d,e]=b;if(!isValidWowAddress(c))return![];if(!isValidMoveIdentifier(d))return![];if(!isValidMoveIdentifier(e))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20{address}::{module}::{struct}\x20where\x20address\x20is\x200x+64hex,\x20module/struct\x20are\x20valid\x20Move\x20identifiers,\x20or\x20\x270x2::wow::WOW\x27'})['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20e.g.\x20\x270x2::wow::WOW\x27\x20(WOW),\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.');export const TokenTypeWithDefaultSchema=TokenTypeSchema['default'](WOW_TOKEN_TYPE)['describe']('Token\x20type\x20in\x20format:\x20{address}::{module}::{struct}.\x20Default:\x20\x270x2::wow::WOW\x27.\x20Other\x20examples:\x20\x270x...::usdt::USDT\x27\x20(USDT),\x20\x270x...::eth::ETH\x27\x20(ETH).\x20To\x20discover\x20all\x20available\x20tokens\x20and\x20their\x20type\x20tags,\x20query\x20\x27mainnet\x20bridge\x20tokens\x27\x20via\x20wowok_buildin_info\x20and\x20use\x20the\x20returned\x20`wowTypeTag`\x20here.');export const NameSchema=z['string']()['refine'](isValidName,'Name\x20string\x20(max\x2064\x20bcs\x20characters,\x20must\x20not\x20start\x20with\x20\x270x\x27)');export const NotEmptyNameSchema=z['string']()['nonempty']()['refine'](isValidName,'Name\x20string\x20(at\x20least\x201\x20character,\x20max\x20length\x2064\x20bcs\x20characters)');export const NameOrAddressSchema=z['string']()['refine'](a=>{if(isValidAddress(a))return!![];if(isValidName(a))return!![];return![];},{'message':'Invalid\x20ID\x20format:\x20must\x20be\x20\x270x\x27\x20prefix,\x20or\x20a\x20builtin\x20ID\x20(0x5-0x9,\x200xa,\x200xc,\x200xd,\x200x403,\x200xaaa,\x200xaab,\x200xacc)'})['describe']('Account/Object\x20name\x20or\x20ID.\x20If\x20specifying\x20an\x20account,\x20use\x20empty\x20string\x20\x27\x27\x20for\x20the\x20default\x20account.\x20'+'If\x20it\x20starts\x20with\x20\x270x\x27,\x20it\x20will\x20be\x20treated\x20as\x20an\x20ID.\x20'+'Otherwise,\x20it\x20will\x20be\x20treated\x20as\x20a\x20name\x20(max\x2064\x20bcs\x20characters).');export const AccountOrMark_AddressSchema=z['object']({'name_or_address':NameOrAddressSchema['optional'](),'local_mark_first':z['boolean']()['optional']()['describe']('Whether\x20to\x20prioritize\x20local\x20marks,\x20if\x20true,\x20prioritize\x20local\x20marks,\x20otherwise\x20prioritize\x20global\x20marks')})['strict']()['describe']('Account\x20or\x20address\x20lookup\x20object.\x20Use\x20this\x20to\x20specify\x20which\x20account\x20to\x20use\x20for\x20an\x20operation.\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x27testor2\x27\x20}\x20-\x20looks\x20up\x20account\x20by\x20name;\x20'+'EXAMPLE:\x20{\x20name_or_address:\x20\x270x1234...\x27\x20}\x20-\x20uses\x20address\x20directly;\x20'+'If\x20name_or_address\x20is\x20empty\x20string\x20\x27\x27,\x20uses\x20the\x20default\x20local\x20account.');export const ManyAccountOrMark_AddressSchema=z['object']({'entities':z['array'](AccountOrMark_AddressSchema),'check_all_founded':z['boolean']()['optional']()['describe']('Whether\x20to\x20check\x20all\x20entities\x20are\x20found,\x20if\x20true,\x20all\x20entities\x20must\x20be\x20found\x20(abort\x20and\x20throw\x20exception\x20if\x20any\x20ID\x20not\x20found);\x20if\x20false,\x20only\x20return\x20found\x20IDs')})['strict']()['describe']('Used\x20to\x20batch\x20find\x20account\x20or\x20object\x20IDs\x20by\x20name');export const AccountOrMark_AddressAISchema=z['union']([NameOrAddressSchema['transform'](a=>({'name_or_address':a,'local_mark_first':!![]}))['describe']('Account\x20name,\x20address\x20(0x...),\x20or\x20mark\x20name.\x20'+'When\x20using\x20string\x20format,\x20local\x20marks\x20are\x20searched\x20first.\x20'+'EXAMPLE:\x20\x27alice\x27\x20-\x20searches\x20local\x20marks\x20first,\x20then\x20global;\x20'+'EXAMPLE:\x20\x270x2...\x27\x20(64\x20hex\x20chars)\x20-\x20uses\x20address\x20directly;\x20'+'EXAMPLE:\x20\x27\x27\x20-\x20uses\x20the\x20default\x20local\x20account'),AccountOrMark_AddressSchema])['describe']('Account\x20or\x20address\x20lookup.\x20Can\x20be\x20a\x20simple\x20string\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20local_mark_first\x20control.\x20'+'String\x20form\x20auto-converts\x20to\x20{\x20name_or_address:\x20<string>,\x20local_mark_first:\x20true\x20}.');export const ManyAccountOrMark_AddressAISchema=z['union']([z['array'](NameOrAddressSchema)['transform'](a=>({'entities':a['map'](b=>({'name_or_address':b,'local_mark_first':!![]})),'check_all_founded':!![]}))['describe']('Array\x20of\x20account\x20names,\x20addresses,\x20or\x20mark\x20names.\x20'+'Local\x20marks\x20are\x20searched\x20first\x20for\x20each\x20entry.\x20'+'EXAMPLE:\x20[\x27alice\x27,\x20\x270x2...\x27,\x20\x27bob\x27]'),ManyAccountOrMark_AddressSchema])['describe']('Batch\x20account\x20or\x20address\x20lookup.\x20Can\x20be\x20an\x20array\x20of\x20strings\x20(recommended\x20for\x20AI)\x20'+'or\x20full\x20object\x20with\x20explicit\x20control.\x20'+'Array\x20form\x20auto-converts\x20to\x20{\x20entities:\x20[...],\x20check_all_founded:\x20true\x20}.');export const ObjectOwnerSchema=z['union']([z['object']({'AddressOwner':z['string']()['describe']('Address\x20owner')})['strict'](),z['object']({'ObjectOwner':z['string']()['describe']('Object\x20owner')})['strict'](),z['object']({'Shared':z['object']({'initial_shared_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20became\x20shared')})['strict']()['describe']('Shared\x20object')})['strict'](),z['literal']('Immutable'),z['object']({'ConsensusAddressOwner':z['object']({'owner':z['string']()['describe']('Consensus\x20ID\x20owner'),'start_version':z['union']([z['string'](),z['number']()])['describe']('Version\x20when\x20object\x20recently\x20became\x20consensus\x20object')})['strict']()['describe']('Consensus\x20ID\x20owner')})['strict']()])['describe']('Object\x20owner');export const ValueTypeUserSchema=z['union']([z['literal'](a278a['Bool'])['describe']('Bool\x20(0)'),z['literal'](a278a['Address'])['describe']('Address\x20(1)'),z['literal'](a278a['String'])['describe']('String\x20(2)'),z['literal'](a278a['U8'])['describe']('U8\x20(3)'),z['literal'](a278a['U16'])['describe']('U16\x20(4)'),z['literal'](a278a['U32'])['describe']('U32\x20(5)'),z['literal'](a278a['U64'])['describe']('U64\x20(6)'),z['literal'](a278a['U128'])['describe']('U128\x20(7)'),z['literal'](a278a['U256'])['describe']('U256\x20(8)'),z['literal'](a278a['VecBool'])['describe']('VecBool\x20(9)'),z['literal'](a278a['VecAddress'])['describe']('VecAddress\x20(10)'),z['literal'](a278a['VecString'])['describe']('VecString\x20(11)'),z['literal'](a278a['VecU8'])['describe']('VecU8\x20(12)'),z['literal'](a278a['VecU16'])['describe']('VecU16\x20(13)'),z['literal'](a278a['VecU32'])['describe']('VecU32\x20(14)'),z['literal'](a278a['VecU64'])['describe']('VecU64\x20(15)'),z['literal'](a278a['VecU128'])['describe']('VecU128\x20(16)'),z['literal'](a278a['VecU256'])['describe']('VecU256\x20(17)'),z['literal'](a278a['VecVecU8'])['describe']('VecVecU8\x20(18)'),z['literal']('Bool')['describe']('Bool'),z['literal']('Address')['describe']('Address'),z['literal']('String')['describe']('String'),z['literal']('U8')['describe']('U8'),z['literal']('U16')['describe']('U16'),z['literal']('U32')['describe']('U32'),z['literal']('U64')['describe']('U64'),z['literal']('U128')['describe']('U128'),z['literal']('U256')['describe']('U256'),z['literal']('VecBool')['describe']('VecBool'),z['literal']('VecAddress')['describe']('VecAddress'),z['literal']('VecString')['describe']('VecString'),z['literal']('VecU8')['describe']('VecU8'),z['literal']('VecU16')['describe']('VecU16'),z['literal']('VecU32')['describe']('VecU32'),z['literal']('VecU64')['describe']('VecU64'),z['literal']('VecU128')['describe']('VecU128'),z['literal']('VecU256')['describe']('VecU256'),z['literal']('VecVecU8')['describe']('VecVecU8'),z['literal']('bool')['describe']('bool'),z['literal']('address')['describe']('address'),z['literal']('string')['describe']('string'),z['literal']('u8')['describe']('u8'),z['literal']('u16')['describe']('u16'),z['literal']('u32')['describe']('u32'),z['literal']('u64')['describe']('u64'),z['literal']('u128')['describe']('u128'),z['literal']('u256')['describe']('u256'),z['literal']('vecbool')['describe']('vecbool'),z['literal']('vecaddress')['describe']('vecaddress'),z['literal']('vecstring')['describe']('vecstring'),z['literal']('vecu8')['describe']('vecu8'),z['literal']('vecu16')['describe']('vecu16'),z['literal']('vecu32')['describe']('vecu32'),z['literal']('vecu64')['describe']('vecu64'),z['literal']('vecu128')['describe']('vecu128'),z['literal']('vecu256')['describe']('vecu256'),z['literal']('vecvecu8')['describe']('vecvecu8')])['describe']('User\x20available\x20value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27\x20or\x20\x27u64\x27)');export const ValueTypeSchema=ValueTypeUserSchema['or'](z['literal'](a278a['Value'])['describe']('Value\x20(19)'))['or'](z['literal']('Value')['describe']('Value'))['describe']('Value\x20type\x20(number\x20or\x20string,\x20e.g.,\x206\x20or\x20\x27U64\x27)');export const ObjectTypeSchema=z['enum']([a278b['Permission'],a278b['Repository'],a278b['Arb'],a278b['Arbitration'],a278b['Service'],a278b['Machine'],a278b['Order'],a278b['Progress'],a278b['Payment'],a278b['Treasury'],a278b['Guard'],a278b['Demand'],a278b['Passport'],a278b['Allocation'],a278b['Resource'],a278b['Reward'],a278b['Discount'],a278b['EntityRegistrar'],a278b['EntityLinker'],a278b['Proof'],a278b['WReceivedObject'],a278b['Contact'],a278b['TableItem_ProgressHistory'],a278b['TableItem_PermissionPerm'],a278b['TableItem_DemandPresenter'],a278b['TableItem_MachineNode'],a278b['TableItem_TreasuryHistory'],a278b['TableItem_RepositoryData'],a278b['TableItem_RewardRecord'],a278b['TableItem_EntityLinker'],a278b['TableItem_AddressMark'],a278b['TableItem_EntityRegistrar']])['describe']('Wowok\x20object\x20type');export const BalanceTypeSchema=z['union']([z['number'](),z['string']()])['refine'](a=>{if(typeof a==='number')return Number['isSafeInteger'](a)&&a>=0x0;const b=a['trim']();if(/^\d+$/['test'](b))return!![];return/^(\d+(?:\.\d+)?)\s*([A-Za-z][A-Za-z0-9]*)$/['test'](b);},'Invalid\x20amount:\x20bare\x20decimal\x20values\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22,\x20\x220.1\x22)\x20are\x20rejected.\x20'+'Use\x20a\x20smallest-unit\x20non-negative\x20integer\x20string\x20(e.g.\x20\x222500000000\x22),\x20a\x20non-negative\x20safe-integer\x20number,\x20'+'or\x20a\x20display\x20string\x20with\x20the\x20token\x20symbol\x20(e.g.\x20\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20can\x20convert\x20it.')['describe']('A\x20coin/balance\x20amount.\x20Accepts\x20three\x20formats:\x20'+'(1)\x20DISPLAY\x20FORMAT\x20with\x20token\x20symbol:\x20\x222.5WOW\x22,\x20\x2210USDC\x22,\x20\x220.05WOW\x22\x20—\x20'+'auto-converted\x20to\x20smallest\x20units\x20via\x20the\x20Fund\x20Processing\x20Layer\x20(token\x20precision\x20resolved\x20'+'from\x20official\x20registry\x20→\x20cache\x20→\x20on-chain).\x20The\x20symbol\x20MUST\x20match\x20the\x20token\x27s\x20type_parameter.\x20'+'(2)\x20SMALLEST\x20UNIT\x20(numeric\x20string):\x20\x2210000000000\x22\x20—\x20used\x20as-is,\x20no\x20conversion.\x20'+'(3)\x20SMALLEST\x20UNIT\x20(number):\x2010000000000\x20—\x20used\x20as-is\x20only\x20within\x20the\x20safe\x20integer\x20range\x20(±2^53);\x20numbers\x20outside\x20it\x20are\x20REJECTED,\x20use\x20a\x20numeric\x20string\x20instead.\x20'+'PRECISION\x20RULE:\x20for\x20values\x20exceeding\x202^53\x20(9007199254740991),\x20ALWAYS\x20use\x20format\x20(1)\x20or\x20(2)\x20—\x20JS\x20numbers\x20lose\x20integer\x20precision\x20silently\x20and\x20such\x20inputs\x20are\x20blocked.\x20'+'Raw\x20amounts\x20must\x20be\x20plain\x20non-negative\x20integers;\x20a\x20decimal\x20value\x20without\x20a\x20token\x20symbol\x20(e.g.\x20\x222.5\x22)\x20is\x20rejected\x20—\x20append\x20the\x20symbol\x20(\x222.5WOW\x22)\x20so\x20the\x20Fund\x20Processing\x20Layer\x20converts\x20it.\x20'+'Default\x20token:\x20WOW\x20(9\x20decimals,\x201\x20WOW\x20=\x2010^9\x20MIST).\x20'+'For\x20custom\x20tokens:\x20use\x20display\x20format\x20with\x20the\x20token\x27s\x20symbol,\x20or\x20pass\x20smallest\x20units\x20directly.\x20'+'MONEY\x20CONFIRMATION:\x20all\x20monetary\x20fields\x20trigger\x20user\x20confirmation\x20via\x20the\x20Fund\x20Processing\x20Layer,\x20where\x20the\x20token\x27s\x20FULL\x20type,\x20decimals\x20and\x20raw\x20amount\x20are\x20always\x20visible.\x20'+'MULTIPLE\x20ISSUERS:\x20several\x20on-chain\x20tokens\x20may\x20legally\x20share\x20the\x20same\x20symbol\x20(e.g.\x20multiple\x20\x22USDT\x22\x20coins).\x20When\x20a\x20bare\x20symbol\x20matches\x20more\x20than\x20one\x20token,\x20the\x20operation\x20is\x20BLOCKED\x20and\x20every\x20candidate\x20is\x20listed\x20with\x20full\x20details\x20(type,\x20name,\x20decimals,\x20verified\x20tag)\x20—\x20present\x20the\x20list\x20to\x20the\x20USER\x20and\x20let\x20them\x20choose\x20(they\x20may\x20answer\x20by\x20number),\x20then\x20re-issue\x20with\x20the\x20chosen\x20token\x27s\x20FULL\x20type\x20string\x20in\x20type_parameter;\x20never\x20guess\x20an\x20issuer\x20from\x20the\x20bare\x20symbol.\x20'+'MISSING\x20TOKEN\x20INFO:\x20when\x20a\x20token\x27s\x20precision\x20cannot\x20be\x20resolved,\x20the\x20operation\x20is\x20REFUSED\x20(raw\x20u64\x20included\x20—\x20amount\x20magnitude\x20could\x20not\x20be\x20verified).\x20Recovery:\x20provide\x20the\x20token\x27s\x20FULL\x20type\x20in\x20package::module::Name\x20form\x20in\x20type_parameter\x20(a\x20bare\x20symbol\x20like\x20\x22USDT\x22\x20cannot\x20be\x20resolved),\x20and\x20verify\x20the\x20WOW\x20network\x20is\x20correct.\x20'+'Examples:\x20\x222.5WOW\x22\x20(display\x20→\x202500000000),\x2010000000000\x20(number,\x20smallest\x20unit),\x20\x2250000000000\x22\x20(string,\x20smallest\x20unit).\x20'+'Used\x20for:\x20Service.sale.price,\x20Service.compensation_fund_add\x20balance,\x20Treasury.deposit,\x20Arbitration.fee,\x20Reward.amount,\x20stock\x20quantities.');export const QueryIdSchema=z['number']()['int']()['min'](0x0)['describe']('Query\x20ID');export const CacheExpireTypeSchema=z['union']([z['number'](),z['literal']('INFINITE')])['describe']('Cache\x20expiration\x20time\x20type');export const ValueContainerSchema=z['lazy'](()=>z['object']({'valueType':ValueTypeSchema['describe']('Value\x20type'),'value':SupportedValueSchema['describe']('Value')})['strict']()['describe']('Value\x20container\x20with\x20type\x20and\x20value'));export const SupportedValueUserSchema=z['union']([z['boolean'](),z['union']([AccountOrMark_AddressSchema,z['string']()]),z['string'](),z['number'](),z['array'](z['boolean']()),z['union']([ManyAccountOrMark_AddressSchema,z['array'](z['string']())]),z['array'](z['string']()),z['array'](z['number']()),z['array'](z['array'](z['number']()))])['describe']('User\x20available\x20supported\x20value\x20type');export const SupportedValueSchema=SupportedValueUserSchema['or'](ValueContainerSchema)['describe']('Supported\x20value\x20type');export const GuardIdentifierSchema=z['number']()['int']()['min'](0x0)['max'](0xff)['describe']('Identifier\x20(0-255)\x20for\x20data\x20lookup\x20in\x20Guard\x20table.');export const GuardTableItemBaseSchema=z['object']({'identifier':GuardIdentifierSchema,'b_submission':z['boolean']()['describe']('Whether\x20this\x20table\x20item\x27s\x20value\x20is\x20submitted\x20dynamically\x20at\x20Guard\x20trigger\x20time\x20(alloc_by_guard\x20call).\x20'+'\x0a\x0a'+'true\x20=\x20value\x20is\x20submitted\x20by\x20the\x20caller\x20when\x20triggering\x20the\x20Guard.\x20'+'Use\x20for\x20runtime-context-dependent\x20values\x20like\x20order\x20address,\x20user\x20address.\x20'+'The\x20\x27value\x27\x20field\x20is\x20ignored\x20when\x20b_submission=true;\x20the\x20caller\x20must\x20provide\x20it\x20via\x20submissions[].\x20'+'\x0a\x0a'+'false\x20=\x20value\x20is\x20static,\x20set\x20at\x20Guard\x20creation\x20time.\x20'+'Use\x20for\x20values\x20known\x20when\x20the\x20Guard\x20is\x20created:\x20expected\x20node\x20names,\x20expected\x20merchant\x20address,\x20expected\x20service\x20address.\x20'+'The\x20\x27value\x27\x20field\x20must\x20be\x20populated\x20and\x20will\x20be\x20stored\x20on-chain\x20permanently.\x20'+'\x0a\x0a'+'Rule\x20of\x20thumb:\x20if\x20the\x20value\x20is\x20the\x20SAME\x20for\x20all\x20future\x20Guard\x20triggers,\x20use\x20false.\x20'+'If\x20the\x20value\x20DIFFERS\x20per\x20trigger\x20(e.g.,\x20which\x20order\x20to\x20release\x20funds\x20for),\x20use\x20true.'),'value_type':ValueTypeUserSchema['describe']('Type\x20of\x20the\x20value\x20stored\x20in\x20`value`.\x20One\x20of:\x20Bool(0),\x20Address(1),\x20String(2),\x20U8(3),\x20U16(4),\x20U32(5),\x20U64(6),\x20U128(7),\x20U256(8),\x20VecBool(9),\x20VecAddress(10),\x20VecString(11),\x20VecU8(12),\x20VecU16(13),\x20VecU32(14),\x20VecU64(15),\x20VecU128(16),\x20VecU256(17),\x20VecVecU8(18).\x20'+'When\x20value_type=Address\x20(1),\x20the\x20`value`\x20field\x20accepts\x20a\x20hex\x20address\x20string,\x20a\x20LocalMark\x20name,\x20or\x20an\x20AccountOrMark_Address\x20object\x20—\x20see\x20`value`\x20field\x20description\x20for\x20details.'),'value':SupportedValueUserSchema['optional']()['describe']('The\x20actual\x20value\x20data.\x20Format\x20depends\x20on\x20`value_type`:\x0a'+'•\x20Bool:\x20true/false\x20(boolean)\x0a'+'•\x20Address\x20(CRITICAL\x20—\x20string\x20\x27Address\x27\x20is\x20NOT\x20a\x20placeholder):\x20a\x20hex\x20address\x20(e.g.\x20\x270x1234...\x27),\x20a\x20LocalMark\x20name\x20(e.g.\x20\x27my-service\x27\x20—\x20resolved\x20to\x20address\x20at\x20evaluation\x20time),\x20an\x20AccountOrMark_Address\x20object\x20(e.g.\x20{name_or_address:\x27my-service\x27}),\x20or\x20system\x20shorthand\x20(\x270xaaa\x27\x20=\x20EntityLinker,\x20\x270xaab\x27\x20=\x20EntityRegistrar).\x20The\x20literal\x20string\x20\x27Address\x27\x20itself\x20is\x20INVALID\x20—\x20it\x20would\x20be\x20treated\x20as\x20a\x20non-existent\x20LocalMark\x20name\x20and\x20fail.\x20Example:\x20value=\x270x2::wow::WOW<address>\x27\x20or\x20value=\x27my-permission\x27.\x0a'+'•\x20String:\x20any\x20string\x0a'+'•\x20U8/U16/U32/U64/U128/U256:\x20number\x20or\x20numeric\x20string\x20(e.g.\x2042\x20or\x20\x2742\x27)\x0a'+'•\x20Vec*\x20types:\x20arrays\x20of\x20the\x20corresponding\x20element\x20type\x0a'+'REQUIRED\x20when\x20b_submission=false.\x20OPTIONAL\x20when\x20b_submission=true\x20(value\x20is\x20supplied\x20at\x20evaluation\x20time\x20by\x20user\x20submission).'),'name':z['string']()['default']('')['describe']('Data\x20name\x20identifier.\x20MAX\x2064\x20BCS\x20characters\x20(Chinese\x20chars\x20count\x20as\x203-4\x20BCS\x20bytes\x20each).\x20'+'Use\x20short\x20identifiers\x20like\x20\x27order_id\x27,\x20\x27delivery_node\x27.\x20'+'Put\x20longer\x20descriptions\x20in\x20the\x20Guard\x27s\x20\x27description\x27\x20field,\x20NOT\x20here.')})['strict']()['describe']('Guard\x20table\x20item\x20(INPUT/CREATION\x20form).\x20DO\x20NOT\x20include\x20`object_type`\x20field\x20—\x20it\x20is\x20query-output\x20only\x20and\x20will\x20be\x20rejected\x20here.');export const GuardTableItemSchema=GuardTableItemBaseSchema['extend']({'object_type':ObjectTypeSchema['optional']()['describe']('OUTPUT-ONLY\x20(query\x20side):\x20Object\x20type\x20when\x20value_type\x20is\x20Address\x20and\x20represents\x20a\x20specific\x20object.\x20Auto-derived\x20by\x20the\x20system\x20—\x20DO\x20NOT\x20set\x20this\x20field\x20at\x20Guard\x20creation.')})['strict']()['describe']('Guard\x20table\x20item\x20(QUERY/OUTPUT\x20form\x20—\x20includes\x20auto-derived\x20object_type\x20field)');export const EntrypointSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet'],ENTRYPOINT['Mainnet']])['describe']('Network\x20entrypoint:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on.\x20'+'FIX-010\x20cross-network\x20note:\x20LocalMark\x20names\x20are\x20scoped\x20per\x20network\x20(testnet\x20marks\x20are\x20invisible\x20on\x20mainnet\x20and\x20vice\x20versa).\x20'+'When\x20migrating\x20from\x20testnet\x20to\x20mainnet,\x20recreate\x20all\x20objects\x20on\x20mainnet\x20and\x20re-register\x20LocalMark\x20names\x20with\x20the\x20SAME\x20names\x20'+'to\x20keep\x20name-based\x20references\x20working\x20across\x20networks.\x20Recreate\x20all\x20objects\x20on\x20the\x20target\x20network\x20'+'via\x20onchain_operations\x20with\x20env.network=target_network,\x20then\x20re-register\x20the\x20LocalMark\x20names.');export const FaucetNetworkSchema=z['enum']([ENTRYPOINT['Localnet'],ENTRYPOINT['Testnet']])['describe']('Network\x20entrypoint\x20for\x20Faucet:\x20Specifies\x20which\x20network\x20the\x20operation\x20occurs\x20on');export const ObjectBaseSchema=z['object']({'object':z['string']()['describe']('Object\x20ID'),'type':ObjectTypeSchema['optional']()['describe']('Object\x20type'),'type_raw':z['string']()['optional']()['describe']('Raw\x20object\x20type'),'owner':z['union']([ObjectOwnerSchema,z['null']()])['optional']()['describe']('Object\x20owner'),'version':z['union']([z['string'](),z['number']()])['optional']()['describe']('Object\x20version'),'previousTransaction':z['string']()['optional']()['describe']('Previous\x20transaction\x20ID'),'cache_expire':CacheExpireTypeSchema['optional']()['describe']('Cache\x20expiration\x20time'),'query_name':z['string']()['optional']()['describe']('Original\x20query\x20name\x20or\x20address\x20used\x20to\x20retrieve\x20this\x20object'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data\x20for\x20unknown\x20object\x20types'),'_guard_node_comments':z['array'](z['object']({'type':z['string'](),'description':z['string']()}))['optional']()['describe']('Additional\x20comments\x20for\x20Guard\x20node\x20instructions')})['passthrough']()['describe']('Object\x20base\x20information');export const QueryEnvSchema=z['object']({'no_cache':z['boolean']()['optional']()['describe']('Whether\x20to\x20disable\x20cache'),'network':EntrypointSchema['optional']()})['strict']()['describe']('Query\x20environment\x20parameters');export const ReceivedBalanceObjectSchema=z['object']({'id':z['string']()['describe']('Received\x20CoinWrapper\x20object\x20ID'),'balance':BalanceTypeSchema,'payment':z['string']()['describe']('Payment\x20object\x20ID'),'type':z['string']()['optional']()['describe']('Type\x20of\x20the\x20received\x20object\x20(or\x20inner\x20coin\x20type);\x20used\x20for\x20token_type\x20detection'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20CoinWrapper\x20object\x20record');export const CoinWrapperTokenTypeSchema=z['string']()['refine'](a=>{const b=a['match'](/^CoinWrapper<(.+)>$/);if(b){const g=b[0x1];if(g===WOW_TOKEN_TYPE)return!![];const h=g['split']('::');if(h['length']!==0x3)return![];const [i,j,k]=h;if(!isValidWowAddress(i))return![];if(!isValidMoveIdentifier(j))return![];if(!isValidMoveIdentifier(k))return![];return!![];}if(a===WOW_TOKEN_TYPE)return!![];const c=a['split']('::');if(c['length']!==0x3)return![];const [d,e,f]=c;if(!isValidWowAddress(d))return![];if(!isValidMoveIdentifier(e))return![];if(!isValidMoveIdentifier(f))return![];return!![];},{'message':'Invalid\x20token\x20type\x20format.\x20Expected:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>\x20or\x200x2::wow::WOW'})['describe']('Token\x20type\x20in\x20format:\x20CoinWrapper<{address}::{module}::{struct}>\x20or\x20{address}::{module}::{struct}.\x20Example:\x20CoinWrapper<0x2::wow::WOW>');export const ReceivedBalanceSchema=z['object']({'balance':BalanceTypeSchema,'token_type':CoinWrapperTokenTypeSchema['describe']('Asset\x20type\x20of\x20Coin\x20objects.\x20Supports\x20CoinWrapper<...>\x20format\x20for\x20order\x20receive\x20operations.'),'received':z['array'](ReceivedBalanceObjectSchema)['describe']('Received\x20records\x20of\x20Coin\x20objects')})['strict']()['describe']('Received\x20record\x20of\x20Coin\x20objects');export const ReceivedBalanceOrRecentlySchema=z['union']([ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20balance\x20record\x20or\x20all\x20recently\x20received\x20balance\x20record');export const ReceivedNormalSchema=z['object']({'id':z['string']()['nonempty']()['describe']('Received\x20object\x20ID'),'type':z['string']()['nonempty']()['describe']('Object\x20type'),'content_raw':z['any']()['optional']()['describe']('Raw\x20content\x20data'),'version':z['string']()['optional']()['describe']('Object\x20version,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive'),'digest':z['string']()['optional']()['describe']('Object\x20digest,\x20required\x20to\x20build\x20a\x20Receiving<T>\x20argument\x20for\x20owner_receive')})['strict']()['describe']('Received\x20normal\x20object\x20record');export const ReceivedObjectsOrRecentlySchema=z['union']([z['array'](ReceivedNormalSchema),ReceivedBalanceSchema,z['literal']('recently')])['describe']('Specified\x20received\x20object\x20records\x20or\x20all\x20recently\x20received\x20object\x20records');export const RECEIVE_FORMAT_BLOCK_OBJECTS='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20objects.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22withdraw\x20everything\x20the\x20object\x20has\x20received.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedNormal[]\x20(array)\x20—\x20explicit\x20list\x20of\x20received\x20objects\x20to\x20unwrap.\x0a'+'\x20\x20Use\x20this\x20when\x20you\x20want\x20to\x20receive\x20specific\x20objects\x20only\x20(not\x20all).\x0a'+'\x20\x20Example:\x20receive:\x20[{id:\x20\x270xobj1\x27,\x20type:\x20\x270x2::coin::Coin<0x2::wow::WOW>\x27}]\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20balance\x20record\x20from\x20a\x20specific\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20for\x20precise\x20balance\x20targeting\x20(advanced\x20—\x20usually\x20after\x20querying\x0a'+'\x20\x20the\x20object\x27s\x20received\x20history\x20via\x20query_received).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const RECEIVE_FORMAT_BLOCK_BALANCE='\x0a\x0aACCEPTED\x20FORMATS\x20(F-06\x20unified\x20receive\x20operation\x20block):\x0a'+'•\x20\x27recently\x27\x20(string\x20literal)\x20—\x20auto-query\x20and\x20receive\x20ALL\x20recently\x20received\x20balance.\x0a'+'\x20\x20Use\x20this\x20for\x20the\x20common\x20case:\x20\x22deposit\x20all\x20recently\x20received\x20coins\x20into\x20pending\x20balance.\x22\x0a'+'\x20\x20Example:\x20receive:\x20\x27recently\x27\x0a'+'•\x20ReceivedBalance\x20({token_type,\x20balance,\x20received:\x20[{id,\x20balance,\x20payment}]})\x20—\x0a'+'\x20\x20receive\x20a\x20specific\x20balance\x20record\x20from\x20a\x20Payment/payer.\x0a'+'\x20\x20Use\x20this\x20when\x20targeting\x20a\x20specific\x20received\x20balance\x20(advanced).\x0a'+'\x20\x20Example:\x20receive:\x20{token_type:\x20\x270x2::wow::WOW\x27,\x20balance:\x201000000,\x20received:\x20[{id:\x20\x270xrec1\x27,\x20balance:\x201000000,\x20payment:\x20\x270xpay1\x27}]}\x0a'+'ANTI-PATTERN:\x20do\x20NOT\x20wrap\x20in\x20{result:\x20...}\x20—\x20pass\x20the\x20value\x20directly.';export const QueryReceivedResultSchema=z['object']({'result':z['union']([ReceivedBalanceSchema,z['array'](ReceivedNormalSchema)])['describe']('Received\x20CoinWrapper\x20object\x20record\x20or\x20received\x20other\x20objects\x20array')})['strict']()['describe']('Query\x20received\x20result');
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './persona/index.js';
|
|
|
14
14
|
export * from './intent-radar/index.js';
|
|
15
15
|
export * from './goal/index.js';
|
|
16
16
|
export * from './employee/index.js';
|
|
17
|
+
export * from './interaction/index.js';
|
|
17
18
|
export * from './schema-query/index.js';
|
|
18
19
|
export * from './industry-pack/index.js';
|
|
19
20
|
export * from './workspace/index.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from'./call/index.js';export*from'./query/index.js';export*from'./local/index.js';export*from'./messenger/index.js';export*from'./common/index.js';export*from'./operations.js';export*from'./utils/guard-parser.js';export*from'./utils/node-parser.js';export*from'./config/index.js';export*from'./trust/index.js';export*from'./evaluation/index.js';export*from'./watch/index.js';export*from'./persona/index.js';export*from'./intent-radar/index.js';export*from'./goal/index.js';export*from'./employee/index.js';export*from'./schema-query/index.js';export*from'./industry-pack/index.js';export*from'./workspace/index.js';export*from'./workflow/index.js';export*from'./permission/index.js';export*from'./keeper/index.js';export{MCP_SCHEMA_VERSION,getSchemaVersions,checkClientSchemaCompatibility,attachSchemaWarning}from'./schema-version.js';
|
|
1
|
+
export*from'./call/index.js';export*from'./query/index.js';export*from'./local/index.js';export*from'./messenger/index.js';export*from'./common/index.js';export*from'./operations.js';export*from'./utils/guard-parser.js';export*from'./utils/node-parser.js';export*from'./config/index.js';export*from'./trust/index.js';export*from'./evaluation/index.js';export*from'./watch/index.js';export*from'./persona/index.js';export*from'./intent-radar/index.js';export*from'./goal/index.js';export*from'./employee/index.js';export*from'./interaction/index.js';export*from'./schema-query/index.js';export*from'./industry-pack/index.js';export*from'./workspace/index.js';export*from'./workflow/index.js';export*from'./permission/index.js';export*from'./keeper/index.js';export{MCP_SCHEMA_VERSION,getSchemaVersions,checkClientSchemaCompatibility,attachSchemaWarning}from'./schema-version.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AskOptionIdSchema: z.ZodString;
|
|
3
|
+
export declare const AskUserOptionSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
label: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type AskUserOption = z.infer<typeof AskUserOptionSchema>;
|
|
9
|
+
export declare const AskUserInputSchema: z.ZodObject<{
|
|
10
|
+
question: z.ZodString;
|
|
11
|
+
options: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
recommended_id: z.ZodOptional<z.ZodString>;
|
|
17
|
+
multi_select: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
allow_freeform: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
context: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type AskUserInput = z.infer<typeof AskUserInputSchema>;
|
|
22
|
+
export declare const AskUserResultSchema: z.ZodObject<{
|
|
23
|
+
status: z.ZodLiteral<"success">;
|
|
24
|
+
action: z.ZodEnum<{
|
|
25
|
+
accept: "accept";
|
|
26
|
+
decline: "decline";
|
|
27
|
+
cancel: "cancel";
|
|
28
|
+
}>;
|
|
29
|
+
question: z.ZodString;
|
|
30
|
+
selected_ids: z.ZodArray<z.ZodString>;
|
|
31
|
+
selected_labels: z.ZodArray<z.ZodString>;
|
|
32
|
+
freeform_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type AskUserResult = z.infer<typeof AskUserResultSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from'zod';export const AskOptionIdSchema=z['string']()['trim']()['min'](0x1)['max'](0x28)['regex'](/^[a-z0-9][a-z0-9_]{0,39}$/i,'Option\x20id\x20must\x20be\x201-40\x20chars:\x20letters,\x20digits,\x20underscore');export const AskUserOptionSchema=z['object']({'id':AskOptionIdSchema['describe']('Stable\x20machine\x20id\x20returned\x20in\x20the\x20result\x20when\x20chosen\x20(e.g.\x20\x27strict_binding\x27).'),'label':z['string']()['trim']()['min'](0x1)['max'](0x78)['describe']('Short\x20user-visible\x20label\x20(a\x20few\x20words).'),'description':z['string']()['trim']()['max'](0x1f4)['optional']()['describe']('Optional\x20one-line\x20explanation\x20of\x20what\x20choosing\x20this\x20means.')});export const AskUserInputSchema=z['object']({'question':z['string']()['trim']()['min'](0x1)['max'](0x3e8)['describe']('The\x20single\x20decision\x20you\x20need\x20from\x20the\x20user.\x20Phrase\x20as\x20a\x20complete\x20question;\x20'+'use\x20the\x20user\x27s\x20language.\x20Do\x20NOT\x20stack\x20multiple\x20questions\x20into\x20one\x20call.'),'options':z['array'](AskUserOptionSchema)['min'](0x2)['max'](0x8)['describe']('Concrete\x20mutually-exclusive\x20choices\x20(or\x20combinable\x20choices\x20with\x20multi_select=true).\x20'+'Each\x20MUST\x20be\x20self-contained\x20—\x20the\x20user\x20decides\x20from\x20these\x20labels\x20alone.'),'recommended_id':AskOptionIdSchema['optional']()['describe']('id\x20of\x20the\x20option\x20you\x20recommend\x20(marked\x20as\x20suggested).\x20Must\x20match\x20one\x20of\x20options[].id.\x20'+'Omit\x20only\x20when\x20you\x20genuinely\x20have\x20no\x20recommendation.'),'multi_select':z['boolean']()['default'](![])['describe']('true\x20when\x20several\x20options\x20may\x20be\x20combined\x20(the\x20result\x20returns\x20an\x20id\x20array).'),'allow_freeform':z['boolean']()['default'](![])['describe']('true\x20to\x20additionally\x20allow\x20a\x20free-text\x20answer\x20not\x20covered\x20by\x20the\x20options.'),'context':z['string']()['trim']()['max'](0x320)['optional']()['describe']('Optional\x20short\x20explanation\x20of\x20WHY\x20this\x20decision\x20is\x20needed\x20and\x20what\x20each\x20path\x20'+'changes\x20—\x20shown\x20under\x20the\x20question,\x20never\x20instead\x20of\x20it.')})['strict']()['describe']('Ask\x20the\x20user\x20to\x20choose\x20between\x20concrete\x20options\x20before\x20continuing.');export const AskUserResultSchema=z['object']({'status':z['literal']('success'),'action':z['enum'](['accept','decline','cancel']),'question':z['string'](),'selected_ids':z['array'](z['string']()),'selected_labels':z['array'](z['string']()),'freeform_text':z['string']()['nullable']()['optional']()});
|