otto-execute 0.1.0

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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/dist/cdp-signer.d.ts +2 -0
  4. package/dist/cdp-signer.js +3 -0
  5. package/dist/cdp.d.ts +7 -0
  6. package/dist/cdp.js +8 -0
  7. package/dist/chain.d.ts +2 -0
  8. package/dist/chain.js +3 -0
  9. package/dist/cli.d.ts +17 -0
  10. package/dist/cli.js +400 -0
  11. package/dist/delegate.d.ts +117 -0
  12. package/dist/delegate.js +394 -0
  13. package/dist/eoa-signer.d.ts +94 -0
  14. package/dist/eoa-signer.js +289 -0
  15. package/dist/erc20.d.ts +2 -0
  16. package/dist/erc20.js +3 -0
  17. package/dist/index.d.ts +16 -0
  18. package/dist/index.js +19 -0
  19. package/dist/lifi-decode.d.ts +2 -0
  20. package/dist/lifi-decode.js +3 -0
  21. package/dist/mutations.d.ts +55 -0
  22. package/dist/mutations.js +363 -0
  23. package/dist/refusal.d.ts +2 -0
  24. package/dist/refusal.js +3 -0
  25. package/dist/vendor/otto-intel-mcp/VENDORED.json +52 -0
  26. package/dist/vendor/otto-intel-mcp/adapter/cdp-signer.d.ts +133 -0
  27. package/dist/vendor/otto-intel-mcp/adapter/cdp-signer.js +356 -0
  28. package/dist/vendor/otto-intel-mcp/adapter/chain.d.ts +36 -0
  29. package/dist/vendor/otto-intel-mcp/adapter/chain.js +65 -0
  30. package/dist/vendor/otto-intel-mcp/adapter/erc20.d.ts +39 -0
  31. package/dist/vendor/otto-intel-mcp/adapter/erc20.js +17 -0
  32. package/dist/vendor/otto-intel-mcp/adapter/lifi-decode.d.ts +52 -0
  33. package/dist/vendor/otto-intel-mcp/adapter/lifi-decode.js +149 -0
  34. package/dist/vendor/otto-intel-mcp/adapter/refusal.d.ts +21 -0
  35. package/dist/vendor/otto-intel-mcp/adapter/refusal.js +55 -0
  36. package/dist/vendor/otto-intel-mcp/adapter/sent-step.d.ts +15 -0
  37. package/dist/vendor/otto-intel-mcp/adapter/sent-step.js +6 -0
  38. package/dist/vendor/otto-intel-mcp/adapter/verify.d.ts +149 -0
  39. package/dist/vendor/otto-intel-mcp/adapter/verify.js +432 -0
  40. package/dist/vendor/otto-intel-mcp/adapter-cdp-index.d.ts +6 -0
  41. package/dist/vendor/otto-intel-mcp/adapter-cdp-index.js +7 -0
  42. package/dist/vendor/otto-intel-mcp/adapter-index.d.ts +15 -0
  43. package/dist/vendor/otto-intel-mcp/adapter-index.js +15 -0
  44. package/dist/vendor/otto-intel-mcp/artifact-id.d.ts +16 -0
  45. package/dist/vendor/otto-intel-mcp/artifact-id.js +60 -0
  46. package/dist/vendor/otto-intel-mcp/execution-config.d.ts +232 -0
  47. package/dist/vendor/otto-intel-mcp/execution-config.js +443 -0
  48. package/dist/vendor/otto-intel-mcp/execution-delegated-definition.d.ts +165 -0
  49. package/dist/vendor/otto-intel-mcp/execution-delegated-definition.js +116 -0
  50. package/dist/vendor/otto-intel-mcp/execution-delegation-admin-definition.d.ts +208 -0
  51. package/dist/vendor/otto-intel-mcp/execution-delegation-admin-definition.js +170 -0
  52. package/dist/vendor/otto-intel-mcp/execution-delegation-policy.d.ts +257 -0
  53. package/dist/vendor/otto-intel-mcp/execution-delegation-policy.js +279 -0
  54. package/dist/vendor/otto-intel-mcp/execution-errors.d.ts +9 -0
  55. package/dist/vendor/otto-intel-mcp/execution-errors.js +134 -0
  56. package/dist/vendor/otto-intel-mcp/execution-index.d.ts +17 -0
  57. package/dist/vendor/otto-intel-mcp/execution-index.js +16 -0
  58. package/dist/vendor/otto-intel-mcp/execution-intent.d.ts +14 -0
  59. package/dist/vendor/otto-intel-mcp/execution-intent.js +36 -0
  60. package/dist/vendor/otto-intel-mcp/execution-tool-definitions.d.ts +1103 -0
  61. package/dist/vendor/otto-intel-mcp/execution-tool-definitions.js +1051 -0
  62. package/dist/vendor/otto-intel-mcp/execution-types.d.ts +274 -0
  63. package/dist/vendor/otto-intel-mcp/execution-types.js +157 -0
  64. package/dist/verify.d.ts +2 -0
  65. package/dist/verify.js +3 -0
  66. package/dist/x402-table.d.ts +99 -0
  67. package/dist/x402-table.js +221 -0
  68. package/package.json +97 -0
