@wowok/agent-mcp 3.0.2 → 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/LICENSE +0 -3
- package/dist/harness/recover.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/knowledge/account-marks.js +1 -1
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/flywheel-loop.d.ts +4 -52
- package/dist/knowledge/flywheel-loop.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/index.d.ts +2 -225
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/order-ledger.d.ts +2 -2
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-puzzle.d.ts +4 -4
- package/dist/knowledge/order-puzzle.js +1 -1
- package/dist/knowledge/order-risk.d.ts +1 -0
- package/dist/knowledge/order-risk.js +1 -1
- package/dist/knowledge/order-templates.d.ts +1 -1
- package/dist/knowledge/order-templates.js +1 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/context-assembly.d.ts +3 -1
- package/dist/playbooks/service-build/context-assembly.js +1 -1
- package/dist/playbooks/service-build/machine-nodes.d.ts +2 -0
- package/dist/playbooks/service-build/machine-nodes.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.d.ts +7 -0
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/review/machine.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 +17 -3
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +29 -0
- package/dist/schema/call/bridge.js +1 -1
- package/dist/schema/call/contact.d.ts +5 -0
- package/dist/schema/call/demand.d.ts +5 -0
- package/dist/schema/call/error-codes.d.ts +2 -0
- package/dist/schema/call/error-codes.js +1 -0
- package/dist/schema/call/guard.d.ts +19 -4
- 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/semantic.d.ts +9 -1
- package/dist/schema/call/semantic.js +1 -1
- 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/goal/index.d.ts +3 -3
- package/dist/schema/goal/planning.d.ts +2 -2
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +4 -4
- package/dist/schema/industry-pack/modes.d.ts +4 -4
- package/dist/schema/interaction/index.d.ts +34 -0
- package/dist/schema/interaction/index.js +1 -0
- package/dist/schema/local/index.d.ts +558 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +31 -25
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +91 -1
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +2 -2
- package/dist/schema/query/bi.d.ts +0 -4
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/trust/index.d.ts +3 -3
- package/dist/schema/workspace/index.d.ts +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +4 -0
- package/dist/schemas/ask_user.output.json +54 -0
- package/dist/schemas/ask_user.schema.json +78 -0
- package/dist/schemas/bridge_operation.output.json +4 -0
- package/dist/schemas/bridge_operation.schema.json +50 -5
- package/dist/schemas/guard2file.schema.json +10 -1
- package/dist/schemas/index.json +13 -1
- package/dist/schemas/local_history_operation.output.json +1458 -0
- package/dist/schemas/local_history_operation.schema.json +105 -0
- package/dist/schemas/local_info_operation.output.json +4 -0
- package/dist/schemas/local_mark_operation.output.json +4 -0
- 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.output.json +4 -1
- package/dist/schemas/onchain_operations.schema.json +210 -28
- 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 +40 -11
- 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.output.json +17 -16
- 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/local.d.ts +1 -0
- package/dist/tools/handlers/local.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
- package/dist/knowledge/allocation-confirm.d.ts +0 -115
- package/dist/knowledge/allocation-confirm.js +0 -1
- package/dist/knowledge/allocation-context.d.ts +0 -58
- package/dist/knowledge/allocation-context.js +0 -1
- package/dist/knowledge/allocation-translation.d.ts +0 -72
- package/dist/knowledge/allocation-translation.js +0 -1
- package/dist/knowledge/arb-confirm.d.ts +0 -28
- package/dist/knowledge/arb-confirm.js +0 -1
- package/dist/knowledge/arb-translation.d.ts +0 -48
- package/dist/knowledge/arb-translation.js +0 -1
- package/dist/knowledge/arbitration-confirm.d.ts +0 -135
- package/dist/knowledge/arbitration-confirm.js +0 -1
- package/dist/knowledge/arbitration-context.d.ts +0 -81
- package/dist/knowledge/arbitration-context.js +0 -1
- package/dist/knowledge/arbitration-translation.d.ts +0 -91
- package/dist/knowledge/arbitration-translation.js +0 -1
- package/dist/knowledge/bridge-confirm.d.ts +0 -26
- package/dist/knowledge/bridge-confirm.js +0 -1
- package/dist/knowledge/bridge-translation.d.ts +0 -37
- package/dist/knowledge/bridge-translation.js +0 -1
- package/dist/knowledge/contact-confirm.d.ts +0 -27
- package/dist/knowledge/contact-confirm.js +0 -1
- package/dist/knowledge/contact-translation.d.ts +0 -39
- package/dist/knowledge/contact-translation.js +0 -1
- package/dist/knowledge/demand-confirm.d.ts +0 -32
- package/dist/knowledge/demand-confirm.js +0 -1
- package/dist/knowledge/demand-context.d.ts +0 -17
- package/dist/knowledge/demand-context.js +0 -1
- package/dist/knowledge/demand-ledger.d.ts +0 -26
- package/dist/knowledge/demand-ledger.js +0 -1
- package/dist/knowledge/demand-puzzle.d.ts +0 -29
- package/dist/knowledge/demand-puzzle.js +0 -1
- package/dist/knowledge/demand-templates.d.ts +0 -12
- package/dist/knowledge/demand-templates.js +0 -1
- package/dist/knowledge/demand-translation.d.ts +0 -55
- package/dist/knowledge/demand-translation.js +0 -1
- package/dist/knowledge/examples-scanner-cli.d.ts +0 -1
- package/dist/knowledge/examples-scanner-cli.js +0 -1
- package/dist/knowledge/examples-scanner.d.ts +0 -121
- package/dist/knowledge/examples-scanner.js +0 -1
- package/dist/knowledge/glossary.d.ts +0 -18
- package/dist/knowledge/glossary.js +0 -1
- package/dist/knowledge/guard-bytecode-spec.d.ts +0 -82
- package/dist/knowledge/guard-bytecode-spec.js +0 -1
- package/dist/knowledge/guard-confirm.d.ts +0 -86
- package/dist/knowledge/guard-confirm.js +0 -1
- package/dist/knowledge/immutability.d.ts +0 -11
- package/dist/knowledge/immutability.js +0 -1
- package/dist/knowledge/machine-confirm.d.ts +0 -102
- package/dist/knowledge/machine-confirm.js +0 -1
- package/dist/knowledge/machine-context.d.ts +0 -160
- package/dist/knowledge/machine-context.js +0 -1
- package/dist/knowledge/machine-render.d.ts +0 -41
- package/dist/knowledge/machine-render.js +0 -1
- package/dist/knowledge/mcp-schema-audit-cli.d.ts +0 -1
- package/dist/knowledge/mcp-schema-audit-cli.js +0 -1
- package/dist/knowledge/mcp-schema-audit.d.ts +0 -91
- package/dist/knowledge/mcp-schema-audit.js +0 -1
- package/dist/knowledge/messenger-guard-guidance.d.ts +0 -17
- package/dist/knowledge/messenger-guard-guidance.js +0 -1
- package/dist/knowledge/order-confirm.d.ts +0 -115
- package/dist/knowledge/order-confirm.js +0 -1
- package/dist/knowledge/order-context.d.ts +0 -66
- package/dist/knowledge/order-context.js +0 -1
- package/dist/knowledge/order-translation.d.ts +0 -78
- package/dist/knowledge/order-translation.js +0 -1
- package/dist/knowledge/overrides-loader.d.ts +0 -13
- package/dist/knowledge/overrides-loader.js +0 -1
- package/dist/knowledge/passport-confirm.d.ts +0 -130
- package/dist/knowledge/passport-confirm.js +0 -1
- package/dist/knowledge/passport-context.d.ts +0 -59
- package/dist/knowledge/passport-context.js +0 -1
- package/dist/knowledge/passport-puzzle.d.ts +0 -108
- package/dist/knowledge/passport-puzzle.js +0 -1
- package/dist/knowledge/passport-risk.d.ts +0 -70
- package/dist/knowledge/passport-risk.js +0 -1
- package/dist/knowledge/passport-translation.d.ts +0 -68
- package/dist/knowledge/passport-translation.js +0 -1
- package/dist/knowledge/payment-confirm.d.ts +0 -26
- package/dist/knowledge/payment-confirm.js +0 -1
- package/dist/knowledge/payment-translation.d.ts +0 -37
- package/dist/knowledge/payment-translation.js +0 -1
- package/dist/knowledge/permission-confirm.d.ts +0 -110
- package/dist/knowledge/permission-confirm.js +0 -1
- package/dist/knowledge/permission-context.d.ts +0 -69
- package/dist/knowledge/permission-context.js +0 -1
- package/dist/knowledge/permission-translation.d.ts +0 -57
- package/dist/knowledge/permission-translation.js +0 -1
- package/dist/knowledge/personal-confirm.d.ts +0 -29
- package/dist/knowledge/personal-confirm.js +0 -1
- package/dist/knowledge/personal-translation.d.ts +0 -37
- package/dist/knowledge/personal-translation.js +0 -1
- package/dist/knowledge/process-model.d.ts +0 -14
- package/dist/knowledge/process-model.js +0 -1
- package/dist/knowledge/progress-confirm.d.ts +0 -108
- package/dist/knowledge/progress-confirm.js +0 -1
- package/dist/knowledge/progress-context.d.ts +0 -123
- package/dist/knowledge/progress-context.js +0 -1
- package/dist/knowledge/progress-translation.d.ts +0 -52
- package/dist/knowledge/progress-translation.js +0 -1
- package/dist/knowledge/proof-confirm.d.ts +0 -31
- package/dist/knowledge/proof-confirm.js +0 -1
- package/dist/knowledge/proof-context.d.ts +0 -17
- package/dist/knowledge/proof-context.js +0 -1
- package/dist/knowledge/proof-ledger.d.ts +0 -34
- package/dist/knowledge/proof-ledger.js +0 -1
- package/dist/knowledge/proof-puzzle.d.ts +0 -35
- package/dist/knowledge/proof-puzzle.js +0 -1
- package/dist/knowledge/proof-templates.d.ts +0 -22
- package/dist/knowledge/proof-templates.js +0 -1
- package/dist/knowledge/proof-translation.d.ts +0 -52
- package/dist/knowledge/proof-translation.js +0 -1
- package/dist/knowledge/registrar-confirm.d.ts +0 -26
- package/dist/knowledge/registrar-confirm.js +0 -1
- package/dist/knowledge/registrar-translation.d.ts +0 -37
- package/dist/knowledge/registrar-translation.js +0 -1
- package/dist/knowledge/repository-confirm.d.ts +0 -40
- package/dist/knowledge/repository-confirm.js +0 -1
- package/dist/knowledge/repository-context.d.ts +0 -12
- package/dist/knowledge/repository-context.js +0 -1
- package/dist/knowledge/repository-ledger.d.ts +0 -25
- package/dist/knowledge/repository-ledger.js +0 -1
- package/dist/knowledge/repository-puzzle.d.ts +0 -30
- package/dist/knowledge/repository-puzzle.js +0 -1
- package/dist/knowledge/repository-templates.d.ts +0 -14
- package/dist/knowledge/repository-templates.js +0 -1
- package/dist/knowledge/repository-translation.d.ts +0 -58
- package/dist/knowledge/repository-translation.js +0 -1
- package/dist/knowledge/resource-confirm.d.ts +0 -25
- package/dist/knowledge/resource-confirm.js +0 -1
- package/dist/knowledge/resource-translation.d.ts +0 -37
- package/dist/knowledge/resource-translation.js +0 -1
- package/dist/knowledge/reward-confirm.d.ts +0 -116
- package/dist/knowledge/reward-confirm.js +0 -1
- package/dist/knowledge/reward-context.d.ts +0 -127
- package/dist/knowledge/reward-context.js +0 -1
- package/dist/knowledge/reward-translation.d.ts +0 -58
- package/dist/knowledge/reward-translation.js +0 -1
- package/dist/knowledge/service-confirm.d.ts +0 -161
- package/dist/knowledge/service-confirm.js +0 -1
- package/dist/knowledge/service-context.d.ts +0 -66
- package/dist/knowledge/service-context.js +0 -1
- package/dist/knowledge/service-translation.d.ts +0 -103
- package/dist/knowledge/service-translation.js +0 -1
- package/dist/knowledge/treasury-confirm.d.ts +0 -133
- package/dist/knowledge/treasury-confirm.js +0 -1
- package/dist/knowledge/treasury-context.d.ts +0 -64
- package/dist/knowledge/treasury-context.js +0 -1
- package/dist/knowledge/treasury-translation.d.ts +0 -78
- package/dist/knowledge/treasury-translation.js +0 -1
- package/dist/knowledge/util-confirm.d.ts +0 -24
- package/dist/knowledge/util-confirm.js +0 -1
- package/dist/knowledge/util-translation.d.ts +0 -39
- package/dist/knowledge/util-translation.js +0 -1
- package/dist/loop-engineering/aggregate.d.ts +0 -50
- package/dist/loop-engineering/aggregate.js +0 -1
- package/dist/loop-engineering/context-collect.d.ts +0 -7
- package/dist/loop-engineering/context-collect.js +0 -1
- package/dist/loop-engineering/diagnose.d.ts +0 -22
- package/dist/loop-engineering/diagnose.js +0 -1
- package/dist/loop-engineering/improve.d.ts +0 -55
- package/dist/loop-engineering/improve.js +0 -1
- package/dist/loop-engineering/index.d.ts +0 -4
- package/dist/loop-engineering/index.js +0 -1
- package/dist/loop-engineering/pipeline.d.ts +0 -17
- package/dist/loop-engineering/pipeline.js +0 -1
- package/dist/schema/utils/object-type-utils.d.ts +0 -12
- package/dist/schema/utils/object-type-utils.js +0 -1
- package/dist/telemetry/index.d.ts +0 -19
- package/dist/telemetry/index.js +0 -1
- package/dist/telemetry/redact.d.ts +0 -2
- package/dist/telemetry/redact.js +0 -1
- package/dist/telemetry/storage.d.ts +0 -8
- package/dist/telemetry/storage.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CallEnvSchema,SemanticSummarySchema}from'./base.js';import{WowAddressSchema}from'../common/index.js';export const BridgeTokenSchema=z['enum'](['ETH','WETH','WBTC','USDC','USDT'])['describe']('Cross-chain\x20token\x20identifier.\x20ETH=native\x20ETH;\x20WETH/WBTC/USDC/USDT=ERC20.\x20Decimals\x20are\x20handled\x20by\x20SDK\x20config.');export const EvmChainSchema=z['enum'](['mainnet'])['default']('mainnet')['describe']('EVM\x20chain\x20identifier.\x20Currently\x20only\x20\x27mainnet\x27\x20(Ethereum\x20mainnet,\x20chainId=1)\x20is\x20supported.\x20Extensible\x20to\x20BSC/Polygon/Arbitrum\x20in\x20the\x20future.');export const EvmAddressSchema=z['string']()['regex'](/^0x[0-9a-fA-F]{40}$/,'Invalid\x20EVM\x20address\x20(must\x20be\x200x\x20+\x2040\x20hex)')['describe']('EVM\x20address\x20(0x\x20+\x2040\x20hex)');export const BridgeAmountSchema=z['string']()['describe']('Cross-chain\x20amount\x20as\x20a\x20string\x20in\x20the\x20smallest\x20unit\x20(e.g.\x20wei\x20/\x20token\x20minimal\x20unit).\x20Example:\x201\x20ETH\x20=\x20\x271000000000000000000\x27');export const BridgeIdempotencyKeySchema=z['string']()['min'](0x1)['max'](0x80)['describe']('Idempotency\x20key\x20(1-128\x20chars).\x20Prevents\x20duplicate\x20transfers\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).');export const BridgeOperationTypeSchema=z['enum'](['cross_chain_wow_to_evm','cross_chain_evm_to_wow','claim_wow_to_evm','resume_transfer','withdraw','query_active_evm_account','query_supported_evm_chains','query_supported_tokens','query_transfer_list','query_transfer_status','manage_evm_rpc'])['describe']('Bridge\x20operation\x20type');export const BridgeWowToEvmDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(WOW-side\x20smallest\x20unit,\x20wowDecimals)'),'withdrawTo':EvmAddressSchema['optional']()['describe']('Final\x20withdrawal\x20EVM\x20address;\x20if\x20omitted,\x20assets\x20remain\x20in\x20activeEvmAccount.\x20When\x20provided,\x20the\x20SDK\x20uses\x20the\x20activeEvmAccount\x20key\x20to\x20transfer\x20to\x20this\x20address.'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+withdrawTo.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20(step\x201:\x20deposit\x20only).\x20'+'Returns\x20immediately\x20with\x20depositTxDigest\x20+\x20bridgeSeq\x20+\x20transferId.\x20'+'This\x20operation\x20only\x20locks\x20assets\x20on\x20WOW;\x20it\x20does\x20NOT\x20complete\x20the\x20cross-chain.\x20'+'After\x20deposit,\x20bridge\x20nodes\x20need\x20~1-5\x20minutes\x20to\x20sign.\x20'+'Use\x20query_transfer_status\x20to\x20monitor\x20progress;\x20when\x20latestState.step\x20shows\x20\x27signatures_ready\x27,\x20'+'call\x20claim_wow_to_evm\x20(step\x202)\x20to\x20claim\x20assets\x20on\x20EVM.\x20'+'[Gas\x20requirements]\x20Step\x201\x20needs\x20WOW\x20gas;\x20Step\x202\x20(claim_wow_to_evm)\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas.');export const BridgeEvmToWowDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type\x20(ETH=native\x20ETH,\x20others\x20are\x20ERC20)'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(EVM-side\x20smallest\x20unit,\x20evmDecimals)'),'recipientWowAddress':WowAddressSchema['optional']()['describe']('WOW\x20recipient\x20address\x20or\x20account\x20name;\x20defaults\x20to\x20env.account\x20if\x20omitted'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+recipientWowAddress.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20(single\x20step:\x20deposit).\x20'+'Returns\x20immediately\x20with\x20depositTxHash\x20+\x20transferId.\x20'+'Bridge\x20will\x20automatically\x20claim\x20on\x20WOW\x20(no\x20WOW\x20gas\x20needed,\x20no\x20user\x20action\x20required).\x20'+'[Time\x20estimate]\x20~10-20\x20minutes\x20total:\x20'+'(1)\x2064-block\x20confirmation\x20~12.8\x20min\x20on\x20ETH;\x20'+'(2)\x20bridge\x20node\x20auto-claim\x20~1-5\x20min\x20on\x20WOW.\x20'+'[Status\x20flow]\x20Use\x20query_transfer_status(refresh=true)\x20to\x20monitor:\x20'+'latestState.step:\x20source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed.\x20'+'When\x20latestState.confirmations\x20>=\x2064,\x20deposit\x20is\x20finalized\x20and\x20bridge\x20nodes\x20will\x20sign.\x20'+'[Gas\x20requirements]\x20Only\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20deposit).\x20No\x20WOW\x20gas\x20needed.');export const BridgeClaimWowToEvmDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20from\x20cross_chain_wow_to_evm\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20nodes\x20have\x20signed.\x20'+'Prerequisite:\x20cross_chain_wow_to_evm\x20(step\x201)\x20must\x20be\x20completed,\x20and\x20query_transfer_status\x20'+'must\x20show\x20latestState.step\x20=\x20\x27signatures_ready\x27\x20or\x20\x27source_tx_confirmed\x27\x20(nodes\x20have\x20approved).\x20'+'Returns\x20claimTxHash\x20on\x20success.\x20'+'After\x20claim_wow_to_evm\x20returns,\x20the\x20claim\x20tx\x20has\x20been\x20submitted\x20and\x20confirmed\x20(1\x20block)\x20on\x20EVM.\x20'+'Use\x20query_transfer_status(refresh=true)\x20to\x20verify\x20latestState.step\x20=\x20\x27completed\x27.\x20'+'[Gas\x20requirements]\x20Requires\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20the\x20claim\x20transaction).');export const BridgeResumeTransferDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20to\x20resume\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20'+'Use\x20this\x20when\x20a\x20transfer\x20was\x20interrupted\x20(e.g.\x20MCP\x20restart,\x20network\x20error)\x20and\x20you\x20want\x20to\x20continue\x20from\x20where\x20it\x20left\x20off.\x20'+'The\x20SDK\x20determines\x20the\x20current\x20step\x20and\x20attempts\x20to\x20advance\x20it:\x20'+'-\x20If\x20deposit\x20step\x20failed:\x20retries\x20the\x20deposit\x20'+'-\x20If\x20deposit\x20is\x20pending/confirmed:\x20waits\x20for\x20bridge\x20signatures\x20and\x20proceeds\x20to\x20claim\x20'+'-\x20If\x20claim\x20step\x20is\x20ready:\x20executes\x20the\x20claim\x20'+'-\x20If\x20transfer\x20is\x20already\x20complete:\x20returns\x20the\x20existing\x20record\x20(idempotentHit=true)\x20'+'[Returns]\x20The\x20updated\x20transfer\x20record\x20after\x20attempting\x20to\x20advance\x20it.\x20'+'[Requires\x20env]\x20WOW\x20env\x20is\x20needed\x20for\x20WOW-side\x20operations;\x20EVM-side\x20operations\x20use\x20activeEvmAccount.');export const BridgeWithdrawDataSchema=z['object']({'to':EvmAddressSchema['describe']('Withdrawal\x20target\x20EVM\x20address'),'amount':BridgeAmountSchema['describe']('Withdrawal\x20amount\x20(smallest\x20unit)'),'token':BridgeTokenSchema['optional']()['describe']('ERC20\x20token\x20identifier;\x20if\x20omitted\x20or\x20ETH,\x20withdraws\x20native\x20ETH'),'tokenAddress':EvmAddressSchema['optional']()['describe']('ERC20\x20contract\x20address\x20(alternative\x20to\x20token;\x20allows\x20withdrawing\x20by\x20contract\x20address)'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address');export const BridgeQueryActiveEvmAccountDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20queries\x20all\x20supported\x20chains'),'tokens':z['array'](EvmAddressSchema)['optional']()['describe']('Additional\x20ERC20\x20token\x20contract\x20addresses\x20to\x20query;\x20if\x20omitted,\x20only\x20native\x20ETH\x20balance\x20is\x20queried')})['strict']()['describe']('Query\x20activeEvmAccount\x20parameters');export const BridgeQuerySupportedTokensDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20returns\x20token\x20lists\x20for\x20all\x20supported\x20chains')})['strict']()['describe']('Query\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20addresses,\x20decimals,\x20description)');export const BridgeQueryTransferListDataSchema=z['object']({'onlyActive':z['boolean']()['optional']()['describe']('true\x20returns\x20only\x20in-progress\x20transfers;\x20false/omitted\x20returns\x20all'),'status':z['enum'](['pending','in_progress','success','failed'])['optional']()['describe']('Filter\x20by\x20transfer\x20status'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['optional']()['describe']('Filter\x20by\x20transfer\x20direction'),'token':BridgeTokenSchema['optional']()['describe']('Filter\x20by\x20token\x20type\x20(ETH/WETH/WBTC/USDC/USDT)'),'limit':z['number']()['int']()['positive']()['max'](0x64)['optional']()['describe']('Maximum\x20number\x20of\x20results\x20(default:\x20all,\x20max:\x20100)')})['strict']()['describe']('Query\x20transfer\x20list\x20with\x20optional\x20filters\x20(status\x20/\x20direction\x20/\x20token\x20/\x20limit)');export const BridgeQueryTransferStatusDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)'),'refresh':z['boolean']()['optional']()['default'](!![])['describe']('Whether\x20to\x20refresh\x20from\x20on-chain\x20state\x20(default\x20true).\x20'+'true=queries\x20latest\x20on-chain\x20status\x20(takes\x205-15s,\x20timeout\x20at\x2015s\x20on\x20slow\x20RPC).\x20'+'false=instant\x20response\x20from\x20local\x20cache\x20(no\x20on-chain\x20query).\x20'+'Recommended:\x20use\x20refresh=true\x20every\x201-2\x20minutes\x20for\x20ongoing\x20transfers;\x20'+'use\x20refresh=false\x20for\x20quick\x20checks\x20between\x20refreshes.')})['strict']()['describe']('Query\x20single\x20transfer\x20parameters.\x20'+'[Wait\x20hint]\x20With\x20refresh=true\x20(default),\x20this\x20call\x20may\x20take\x205-15\x20seconds\x20to\x20query\x20on-chain\x20state.\x20'+'If\x20on-chain\x20RPC\x20is\x20slow,\x20it\x20will\x20timeout\x20at\x2015s\x20and\x20return\x20cached\x20state.\x20'+'Set\x20refresh=false\x20for\x20instant\x20response\x20from\x20local\x20cache.\x20'+'[Returned\x20fields]\x20The\x20result\x20includes:\x20'+'(1)\x20record.step/status\x20-\x20high-level\x20lifecycle\x20(deposit/claimed/success);\x20'+'(2)\x20record.latestState.step/status\x20-\x20fine-grained\x20on-chain\x20progress\x20'+'(source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed).\x20'+'Use\x20latestState.confirmations\x20to\x20estimate\x20remaining\x20time\x20(needs\x2064\x20for\x20ETH→WOW\x20finalization).');export const BridgeManageEvmRpcDataSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('list')['describe']('List\x20all\x20configured\x20RPC\x20endpoints\x20with\x20health\x20status'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['describe']('List\x20RPC\x20endpoints\x20(no\x20rpcUrl/rpcUrls\x20needed)'),z['object']({'op':z['literal']('add')['describe']('Append\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20add')})['describe']('Add\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('remove')['describe']('Remove\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20remove')})['describe']('Remove\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('set')['describe']('Full\x20replace\x20all\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('Full\x20RPC\x20list\x20(replaces\x20all\x20existing\x20endpoints)')})['describe']('Full\x20replace\x20RPC\x20endpoints'),z['object']({'op':z['literal']('ping')['describe']('Health\x20check\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['optional']()['describe']('Specific\x20RPC\x20URLs\x20to\x20ping;\x20if\x20omitted,\x20pings\x20all\x20configured\x20RPCs')})['describe']('Health\x20check\x20RPC\x20endpoints')])['describe']('EVM\x20RPC\x20endpoint\x20management\x20(discriminated\x20by\x20op)');export const BridgeOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['operation_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['operation_type'])return c;}catch{}if(typeof b['data']==='string')try{b['data']=JSON['parse'](b['data']);}catch{}if(typeof b['env']==='string')try{b['env']=JSON['parse'](b['env']);}catch{}return b;}return a;},z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'data':BridgeWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20cross-chain\x20(simplified):\x20assets\x20auto-claim\x20to\x20activeEvmAccount;\x20if\x20withdrawTo\x20is\x20provided,\x20an\x20additional\x20transfer\x20is\x20made\x20to\x20that\x20address.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'data':BridgeEvmToWowDataSchema,'env':CallEnvSchema['optional']()})['describe']('EVM→WOW\x20cross-chain\x20(single\x20step):\x20deposit\x20from\x20activeEvmAccount,\x20bridge\x20auto-claims\x20on\x20WOW.\x20No\x20WOW\x20gas\x20needed.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'data':BridgeClaimWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20signed.\x20Requires\x20activeEvmAccount\x20to\x20have\x20EVM\x20gas.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('resume_transfer'),'data':BridgeResumeTransferDataSchema,'env':CallEnvSchema['optional']()})['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20Safe\x20to\x20retry.\x20[Requires\x20WOW\x20mainnet\x20env\x20for\x20WOW-side\x20operations]'),z['object']({'operation_type':z['literal']('withdraw'),'data':BridgeWithdrawDataSchema,'env':CallEnvSchema['optional']()['describe']('Optional\x20env\x20—\x20needed\x20to\x20pass\x20confirmed=true\x20after\x20a\x20pending_confirmation\x20block\x20(funds\x20leave\x20activeEvmAccount).')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address\x20(non-cross-chain).\x20[env\x20optional:\x20only\x20needed\x20for\x20env.confirmed\x20after\x20a\x20confirmation\x20block]'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'data':BridgeQueryActiveEvmAccountDataSchema['optional']()})['describe']('Query\x20activeEvmAccount\x20address\x20+\x20balances\x20(per\x20chain\x20or\x20all\x20chains).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_supported_evm_chains')})['describe']('List\x20currently\x20supported\x20EVM\x20chains\x20(enum\x20value\x20/\x20description\x20/\x20chainId\x20/\x20RPC\x20health).\x20[No\x20env\x20needed,\x20no\x20data\x20required]'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'data':BridgeQuerySupportedTokensDataSchema['optional']()})['describe']('List\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20contract\x20addresses,\x20decimals,\x20description).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_list'),'data':BridgeQueryTransferListDataSchema['optional']()})['describe']('Query\x20cross-chain\x20/\x20withdrawal\x20transfer\x20history\x20list\x20(optionally\x20only\x20in-progress).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_status'),'data':BridgeQueryTransferStatusDataSchema})['describe']('Query\x20a\x20single\x20transfer\x27s\x20detail\x20by\x20transferId'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'data':BridgeManageEvmRpcDataSchema})['describe']('Manage\x20EVM\x20RPC\x20endpoints\x20(list/add/remove/set/ping)\x20to\x20mitigate\x20public\x20RPC\x20429\x20rate\x20limits.\x20[No\x20env\x20needed]')]));export const BridgeLatestStateSchema=z['object']({'status':z['enum'](['not_started','pending','confirmed','signatures_ready','claiming','completed','failed'])['describe']('On-chain\x20status\x20(finer-grained\x20than\x20record.status):\x20'+'pending=source\x20tx\x20submitted\x20but\x20not\x20confirmed;\x20'+'confirmed=source\x20tx\x20confirmed,\x20waiting\x20for\x20bridge\x20node\x20signatures;\x20'+'signatures_ready=nodes\x20signed,\x20ready\x20to\x20claim;\x20'+'claiming=claim\x20tx\x20submitted,\x20waiting\x20for\x20confirmation;\x20'+'completed=fully\x20completed,\x20assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=on-chain\x20failure'),'step':z['enum'](['not_started','source_tx_pending','source_tx_confirmed','node_signing','signatures_ready','claim_tx_pending','completed','failed'])['describe']('Detailed\x20step\x20(more\x20granular\x20than\x20status).\x20'+'source_tx_pending=source\x20chain\x20tx\x20waiting\x20for\x20block\x20confirmation;\x20'+'source_tx_confirmed=source\x20confirmed,\x20waiting\x20for\x20bridge\x20nodes\x20to\x20approve;\x20'+'node_signing=nodes\x20collecting\x20signatures;\x20'+'signatures_ready=sufficient\x20signatures\x20collected,\x20ready\x20to\x20claim\x20on\x20target\x20chain;\x20'+'claim_tx_pending=claim\x20tx\x20submitted\x20on\x20target\x20chain,\x20waiting\x20for\x20confirmation;\x20'+'completed=assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=error\x20occurred'),'stepDescription':z['string']()['optional']()['describe']('Human-readable\x20step\x20description\x20(Chinese)'),'direction':z['enum'](['wow_to_evm','evm_to_wow'])['optional'](),'sourceTxHash':z['string']()['optional']()['describe']('Source\x20chain\x20tx\x20hash/digest'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'confirmations':z['number']()['optional']()['describe']('Source\x20chain\x20confirmation\x20count\x20(EVM→WOW\x20only;\x20needs\x2064\x20for\x20finalization)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow,\x20when\x20completed)'),'claimReceipt':z['any']()['optional']()['describe']('EVM\x20claim\x20tx\x20receipt\x20(wow_to_evm,\x20when\x20available)'),'ethReceipt':z['any']()['optional']()['describe']('EVM\x20source\x20tx\x20receipt\x20(evm_to_wow)'),'wowReceipt':z['any']()['optional']()['describe']('WOW\x20source\x20tx\x20receipt\x20(wow_to_evm)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20step=failed'),'hint':z['string']()['optional']()['describe']('Hint\x20message\x20for\x20next\x20action\x20(e.g.,\x20when\x20claim_wow_to_evm\x20not\x20yet\x20called)'),'updatedAt':z['number']()['optional']()['describe']('Last\x20on-chain\x20update\x20timestamp\x20(ms)')})['describe']('Latest\x20on-chain\x20state\x20(from\x20refresh=true\x20query)');export const BridgeTransferRecordSchema=z['object']({'transferId':z['string']()['describe']('Unique\x20ID\x20(br_<timestamp>_<counter>)'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['describe']('Transfer\x20direction'),'token':BridgeTokenSchema['describe']('Token\x20identifier'),'amount':z['string']()['describe']('Amount\x20in\x20smallest\x20unit\x20(string\x20to\x20avoid\x20bigint\x20issues)'),'recipientEth':z['string']()['optional']()['describe']('ETH-side\x20recipient\x20address'),'recipientWow':z['string']()['optional']()['describe']('WOW-side\x20recipient\x20address'),'intermediateEthAccount':z['string']()['describe']('Intermediate\x20EVM\x20account\x20(activeEvmAccount)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20for\x20this\x20transfer\x20(if\x20any)'),'step':z['enum'](['init','deposit','claimed','withdraw','withdrawn'])['describe']('Current\x20step\x20in\x20the\x20transfer\x20lifecycle:\x20'+'init=just\x20created;\x20'+'deposit=source\x20chain\x20deposit\x20in\x20progress;\x20'+'claimed=claim\x20completed\x20on\x20target\x20chain\x20(success);\x20'+'withdraw=intermediate→final\x20withdraw\x20in\x20progress;\x20'+'withdrawn=withdraw\x20completed'),'status':z['enum'](['pending','in_progress','success','failed'])['describe']('Transfer\x20status:\x20pending/in_progress=ongoing;\x20success=fully\x20completed;\x20failed=error'),'depositTxHash':z['string']()['optional']()['describe']('EVM\x20deposit\x20tx\x20hash\x20(evm_to_wow)'),'depositTxDigest':z['string']()['optional']()['describe']('WOW\x20deposit\x20tx\x20digest\x20(wow_to_evm)'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'claimTxHash':z['string']()['optional']()['describe']('EVM\x20claim\x20tx\x20hash\x20(wow_to_evm)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow)'),'withdrawTxHash':z['string']()['optional']()['describe']('EVM\x20withdraw\x20tx\x20hash\x20(withdraw\x20step)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20status=failed'),'createdAt':z['number']()['describe']('Creation\x20timestamp\x20(ms)'),'updatedAt':z['number']()['describe']('Last\x20update\x20timestamp\x20(ms)'),'latestState':BridgeLatestStateSchema['optional']()['describe']('Latest\x20on-chain\x20state\x20(only\x20present\x20after\x20refresh=true\x20query).\x20'+'Provides\x20real-time\x20progress:\x20confirmations\x20count,\x20node\x20signing\x20status,\x20claim\x20tx\x20hash,\x20etc.\x20'+'Use\x20this\x20to\x20estimate\x20remaining\x20time\x20and\x20next\x20action.')})['strict']()['describe']('Bridge\x20transfer\x20record');export const BridgeWowToEvmResultSchema=z['object']({'depositTxDigest':z['string']()['describe']('WOW\x20deposit\x20tx\x20digest'),'bridgeSeq':z['string']()['describe']('Bridge\x20sequence\x20number'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20will\x20receive\x20the\x20assets'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20claim_wow_to_evm\x20(step\x202)\x20and\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20step\x201\x20result\x20(deposit\x20only,\x20claim\x20pending)');export const BridgeEvmToWowResultSchema=z['object']({'depositTxHash':z['string']()['describe']('EVM\x20deposit\x20tx\x20hash'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20initiated\x20the\x20deposit'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20result\x20(deposit\x20submitted,\x20auto-claim\x20in\x20progress)');export const BridgeClaimWowToEvmResultSchema=z['object']({'claimTxHash':z['string']()['describe']('EVM\x20claim\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result');export const BridgeWithdrawResultSchema=z['object']({'txHash':z['string']()['describe']('EVM\x20withdraw\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20result');export const BridgeQueryActiveEvmAccountResultSchema=z['object']({'address':z['string']()['describe']('activeEvmAccount\x20address\x20(0x\x20+\x2040\x20hex)'),'chains':z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name'),'nativeBalance':z['string']()['describe']('Native\x20ETH\x20balance\x20(wei,\x20string)'),'tokens':z['array'](z['object']({'tokenAddress':z['string']()['describe']('ERC20\x20token\x20contract\x20address'),'balance':z['string']()['describe']('Token\x20balance\x20(smallest\x20unit,\x20string)')}))['optional']()['describe']('Additional\x20ERC20\x20token\x20balances\x20(if\x20requested)')}))['describe']('Per-chain\x20balance\x20information')})['strict']()['describe']('activeEvmAccount\x20query\x20result');export const BridgeQuerySupportedEvmChainsResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name\x20(enum\x20value)'),'description':z['string']()['describe']('Human-readable\x20chain\x20description'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'explorerUrl':z['string']()['describe']('Block\x20explorer\x20URL'),'rpcCount':z['number']()['describe']('Total\x20configured\x20RPC\x20endpoints'),'healthyRpcCount':z['number']()['describe']('Currently\x20healthy\x20RPC\x20endpoints')}))['describe']('List\x20of\x20supported\x20EVM\x20chains');export const BridgeQuerySupportedTokensResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'chainName':z['string']()['describe']('Chain\x20name'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'tokens':z['array'](z['object']({'tokenId':z['number']()['describe']('On-chain\x20token\x20ID'),'symbol':z['string']()['describe']('Token\x20symbol\x20(ETH/WETH/WBTC/USDC/USDT)'),'evmAddress':z['string']()['describe']('EVM-side\x20contract\x20address\x20(0x000...000\x20for\x20native\x20ETH)'),'evmDecimals':z['number']()['describe']('EVM-side\x20decimals'),'wowTypeTag':z['string']()['describe']('WOW-side\x20type\x20tag'),'wowDecimals':z['number']()['describe']('WOW-side\x20decimals'),'description':z['string']()['describe']('Token\x20description')}))['describe']('Tokens\x20available\x20on\x20this\x20chain')}))['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain');export const BridgeQueryTransferListResultSchema=z['array'](BridgeTransferRecordSchema)['describe']('Transfer\x20history\x20list');export const BridgeQueryTransferStatusResultSchema=BridgeTransferRecordSchema['nullable']()['describe']('Single\x20transfer\x20detail\x20(null\x20if\x20not\x20found)');export const BridgeManageEvmRpcResultSchema=z['object']({'op':z['string']()['describe']('Operation\x20performed\x20(list/add/remove/set/ping)'),'success':z['boolean']()['describe']('Whether\x20the\x20operation\x20succeeded'),'result':z['any']()['optional']()['describe']('Operation-specific\x20result\x20(list=array\x20of\x20RPC\x20status,\x20ping=health\x20results,\x20add/remove/set=void)')})['strict']()['describe']('EVM\x20RPC\x20management\x20result');export const BridgeOutputSchema=z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'result':BridgeWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'result':BridgeEvmToWowResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM→WOW\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'result':BridgeClaimWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result'),z['object']({'operation_type':z['literal']('resume_transfer'),'result':BridgeTransferRecordSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Resume\x20interrupted\x20transfer\x20result'),z['object']({'operation_type':z['literal']('withdraw'),'result':BridgeWithdrawResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20result'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'result':BridgeQueryActiveEvmAccountResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('activeEvmAccount\x20query\x20result'),z['object']({'operation_type':z['literal']('query_supported_evm_chains'),'result':BridgeQuerySupportedEvmChainsResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20EVM\x20chains\x20result'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'result':BridgeQuerySupportedTokensResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain\x20result'),z['object']({'operation_type':z['literal']('query_transfer_list'),'result':BridgeQueryTransferListResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Transfer\x20history\x20list\x20result'),z['object']({'operation_type':z['literal']('query_transfer_status'),'result':BridgeQueryTransferStatusResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Single\x20transfer\x20detail\x20result'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'result':BridgeManageEvmRpcResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM\x20RPC\x20management\x20result')])['describe']('Bridge\x20operation\x20result\x20(discriminated\x20by\x20operation_type\x20with\x20per-operation\x20typed\x20result)');export const BridgeCallOutputSchema=z['object']({'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message'),'result':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('data'),'data':z['unknown']()['describe']('Operation\x20result\x20data\x20(structure\x20varies\x20by\x20operation_type)')})['describe']('Successful\x20result'),z['object']({'type':z['literal']('error'),'error':z['string']()['describe']('Error\x20message'),'error_code':z['enum'](['invalid_parameter','guard_rejected','state_conflict','insufficient_balance','object_not_found','permission_denied','immutable_violation','network_error','rate_limit','gas_exceeded','bcs_error','signature_error','config_error','wip_verification_failed','unknown'])['optional']()['describe']('Error\x20classification\x20for\x20programmatic\x20recovery'),'retryable':z['boolean']()['optional']()['describe']('Whether\x20the\x20operation\x20can\x20be\x20retried\x20as-is'),'recovery_hint':z['string']()['optional']()['describe']('Recovery\x20suggestion\x20for\x20AI\x20or\x20user')})['describe']('Error\x20result'),z['object']({'type':z['literal']('pending_confirmation'),'preview':z['unknown']()['describe']('ConfirmGate\x20preview\x20(level,\x20operation,\x20amount,\x20warnings)'),'rule_id':z['string']()['describe']('Id\x20of\x20the\x20confirmation\x20rule\x20that\x20matched')})['describe']('Pending\x20confirmation.\x20The\x20ConfirmGate\x20blocked\x20this\x20fund-moving\x20operation.\x20Read\x20preview\x20first;\x20if\x20user\x20consents,\x20re-invoke\x20the\x20SAME\x20call\x20with\x20env.confirmed=true.')])['describe']('Bridge\x20operation\x20result\x20(data,\x20error,\x20or\x20pending_confirmation)'),'semantic':SemanticSummarySchema['optional']()['describe']('Business\x20semantic\x20summary\x20for\x20bridge\x20operation')})['describe']('Bridge\x20operation\x20output\x20(matches\x20CallOutput\x20structure\x20returned\x20by\x20the\x20handler)');
|
|
1
|
+
import{z}from'zod';import{CallEnvSchema,SemanticSummarySchema}from'./base.js';import{WowAddressSchema}from'../common/index.js';import{ERROR_CODE_VALUES}from'./error-codes.js';export const BridgeTokenSchema=z['enum'](['ETH','WETH','WBTC','USDC','USDT'])['describe']('Cross-chain\x20token\x20identifier.\x20ETH=native\x20ETH;\x20WETH/WBTC/USDC/USDT=ERC20.\x20Decimals\x20are\x20handled\x20by\x20SDK\x20config.');export const EvmChainSchema=z['enum'](['mainnet'])['default']('mainnet')['describe']('EVM\x20chain\x20identifier.\x20Currently\x20only\x20\x27mainnet\x27\x20(Ethereum\x20mainnet,\x20chainId=1)\x20is\x20supported.\x20Extensible\x20to\x20BSC/Polygon/Arbitrum\x20in\x20the\x20future.');export const EvmAddressSchema=z['string']()['regex'](/^0x[0-9a-fA-F]{40}$/,'Invalid\x20EVM\x20address\x20(must\x20be\x200x\x20+\x2040\x20hex)')['describe']('EVM\x20address\x20(0x\x20+\x2040\x20hex)');export const BridgeAmountSchema=z['string']()['describe']('Cross-chain\x20amount\x20as\x20a\x20string\x20in\x20the\x20smallest\x20unit\x20(e.g.\x20wei\x20/\x20token\x20minimal\x20unit).\x20Example:\x201\x20ETH\x20=\x20\x271000000000000000000\x27');export const BridgeIdempotencyKeySchema=z['string']()['min'](0x1)['max'](0x80)['describe']('Idempotency\x20key\x20(1-128\x20chars).\x20Prevents\x20duplicate\x20transfers\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).');export const BridgeOperationTypeSchema=z['enum'](['cross_chain_wow_to_evm','cross_chain_evm_to_wow','claim_wow_to_evm','resume_transfer','withdraw','query_active_evm_account','query_supported_evm_chains','query_supported_tokens','query_transfer_list','query_transfer_status','manage_evm_rpc'])['describe']('Bridge\x20operation\x20type');export const BridgeWowToEvmDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(WOW-side\x20smallest\x20unit,\x20wowDecimals)'),'withdrawTo':EvmAddressSchema['optional']()['describe']('Final\x20withdrawal\x20EVM\x20address;\x20if\x20omitted,\x20assets\x20remain\x20in\x20activeEvmAccount.\x20When\x20provided,\x20the\x20SDK\x20uses\x20the\x20activeEvmAccount\x20key\x20to\x20transfer\x20to\x20this\x20address.'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+withdrawTo.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20(step\x201:\x20deposit\x20only).\x20'+'Returns\x20immediately\x20with\x20depositTxDigest\x20+\x20bridgeSeq\x20+\x20transferId.\x20'+'This\x20operation\x20only\x20locks\x20assets\x20on\x20WOW;\x20it\x20does\x20NOT\x20complete\x20the\x20cross-chain.\x20'+'After\x20deposit,\x20bridge\x20nodes\x20need\x20~1-5\x20minutes\x20to\x20sign.\x20'+'Use\x20query_transfer_status\x20to\x20monitor\x20progress;\x20when\x20latestState.step\x20shows\x20\x27signatures_ready\x27,\x20'+'call\x20claim_wow_to_evm\x20(step\x202)\x20to\x20claim\x20assets\x20on\x20EVM.\x20'+'[Gas\x20requirements]\x20Step\x201\x20needs\x20WOW\x20gas;\x20Step\x202\x20(claim_wow_to_evm)\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas.');export const BridgeEvmToWowDataSchema=z['object']({'token':BridgeTokenSchema['describe']('Cross-chain\x20token\x20type\x20(ETH=native\x20ETH,\x20others\x20are\x20ERC20)'),'amount':BridgeAmountSchema['describe']('Cross-chain\x20amount\x20(EVM-side\x20smallest\x20unit,\x20evmDecimals)'),'recipientWowAddress':WowAddressSchema['optional']()['describe']('WOW\x20recipient\x20address\x20or\x20account\x20name;\x20defaults\x20to\x20env.account\x20if\x20omitted'),'idempotencyKey':BridgeIdempotencyKeySchema['optional']()['describe']('Idempotency\x20key\x20to\x20prevent\x20duplicate\x20deposits\x20on\x20retry.\x20If\x20a\x20successful\x20transfer\x20with\x20this\x20key\x20exists,\x20returns\x20it\x20immediately\x20(idempotentHit=true).'),'idempotentByParams':z['boolean']()['optional']()['describe']('If\x20true,\x20auto-generates\x20an\x20idempotency\x20key\x20from\x20token+amount+recipientWowAddress.\x20Use\x20when\x20you\x20want\x20implicit\x20idempotency\x20without\x20managing\x20explicit\x20keys.')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20(single\x20step:\x20deposit).\x20'+'Returns\x20immediately\x20with\x20depositTxHash\x20+\x20transferId.\x20'+'Bridge\x20will\x20automatically\x20claim\x20on\x20WOW\x20(no\x20WOW\x20gas\x20needed,\x20no\x20user\x20action\x20required).\x20'+'[Time\x20estimate]\x20~10-20\x20minutes\x20total:\x20'+'(1)\x2064-block\x20confirmation\x20~12.8\x20min\x20on\x20ETH;\x20'+'(2)\x20bridge\x20node\x20auto-claim\x20~1-5\x20min\x20on\x20WOW.\x20'+'[Status\x20flow]\x20Use\x20query_transfer_status(refresh=true)\x20to\x20monitor:\x20'+'latestState.step:\x20source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed.\x20'+'When\x20latestState.confirmations\x20>=\x2064,\x20deposit\x20is\x20finalized\x20and\x20bridge\x20nodes\x20will\x20sign.\x20'+'[Gas\x20requirements]\x20Only\x20needs\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20deposit).\x20No\x20WOW\x20gas\x20needed.');export const BridgeClaimWowToEvmDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20from\x20cross_chain_wow_to_evm\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20nodes\x20have\x20signed.\x20'+'Prerequisite:\x20cross_chain_wow_to_evm\x20(step\x201)\x20must\x20be\x20completed,\x20and\x20query_transfer_status\x20'+'must\x20show\x20latestState.step\x20=\x20\x27signatures_ready\x27\x20or\x20\x27source_tx_confirmed\x27\x20(nodes\x20have\x20approved).\x20'+'Returns\x20claimTxHash\x20on\x20success.\x20'+'After\x20claim_wow_to_evm\x20returns,\x20the\x20claim\x20tx\x20has\x20been\x20submitted\x20and\x20confirmed\x20(1\x20block)\x20on\x20EVM.\x20'+'Use\x20query_transfer_status(refresh=true)\x20to\x20verify\x20latestState.step\x20=\x20\x27completed\x27.\x20'+'[Gas\x20requirements]\x20Requires\x20activeEvmAccount\x20to\x20have\x20target-chain\x20gas\x20(for\x20the\x20claim\x20transaction).');export const BridgeResumeTransferDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20to\x20resume\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20'+'Use\x20this\x20when\x20a\x20transfer\x20was\x20interrupted\x20(e.g.\x20MCP\x20restart,\x20network\x20error)\x20and\x20you\x20want\x20to\x20continue\x20from\x20where\x20it\x20left\x20off.\x20'+'The\x20SDK\x20determines\x20the\x20current\x20step\x20and\x20attempts\x20to\x20advance\x20it:\x20'+'-\x20If\x20deposit\x20step\x20failed:\x20retries\x20the\x20deposit\x20'+'-\x20If\x20deposit\x20is\x20pending/confirmed:\x20waits\x20for\x20bridge\x20signatures\x20and\x20proceeds\x20to\x20claim\x20'+'-\x20If\x20claim\x20step\x20is\x20ready:\x20executes\x20the\x20claim\x20'+'-\x20If\x20transfer\x20is\x20already\x20complete:\x20returns\x20the\x20existing\x20record\x20(idempotentHit=true)\x20'+'[Returns]\x20The\x20updated\x20transfer\x20record\x20after\x20attempting\x20to\x20advance\x20it.\x20'+'[Requires\x20env]\x20WOW\x20env\x20is\x20needed\x20for\x20WOW-side\x20operations;\x20EVM-side\x20operations\x20use\x20activeEvmAccount.');export const BridgeWithdrawDataSchema=z['object']({'to':EvmAddressSchema['describe']('Withdrawal\x20target\x20EVM\x20address'),'amount':BridgeAmountSchema['describe']('Withdrawal\x20amount\x20(smallest\x20unit)'),'token':BridgeTokenSchema['optional']()['describe']('ERC20\x20token\x20identifier;\x20if\x20omitted\x20or\x20ETH,\x20withdraws\x20native\x20ETH'),'tokenAddress':EvmAddressSchema['optional']()['describe']('ERC20\x20contract\x20address\x20(alternative\x20to\x20token;\x20allows\x20withdrawing\x20by\x20contract\x20address)'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address');export const BridgeQueryActiveEvmAccountDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20queries\x20all\x20supported\x20chains'),'tokens':z['array'](EvmAddressSchema)['optional']()['describe']('Additional\x20ERC20\x20token\x20contract\x20addresses\x20to\x20query;\x20if\x20omitted,\x20only\x20native\x20ETH\x20balance\x20is\x20queried')})['strict']()['describe']('Query\x20activeEvmAccount\x20parameters');export const BridgeQuerySupportedTokensDataSchema=z['object']({'network':EvmChainSchema['optional']()['describe']('Specific\x20chain;\x20if\x20omitted,\x20returns\x20token\x20lists\x20for\x20all\x20supported\x20chains')})['strict']()['describe']('Query\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20addresses,\x20decimals,\x20description)');export const BridgeQueryTransferListDataSchema=z['object']({'onlyActive':z['boolean']()['optional']()['describe']('true\x20returns\x20only\x20in-progress\x20transfers;\x20false/omitted\x20returns\x20all'),'status':z['enum'](['pending','in_progress','success','failed'])['optional']()['describe']('Filter\x20by\x20transfer\x20status'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['optional']()['describe']('Filter\x20by\x20transfer\x20direction'),'token':BridgeTokenSchema['optional']()['describe']('Filter\x20by\x20token\x20type\x20(ETH/WETH/WBTC/USDC/USDT)'),'limit':z['number']()['int']()['positive']()['max'](0x64)['optional']()['describe']('Maximum\x20number\x20of\x20results\x20(default:\x20all,\x20max:\x20100)')})['strict']()['describe']('Query\x20transfer\x20list\x20with\x20optional\x20filters\x20(status\x20/\x20direction\x20/\x20token\x20/\x20limit)');export const BridgeQueryTransferStatusDataSchema=z['object']({'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)'),'refresh':z['boolean']()['optional']()['default'](!![])['describe']('Whether\x20to\x20refresh\x20from\x20on-chain\x20state\x20(default\x20true).\x20'+'true=queries\x20latest\x20on-chain\x20status\x20(takes\x205-15s,\x20timeout\x20at\x2015s\x20on\x20slow\x20RPC).\x20'+'false=instant\x20response\x20from\x20local\x20cache\x20(no\x20on-chain\x20query).\x20'+'Recommended:\x20use\x20refresh=true\x20every\x201-2\x20minutes\x20for\x20ongoing\x20transfers;\x20'+'use\x20refresh=false\x20for\x20quick\x20checks\x20between\x20refreshes.')})['strict']()['describe']('Query\x20single\x20transfer\x20parameters.\x20'+'[Wait\x20hint]\x20With\x20refresh=true\x20(default),\x20this\x20call\x20may\x20take\x205-15\x20seconds\x20to\x20query\x20on-chain\x20state.\x20'+'If\x20on-chain\x20RPC\x20is\x20slow,\x20it\x20will\x20timeout\x20at\x2015s\x20and\x20return\x20cached\x20state.\x20'+'Set\x20refresh=false\x20for\x20instant\x20response\x20from\x20local\x20cache.\x20'+'[Returned\x20fields]\x20The\x20result\x20includes:\x20'+'(1)\x20record.step/status\x20-\x20high-level\x20lifecycle\x20(deposit/claimed/success);\x20'+'(2)\x20record.latestState.step/status\x20-\x20fine-grained\x20on-chain\x20progress\x20'+'(source_tx_pending\x20→\x20source_tx_confirmed\x20→\x20signatures_ready\x20→\x20completed).\x20'+'Use\x20latestState.confirmations\x20to\x20estimate\x20remaining\x20time\x20(needs\x2064\x20for\x20ETH→WOW\x20finalization).');export const BridgeManageEvmRpcDataSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('list')['describe']('List\x20all\x20configured\x20RPC\x20endpoints\x20with\x20health\x20status'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))')})['describe']('List\x20RPC\x20endpoints\x20(no\x20rpcUrl/rpcUrls\x20needed)'),z['object']({'op':z['literal']('add')['describe']('Append\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20add')})['describe']('Add\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('remove')['describe']('Remove\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('RPC\x20URL(s)\x20to\x20remove')})['describe']('Remove\x20RPC\x20endpoint(s)'),z['object']({'op':z['literal']('set')['describe']('Full\x20replace\x20all\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['min'](0x1)['describe']('Full\x20RPC\x20list\x20(replaces\x20all\x20existing\x20endpoints)')})['describe']('Full\x20replace\x20RPC\x20endpoints'),z['object']({'op':z['literal']('ping')['describe']('Health\x20check\x20one\x20or\x20more\x20RPC\x20endpoints'),'network':EvmChainSchema['describe']('Target\x20chain\x20(defaults\x20to\x20Ethereum\x20mainnet\x20when\x20omitted\x20—\x20EvmChainSchema\x20carries\x20.default(\x22mainnet\x22))'),'rpcUrls':z['array'](z['string']()['url']())['optional']()['describe']('Specific\x20RPC\x20URLs\x20to\x20ping;\x20if\x20omitted,\x20pings\x20all\x20configured\x20RPCs')})['describe']('Health\x20check\x20RPC\x20endpoints')])['describe']('EVM\x20RPC\x20endpoint\x20management\x20(discriminated\x20by\x20op)');export const BridgeOperationsSchema=z['preprocess'](a=>{if(typeof a==='object'&&a!==null){const b={...a};if(typeof b['description']==='string'&&!b['operation_type'])try{const c=JSON['parse'](b['description']);if(c&&typeof c==='object'&&c['operation_type'])return c;}catch{}if(typeof b['data']==='string')try{b['data']=JSON['parse'](b['data']);}catch{}if(typeof b['env']==='string')try{b['env']=JSON['parse'](b['env']);}catch{}return b;}return a;},z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'data':BridgeWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20cross-chain\x20(simplified):\x20assets\x20auto-claim\x20to\x20activeEvmAccount;\x20if\x20withdrawTo\x20is\x20provided,\x20an\x20additional\x20transfer\x20is\x20made\x20to\x20that\x20address.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'data':BridgeEvmToWowDataSchema,'env':CallEnvSchema['optional']()})['describe']('EVM→WOW\x20cross-chain\x20(single\x20step):\x20deposit\x20from\x20activeEvmAccount,\x20bridge\x20auto-claims\x20on\x20WOW.\x20No\x20WOW\x20gas\x20needed.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'data':BridgeClaimWowToEvmDataSchema,'env':CallEnvSchema['optional']()})['describe']('WOW→EVM\x20claim\x20(step\x202):\x20claim\x20assets\x20on\x20EVM\x20after\x20bridge\x20signed.\x20Requires\x20activeEvmAccount\x20to\x20have\x20EVM\x20gas.\x20[Requires\x20WOW\x20mainnet\x20env]'),z['object']({'operation_type':z['literal']('resume_transfer'),'data':BridgeResumeTransferDataSchema,'env':CallEnvSchema['optional']()})['describe']('Resume\x20an\x20interrupted\x20transfer\x20from\x20its\x20current\x20step.\x20Safe\x20to\x20retry.\x20[Requires\x20WOW\x20mainnet\x20env\x20for\x20WOW-side\x20operations]'),z['object']({'operation_type':z['literal']('withdraw'),'data':BridgeWithdrawDataSchema,'env':CallEnvSchema['optional']()['describe']('Optional\x20env\x20—\x20needed\x20to\x20pass\x20confirmed=true\x20after\x20a\x20pending_confirmation\x20block\x20(funds\x20leave\x20activeEvmAccount).')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20to\x20another\x20EVM\x20address\x20(non-cross-chain).\x20[env\x20optional:\x20only\x20needed\x20for\x20env.confirmed\x20after\x20a\x20confirmation\x20block]'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'data':BridgeQueryActiveEvmAccountDataSchema['optional']()})['describe']('Query\x20activeEvmAccount\x20address\x20+\x20balances\x20(per\x20chain\x20or\x20all\x20chains).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_supported_evm_chains')})['describe']('List\x20currently\x20supported\x20EVM\x20chains\x20(enum\x20value\x20/\x20description\x20/\x20chainId\x20/\x20RPC\x20health).\x20[No\x20env\x20needed,\x20no\x20data\x20required]'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'data':BridgeQuerySupportedTokensDataSchema['optional']()})['describe']('List\x20supported\x20Bridge\x20tokens\x20per\x20chain\x20(WOW/EVM\x20contract\x20addresses,\x20decimals,\x20description).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_list'),'data':BridgeQueryTransferListDataSchema['optional']()})['describe']('Query\x20cross-chain\x20/\x20withdrawal\x20transfer\x20history\x20list\x20(optionally\x20only\x20in-progress).\x20[No\x20env\x20needed]'),z['object']({'operation_type':z['literal']('query_transfer_status'),'data':BridgeQueryTransferStatusDataSchema})['describe']('Query\x20a\x20single\x20transfer\x27s\x20detail\x20by\x20transferId'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'data':BridgeManageEvmRpcDataSchema})['describe']('Manage\x20EVM\x20RPC\x20endpoints\x20(list/add/remove/set/ping)\x20to\x20mitigate\x20public\x20RPC\x20429\x20rate\x20limits.\x20[No\x20env\x20needed]')]));export const BridgeLatestStateSchema=z['object']({'status':z['enum'](['not_started','pending','confirmed','signatures_ready','claiming','completed','failed'])['describe']('On-chain\x20status\x20(finer-grained\x20than\x20record.status):\x20'+'pending=source\x20tx\x20submitted\x20but\x20not\x20confirmed;\x20'+'confirmed=source\x20tx\x20confirmed,\x20waiting\x20for\x20bridge\x20node\x20signatures;\x20'+'signatures_ready=nodes\x20signed,\x20ready\x20to\x20claim;\x20'+'claiming=claim\x20tx\x20submitted,\x20waiting\x20for\x20confirmation;\x20'+'completed=fully\x20completed,\x20assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=on-chain\x20failure'),'step':z['enum'](['not_started','source_tx_pending','source_tx_confirmed','node_signing','signatures_ready','claim_tx_pending','completed','failed'])['describe']('Detailed\x20step\x20(more\x20granular\x20than\x20status).\x20'+'source_tx_pending=source\x20chain\x20tx\x20waiting\x20for\x20block\x20confirmation;\x20'+'source_tx_confirmed=source\x20confirmed,\x20waiting\x20for\x20bridge\x20nodes\x20to\x20approve;\x20'+'node_signing=nodes\x20collecting\x20signatures;\x20'+'signatures_ready=sufficient\x20signatures\x20collected,\x20ready\x20to\x20claim\x20on\x20target\x20chain;\x20'+'claim_tx_pending=claim\x20tx\x20submitted\x20on\x20target\x20chain,\x20waiting\x20for\x20confirmation;\x20'+'completed=assets\x20arrived\x20on\x20target\x20chain;\x20'+'failed=error\x20occurred'),'stepDescription':z['string']()['optional']()['describe']('Human-readable\x20step\x20description\x20(Chinese)'),'direction':z['enum'](['wow_to_evm','evm_to_wow'])['optional'](),'sourceTxHash':z['string']()['optional']()['describe']('Source\x20chain\x20tx\x20hash/digest'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'confirmations':z['number']()['optional']()['describe']('Source\x20chain\x20confirmation\x20count\x20(EVM→WOW\x20only;\x20needs\x2064\x20for\x20finalization)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow,\x20when\x20completed)'),'claimReceipt':z['any']()['optional']()['describe']('EVM\x20claim\x20tx\x20receipt\x20(wow_to_evm,\x20when\x20available)'),'ethReceipt':z['any']()['optional']()['describe']('EVM\x20source\x20tx\x20receipt\x20(evm_to_wow)'),'wowReceipt':z['any']()['optional']()['describe']('WOW\x20source\x20tx\x20receipt\x20(wow_to_evm)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20step=failed'),'hint':z['string']()['optional']()['describe']('Hint\x20message\x20for\x20next\x20action\x20(e.g.,\x20when\x20claim_wow_to_evm\x20not\x20yet\x20called)'),'updatedAt':z['number']()['optional']()['describe']('Last\x20on-chain\x20update\x20timestamp\x20(ms)')})['describe']('Latest\x20on-chain\x20state\x20(from\x20refresh=true\x20query)');export const BridgeTransferRecordSchema=z['object']({'transferId':z['string']()['describe']('Unique\x20ID\x20(br_<timestamp>_<counter>)'),'direction':z['enum'](['wow_to_evm','evm_to_wow','withdraw'])['describe']('Transfer\x20direction'),'token':BridgeTokenSchema['describe']('Token\x20identifier'),'amount':z['string']()['describe']('Amount\x20in\x20smallest\x20unit\x20(string\x20to\x20avoid\x20bigint\x20issues)'),'recipientEth':z['string']()['optional']()['describe']('ETH-side\x20recipient\x20address'),'recipientWow':z['string']()['optional']()['describe']('WOW-side\x20recipient\x20address'),'intermediateEthAccount':z['string']()['describe']('Intermediate\x20EVM\x20account\x20(activeEvmAccount)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20for\x20this\x20transfer\x20(if\x20any)'),'step':z['enum'](['init','deposit','claimed','withdraw','withdrawn'])['describe']('Current\x20step\x20in\x20the\x20transfer\x20lifecycle:\x20'+'init=just\x20created;\x20'+'deposit=source\x20chain\x20deposit\x20in\x20progress;\x20'+'claimed=claim\x20completed\x20on\x20target\x20chain\x20(success);\x20'+'withdraw=intermediate→final\x20withdraw\x20in\x20progress;\x20'+'withdrawn=withdraw\x20completed'),'status':z['enum'](['pending','in_progress','success','failed'])['describe']('Transfer\x20status:\x20pending/in_progress=ongoing;\x20success=fully\x20completed;\x20failed=error'),'depositTxHash':z['string']()['optional']()['describe']('EVM\x20deposit\x20tx\x20hash\x20(evm_to_wow)'),'depositTxDigest':z['string']()['optional']()['describe']('WOW\x20deposit\x20tx\x20digest\x20(wow_to_evm)'),'bridgeSeq':z['string']()['optional']()['describe']('Bridge\x20sequence\x20number'),'claimTxHash':z['string']()['optional']()['describe']('EVM\x20claim\x20tx\x20hash\x20(wow_to_evm)'),'claimTxDigest':z['string']()['optional']()['describe']('WOW\x20claim\x20tx\x20digest\x20(evm_to_wow)'),'withdrawTxHash':z['string']()['optional']()['describe']('EVM\x20withdraw\x20tx\x20hash\x20(withdraw\x20step)'),'error':z['string']()['optional']()['describe']('Error\x20message\x20if\x20status=failed'),'createdAt':z['number']()['describe']('Creation\x20timestamp\x20(ms)'),'updatedAt':z['number']()['describe']('Last\x20update\x20timestamp\x20(ms)'),'latestState':BridgeLatestStateSchema['optional']()['describe']('Latest\x20on-chain\x20state\x20(only\x20present\x20after\x20refresh=true\x20query).\x20'+'Provides\x20real-time\x20progress:\x20confirmations\x20count,\x20node\x20signing\x20status,\x20claim\x20tx\x20hash,\x20etc.\x20'+'Use\x20this\x20to\x20estimate\x20remaining\x20time\x20and\x20next\x20action.')})['strict']()['describe']('Bridge\x20transfer\x20record');export const BridgeWowToEvmResultSchema=z['object']({'depositTxDigest':z['string']()['describe']('WOW\x20deposit\x20tx\x20digest'),'bridgeSeq':z['string']()['describe']('Bridge\x20sequence\x20number'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20will\x20receive\x20the\x20assets'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20claim_wow_to_evm\x20(step\x202)\x20and\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('WOW→EVM\x20cross-chain\x20step\x201\x20result\x20(deposit\x20only,\x20claim\x20pending)');export const BridgeEvmToWowResultSchema=z['object']({'depositTxHash':z['string']()['describe']('EVM\x20deposit\x20tx\x20hash'),'activeEvmAccount':z['string']()['describe']('activeEvmAccount\x20address\x20that\x20initiated\x20the\x20deposit'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>).\x20Save\x20this\x20for\x20query_transfer_status'),'idempotentHit':z['boolean']()['optional']()['describe']('true\x20if\x20this\x20result\x20was\x20returned\x20from\x20idempotency\x20cache\x20(no\x20new\x20deposit\x20executed)'),'idempotencyKey':z['string']()['optional']()['describe']('Idempotency\x20key\x20used\x20(if\x20any)')})['strict']()['describe']('EVM→WOW\x20cross-chain\x20result\x20(deposit\x20submitted,\x20auto-claim\x20in\x20progress)');export const BridgeClaimWowToEvmResultSchema=z['object']({'claimTxHash':z['string']()['describe']('EVM\x20claim\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID')})['strict']()['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result');export const BridgeWithdrawResultSchema=z['object']({'txHash':z['string']()['describe']('EVM\x20withdraw\x20tx\x20hash'),'transferId':z['string']()['describe']('Transfer\x20ID\x20(br_<timestamp>_<counter>)')})['strict']()['describe']('Withdraw\x20from\x20activeEvmAccount\x20result');export const BridgeQueryActiveEvmAccountResultSchema=z['object']({'address':z['string']()['describe']('activeEvmAccount\x20address\x20(0x\x20+\x2040\x20hex)'),'chains':z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name'),'nativeBalance':z['string']()['describe']('Native\x20ETH\x20balance\x20(wei,\x20string)'),'tokens':z['array'](z['object']({'tokenAddress':z['string']()['describe']('ERC20\x20token\x20contract\x20address'),'balance':z['string']()['describe']('Token\x20balance\x20(smallest\x20unit,\x20string)')}))['optional']()['describe']('Additional\x20ERC20\x20token\x20balances\x20(if\x20requested)')}))['describe']('Per-chain\x20balance\x20information')})['strict']()['describe']('activeEvmAccount\x20query\x20result');export const BridgeQuerySupportedEvmChainsResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'name':z['string']()['describe']('Chain\x20name\x20(enum\x20value)'),'description':z['string']()['describe']('Human-readable\x20chain\x20description'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'explorerUrl':z['string']()['describe']('Block\x20explorer\x20URL'),'rpcCount':z['number']()['describe']('Total\x20configured\x20RPC\x20endpoints'),'healthyRpcCount':z['number']()['describe']('Currently\x20healthy\x20RPC\x20endpoints')}))['describe']('List\x20of\x20supported\x20EVM\x20chains');export const BridgeQuerySupportedTokensResultSchema=z['array'](z['object']({'chainId':z['number']()['describe']('EVM\x20chain\x20ID'),'chainName':z['string']()['describe']('Chain\x20name'),'bridgeChainId':z['number']()['describe']('Bridge\x20protocol\x20chain\x20ID'),'tokens':z['array'](z['object']({'tokenId':z['number']()['describe']('On-chain\x20token\x20ID'),'symbol':z['string']()['describe']('Token\x20symbol\x20(ETH/WETH/WBTC/USDC/USDT)'),'evmAddress':z['string']()['describe']('EVM-side\x20contract\x20address\x20(0x000...000\x20for\x20native\x20ETH)'),'evmDecimals':z['number']()['describe']('EVM-side\x20decimals'),'wowTypeTag':z['string']()['describe']('WOW-side\x20type\x20tag'),'wowDecimals':z['number']()['describe']('WOW-side\x20decimals'),'description':z['string']()['describe']('Token\x20description')}))['describe']('Tokens\x20available\x20on\x20this\x20chain')}))['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain');export const BridgeQueryTransferListResultSchema=z['array'](BridgeTransferRecordSchema)['describe']('Transfer\x20history\x20list');export const BridgeQueryTransferStatusResultSchema=BridgeTransferRecordSchema['nullable']()['describe']('Single\x20transfer\x20detail\x20(null\x20if\x20not\x20found)');export const BridgeManageEvmRpcResultSchema=z['object']({'op':z['string']()['describe']('Operation\x20performed\x20(list/add/remove/set/ping)'),'success':z['boolean']()['describe']('Whether\x20the\x20operation\x20succeeded'),'result':z['any']()['optional']()['describe']('Operation-specific\x20result\x20(list=array\x20of\x20RPC\x20status,\x20ping=health\x20results,\x20add/remove/set=void)')})['strict']()['describe']('EVM\x20RPC\x20management\x20result');export const BridgeOutputSchema=z['discriminatedUnion']('operation_type',[z['object']({'operation_type':z['literal']('cross_chain_wow_to_evm'),'result':BridgeWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('cross_chain_evm_to_wow'),'result':BridgeEvmToWowResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM→WOW\x20cross-chain\x20result'),z['object']({'operation_type':z['literal']('claim_wow_to_evm'),'result':BridgeClaimWowToEvmResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('WOW→EVM\x20claim\x20(step\x202)\x20result'),z['object']({'operation_type':z['literal']('resume_transfer'),'result':BridgeTransferRecordSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Resume\x20interrupted\x20transfer\x20result'),z['object']({'operation_type':z['literal']('withdraw'),'result':BridgeWithdrawResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Withdraw\x20from\x20activeEvmAccount\x20result'),z['object']({'operation_type':z['literal']('query_active_evm_account'),'result':BridgeQueryActiveEvmAccountResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('activeEvmAccount\x20query\x20result'),z['object']({'operation_type':z['literal']('query_supported_evm_chains'),'result':BridgeQuerySupportedEvmChainsResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20EVM\x20chains\x20result'),z['object']({'operation_type':z['literal']('query_supported_tokens'),'result':BridgeQuerySupportedTokensResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Supported\x20Bridge\x20tokens\x20per\x20chain\x20result'),z['object']({'operation_type':z['literal']('query_transfer_list'),'result':BridgeQueryTransferListResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Transfer\x20history\x20list\x20result'),z['object']({'operation_type':z['literal']('query_transfer_status'),'result':BridgeQueryTransferStatusResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('Single\x20transfer\x20detail\x20result'),z['object']({'operation_type':z['literal']('manage_evm_rpc'),'result':BridgeManageEvmRpcResultSchema,'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message')})['describe']('EVM\x20RPC\x20management\x20result')])['describe']('Bridge\x20operation\x20result\x20(discriminated\x20by\x20operation_type\x20with\x20per-operation\x20typed\x20result)');export const BridgeCallOutputSchema=z['object']({'message':z['string']()['optional']()['describe']('Result\x20summary\x20or\x20hint\x20message'),'result':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('data'),'data':z['unknown']()['describe']('Operation\x20result\x20data\x20(structure\x20varies\x20by\x20operation_type)')})['describe']('Successful\x20result'),z['object']({'type':z['literal']('error'),'error':z['string']()['describe']('Error\x20message'),'error_code':z['enum'](ERROR_CODE_VALUES)['optional']()['describe']('Error\x20classification\x20for\x20programmatic\x20recovery'),'retryable':z['boolean']()['optional']()['describe']('Whether\x20the\x20operation\x20can\x20be\x20retried\x20as-is'),'recovery_hint':z['string']()['optional']()['describe']('Recovery\x20suggestion\x20for\x20AI\x20or\x20user')})['describe']('Error\x20result'),z['object']({'type':z['literal']('pending_confirmation'),'preview':z['unknown']()['describe']('ConfirmGate\x20preview\x20(level,\x20operation,\x20amount,\x20warnings)'),'rule_id':z['string']()['describe']('Id\x20of\x20the\x20confirmation\x20rule\x20that\x20matched')})['describe']('Pending\x20confirmation.\x20The\x20ConfirmGate\x20blocked\x20this\x20fund-moving\x20operation.\x20Read\x20preview\x20first;\x20if\x20user\x20consents,\x20re-invoke\x20the\x20SAME\x20call\x20with\x20env.confirmed=true.')])['describe']('Bridge\x20operation\x20result\x20(data,\x20error,\x20or\x20pending_confirmation)'),'semantic':SemanticSummarySchema['optional']()['describe']('Business\x20semantic\x20summary\x20for\x20bridge\x20operation')})['describe']('Bridge\x20operation\x20output\x20(matches\x20CallOutput\x20structure\x20returned\x20by\x20the\x20handler)');
|
|
@@ -147,6 +147,11 @@ export declare const CallContact_InputSchema: z.ZodObject<{
|
|
|
147
147
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
148
148
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
149
149
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
151
|
+
full: "full";
|
|
152
|
+
streamlined: "streamlined";
|
|
153
|
+
quiet: "quiet";
|
|
154
|
+
}>>;
|
|
150
155
|
}, z.core.$strict>>;
|
|
151
156
|
submission: z.ZodOptional<z.ZodObject<{
|
|
152
157
|
type: z.ZodLiteral<"submission">;
|
|
@@ -200,6 +200,11 @@ export declare const CallDemand_InputSchema: z.ZodObject<{
|
|
|
200
200
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
201
201
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
202
202
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
204
|
+
full: "full";
|
|
205
|
+
streamlined: "streamlined";
|
|
206
|
+
quiet: "quiet";
|
|
207
|
+
}>>;
|
|
203
208
|
}, z.core.$strict>>;
|
|
204
209
|
submission: z.ZodOptional<z.ZodObject<{
|
|
205
210
|
type: z.ZodLiteral<"submission">;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ERROR_CODE_VALUES: readonly ["invalid_parameter", "guard_rejected", "state_conflict", "insufficient_balance", "stock_exhausted", "sale_suspended", "discount_invalid", "object_not_found", "permission_denied", "time_lock_not_elapsed", "immutable_violation", "network_error", "rate_limit", "gas_exceeded", "bcs_error", "signature_error", "config_error", "wip_verification_failed", "unknown"];
|
|
2
|
+
export type ErrorCodeValue = (typeof ERROR_CODE_VALUES)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ERROR_CODE_VALUES=['invalid_parameter','guard_rejected','state_conflict','insufficient_balance','stock_exhausted','sale_suspended','discount_invalid','object_not_found','permission_denied','time_lock_not_elapsed','immutable_violation','network_error','rate_limit','gas_exceeded','bcs_error','signature_error','config_error','wip_verification_failed','unknown'];
|
|
@@ -34,8 +34,8 @@ export declare const GuardBindingHintBindingFieldSchema: z.ZodEnum<{
|
|
|
34
34
|
guard: "guard";
|
|
35
35
|
none: "none";
|
|
36
36
|
submission: "submission";
|
|
37
|
-
buy_guard: "buy_guard";
|
|
38
37
|
order_allocators: "order_allocators";
|
|
38
|
+
buy_guard: "buy_guard";
|
|
39
39
|
"Forward.guard": "Forward.guard";
|
|
40
40
|
write_guard: "write_guard";
|
|
41
41
|
usage_guard: "usage_guard";
|
|
@@ -69,8 +69,8 @@ export declare const GuardBindingHintSchema: z.ZodObject<{
|
|
|
69
69
|
guard: "guard";
|
|
70
70
|
none: "none";
|
|
71
71
|
submission: "submission";
|
|
72
|
-
buy_guard: "buy_guard";
|
|
73
72
|
order_allocators: "order_allocators";
|
|
73
|
+
buy_guard: "buy_guard";
|
|
74
74
|
"Forward.guard": "Forward.guard";
|
|
75
75
|
write_guard: "write_guard";
|
|
76
76
|
usage_guard: "usage_guard";
|
|
@@ -144,8 +144,8 @@ export declare const CallGuard_DataSchema: z.ZodObject<{
|
|
|
144
144
|
guard: "guard";
|
|
145
145
|
none: "none";
|
|
146
146
|
submission: "submission";
|
|
147
|
-
buy_guard: "buy_guard";
|
|
148
147
|
order_allocators: "order_allocators";
|
|
148
|
+
buy_guard: "buy_guard";
|
|
149
149
|
"Forward.guard": "Forward.guard";
|
|
150
150
|
write_guard: "write_guard";
|
|
151
151
|
usage_guard: "usage_guard";
|
|
@@ -221,8 +221,8 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
|
|
|
221
221
|
guard: "guard";
|
|
222
222
|
none: "none";
|
|
223
223
|
submission: "submission";
|
|
224
|
-
buy_guard: "buy_guard";
|
|
225
224
|
order_allocators: "order_allocators";
|
|
225
|
+
buy_guard: "buy_guard";
|
|
226
226
|
"Forward.guard": "Forward.guard";
|
|
227
227
|
write_guard: "write_guard";
|
|
228
228
|
usage_guard: "usage_guard";
|
|
@@ -251,6 +251,11 @@ export declare const CallGuard_InputSchema: z.ZodObject<{
|
|
|
251
251
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
252
252
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
253
253
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
254
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
full: "full";
|
|
256
|
+
streamlined: "streamlined";
|
|
257
|
+
quiet: "quiet";
|
|
258
|
+
}>>;
|
|
254
259
|
}, z.core.$strict>>;
|
|
255
260
|
}, z.core.$strict>;
|
|
256
261
|
export declare const CallGenPassport_InputSchema: z.ZodObject<{
|
|
@@ -332,6 +337,11 @@ export declare const CallGenPassport_InputSchema: z.ZodObject<{
|
|
|
332
337
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
333
338
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
334
339
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
341
|
+
full: "full";
|
|
342
|
+
streamlined: "streamlined";
|
|
343
|
+
quiet: "quiet";
|
|
344
|
+
}>>;
|
|
335
345
|
}, z.core.$strict>>;
|
|
336
346
|
}, z.core.$strict>;
|
|
337
347
|
export declare const Guard2File_InputSchema: z.ZodObject<{
|
|
@@ -358,6 +368,11 @@ export declare const Guard2File_InputSchema: z.ZodObject<{
|
|
|
358
368
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
359
369
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
360
370
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
371
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
372
|
+
full: "full";
|
|
373
|
+
streamlined: "streamlined";
|
|
374
|
+
quiet: "quiet";
|
|
375
|
+
}>>;
|
|
361
376
|
}, z.core.$strict>>;
|
|
362
377
|
}, z.core.$strict>;
|
|
363
378
|
export declare const Guard2File_OutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -576,6 +576,11 @@ export declare const CallMachine_InputSchema: z.ZodObject<{
|
|
|
576
576
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
577
577
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
578
578
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
580
|
+
full: "full";
|
|
581
|
+
streamlined: "streamlined";
|
|
582
|
+
quiet: "quiet";
|
|
583
|
+
}>>;
|
|
579
584
|
}, z.core.$strict>>;
|
|
580
585
|
submission: z.ZodOptional<z.ZodObject<{
|
|
581
586
|
type: z.ZodLiteral<"submission">;
|
|
@@ -662,6 +667,11 @@ export declare const MachineNode2File_InputSchema: z.ZodObject<{
|
|
|
662
667
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
663
668
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
664
669
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
671
|
+
full: "full";
|
|
672
|
+
streamlined: "streamlined";
|
|
673
|
+
quiet: "quiet";
|
|
674
|
+
}>>;
|
|
665
675
|
}, z.core.$strict>>;
|
|
666
676
|
}, z.core.$strict>;
|
|
667
677
|
export declare const MachineNode2File_OutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -148,6 +148,11 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
|
|
|
148
148
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
149
149
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
150
150
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
152
|
+
full: "full";
|
|
153
|
+
streamlined: "streamlined";
|
|
154
|
+
quiet: "quiet";
|
|
155
|
+
}>>;
|
|
151
156
|
}, z.core.$strict>>;
|
|
152
157
|
submission: z.ZodOptional<z.ZodObject<{
|
|
153
158
|
type: z.ZodLiteral<"submission">;
|
|
@@ -119,6 +119,11 @@ export declare const CallPayment_InputSchema: z.ZodObject<{
|
|
|
119
119
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
120
120
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
121
121
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
full: "full";
|
|
124
|
+
streamlined: "streamlined";
|
|
125
|
+
quiet: "quiet";
|
|
126
|
+
}>>;
|
|
122
127
|
}, z.core.$strict>>;
|
|
123
128
|
}, z.core.$strict>;
|
|
124
129
|
export type Revenue = z.infer<typeof RevenueSchema>;
|
|
@@ -525,6 +525,11 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
525
525
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
526
526
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
527
527
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
528
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
529
|
+
full: "full";
|
|
530
|
+
streamlined: "streamlined";
|
|
531
|
+
quiet: "quiet";
|
|
532
|
+
}>>;
|
|
528
533
|
}, z.core.$strict>>;
|
|
529
534
|
submission: z.ZodOptional<z.ZodObject<{
|
|
530
535
|
type: z.ZodLiteral<"submission">;
|
|
@@ -457,6 +457,11 @@ export declare const CallPersonal_InputSchema: z.ZodObject<{
|
|
|
457
457
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
458
458
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
459
459
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
full: "full";
|
|
462
|
+
streamlined: "streamlined";
|
|
463
|
+
quiet: "quiet";
|
|
464
|
+
}>>;
|
|
460
465
|
}, z.core.$strict>>;
|
|
461
466
|
}, z.core.$strict>;
|
|
462
467
|
export type InformationAdd = z.infer<typeof InformationAddSchema>;
|
|
@@ -144,6 +144,11 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
144
144
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
145
145
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
146
146
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
full: "full";
|
|
149
|
+
streamlined: "streamlined";
|
|
150
|
+
quiet: "quiet";
|
|
151
|
+
}>>;
|
|
147
152
|
}, z.core.$strict>>;
|
|
148
153
|
submission: z.ZodOptional<z.ZodObject<{
|
|
149
154
|
type: z.ZodLiteral<"submission">;
|
|
@@ -47,6 +47,11 @@ export declare const CallProof_InputSchema: z.ZodObject<{
|
|
|
47
47
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
48
48
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
49
49
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
full: "full";
|
|
52
|
+
streamlined: "streamlined";
|
|
53
|
+
quiet: "quiet";
|
|
54
|
+
}>>;
|
|
50
55
|
}, z.core.$strict>>;
|
|
51
56
|
}, z.core.$strict>;
|
|
52
57
|
export declare const CallGenProof_InputSchema: z.ZodObject<{
|
|
@@ -74,6 +79,11 @@ export declare const CallGenProof_InputSchema: z.ZodObject<{
|
|
|
74
79
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
75
80
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
76
81
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
full: "full";
|
|
84
|
+
streamlined: "streamlined";
|
|
85
|
+
quiet: "quiet";
|
|
86
|
+
}>>;
|
|
77
87
|
}, z.core.$strict>>;
|
|
78
88
|
}, z.core.$strict>;
|
|
79
89
|
export type CallProof_Data = z.infer<typeof CallProof_DataSchema>;
|
|
@@ -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">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SemanticSummary, ObjectRole, FundRole, EventSemantic } from "./base.js";
|
|
2
|
+
import { type ErrorCodeValue } from "./error-codes.js";
|
|
2
3
|
export interface SemanticContext {
|
|
3
4
|
operation_type: string;
|
|
4
5
|
data: any;
|
|
@@ -8,7 +9,7 @@ export interface SemanticContext {
|
|
|
8
9
|
pre_warnings?: string[];
|
|
9
10
|
schema_check?: import("../schema-version.js").SchemaCheckResult;
|
|
10
11
|
}
|
|
11
|
-
export type ErrorCode =
|
|
12
|
+
export type ErrorCode = ErrorCodeValue;
|
|
12
13
|
export interface MoveAbortInfo {
|
|
13
14
|
module: string;
|
|
14
15
|
code: number;
|
|
@@ -20,6 +21,12 @@ export interface ErrorClassification {
|
|
|
20
21
|
recovery_hint?: string;
|
|
21
22
|
move_abort_info?: MoveAbortInfo;
|
|
22
23
|
}
|
|
24
|
+
interface MoveAbortMapping {
|
|
25
|
+
error_code: ErrorCode;
|
|
26
|
+
retryable?: boolean;
|
|
27
|
+
recovery_hint?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const MOVE_ABORT_ERROR_MAP: Record<string, MoveAbortMapping>;
|
|
23
30
|
export declare function normalizeErrorMessage(value: unknown): string;
|
|
24
31
|
export declare function classifyError(errorMsg: unknown, error?: unknown): ErrorClassification;
|
|
25
32
|
export declare function inferIntent(operation_type: string, data: any): string;
|
|
@@ -30,3 +37,4 @@ export declare function eventToSemantic(event: any): EventSemantic;
|
|
|
30
37
|
export declare function annotateEvents(events: any[] | undefined): EventSemantic[];
|
|
31
38
|
export declare function buildSemantic(safeResult: any, context?: SemanticContext): SemanticSummary | undefined;
|
|
32
39
|
export declare function buildDataSemantic(data: any, context?: SemanticContext, isError?: boolean, errorMsg?: string): SemanticSummary | undefined;
|
|
40
|
+
export {};
|