@@ -0,0 +1,1103 @@
1
+ import { z } from 'zod';
2
+ export declare const ACCOUNT_PROFILE_SCHEMA: z.ZodObject<{
3
+ kind: z.ZodEnum<{
4
+ safe: "safe";
5
+ eoa: "eoa";
6
+ }>;
7
+ address: z.ZodString;
8
+ chainId: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ export declare const PREPARE_SWAP_INPUT_SCHEMA: z.ZodObject<{
11
+ accountProfile: z.ZodObject<{
12
+ kind: z.ZodEnum<{
13
+ safe: "safe";
14
+ eoa: "eoa";
15
+ }>;
16
+ address: z.ZodString;
17
+ chainId: z.ZodNumber;
18
+ }, z.core.$strict>;
19
+ chainId: z.ZodNumber;
20
+ fromToken: z.ZodString;
21
+ toToken: z.ZodString;
22
+ fromAmount: z.ZodString;
23
+ slippage: z.ZodObject<{
24
+ maxBps: z.ZodNumber;
25
+ minAmountOut: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strict>;
27
+ client_ref: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strict>;
29
+ export declare const PREPARE_BRIDGE_INPUT_SCHEMA: z.ZodObject<{
30
+ accountProfile: z.ZodObject<{
31
+ kind: z.ZodEnum<{
32
+ safe: "safe";
33
+ eoa: "eoa";
34
+ }>;
35
+ address: z.ZodString;
36
+ chainId: z.ZodNumber;
37
+ }, z.core.$strict>;
38
+ fromChainId: z.ZodNumber;
39
+ toChainId: z.ZodNumber;
40
+ fromToken: z.ZodString;
41
+ toToken: z.ZodString;
42
+ fromAmount: z.ZodString;
43
+ destinationRecipient: z.ZodOptional<z.ZodString>;
44
+ slippage: z.ZodObject<{
45
+ maxBps: z.ZodNumber;
46
+ minAmountOut: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strict>;
48
+ client_ref: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ interface DecodedApproval {
51
+ readonly spender: string;
52
+ readonly amount: bigint;
53
+ }
54
+ /**
55
+ * Decode a canonical `approve(address,uint256)` call. Returns undefined for any other calldata,
56
+ * so the envelope schema can bind approval shape without trusting the step's declared kind.
57
+ */
58
+ export declare function decodeApprovalCalldata(data: string): DecodedApproval | undefined;
59
+ export declare const EXECUTION_ENVELOPE_SCHEMA: z.ZodObject<{
60
+ schema_version: z.ZodLiteral<"1">;
61
+ artifact_id: z.ZodString;
62
+ rail: z.ZodLiteral<"lifi">;
63
+ operation: z.ZodLiteral<"swap">;
64
+ intent_digest: z.ZodString;
65
+ account_binding: z.ZodObject<{
66
+ kind: z.ZodEnum<{
67
+ safe: "safe";
68
+ eoa: "eoa";
69
+ }>;
70
+ address: z.ZodString;
71
+ chainId: z.ZodNumber;
72
+ protocol_roles: z.ZodObject<{
73
+ lifi: z.ZodObject<{
74
+ sender: z.ZodString;
75
+ receiver: z.ZodString;
76
+ }, z.core.$strict>;
77
+ }, z.core.$strict>;
78
+ }, z.core.$strict>;
79
+ required_capabilities: z.ZodArray<z.ZodEnum<{
80
+ send_evm_transaction: "send_evm_transaction";
81
+ submit_evm_batch: "submit_evm_batch";
82
+ }>>;
83
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ kind: z.ZodLiteral<"evm_execution_plan">;
85
+ chain_id: z.ZodNumber;
86
+ steps: z.ZodArray<z.ZodObject<{
87
+ to: z.ZodString;
88
+ value: z.ZodString;
89
+ data: z.ZodString;
90
+ kind: z.ZodEnum<{
91
+ call: "call";
92
+ approve_reset: "approve_reset";
93
+ approve: "approve";
94
+ }>;
95
+ }, z.core.$strict>>;
96
+ }, z.core.$strict>], "kind">;
97
+ fee_attribution: z.ZodObject<{
98
+ mechanism: z.ZodLiteral<"lifi_integrator_fee">;
99
+ config_version: z.ZodString;
100
+ }, z.core.$strict>;
101
+ replay_disclosure: z.ZodObject<{
102
+ artifact_role: z.ZodLiteral<"construction_aid">;
103
+ freshness_boundary: z.ZodLiteral<"valid_until">;
104
+ onchain_replay_boundary: z.ZodLiteral<"signer_account_nonce">;
105
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
106
+ }, z.core.$strict>;
107
+ assertions: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ result: z.ZodLiteral<"passed">;
110
+ }, z.core.$strict>>;
111
+ valid_until: z.ZodString;
112
+ submission: z.ZodObject<{
113
+ method: z.ZodEnum<{
114
+ send_evm_transaction: "send_evm_transaction";
115
+ submit_evm_batch: "submit_evm_batch";
116
+ }>;
117
+ chain_id: z.ZodNumber;
118
+ artifact_id: z.ZodString;
119
+ payload_digest: z.ZodString;
120
+ artifact_digest: z.ZodString;
121
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"gas">, z.ZodLiteral<"serialization">], null>;
122
+ client_ref: z.ZodOptional<z.ZodString>;
123
+ }, z.core.$strict>;
124
+ }, z.core.$strict>;
125
+ export declare const BRIDGE_EXECUTION_ENVELOPE_SCHEMA: z.ZodObject<{
126
+ schema_version: z.ZodLiteral<"1">;
127
+ artifact_id: z.ZodString;
128
+ rail: z.ZodLiteral<"lifi">;
129
+ operation: z.ZodLiteral<"bridge">;
130
+ intent_digest: z.ZodString;
131
+ account_binding: z.ZodObject<{
132
+ kind: z.ZodEnum<{
133
+ safe: "safe";
134
+ eoa: "eoa";
135
+ }>;
136
+ address: z.ZodString;
137
+ chainId: z.ZodNumber;
138
+ protocol_roles: z.ZodObject<{
139
+ lifi: z.ZodObject<{
140
+ sender: z.ZodString;
141
+ receiver: z.ZodString;
142
+ source_chain_id: z.ZodNumber;
143
+ destination_chain_id: z.ZodNumber;
144
+ sending_asset: z.ZodString;
145
+ receiving_asset: z.ZodString;
146
+ }, z.core.$strict>;
147
+ }, z.core.$strict>;
148
+ }, z.core.$strict>;
149
+ required_capabilities: z.ZodArray<z.ZodEnum<{
150
+ send_evm_transaction: "send_evm_transaction";
151
+ submit_evm_batch: "submit_evm_batch";
152
+ }>>;
153
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
+ kind: z.ZodLiteral<"evm_execution_plan">;
155
+ chain_id: z.ZodNumber;
156
+ steps: z.ZodArray<z.ZodObject<{
157
+ to: z.ZodString;
158
+ value: z.ZodString;
159
+ data: z.ZodString;
160
+ kind: z.ZodEnum<{
161
+ call: "call";
162
+ approve_reset: "approve_reset";
163
+ approve: "approve";
164
+ }>;
165
+ }, z.core.$strict>>;
166
+ }, z.core.$strict>], "kind">;
167
+ fee_attribution: z.ZodObject<{
168
+ mechanism: z.ZodLiteral<"lifi_integrator_fee">;
169
+ config_version: z.ZodString;
170
+ }, z.core.$strict>;
171
+ replay_disclosure: z.ZodObject<{
172
+ artifact_role: z.ZodLiteral<"construction_aid">;
173
+ freshness_boundary: z.ZodLiteral<"valid_until">;
174
+ onchain_replay_boundary: z.ZodLiteral<"signer_account_nonce">;
175
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
176
+ }, z.core.$strict>;
177
+ assertions: z.ZodArray<z.ZodObject<{
178
+ id: z.ZodString;
179
+ result: z.ZodLiteral<"passed">;
180
+ }, z.core.$strict>>;
181
+ valid_until: z.ZodString;
182
+ submission: z.ZodObject<{
183
+ method: z.ZodEnum<{
184
+ send_evm_transaction: "send_evm_transaction";
185
+ submit_evm_batch: "submit_evm_batch";
186
+ }>;
187
+ chain_id: z.ZodNumber;
188
+ artifact_id: z.ZodString;
189
+ payload_digest: z.ZodString;
190
+ artifact_digest: z.ZodString;
191
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"gas">, z.ZodLiteral<"serialization">], null>;
192
+ client_ref: z.ZodOptional<z.ZodString>;
193
+ }, z.core.$strict>;
194
+ }, z.core.$strict>;
195
+ export declare const PREPARE_POLYMARKET_ORDER_INPUT_SCHEMA: z.ZodObject<{
196
+ accountProfile: z.ZodObject<{
197
+ kind: z.ZodEnum<{
198
+ safe: "safe";
199
+ eoa: "eoa";
200
+ }>;
201
+ address: z.ZodString;
202
+ chainId: z.ZodNumber;
203
+ }, z.core.$strict>;
204
+ tokenId: z.ZodString;
205
+ side: z.ZodEnum<{
206
+ BUY: "BUY";
207
+ SELL: "SELL";
208
+ }>;
209
+ price: z.ZodString;
210
+ size: z.ZodString;
211
+ client_ref: z.ZodOptional<z.ZodString>;
212
+ }, z.core.$strict>;
213
+ /** The SDK's own order args, pre-signing. No `signature` field exists on this shape by design. */
214
+ declare const POLYMARKET_ORDER_ARGS_SCHEMA: z.ZodObject<{
215
+ salt: z.ZodString;
216
+ maker: z.ZodString;
217
+ signer: z.ZodString;
218
+ tokenId: z.ZodString;
219
+ makerAmount: z.ZodString;
220
+ takerAmount: z.ZodString;
221
+ side: z.ZodEnum<{
222
+ BUY: "BUY";
223
+ SELL: "SELL";
224
+ }>;
225
+ signatureType: z.ZodLiteral<0>;
226
+ metadata: z.ZodString;
227
+ builder: z.ZodString;
228
+ timestamp: z.ZodString;
229
+ expiration: z.ZodString;
230
+ }, z.core.$strict>;
231
+ declare const POLYMARKET_TYPED_DATA_SCHEMA: z.ZodObject<{
232
+ primary_type: z.ZodLiteral<"Order">;
233
+ domain: z.ZodObject<{
234
+ name: z.ZodLiteral<"Polymarket CTF Exchange">;
235
+ version: z.ZodLiteral<"2">;
236
+ chainId: z.ZodLiteral<137>;
237
+ verifyingContract: z.ZodString;
238
+ }, z.core.$strict>;
239
+ types: z.ZodObject<{
240
+ Order: z.ZodArray<z.ZodObject<{
241
+ name: z.ZodString;
242
+ type: z.ZodString;
243
+ }, z.core.$strict>>;
244
+ }, z.core.$strict>;
245
+ message: z.ZodObject<{
246
+ salt: z.ZodString;
247
+ maker: z.ZodString;
248
+ signer: z.ZodString;
249
+ tokenId: z.ZodString;
250
+ makerAmount: z.ZodString;
251
+ takerAmount: z.ZodString;
252
+ side: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
253
+ signatureType: z.ZodLiteral<0>;
254
+ timestamp: z.ZodString;
255
+ metadata: z.ZodString;
256
+ builder: z.ZodString;
257
+ }, z.core.$strict>;
258
+ }, z.core.$strict>;
259
+ export declare const POLYMARKET_ORDER_PAYLOAD_SCHEMA: z.ZodObject<{
260
+ kind: z.ZodLiteral<"polymarket_order_v2">;
261
+ chain_id: z.ZodLiteral<137>;
262
+ exchange: z.ZodString;
263
+ neg_risk: z.ZodBoolean;
264
+ tick_size: z.ZodEnum<{
265
+ 0.1: "0.1";
266
+ 0.01: "0.01";
267
+ 0.001: "0.001";
268
+ 0.0001: "0.0001";
269
+ }>;
270
+ order_type: z.ZodLiteral<"GTC">;
271
+ order: z.ZodObject<{
272
+ salt: z.ZodString;
273
+ maker: z.ZodString;
274
+ signer: z.ZodString;
275
+ tokenId: z.ZodString;
276
+ makerAmount: z.ZodString;
277
+ takerAmount: z.ZodString;
278
+ side: z.ZodEnum<{
279
+ BUY: "BUY";
280
+ SELL: "SELL";
281
+ }>;
282
+ signatureType: z.ZodLiteral<0>;
283
+ metadata: z.ZodString;
284
+ builder: z.ZodString;
285
+ timestamp: z.ZodString;
286
+ expiration: z.ZodString;
287
+ }, z.core.$strict>;
288
+ eip712: z.ZodObject<{
289
+ primary_type: z.ZodLiteral<"Order">;
290
+ domain: z.ZodObject<{
291
+ name: z.ZodLiteral<"Polymarket CTF Exchange">;
292
+ version: z.ZodLiteral<"2">;
293
+ chainId: z.ZodLiteral<137>;
294
+ verifyingContract: z.ZodString;
295
+ }, z.core.$strict>;
296
+ types: z.ZodObject<{
297
+ Order: z.ZodArray<z.ZodObject<{
298
+ name: z.ZodString;
299
+ type: z.ZodString;
300
+ }, z.core.$strict>>;
301
+ }, z.core.$strict>;
302
+ message: z.ZodObject<{
303
+ salt: z.ZodString;
304
+ maker: z.ZodString;
305
+ signer: z.ZodString;
306
+ tokenId: z.ZodString;
307
+ makerAmount: z.ZodString;
308
+ takerAmount: z.ZodString;
309
+ side: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
310
+ signatureType: z.ZodLiteral<0>;
311
+ timestamp: z.ZodString;
312
+ metadata: z.ZodString;
313
+ builder: z.ZodString;
314
+ }, z.core.$strict>;
315
+ }, z.core.$strict>;
316
+ order_hash: z.ZodString;
317
+ }, z.core.$strict>;
318
+ export declare const POLYMARKET_EXECUTION_ENVELOPE_SCHEMA: z.ZodObject<{
319
+ schema_version: z.ZodLiteral<"1">;
320
+ artifact_id: z.ZodString;
321
+ rail: z.ZodLiteral<"polymarket">;
322
+ operation: z.ZodLiteral<"pm_order">;
323
+ intent_digest: z.ZodString;
324
+ account_binding: z.ZodObject<{
325
+ kind: z.ZodEnum<{
326
+ safe: "safe";
327
+ eoa: "eoa";
328
+ }>;
329
+ address: z.ZodString;
330
+ chainId: z.ZodNumber;
331
+ protocol_roles: z.ZodObject<{
332
+ polymarket: z.ZodObject<{
333
+ maker: z.ZodString;
334
+ signer: z.ZodString;
335
+ funder: z.ZodString;
336
+ exchange: z.ZodString;
337
+ token_id: z.ZodString;
338
+ signature_type: z.ZodLiteral<0>;
339
+ }, z.core.$strict>;
340
+ }, z.core.$strict>;
341
+ }, z.core.$strict>;
342
+ required_capabilities: z.ZodTuple<[z.ZodLiteral<"sign_eip712">], null>;
343
+ payload: z.ZodObject<{
344
+ kind: z.ZodLiteral<"polymarket_order_v2">;
345
+ chain_id: z.ZodLiteral<137>;
346
+ exchange: z.ZodString;
347
+ neg_risk: z.ZodBoolean;
348
+ tick_size: z.ZodEnum<{
349
+ 0.1: "0.1";
350
+ 0.01: "0.01";
351
+ 0.001: "0.001";
352
+ 0.0001: "0.0001";
353
+ }>;
354
+ order_type: z.ZodLiteral<"GTC">;
355
+ order: z.ZodObject<{
356
+ salt: z.ZodString;
357
+ maker: z.ZodString;
358
+ signer: z.ZodString;
359
+ tokenId: z.ZodString;
360
+ makerAmount: z.ZodString;
361
+ takerAmount: z.ZodString;
362
+ side: z.ZodEnum<{
363
+ BUY: "BUY";
364
+ SELL: "SELL";
365
+ }>;
366
+ signatureType: z.ZodLiteral<0>;
367
+ metadata: z.ZodString;
368
+ builder: z.ZodString;
369
+ timestamp: z.ZodString;
370
+ expiration: z.ZodString;
371
+ }, z.core.$strict>;
372
+ eip712: z.ZodObject<{
373
+ primary_type: z.ZodLiteral<"Order">;
374
+ domain: z.ZodObject<{
375
+ name: z.ZodLiteral<"Polymarket CTF Exchange">;
376
+ version: z.ZodLiteral<"2">;
377
+ chainId: z.ZodLiteral<137>;
378
+ verifyingContract: z.ZodString;
379
+ }, z.core.$strict>;
380
+ types: z.ZodObject<{
381
+ Order: z.ZodArray<z.ZodObject<{
382
+ name: z.ZodString;
383
+ type: z.ZodString;
384
+ }, z.core.$strict>>;
385
+ }, z.core.$strict>;
386
+ message: z.ZodObject<{
387
+ salt: z.ZodString;
388
+ maker: z.ZodString;
389
+ signer: z.ZodString;
390
+ tokenId: z.ZodString;
391
+ makerAmount: z.ZodString;
392
+ takerAmount: z.ZodString;
393
+ side: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
394
+ signatureType: z.ZodLiteral<0>;
395
+ timestamp: z.ZodString;
396
+ metadata: z.ZodString;
397
+ builder: z.ZodString;
398
+ }, z.core.$strict>;
399
+ }, z.core.$strict>;
400
+ order_hash: z.ZodString;
401
+ }, z.core.$strict>;
402
+ fee_attribution: z.ZodObject<{
403
+ mechanism: z.ZodLiteral<"polymarket_builder_code">;
404
+ config_version: z.ZodString;
405
+ }, z.core.$strict>;
406
+ replay_disclosure: z.ZodObject<{
407
+ artifact_role: z.ZodLiteral<"construction_aid">;
408
+ freshness_boundary: z.ZodLiteral<"valid_until">;
409
+ onchain_replay_boundary: z.ZodLiteral<"exchange_order_hash">;
410
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
411
+ }, z.core.$strict>;
412
+ assertions: z.ZodArray<z.ZodObject<{
413
+ id: z.ZodString;
414
+ result: z.ZodLiteral<"passed">;
415
+ }, z.core.$strict>>;
416
+ valid_until: z.ZodString;
417
+ submission: z.ZodObject<{
418
+ method: z.ZodLiteral<"sign_eip712">;
419
+ chain_id: z.ZodLiteral<137>;
420
+ artifact_id: z.ZodString;
421
+ payload_digest: z.ZodString;
422
+ artifact_digest: z.ZodString;
423
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"signature">, z.ZodLiteral<"clob_post">], null>;
424
+ client_ref: z.ZodOptional<z.ZodString>;
425
+ }, z.core.$strict>;
426
+ }, z.core.$strict>;
427
+ /**
428
+ * One order leg, with keys declared in the venue's canonical msgpack order. The declaration order is
429
+ * load-bearing: zod rebuilds parsed objects in schema order, so this is what fixes the key order of
430
+ * the emitted artifact, and the envelope's own refinement checks it against
431
+ * `HYPERLIQUID_ORDER_KEY_ORDER` so a schema edit that drifts from the pinned order fails loudly.
432
+ */
433
+ declare const HYPERLIQUID_ORDER_LEG_SCHEMA: z.ZodObject<{
434
+ a: z.ZodNumber;
435
+ b: z.ZodBoolean;
436
+ p: z.ZodString;
437
+ s: z.ZodString;
438
+ r: z.ZodBoolean;
439
+ t: z.ZodUnion<readonly [z.ZodObject<{
440
+ limit: z.ZodObject<{
441
+ tif: z.ZodEnum<{
442
+ Gtc: "Gtc";
443
+ Ioc: "Ioc";
444
+ Alo: "Alo";
445
+ }>;
446
+ }, z.core.$strict>;
447
+ }, z.core.$strict>, z.ZodObject<{
448
+ trigger: z.ZodObject<{
449
+ isMarket: z.ZodLiteral<true>;
450
+ triggerPx: z.ZodString;
451
+ tpsl: z.ZodEnum<{
452
+ tp: "tp";
453
+ sl: "sl";
454
+ }>;
455
+ }, z.core.$strict>;
456
+ }, z.core.$strict>]>;
457
+ c: z.ZodString;
458
+ }, z.core.$strict>;
459
+ /**
460
+ * The canonical `order` action. `.strict()` is the schema-level bind on the RULED valueless builder
461
+ * field (spec §7.2): a `builder` key cannot pass envelope validation at all, so an unruled attribution
462
+ * value cannot reach an artifact through this schema even if a future constructor tried to stamp one.
463
+ */
464
+ declare const HYPERLIQUID_ORDER_ACTION_SCHEMA: z.ZodObject<{
465
+ type: z.ZodLiteral<"order">;
466
+ orders: z.ZodArray<z.ZodObject<{
467
+ a: z.ZodNumber;
468
+ b: z.ZodBoolean;
469
+ p: z.ZodString;
470
+ s: z.ZodString;
471
+ r: z.ZodBoolean;
472
+ t: z.ZodUnion<readonly [z.ZodObject<{
473
+ limit: z.ZodObject<{
474
+ tif: z.ZodEnum<{
475
+ Gtc: "Gtc";
476
+ Ioc: "Ioc";
477
+ Alo: "Alo";
478
+ }>;
479
+ }, z.core.$strict>;
480
+ }, z.core.$strict>, z.ZodObject<{
481
+ trigger: z.ZodObject<{
482
+ isMarket: z.ZodLiteral<true>;
483
+ triggerPx: z.ZodString;
484
+ tpsl: z.ZodEnum<{
485
+ tp: "tp";
486
+ sl: "sl";
487
+ }>;
488
+ }, z.core.$strict>;
489
+ }, z.core.$strict>]>;
490
+ c: z.ZodString;
491
+ }, z.core.$strict>>;
492
+ grouping: z.ZodEnum<{
493
+ na: "na";
494
+ normalTpsl: "normalTpsl";
495
+ }>;
496
+ }, z.core.$strict>;
497
+ declare const HYPERLIQUID_SIGNING_DECLARATION_SCHEMA: z.ZodObject<{
498
+ scheme: z.ZodLiteral<"hyperliquid_l1_agent_eip712">;
499
+ primary_type: z.ZodLiteral<"Agent">;
500
+ domain: z.ZodObject<{
501
+ name: z.ZodLiteral<"Exchange">;
502
+ version: z.ZodLiteral<"1">;
503
+ chainId: z.ZodLiteral<1337>;
504
+ verifyingContract: z.ZodLiteral<"0x0000000000000000000000000000000000000000">;
505
+ }, z.core.$strict>;
506
+ types: z.ZodObject<{
507
+ Agent: z.ZodArray<z.ZodObject<{
508
+ name: z.ZodString;
509
+ type: z.ZodString;
510
+ }, z.core.$strict>>;
511
+ }, z.core.$strict>;
512
+ source: z.ZodLiteral<"a">;
513
+ connection_id: z.ZodObject<{
514
+ hash: z.ZodLiteral<"keccak256">;
515
+ preimage: z.ZodTuple<[z.ZodLiteral<"msgpack(action)">, z.ZodLiteral<"nonce_uint64_be">, z.ZodLiteral<"vault_address_marker">, z.ZodLiteral<"vault_address_bytes">, z.ZodLiteral<"expires_after_marker">, z.ZodLiteral<"expires_after_uint64_be">], null>;
516
+ nonce_owner: z.ZodLiteral<"adapter">;
517
+ }, z.core.$strict>;
518
+ }, z.core.$strict>;
519
+ export declare const HYPERLIQUID_L1_ACTION_PAYLOAD_SCHEMA: z.ZodObject<{
520
+ kind: z.ZodLiteral<"hyperliquid_l1_action">;
521
+ chain_id: z.ZodLiteral<1337>;
522
+ action: z.ZodObject<{
523
+ type: z.ZodLiteral<"order">;
524
+ orders: z.ZodArray<z.ZodObject<{
525
+ a: z.ZodNumber;
526
+ b: z.ZodBoolean;
527
+ p: z.ZodString;
528
+ s: z.ZodString;
529
+ r: z.ZodBoolean;
530
+ t: z.ZodUnion<readonly [z.ZodObject<{
531
+ limit: z.ZodObject<{
532
+ tif: z.ZodEnum<{
533
+ Gtc: "Gtc";
534
+ Ioc: "Ioc";
535
+ Alo: "Alo";
536
+ }>;
537
+ }, z.core.$strict>;
538
+ }, z.core.$strict>, z.ZodObject<{
539
+ trigger: z.ZodObject<{
540
+ isMarket: z.ZodLiteral<true>;
541
+ triggerPx: z.ZodString;
542
+ tpsl: z.ZodEnum<{
543
+ tp: "tp";
544
+ sl: "sl";
545
+ }>;
546
+ }, z.core.$strict>;
547
+ }, z.core.$strict>]>;
548
+ c: z.ZodString;
549
+ }, z.core.$strict>>;
550
+ grouping: z.ZodEnum<{
551
+ na: "na";
552
+ normalTpsl: "normalTpsl";
553
+ }>;
554
+ }, z.core.$strict>;
555
+ signing: z.ZodObject<{
556
+ scheme: z.ZodLiteral<"hyperliquid_l1_agent_eip712">;
557
+ primary_type: z.ZodLiteral<"Agent">;
558
+ domain: z.ZodObject<{
559
+ name: z.ZodLiteral<"Exchange">;
560
+ version: z.ZodLiteral<"1">;
561
+ chainId: z.ZodLiteral<1337>;
562
+ verifyingContract: z.ZodLiteral<"0x0000000000000000000000000000000000000000">;
563
+ }, z.core.$strict>;
564
+ types: z.ZodObject<{
565
+ Agent: z.ZodArray<z.ZodObject<{
566
+ name: z.ZodString;
567
+ type: z.ZodString;
568
+ }, z.core.$strict>>;
569
+ }, z.core.$strict>;
570
+ source: z.ZodLiteral<"a">;
571
+ connection_id: z.ZodObject<{
572
+ hash: z.ZodLiteral<"keccak256">;
573
+ preimage: z.ZodTuple<[z.ZodLiteral<"msgpack(action)">, z.ZodLiteral<"nonce_uint64_be">, z.ZodLiteral<"vault_address_marker">, z.ZodLiteral<"vault_address_bytes">, z.ZodLiteral<"expires_after_marker">, z.ZodLiteral<"expires_after_uint64_be">], null>;
574
+ nonce_owner: z.ZodLiteral<"adapter">;
575
+ }, z.core.$strict>;
576
+ }, z.core.$strict>;
577
+ vault_address: z.ZodNullable<z.ZodString>;
578
+ expires_after: z.ZodNumber;
579
+ }, z.core.$strict>;
580
+ export declare const PREPARE_PERP_ORDER_INPUT_SCHEMA: z.ZodObject<{
581
+ accountProfile: z.ZodObject<{
582
+ kind: z.ZodEnum<{
583
+ safe: "safe";
584
+ eoa: "eoa";
585
+ }>;
586
+ address: z.ZodString;
587
+ chainId: z.ZodNumber;
588
+ }, z.core.$strict>;
589
+ asset: z.ZodString;
590
+ side: z.ZodEnum<{
591
+ BUY: "BUY";
592
+ SELL: "SELL";
593
+ }>;
594
+ size: z.ZodString;
595
+ limitPrice: z.ZodString;
596
+ timeInForce: z.ZodDefault<z.ZodEnum<{
597
+ Gtc: "Gtc";
598
+ Ioc: "Ioc";
599
+ Alo: "Alo";
600
+ }>>;
601
+ reduceOnly: z.ZodDefault<z.ZodBoolean>;
602
+ takeProfitPrice: z.ZodOptional<z.ZodString>;
603
+ stopLossPrice: z.ZodOptional<z.ZodString>;
604
+ tradingSigner: z.ZodOptional<z.ZodString>;
605
+ vaultAddress: z.ZodOptional<z.ZodString>;
606
+ client_ref: z.ZodOptional<z.ZodString>;
607
+ }, z.core.$strict>;
608
+ export declare const HYPERLIQUID_EXECUTION_ENVELOPE_SCHEMA: z.ZodObject<{
609
+ schema_version: z.ZodLiteral<"1">;
610
+ artifact_id: z.ZodString;
611
+ rail: z.ZodLiteral<"hyperliquid">;
612
+ operation: z.ZodLiteral<"perp_order">;
613
+ intent_digest: z.ZodString;
614
+ account_binding: z.ZodObject<{
615
+ kind: z.ZodEnum<{
616
+ safe: "safe";
617
+ eoa: "eoa";
618
+ }>;
619
+ address: z.ZodString;
620
+ chainId: z.ZodNumber;
621
+ protocol_roles: z.ZodObject<{
622
+ hyperliquid: z.ZodObject<{
623
+ master: z.ZodString;
624
+ trading_signer: z.ZodString;
625
+ vault_address: z.ZodNullable<z.ZodString>;
626
+ asset: z.ZodString;
627
+ asset_id: z.ZodNumber;
628
+ sz_decimals: z.ZodNumber;
629
+ }, z.core.$strict>;
630
+ }, z.core.$strict>;
631
+ }, z.core.$strict>;
632
+ required_capabilities: z.ZodTuple<[z.ZodLiteral<"sign_hyperliquid_l1">], null>;
633
+ payload: z.ZodObject<{
634
+ kind: z.ZodLiteral<"hyperliquid_l1_action">;
635
+ chain_id: z.ZodLiteral<1337>;
636
+ action: z.ZodObject<{
637
+ type: z.ZodLiteral<"order">;
638
+ orders: z.ZodArray<z.ZodObject<{
639
+ a: z.ZodNumber;
640
+ b: z.ZodBoolean;
641
+ p: z.ZodString;
642
+ s: z.ZodString;
643
+ r: z.ZodBoolean;
644
+ t: z.ZodUnion<readonly [z.ZodObject<{
645
+ limit: z.ZodObject<{
646
+ tif: z.ZodEnum<{
647
+ Gtc: "Gtc";
648
+ Ioc: "Ioc";
649
+ Alo: "Alo";
650
+ }>;
651
+ }, z.core.$strict>;
652
+ }, z.core.$strict>, z.ZodObject<{
653
+ trigger: z.ZodObject<{
654
+ isMarket: z.ZodLiteral<true>;
655
+ triggerPx: z.ZodString;
656
+ tpsl: z.ZodEnum<{
657
+ tp: "tp";
658
+ sl: "sl";
659
+ }>;
660
+ }, z.core.$strict>;
661
+ }, z.core.$strict>]>;
662
+ c: z.ZodString;
663
+ }, z.core.$strict>>;
664
+ grouping: z.ZodEnum<{
665
+ na: "na";
666
+ normalTpsl: "normalTpsl";
667
+ }>;
668
+ }, z.core.$strict>;
669
+ signing: z.ZodObject<{
670
+ scheme: z.ZodLiteral<"hyperliquid_l1_agent_eip712">;
671
+ primary_type: z.ZodLiteral<"Agent">;
672
+ domain: z.ZodObject<{
673
+ name: z.ZodLiteral<"Exchange">;
674
+ version: z.ZodLiteral<"1">;
675
+ chainId: z.ZodLiteral<1337>;
676
+ verifyingContract: z.ZodLiteral<"0x0000000000000000000000000000000000000000">;
677
+ }, z.core.$strict>;
678
+ types: z.ZodObject<{
679
+ Agent: z.ZodArray<z.ZodObject<{
680
+ name: z.ZodString;
681
+ type: z.ZodString;
682
+ }, z.core.$strict>>;
683
+ }, z.core.$strict>;
684
+ source: z.ZodLiteral<"a">;
685
+ connection_id: z.ZodObject<{
686
+ hash: z.ZodLiteral<"keccak256">;
687
+ preimage: z.ZodTuple<[z.ZodLiteral<"msgpack(action)">, z.ZodLiteral<"nonce_uint64_be">, z.ZodLiteral<"vault_address_marker">, z.ZodLiteral<"vault_address_bytes">, z.ZodLiteral<"expires_after_marker">, z.ZodLiteral<"expires_after_uint64_be">], null>;
688
+ nonce_owner: z.ZodLiteral<"adapter">;
689
+ }, z.core.$strict>;
690
+ }, z.core.$strict>;
691
+ vault_address: z.ZodNullable<z.ZodString>;
692
+ expires_after: z.ZodNumber;
693
+ }, z.core.$strict>;
694
+ fee_attribution: z.ZodObject<{
695
+ mechanism: z.ZodLiteral<"hyperliquid_builder_fee">;
696
+ config_version: z.ZodString;
697
+ status: z.ZodLiteral<"pending_step0_builder_fee_approval">;
698
+ }, z.core.$strict>;
699
+ replay_disclosure: z.ZodObject<{
700
+ artifact_role: z.ZodLiteral<"construction_aid">;
701
+ freshness_boundary: z.ZodLiteral<"valid_until">;
702
+ onchain_replay_boundary: z.ZodLiteral<"signer_nonce_and_expires_after">;
703
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
704
+ }, z.core.$strict>;
705
+ assertions: z.ZodArray<z.ZodObject<{
706
+ id: z.ZodString;
707
+ result: z.ZodLiteral<"passed">;
708
+ }, z.core.$strict>>;
709
+ valid_until: z.ZodString;
710
+ submission: z.ZodObject<{
711
+ method: z.ZodLiteral<"sign_hyperliquid_l1">;
712
+ chain_id: z.ZodLiteral<1337>;
713
+ artifact_id: z.ZodString;
714
+ payload_digest: z.ZodString;
715
+ artifact_digest: z.ZodString;
716
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"signature">, z.ZodLiteral<"exchange_post">], null>;
717
+ client_ref: z.ZodOptional<z.ZodString>;
718
+ }, z.core.$strict>;
719
+ }, z.core.$strict>;
720
+ /**
721
+ * Every artifact this MCP produces. Operation is a literal on each branch, so a swap artifact can
722
+ * never satisfy the bridge branch or the reverse — the union widens what adapters accept without
723
+ * loosening either branch's binds.
724
+ */
725
+ export declare const EXECUTION_ARTIFACT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
726
+ schema_version: z.ZodLiteral<"1">;
727
+ artifact_id: z.ZodString;
728
+ rail: z.ZodLiteral<"lifi">;
729
+ operation: z.ZodLiteral<"swap">;
730
+ intent_digest: z.ZodString;
731
+ account_binding: z.ZodObject<{
732
+ kind: z.ZodEnum<{
733
+ safe: "safe";
734
+ eoa: "eoa";
735
+ }>;
736
+ address: z.ZodString;
737
+ chainId: z.ZodNumber;
738
+ protocol_roles: z.ZodObject<{
739
+ lifi: z.ZodObject<{
740
+ sender: z.ZodString;
741
+ receiver: z.ZodString;
742
+ }, z.core.$strict>;
743
+ }, z.core.$strict>;
744
+ }, z.core.$strict>;
745
+ required_capabilities: z.ZodArray<z.ZodEnum<{
746
+ send_evm_transaction: "send_evm_transaction";
747
+ submit_evm_batch: "submit_evm_batch";
748
+ }>>;
749
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
750
+ kind: z.ZodLiteral<"evm_execution_plan">;
751
+ chain_id: z.ZodNumber;
752
+ steps: z.ZodArray<z.ZodObject<{
753
+ to: z.ZodString;
754
+ value: z.ZodString;
755
+ data: z.ZodString;
756
+ kind: z.ZodEnum<{
757
+ call: "call";
758
+ approve_reset: "approve_reset";
759
+ approve: "approve";
760
+ }>;
761
+ }, z.core.$strict>>;
762
+ }, z.core.$strict>], "kind">;
763
+ fee_attribution: z.ZodObject<{
764
+ mechanism: z.ZodLiteral<"lifi_integrator_fee">;
765
+ config_version: z.ZodString;
766
+ }, z.core.$strict>;
767
+ replay_disclosure: z.ZodObject<{
768
+ artifact_role: z.ZodLiteral<"construction_aid">;
769
+ freshness_boundary: z.ZodLiteral<"valid_until">;
770
+ onchain_replay_boundary: z.ZodLiteral<"signer_account_nonce">;
771
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
772
+ }, z.core.$strict>;
773
+ assertions: z.ZodArray<z.ZodObject<{
774
+ id: z.ZodString;
775
+ result: z.ZodLiteral<"passed">;
776
+ }, z.core.$strict>>;
777
+ valid_until: z.ZodString;
778
+ submission: z.ZodObject<{
779
+ method: z.ZodEnum<{
780
+ send_evm_transaction: "send_evm_transaction";
781
+ submit_evm_batch: "submit_evm_batch";
782
+ }>;
783
+ chain_id: z.ZodNumber;
784
+ artifact_id: z.ZodString;
785
+ payload_digest: z.ZodString;
786
+ artifact_digest: z.ZodString;
787
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"gas">, z.ZodLiteral<"serialization">], null>;
788
+ client_ref: z.ZodOptional<z.ZodString>;
789
+ }, z.core.$strict>;
790
+ }, z.core.$strict>, z.ZodObject<{
791
+ schema_version: z.ZodLiteral<"1">;
792
+ artifact_id: z.ZodString;
793
+ rail: z.ZodLiteral<"lifi">;
794
+ operation: z.ZodLiteral<"bridge">;
795
+ intent_digest: z.ZodString;
796
+ account_binding: z.ZodObject<{
797
+ kind: z.ZodEnum<{
798
+ safe: "safe";
799
+ eoa: "eoa";
800
+ }>;
801
+ address: z.ZodString;
802
+ chainId: z.ZodNumber;
803
+ protocol_roles: z.ZodObject<{
804
+ lifi: z.ZodObject<{
805
+ sender: z.ZodString;
806
+ receiver: z.ZodString;
807
+ source_chain_id: z.ZodNumber;
808
+ destination_chain_id: z.ZodNumber;
809
+ sending_asset: z.ZodString;
810
+ receiving_asset: z.ZodString;
811
+ }, z.core.$strict>;
812
+ }, z.core.$strict>;
813
+ }, z.core.$strict>;
814
+ required_capabilities: z.ZodArray<z.ZodEnum<{
815
+ send_evm_transaction: "send_evm_transaction";
816
+ submit_evm_batch: "submit_evm_batch";
817
+ }>>;
818
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
819
+ kind: z.ZodLiteral<"evm_execution_plan">;
820
+ chain_id: z.ZodNumber;
821
+ steps: z.ZodArray<z.ZodObject<{
822
+ to: z.ZodString;
823
+ value: z.ZodString;
824
+ data: z.ZodString;
825
+ kind: z.ZodEnum<{
826
+ call: "call";
827
+ approve_reset: "approve_reset";
828
+ approve: "approve";
829
+ }>;
830
+ }, z.core.$strict>>;
831
+ }, z.core.$strict>], "kind">;
832
+ fee_attribution: z.ZodObject<{
833
+ mechanism: z.ZodLiteral<"lifi_integrator_fee">;
834
+ config_version: z.ZodString;
835
+ }, z.core.$strict>;
836
+ replay_disclosure: z.ZodObject<{
837
+ artifact_role: z.ZodLiteral<"construction_aid">;
838
+ freshness_boundary: z.ZodLiteral<"valid_until">;
839
+ onchain_replay_boundary: z.ZodLiteral<"signer_account_nonce">;
840
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
841
+ }, z.core.$strict>;
842
+ assertions: z.ZodArray<z.ZodObject<{
843
+ id: z.ZodString;
844
+ result: z.ZodLiteral<"passed">;
845
+ }, z.core.$strict>>;
846
+ valid_until: z.ZodString;
847
+ submission: z.ZodObject<{
848
+ method: z.ZodEnum<{
849
+ send_evm_transaction: "send_evm_transaction";
850
+ submit_evm_batch: "submit_evm_batch";
851
+ }>;
852
+ chain_id: z.ZodNumber;
853
+ artifact_id: z.ZodString;
854
+ payload_digest: z.ZodString;
855
+ artifact_digest: z.ZodString;
856
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"gas">, z.ZodLiteral<"serialization">], null>;
857
+ client_ref: z.ZodOptional<z.ZodString>;
858
+ }, z.core.$strict>;
859
+ }, z.core.$strict>, z.ZodObject<{
860
+ schema_version: z.ZodLiteral<"1">;
861
+ artifact_id: z.ZodString;
862
+ rail: z.ZodLiteral<"polymarket">;
863
+ operation: z.ZodLiteral<"pm_order">;
864
+ intent_digest: z.ZodString;
865
+ account_binding: z.ZodObject<{
866
+ kind: z.ZodEnum<{
867
+ safe: "safe";
868
+ eoa: "eoa";
869
+ }>;
870
+ address: z.ZodString;
871
+ chainId: z.ZodNumber;
872
+ protocol_roles: z.ZodObject<{
873
+ polymarket: z.ZodObject<{
874
+ maker: z.ZodString;
875
+ signer: z.ZodString;
876
+ funder: z.ZodString;
877
+ exchange: z.ZodString;
878
+ token_id: z.ZodString;
879
+ signature_type: z.ZodLiteral<0>;
880
+ }, z.core.$strict>;
881
+ }, z.core.$strict>;
882
+ }, z.core.$strict>;
883
+ required_capabilities: z.ZodTuple<[z.ZodLiteral<"sign_eip712">], null>;
884
+ payload: z.ZodObject<{
885
+ kind: z.ZodLiteral<"polymarket_order_v2">;
886
+ chain_id: z.ZodLiteral<137>;
887
+ exchange: z.ZodString;
888
+ neg_risk: z.ZodBoolean;
889
+ tick_size: z.ZodEnum<{
890
+ 0.1: "0.1";
891
+ 0.01: "0.01";
892
+ 0.001: "0.001";
893
+ 0.0001: "0.0001";
894
+ }>;
895
+ order_type: z.ZodLiteral<"GTC">;
896
+ order: z.ZodObject<{
897
+ salt: z.ZodString;
898
+ maker: z.ZodString;
899
+ signer: z.ZodString;
900
+ tokenId: z.ZodString;
901
+ makerAmount: z.ZodString;
902
+ takerAmount: z.ZodString;
903
+ side: z.ZodEnum<{
904
+ BUY: "BUY";
905
+ SELL: "SELL";
906
+ }>;
907
+ signatureType: z.ZodLiteral<0>;
908
+ metadata: z.ZodString;
909
+ builder: z.ZodString;
910
+ timestamp: z.ZodString;
911
+ expiration: z.ZodString;
912
+ }, z.core.$strict>;
913
+ eip712: z.ZodObject<{
914
+ primary_type: z.ZodLiteral<"Order">;
915
+ domain: z.ZodObject<{
916
+ name: z.ZodLiteral<"Polymarket CTF Exchange">;
917
+ version: z.ZodLiteral<"2">;
918
+ chainId: z.ZodLiteral<137>;
919
+ verifyingContract: z.ZodString;
920
+ }, z.core.$strict>;
921
+ types: z.ZodObject<{
922
+ Order: z.ZodArray<z.ZodObject<{
923
+ name: z.ZodString;
924
+ type: z.ZodString;
925
+ }, z.core.$strict>>;
926
+ }, z.core.$strict>;
927
+ message: z.ZodObject<{
928
+ salt: z.ZodString;
929
+ maker: z.ZodString;
930
+ signer: z.ZodString;
931
+ tokenId: z.ZodString;
932
+ makerAmount: z.ZodString;
933
+ takerAmount: z.ZodString;
934
+ side: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
935
+ signatureType: z.ZodLiteral<0>;
936
+ timestamp: z.ZodString;
937
+ metadata: z.ZodString;
938
+ builder: z.ZodString;
939
+ }, z.core.$strict>;
940
+ }, z.core.$strict>;
941
+ order_hash: z.ZodString;
942
+ }, z.core.$strict>;
943
+ fee_attribution: z.ZodObject<{
944
+ mechanism: z.ZodLiteral<"polymarket_builder_code">;
945
+ config_version: z.ZodString;
946
+ }, z.core.$strict>;
947
+ replay_disclosure: z.ZodObject<{
948
+ artifact_role: z.ZodLiteral<"construction_aid">;
949
+ freshness_boundary: z.ZodLiteral<"valid_until">;
950
+ onchain_replay_boundary: z.ZodLiteral<"exchange_order_hash">;
951
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
952
+ }, z.core.$strict>;
953
+ assertions: z.ZodArray<z.ZodObject<{
954
+ id: z.ZodString;
955
+ result: z.ZodLiteral<"passed">;
956
+ }, z.core.$strict>>;
957
+ valid_until: z.ZodString;
958
+ submission: z.ZodObject<{
959
+ method: z.ZodLiteral<"sign_eip712">;
960
+ chain_id: z.ZodLiteral<137>;
961
+ artifact_id: z.ZodString;
962
+ payload_digest: z.ZodString;
963
+ artifact_digest: z.ZodString;
964
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"signature">, z.ZodLiteral<"clob_post">], null>;
965
+ client_ref: z.ZodOptional<z.ZodString>;
966
+ }, z.core.$strict>;
967
+ }, z.core.$strict>, z.ZodObject<{
968
+ schema_version: z.ZodLiteral<"1">;
969
+ artifact_id: z.ZodString;
970
+ rail: z.ZodLiteral<"hyperliquid">;
971
+ operation: z.ZodLiteral<"perp_order">;
972
+ intent_digest: z.ZodString;
973
+ account_binding: z.ZodObject<{
974
+ kind: z.ZodEnum<{
975
+ safe: "safe";
976
+ eoa: "eoa";
977
+ }>;
978
+ address: z.ZodString;
979
+ chainId: z.ZodNumber;
980
+ protocol_roles: z.ZodObject<{
981
+ hyperliquid: z.ZodObject<{
982
+ master: z.ZodString;
983
+ trading_signer: z.ZodString;
984
+ vault_address: z.ZodNullable<z.ZodString>;
985
+ asset: z.ZodString;
986
+ asset_id: z.ZodNumber;
987
+ sz_decimals: z.ZodNumber;
988
+ }, z.core.$strict>;
989
+ }, z.core.$strict>;
990
+ }, z.core.$strict>;
991
+ required_capabilities: z.ZodTuple<[z.ZodLiteral<"sign_hyperliquid_l1">], null>;
992
+ payload: z.ZodObject<{
993
+ kind: z.ZodLiteral<"hyperliquid_l1_action">;
994
+ chain_id: z.ZodLiteral<1337>;
995
+ action: z.ZodObject<{
996
+ type: z.ZodLiteral<"order">;
997
+ orders: z.ZodArray<z.ZodObject<{
998
+ a: z.ZodNumber;
999
+ b: z.ZodBoolean;
1000
+ p: z.ZodString;
1001
+ s: z.ZodString;
1002
+ r: z.ZodBoolean;
1003
+ t: z.ZodUnion<readonly [z.ZodObject<{
1004
+ limit: z.ZodObject<{
1005
+ tif: z.ZodEnum<{
1006
+ Gtc: "Gtc";
1007
+ Ioc: "Ioc";
1008
+ Alo: "Alo";
1009
+ }>;
1010
+ }, z.core.$strict>;
1011
+ }, z.core.$strict>, z.ZodObject<{
1012
+ trigger: z.ZodObject<{
1013
+ isMarket: z.ZodLiteral<true>;
1014
+ triggerPx: z.ZodString;
1015
+ tpsl: z.ZodEnum<{
1016
+ tp: "tp";
1017
+ sl: "sl";
1018
+ }>;
1019
+ }, z.core.$strict>;
1020
+ }, z.core.$strict>]>;
1021
+ c: z.ZodString;
1022
+ }, z.core.$strict>>;
1023
+ grouping: z.ZodEnum<{
1024
+ na: "na";
1025
+ normalTpsl: "normalTpsl";
1026
+ }>;
1027
+ }, z.core.$strict>;
1028
+ signing: z.ZodObject<{
1029
+ scheme: z.ZodLiteral<"hyperliquid_l1_agent_eip712">;
1030
+ primary_type: z.ZodLiteral<"Agent">;
1031
+ domain: z.ZodObject<{
1032
+ name: z.ZodLiteral<"Exchange">;
1033
+ version: z.ZodLiteral<"1">;
1034
+ chainId: z.ZodLiteral<1337>;
1035
+ verifyingContract: z.ZodLiteral<"0x0000000000000000000000000000000000000000">;
1036
+ }, z.core.$strict>;
1037
+ types: z.ZodObject<{
1038
+ Agent: z.ZodArray<z.ZodObject<{
1039
+ name: z.ZodString;
1040
+ type: z.ZodString;
1041
+ }, z.core.$strict>>;
1042
+ }, z.core.$strict>;
1043
+ source: z.ZodLiteral<"a">;
1044
+ connection_id: z.ZodObject<{
1045
+ hash: z.ZodLiteral<"keccak256">;
1046
+ preimage: z.ZodTuple<[z.ZodLiteral<"msgpack(action)">, z.ZodLiteral<"nonce_uint64_be">, z.ZodLiteral<"vault_address_marker">, z.ZodLiteral<"vault_address_bytes">, z.ZodLiteral<"expires_after_marker">, z.ZodLiteral<"expires_after_uint64_be">], null>;
1047
+ nonce_owner: z.ZodLiteral<"adapter">;
1048
+ }, z.core.$strict>;
1049
+ }, z.core.$strict>;
1050
+ vault_address: z.ZodNullable<z.ZodString>;
1051
+ expires_after: z.ZodNumber;
1052
+ }, z.core.$strict>;
1053
+ fee_attribution: z.ZodObject<{
1054
+ mechanism: z.ZodLiteral<"hyperliquid_builder_fee">;
1055
+ config_version: z.ZodString;
1056
+ status: z.ZodLiteral<"pending_step0_builder_fee_approval">;
1057
+ }, z.core.$strict>;
1058
+ replay_disclosure: z.ZodObject<{
1059
+ artifact_role: z.ZodLiteral<"construction_aid">;
1060
+ freshness_boundary: z.ZodLiteral<"valid_until">;
1061
+ onchain_replay_boundary: z.ZodLiteral<"signer_nonce_and_expires_after">;
1062
+ tool_guarantees_single_execution: z.ZodLiteral<false>;
1063
+ }, z.core.$strict>;
1064
+ assertions: z.ZodArray<z.ZodObject<{
1065
+ id: z.ZodString;
1066
+ result: z.ZodLiteral<"passed">;
1067
+ }, z.core.$strict>>;
1068
+ valid_until: z.ZodString;
1069
+ submission: z.ZodObject<{
1070
+ method: z.ZodLiteral<"sign_hyperliquid_l1">;
1071
+ chain_id: z.ZodLiteral<1337>;
1072
+ artifact_id: z.ZodString;
1073
+ payload_digest: z.ZodString;
1074
+ artifact_digest: z.ZodString;
1075
+ adapter_owned_fields: z.ZodTuple<[z.ZodLiteral<"nonce">, z.ZodLiteral<"signature">, z.ZodLiteral<"exchange_post">], null>;
1076
+ client_ref: z.ZodOptional<z.ZodString>;
1077
+ }, z.core.$strict>;
1078
+ }, z.core.$strict>]>;
1079
+ export type PrepareSwapInput = z.infer<typeof PREPARE_SWAP_INPUT_SCHEMA>;
1080
+ export type PrepareBridgeInput = z.infer<typeof PREPARE_BRIDGE_INPUT_SCHEMA>;
1081
+ export type PreparePolymarketOrderInput = z.infer<typeof PREPARE_POLYMARKET_ORDER_INPUT_SCHEMA>;
1082
+ export type PolymarketOrderArgs = z.infer<typeof POLYMARKET_ORDER_ARGS_SCHEMA>;
1083
+ export type PolymarketOrderTypedData = z.infer<typeof POLYMARKET_TYPED_DATA_SCHEMA>;
1084
+ export type PreparePerpOrderInput = z.infer<typeof PREPARE_PERP_ORDER_INPUT_SCHEMA>;
1085
+ export type HyperliquidOrderLeg = z.infer<typeof HYPERLIQUID_ORDER_LEG_SCHEMA>;
1086
+ export type HyperliquidOrderAction = z.infer<typeof HYPERLIQUID_ORDER_ACTION_SCHEMA>;
1087
+ export type HyperliquidSigningDeclaration = z.infer<typeof HYPERLIQUID_SIGNING_DECLARATION_SCHEMA>;
1088
+ export type ExecutionToolName = 'otto_prepare_swap' | 'otto_prepare_bridge' | 'otto_prepare_polymarket_order' | 'otto_prepare_perp_order';
1089
+ export type ExecutionInputSchema = typeof PREPARE_SWAP_INPUT_SCHEMA | typeof PREPARE_BRIDGE_INPUT_SCHEMA | typeof PREPARE_POLYMARKET_ORDER_INPUT_SCHEMA | typeof PREPARE_PERP_ORDER_INPUT_SCHEMA;
1090
+ export type ExecutionOutputSchema = typeof EXECUTION_ENVELOPE_SCHEMA | typeof BRIDGE_EXECUTION_ENVELOPE_SCHEMA | typeof POLYMARKET_EXECUTION_ENVELOPE_SCHEMA | typeof HYPERLIQUID_EXECUTION_ENVELOPE_SCHEMA;
1091
+ /** Separate from IntelToolDefinition: prepare tools have no priced-read or endpoint assumptions. */
1092
+ export interface ExecutionToolDefinition {
1093
+ readonly name: ExecutionToolName;
1094
+ readonly title: string;
1095
+ readonly description: string;
1096
+ readonly inputSchema: ExecutionInputSchema;
1097
+ readonly outputSchema: ExecutionOutputSchema;
1098
+ }
1099
+ /** The enumerated v1 bridge chains, surfaced for the tool description and for callers. */
1100
+ export declare const ENUMERATED_BRIDGE_CHAIN_IDS: readonly number[];
1101
+ export declare const EXECUTION_TOOL_DEFINITIONS: readonly ExecutionToolDefinition[];
1102
+ export declare const EXECUTION_TOOL_DEFINITION_BY_NAME: Map<ExecutionToolName, ExecutionToolDefinition>;
1103
+ export {};