@crediolabs/policy-builder-mcp 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.
@@ -0,0 +1,2297 @@
1
+ import { z } from 'zod';
2
+ export declare const NetworkSchema: z.ZodEnum<["mainnet", "testnet"]>;
3
+ export type Network = z.infer<typeof NetworkSchema>;
4
+ /** ScVal subset - normalised subset the synth consumes. Mirrors
5
+ * `ScVal` in packages/policy-synth/src/types.ts. */
6
+ export declare const ScValSchema: z.ZodType<unknown>;
7
+ /** ContractInvocation mirrors the core. Annotated with an explicit
8
+ * `z.ZodType<unknown>` (like ScValSchema above) so the self-referential
9
+ * `subInvocations` field does not trip TS's circular type inference. */
10
+ export declare const ContractInvocationSchema: z.ZodType<unknown>;
11
+ export declare const TokenMovementSchema: z.ZodObject<{
12
+ token: z.ZodString;
13
+ from: z.ZodString;
14
+ to: z.ZodString;
15
+ amount: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ token: string;
18
+ from: string;
19
+ to: string;
20
+ amount: string;
21
+ }, {
22
+ token: string;
23
+ from: string;
24
+ to: string;
25
+ amount: string;
26
+ }>;
27
+ export declare const OnChainEventSchema: z.ZodObject<{
28
+ contract: z.ZodString;
29
+ topics: z.ZodArray<z.ZodString, "many">;
30
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ contract: string;
33
+ topics: string[];
34
+ data?: unknown;
35
+ }, {
36
+ contract: string;
37
+ topics: string[];
38
+ data?: unknown;
39
+ }>;
40
+ export declare const ParseConfidenceSchema: z.ZodObject<{
41
+ overall: z.ZodNumber;
42
+ knownContracts: z.ZodArray<z.ZodString, "many">;
43
+ unknownContracts: z.ZodArray<z.ZodObject<{
44
+ contract: z.ZodString;
45
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ contract: string;
48
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
49
+ }, {
50
+ contract: string;
51
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
52
+ }>, "many">;
53
+ opaqueScVals: z.ZodArray<z.ZodObject<{
54
+ path: z.ZodString;
55
+ type: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ path: string;
58
+ type: string;
59
+ }, {
60
+ path: string;
61
+ type: string;
62
+ }>, "many">;
63
+ thresholdUsed: z.ZodNumber;
64
+ }, "strip", z.ZodTypeAny, {
65
+ overall: number;
66
+ knownContracts: string[];
67
+ unknownContracts: {
68
+ contract: string;
69
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
70
+ }[];
71
+ opaqueScVals: {
72
+ path: string;
73
+ type: string;
74
+ }[];
75
+ thresholdUsed: number;
76
+ }, {
77
+ overall: number;
78
+ knownContracts: string[];
79
+ unknownContracts: {
80
+ contract: string;
81
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
82
+ }[];
83
+ opaqueScVals: {
84
+ path: string;
85
+ type: string;
86
+ }[];
87
+ thresholdUsed: number;
88
+ }>;
89
+ /** RecordedTransaction mirrors the core RecordedTransaction. The output shape
90
+ * is referenced by name in the tool result structured content; we deliberately
91
+ * type it loosely (`z.unknown()`) on the success path so the core remains the
92
+ * single source of truth for the wire payload. */
93
+ export declare const RecordedTransactionSchema: z.ZodObject<{
94
+ network: z.ZodEnum<["mainnet", "testnet"]>;
95
+ signers: z.ZodArray<z.ZodString, "many">;
96
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
97
+ tokenMovements: z.ZodArray<z.ZodObject<{
98
+ token: z.ZodString;
99
+ from: z.ZodString;
100
+ to: z.ZodString;
101
+ amount: z.ZodString;
102
+ }, "strip", z.ZodTypeAny, {
103
+ token: string;
104
+ from: string;
105
+ to: string;
106
+ amount: string;
107
+ }, {
108
+ token: string;
109
+ from: string;
110
+ to: string;
111
+ amount: string;
112
+ }>, "many">;
113
+ events: z.ZodArray<z.ZodObject<{
114
+ contract: z.ZodString;
115
+ topics: z.ZodArray<z.ZodString, "many">;
116
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ contract: string;
119
+ topics: string[];
120
+ data?: unknown;
121
+ }, {
122
+ contract: string;
123
+ topics: string[];
124
+ data?: unknown;
125
+ }>, "many">;
126
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
127
+ ledgerSequence: z.ZodNumber;
128
+ fetchedAt: z.ZodNumber;
129
+ parseConfidence: z.ZodObject<{
130
+ overall: z.ZodNumber;
131
+ knownContracts: z.ZodArray<z.ZodString, "many">;
132
+ unknownContracts: z.ZodArray<z.ZodObject<{
133
+ contract: z.ZodString;
134
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ contract: string;
137
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
138
+ }, {
139
+ contract: string;
140
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
141
+ }>, "many">;
142
+ opaqueScVals: z.ZodArray<z.ZodObject<{
143
+ path: z.ZodString;
144
+ type: z.ZodString;
145
+ }, "strip", z.ZodTypeAny, {
146
+ path: string;
147
+ type: string;
148
+ }, {
149
+ path: string;
150
+ type: string;
151
+ }>, "many">;
152
+ thresholdUsed: z.ZodNumber;
153
+ }, "strip", z.ZodTypeAny, {
154
+ overall: number;
155
+ knownContracts: string[];
156
+ unknownContracts: {
157
+ contract: string;
158
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
159
+ }[];
160
+ opaqueScVals: {
161
+ path: string;
162
+ type: string;
163
+ }[];
164
+ thresholdUsed: number;
165
+ }, {
166
+ overall: number;
167
+ knownContracts: string[];
168
+ unknownContracts: {
169
+ contract: string;
170
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
171
+ }[];
172
+ opaqueScVals: {
173
+ path: string;
174
+ type: string;
175
+ }[];
176
+ thresholdUsed: number;
177
+ }>;
178
+ sourceAccount: z.ZodString;
179
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
180
+ network: z.ZodEnum<["mainnet", "testnet"]>;
181
+ signers: z.ZodArray<z.ZodString, "many">;
182
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
183
+ tokenMovements: z.ZodArray<z.ZodObject<{
184
+ token: z.ZodString;
185
+ from: z.ZodString;
186
+ to: z.ZodString;
187
+ amount: z.ZodString;
188
+ }, "strip", z.ZodTypeAny, {
189
+ token: string;
190
+ from: string;
191
+ to: string;
192
+ amount: string;
193
+ }, {
194
+ token: string;
195
+ from: string;
196
+ to: string;
197
+ amount: string;
198
+ }>, "many">;
199
+ events: z.ZodArray<z.ZodObject<{
200
+ contract: z.ZodString;
201
+ topics: z.ZodArray<z.ZodString, "many">;
202
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
203
+ }, "strip", z.ZodTypeAny, {
204
+ contract: string;
205
+ topics: string[];
206
+ data?: unknown;
207
+ }, {
208
+ contract: string;
209
+ topics: string[];
210
+ data?: unknown;
211
+ }>, "many">;
212
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
213
+ ledgerSequence: z.ZodNumber;
214
+ fetchedAt: z.ZodNumber;
215
+ parseConfidence: z.ZodObject<{
216
+ overall: z.ZodNumber;
217
+ knownContracts: z.ZodArray<z.ZodString, "many">;
218
+ unknownContracts: z.ZodArray<z.ZodObject<{
219
+ contract: z.ZodString;
220
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ contract: string;
223
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
224
+ }, {
225
+ contract: string;
226
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
227
+ }>, "many">;
228
+ opaqueScVals: z.ZodArray<z.ZodObject<{
229
+ path: z.ZodString;
230
+ type: z.ZodString;
231
+ }, "strip", z.ZodTypeAny, {
232
+ path: string;
233
+ type: string;
234
+ }, {
235
+ path: string;
236
+ type: string;
237
+ }>, "many">;
238
+ thresholdUsed: z.ZodNumber;
239
+ }, "strip", z.ZodTypeAny, {
240
+ overall: number;
241
+ knownContracts: string[];
242
+ unknownContracts: {
243
+ contract: string;
244
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
245
+ }[];
246
+ opaqueScVals: {
247
+ path: string;
248
+ type: string;
249
+ }[];
250
+ thresholdUsed: number;
251
+ }, {
252
+ overall: number;
253
+ knownContracts: string[];
254
+ unknownContracts: {
255
+ contract: string;
256
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
257
+ }[];
258
+ opaqueScVals: {
259
+ path: string;
260
+ type: string;
261
+ }[];
262
+ thresholdUsed: number;
263
+ }>;
264
+ sourceAccount: z.ZodString;
265
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
266
+ network: z.ZodEnum<["mainnet", "testnet"]>;
267
+ signers: z.ZodArray<z.ZodString, "many">;
268
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
269
+ tokenMovements: z.ZodArray<z.ZodObject<{
270
+ token: z.ZodString;
271
+ from: z.ZodString;
272
+ to: z.ZodString;
273
+ amount: z.ZodString;
274
+ }, "strip", z.ZodTypeAny, {
275
+ token: string;
276
+ from: string;
277
+ to: string;
278
+ amount: string;
279
+ }, {
280
+ token: string;
281
+ from: string;
282
+ to: string;
283
+ amount: string;
284
+ }>, "many">;
285
+ events: z.ZodArray<z.ZodObject<{
286
+ contract: z.ZodString;
287
+ topics: z.ZodArray<z.ZodString, "many">;
288
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ contract: string;
291
+ topics: string[];
292
+ data?: unknown;
293
+ }, {
294
+ contract: string;
295
+ topics: string[];
296
+ data?: unknown;
297
+ }>, "many">;
298
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
299
+ ledgerSequence: z.ZodNumber;
300
+ fetchedAt: z.ZodNumber;
301
+ parseConfidence: z.ZodObject<{
302
+ overall: z.ZodNumber;
303
+ knownContracts: z.ZodArray<z.ZodString, "many">;
304
+ unknownContracts: z.ZodArray<z.ZodObject<{
305
+ contract: z.ZodString;
306
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
307
+ }, "strip", z.ZodTypeAny, {
308
+ contract: string;
309
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
310
+ }, {
311
+ contract: string;
312
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
313
+ }>, "many">;
314
+ opaqueScVals: z.ZodArray<z.ZodObject<{
315
+ path: z.ZodString;
316
+ type: z.ZodString;
317
+ }, "strip", z.ZodTypeAny, {
318
+ path: string;
319
+ type: string;
320
+ }, {
321
+ path: string;
322
+ type: string;
323
+ }>, "many">;
324
+ thresholdUsed: z.ZodNumber;
325
+ }, "strip", z.ZodTypeAny, {
326
+ overall: number;
327
+ knownContracts: string[];
328
+ unknownContracts: {
329
+ contract: string;
330
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
331
+ }[];
332
+ opaqueScVals: {
333
+ path: string;
334
+ type: string;
335
+ }[];
336
+ thresholdUsed: number;
337
+ }, {
338
+ overall: number;
339
+ knownContracts: string[];
340
+ unknownContracts: {
341
+ contract: string;
342
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
343
+ }[];
344
+ opaqueScVals: {
345
+ path: string;
346
+ type: string;
347
+ }[];
348
+ thresholdUsed: number;
349
+ }>;
350
+ sourceAccount: z.ZodString;
351
+ }, z.ZodTypeAny, "passthrough">>;
352
+ /** MandateSpec mirrors the core MandateSpec. The deterministic Mandate
353
+ * front-end needs no parseConfidence; the tool adapter injects the full
354
+ * confidence after synthesis so the orchestrator can compare. */
355
+ export declare const MandateSpecSchema: z.ZodObject<{
356
+ chain: z.ZodLiteral<"stellar">;
357
+ contract: z.ZodString;
358
+ method: z.ZodOptional<z.ZodString>;
359
+ spendingLimit: z.ZodOptional<z.ZodObject<{
360
+ token: z.ZodString;
361
+ limit: z.ZodString;
362
+ windowSeconds: z.ZodNumber;
363
+ }, "strip", z.ZodTypeAny, {
364
+ token: string;
365
+ limit: string;
366
+ windowSeconds: number;
367
+ }, {
368
+ token: string;
369
+ limit: string;
370
+ windowSeconds: number;
371
+ }>>;
372
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
373
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
+ expiry: z.ZodOptional<z.ZodObject<{
375
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
376
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ validUntilLedger?: number | undefined;
379
+ validUntilUnixSeconds?: number | undefined;
380
+ }, {
381
+ validUntilLedger?: number | undefined;
382
+ validUntilUnixSeconds?: number | undefined;
383
+ }>>;
384
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
385
+ chain: z.ZodLiteral<"stellar">;
386
+ contract: z.ZodString;
387
+ method: z.ZodOptional<z.ZodString>;
388
+ spendingLimit: z.ZodOptional<z.ZodObject<{
389
+ token: z.ZodString;
390
+ limit: z.ZodString;
391
+ windowSeconds: z.ZodNumber;
392
+ }, "strip", z.ZodTypeAny, {
393
+ token: string;
394
+ limit: string;
395
+ windowSeconds: number;
396
+ }, {
397
+ token: string;
398
+ limit: string;
399
+ windowSeconds: number;
400
+ }>>;
401
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
402
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
403
+ expiry: z.ZodOptional<z.ZodObject<{
404
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
405
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ validUntilLedger?: number | undefined;
408
+ validUntilUnixSeconds?: number | undefined;
409
+ }, {
410
+ validUntilLedger?: number | undefined;
411
+ validUntilUnixSeconds?: number | undefined;
412
+ }>>;
413
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
414
+ chain: z.ZodLiteral<"stellar">;
415
+ contract: z.ZodString;
416
+ method: z.ZodOptional<z.ZodString>;
417
+ spendingLimit: z.ZodOptional<z.ZodObject<{
418
+ token: z.ZodString;
419
+ limit: z.ZodString;
420
+ windowSeconds: z.ZodNumber;
421
+ }, "strip", z.ZodTypeAny, {
422
+ token: string;
423
+ limit: string;
424
+ windowSeconds: number;
425
+ }, {
426
+ token: string;
427
+ limit: string;
428
+ windowSeconds: number;
429
+ }>>;
430
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
431
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
432
+ expiry: z.ZodOptional<z.ZodObject<{
433
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
434
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ validUntilLedger?: number | undefined;
437
+ validUntilUnixSeconds?: number | undefined;
438
+ }, {
439
+ validUntilLedger?: number | undefined;
440
+ validUntilUnixSeconds?: number | undefined;
441
+ }>>;
442
+ }, z.ZodTypeAny, "passthrough">>;
443
+ /** ComposeUserResponses mirrors the core. */
444
+ export declare const ComposeUserResponsesSchema: z.ZodObject<{
445
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
446
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
447
+ limitAmount: z.ZodOptional<z.ZodString>;
448
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
449
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
450
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
451
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
452
+ limitAmount: z.ZodOptional<z.ZodString>;
453
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
454
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
455
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
456
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
457
+ limitAmount: z.ZodOptional<z.ZodString>;
458
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
459
+ }, z.ZodTypeAny, "passthrough">>;
460
+ /** OzAdapterConfig - the per-network OZ built-in instance addresses. */
461
+ export declare const OzAdapterConfigSchema: z.ZodObject<{
462
+ network: z.ZodEnum<["mainnet", "testnet"]>;
463
+ instances: z.ZodObject<{
464
+ spending_limit: z.ZodString;
465
+ simple_threshold: z.ZodString;
466
+ weighted_threshold: z.ZodString;
467
+ }, "strip", z.ZodTypeAny, {
468
+ spending_limit: string;
469
+ simple_threshold: string;
470
+ weighted_threshold: string;
471
+ }, {
472
+ spending_limit: string;
473
+ simple_threshold: string;
474
+ weighted_threshold: string;
475
+ }>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ network: "mainnet" | "testnet";
478
+ instances: {
479
+ spending_limit: string;
480
+ simple_threshold: string;
481
+ weighted_threshold: string;
482
+ };
483
+ }, {
484
+ network: "mainnet" | "testnet";
485
+ instances: {
486
+ spending_limit: string;
487
+ simple_threshold: string;
488
+ weighted_threshold: string;
489
+ };
490
+ }>;
491
+ export declare const RecordTransactionInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
492
+ hash: z.ZodOptional<z.ZodString>;
493
+ xdr: z.ZodOptional<z.ZodString>;
494
+ network: z.ZodEnum<["mainnet", "testnet"]>;
495
+ confidenceOverride: z.ZodOptional<z.ZodNumber>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ network: "mainnet" | "testnet";
498
+ hash?: string | undefined;
499
+ xdr?: string | undefined;
500
+ confidenceOverride?: number | undefined;
501
+ }, {
502
+ network: "mainnet" | "testnet";
503
+ hash?: string | undefined;
504
+ xdr?: string | undefined;
505
+ confidenceOverride?: number | undefined;
506
+ }>, {
507
+ network: "mainnet" | "testnet";
508
+ hash?: string | undefined;
509
+ xdr?: string | undefined;
510
+ confidenceOverride?: number | undefined;
511
+ }, {
512
+ network: "mainnet" | "testnet";
513
+ hash?: string | undefined;
514
+ xdr?: string | undefined;
515
+ confidenceOverride?: number | undefined;
516
+ }>, {
517
+ network: "mainnet" | "testnet";
518
+ hash?: string | undefined;
519
+ xdr?: string | undefined;
520
+ confidenceOverride?: number | undefined;
521
+ }, {
522
+ network: "mainnet" | "testnet";
523
+ hash?: string | undefined;
524
+ xdr?: string | undefined;
525
+ confidenceOverride?: number | undefined;
526
+ }>;
527
+ export type RecordTransactionInput = z.infer<typeof RecordTransactionInputSchema>;
528
+ /** Flat ZodRawShape used for the MCP SDK tool registration. The body
529
+ * re-validates against `RecordTransactionInputSchema` so the mutual-exclusion
530
+ * rule still fires (the SDK does not invoke `.refine()` at registration time). */
531
+ export declare const RecordTransactionToolShape: {
532
+ readonly hash: z.ZodOptional<z.ZodString>;
533
+ readonly xdr: z.ZodOptional<z.ZodString>;
534
+ readonly network: z.ZodEnum<["mainnet", "testnet"]>;
535
+ readonly confidenceOverride: z.ZodOptional<z.ZodNumber>;
536
+ };
537
+ export declare const SynthesizePolicyMandateInputSchema: z.ZodObject<{
538
+ source: z.ZodLiteral<"mandate">;
539
+ mandate: z.ZodObject<{
540
+ chain: z.ZodLiteral<"stellar">;
541
+ contract: z.ZodString;
542
+ method: z.ZodOptional<z.ZodString>;
543
+ spendingLimit: z.ZodOptional<z.ZodObject<{
544
+ token: z.ZodString;
545
+ limit: z.ZodString;
546
+ windowSeconds: z.ZodNumber;
547
+ }, "strip", z.ZodTypeAny, {
548
+ token: string;
549
+ limit: string;
550
+ windowSeconds: number;
551
+ }, {
552
+ token: string;
553
+ limit: string;
554
+ windowSeconds: number;
555
+ }>>;
556
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
557
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
558
+ expiry: z.ZodOptional<z.ZodObject<{
559
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
560
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
561
+ }, "strip", z.ZodTypeAny, {
562
+ validUntilLedger?: number | undefined;
563
+ validUntilUnixSeconds?: number | undefined;
564
+ }, {
565
+ validUntilLedger?: number | undefined;
566
+ validUntilUnixSeconds?: number | undefined;
567
+ }>>;
568
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
569
+ chain: z.ZodLiteral<"stellar">;
570
+ contract: z.ZodString;
571
+ method: z.ZodOptional<z.ZodString>;
572
+ spendingLimit: z.ZodOptional<z.ZodObject<{
573
+ token: z.ZodString;
574
+ limit: z.ZodString;
575
+ windowSeconds: z.ZodNumber;
576
+ }, "strip", z.ZodTypeAny, {
577
+ token: string;
578
+ limit: string;
579
+ windowSeconds: number;
580
+ }, {
581
+ token: string;
582
+ limit: string;
583
+ windowSeconds: number;
584
+ }>>;
585
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
586
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
587
+ expiry: z.ZodOptional<z.ZodObject<{
588
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
589
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ validUntilLedger?: number | undefined;
592
+ validUntilUnixSeconds?: number | undefined;
593
+ }, {
594
+ validUntilLedger?: number | undefined;
595
+ validUntilUnixSeconds?: number | undefined;
596
+ }>>;
597
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
598
+ chain: z.ZodLiteral<"stellar">;
599
+ contract: z.ZodString;
600
+ method: z.ZodOptional<z.ZodString>;
601
+ spendingLimit: z.ZodOptional<z.ZodObject<{
602
+ token: z.ZodString;
603
+ limit: z.ZodString;
604
+ windowSeconds: z.ZodNumber;
605
+ }, "strip", z.ZodTypeAny, {
606
+ token: string;
607
+ limit: string;
608
+ windowSeconds: number;
609
+ }, {
610
+ token: string;
611
+ limit: string;
612
+ windowSeconds: number;
613
+ }>>;
614
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
615
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
616
+ expiry: z.ZodOptional<z.ZodObject<{
617
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
618
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ validUntilLedger?: number | undefined;
621
+ validUntilUnixSeconds?: number | undefined;
622
+ }, {
623
+ validUntilLedger?: number | undefined;
624
+ validUntilUnixSeconds?: number | undefined;
625
+ }>>;
626
+ }, z.ZodTypeAny, "passthrough">>;
627
+ ozConfig: z.ZodOptional<z.ZodObject<{
628
+ network: z.ZodEnum<["mainnet", "testnet"]>;
629
+ instances: z.ZodObject<{
630
+ spending_limit: z.ZodString;
631
+ simple_threshold: z.ZodString;
632
+ weighted_threshold: z.ZodString;
633
+ }, "strip", z.ZodTypeAny, {
634
+ spending_limit: string;
635
+ simple_threshold: string;
636
+ weighted_threshold: string;
637
+ }, {
638
+ spending_limit: string;
639
+ simple_threshold: string;
640
+ weighted_threshold: string;
641
+ }>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ network: "mainnet" | "testnet";
644
+ instances: {
645
+ spending_limit: string;
646
+ simple_threshold: string;
647
+ weighted_threshold: string;
648
+ };
649
+ }, {
650
+ network: "mainnet" | "testnet";
651
+ instances: {
652
+ spending_limit: string;
653
+ simple_threshold: string;
654
+ weighted_threshold: string;
655
+ };
656
+ }>>;
657
+ }, "strip", z.ZodTypeAny, {
658
+ source: "mandate";
659
+ mandate: {
660
+ contract: string;
661
+ chain: "stellar";
662
+ method?: string | undefined;
663
+ spendingLimit?: {
664
+ token: string;
665
+ limit: string;
666
+ windowSeconds: number;
667
+ } | undefined;
668
+ approvalThreshold?: number | undefined;
669
+ recipients?: string[] | undefined;
670
+ expiry?: {
671
+ validUntilLedger?: number | undefined;
672
+ validUntilUnixSeconds?: number | undefined;
673
+ } | undefined;
674
+ } & {
675
+ [k: string]: unknown;
676
+ };
677
+ ozConfig?: {
678
+ network: "mainnet" | "testnet";
679
+ instances: {
680
+ spending_limit: string;
681
+ simple_threshold: string;
682
+ weighted_threshold: string;
683
+ };
684
+ } | undefined;
685
+ }, {
686
+ source: "mandate";
687
+ mandate: {
688
+ contract: string;
689
+ chain: "stellar";
690
+ method?: string | undefined;
691
+ spendingLimit?: {
692
+ token: string;
693
+ limit: string;
694
+ windowSeconds: number;
695
+ } | undefined;
696
+ approvalThreshold?: number | undefined;
697
+ recipients?: string[] | undefined;
698
+ expiry?: {
699
+ validUntilLedger?: number | undefined;
700
+ validUntilUnixSeconds?: number | undefined;
701
+ } | undefined;
702
+ } & {
703
+ [k: string]: unknown;
704
+ };
705
+ ozConfig?: {
706
+ network: "mainnet" | "testnet";
707
+ instances: {
708
+ spending_limit: string;
709
+ simple_threshold: string;
710
+ weighted_threshold: string;
711
+ };
712
+ } | undefined;
713
+ }>;
714
+ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
715
+ source: z.ZodLiteral<"recording">;
716
+ recordedTx: z.ZodObject<{
717
+ network: z.ZodEnum<["mainnet", "testnet"]>;
718
+ signers: z.ZodArray<z.ZodString, "many">;
719
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
720
+ tokenMovements: z.ZodArray<z.ZodObject<{
721
+ token: z.ZodString;
722
+ from: z.ZodString;
723
+ to: z.ZodString;
724
+ amount: z.ZodString;
725
+ }, "strip", z.ZodTypeAny, {
726
+ token: string;
727
+ from: string;
728
+ to: string;
729
+ amount: string;
730
+ }, {
731
+ token: string;
732
+ from: string;
733
+ to: string;
734
+ amount: string;
735
+ }>, "many">;
736
+ events: z.ZodArray<z.ZodObject<{
737
+ contract: z.ZodString;
738
+ topics: z.ZodArray<z.ZodString, "many">;
739
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
740
+ }, "strip", z.ZodTypeAny, {
741
+ contract: string;
742
+ topics: string[];
743
+ data?: unknown;
744
+ }, {
745
+ contract: string;
746
+ topics: string[];
747
+ data?: unknown;
748
+ }>, "many">;
749
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
750
+ ledgerSequence: z.ZodNumber;
751
+ fetchedAt: z.ZodNumber;
752
+ parseConfidence: z.ZodObject<{
753
+ overall: z.ZodNumber;
754
+ knownContracts: z.ZodArray<z.ZodString, "many">;
755
+ unknownContracts: z.ZodArray<z.ZodObject<{
756
+ contract: z.ZodString;
757
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
758
+ }, "strip", z.ZodTypeAny, {
759
+ contract: string;
760
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
761
+ }, {
762
+ contract: string;
763
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
764
+ }>, "many">;
765
+ opaqueScVals: z.ZodArray<z.ZodObject<{
766
+ path: z.ZodString;
767
+ type: z.ZodString;
768
+ }, "strip", z.ZodTypeAny, {
769
+ path: string;
770
+ type: string;
771
+ }, {
772
+ path: string;
773
+ type: string;
774
+ }>, "many">;
775
+ thresholdUsed: z.ZodNumber;
776
+ }, "strip", z.ZodTypeAny, {
777
+ overall: number;
778
+ knownContracts: string[];
779
+ unknownContracts: {
780
+ contract: string;
781
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
782
+ }[];
783
+ opaqueScVals: {
784
+ path: string;
785
+ type: string;
786
+ }[];
787
+ thresholdUsed: number;
788
+ }, {
789
+ overall: number;
790
+ knownContracts: string[];
791
+ unknownContracts: {
792
+ contract: string;
793
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
794
+ }[];
795
+ opaqueScVals: {
796
+ path: string;
797
+ type: string;
798
+ }[];
799
+ thresholdUsed: number;
800
+ }>;
801
+ sourceAccount: z.ZodString;
802
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
803
+ network: z.ZodEnum<["mainnet", "testnet"]>;
804
+ signers: z.ZodArray<z.ZodString, "many">;
805
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
806
+ tokenMovements: z.ZodArray<z.ZodObject<{
807
+ token: z.ZodString;
808
+ from: z.ZodString;
809
+ to: z.ZodString;
810
+ amount: z.ZodString;
811
+ }, "strip", z.ZodTypeAny, {
812
+ token: string;
813
+ from: string;
814
+ to: string;
815
+ amount: string;
816
+ }, {
817
+ token: string;
818
+ from: string;
819
+ to: string;
820
+ amount: string;
821
+ }>, "many">;
822
+ events: z.ZodArray<z.ZodObject<{
823
+ contract: z.ZodString;
824
+ topics: z.ZodArray<z.ZodString, "many">;
825
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ contract: string;
828
+ topics: string[];
829
+ data?: unknown;
830
+ }, {
831
+ contract: string;
832
+ topics: string[];
833
+ data?: unknown;
834
+ }>, "many">;
835
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
836
+ ledgerSequence: z.ZodNumber;
837
+ fetchedAt: z.ZodNumber;
838
+ parseConfidence: z.ZodObject<{
839
+ overall: z.ZodNumber;
840
+ knownContracts: z.ZodArray<z.ZodString, "many">;
841
+ unknownContracts: z.ZodArray<z.ZodObject<{
842
+ contract: z.ZodString;
843
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
844
+ }, "strip", z.ZodTypeAny, {
845
+ contract: string;
846
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
847
+ }, {
848
+ contract: string;
849
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
850
+ }>, "many">;
851
+ opaqueScVals: z.ZodArray<z.ZodObject<{
852
+ path: z.ZodString;
853
+ type: z.ZodString;
854
+ }, "strip", z.ZodTypeAny, {
855
+ path: string;
856
+ type: string;
857
+ }, {
858
+ path: string;
859
+ type: string;
860
+ }>, "many">;
861
+ thresholdUsed: z.ZodNumber;
862
+ }, "strip", z.ZodTypeAny, {
863
+ overall: number;
864
+ knownContracts: string[];
865
+ unknownContracts: {
866
+ contract: string;
867
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
868
+ }[];
869
+ opaqueScVals: {
870
+ path: string;
871
+ type: string;
872
+ }[];
873
+ thresholdUsed: number;
874
+ }, {
875
+ overall: number;
876
+ knownContracts: string[];
877
+ unknownContracts: {
878
+ contract: string;
879
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
880
+ }[];
881
+ opaqueScVals: {
882
+ path: string;
883
+ type: string;
884
+ }[];
885
+ thresholdUsed: number;
886
+ }>;
887
+ sourceAccount: z.ZodString;
888
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
889
+ network: z.ZodEnum<["mainnet", "testnet"]>;
890
+ signers: z.ZodArray<z.ZodString, "many">;
891
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
892
+ tokenMovements: z.ZodArray<z.ZodObject<{
893
+ token: z.ZodString;
894
+ from: z.ZodString;
895
+ to: z.ZodString;
896
+ amount: z.ZodString;
897
+ }, "strip", z.ZodTypeAny, {
898
+ token: string;
899
+ from: string;
900
+ to: string;
901
+ amount: string;
902
+ }, {
903
+ token: string;
904
+ from: string;
905
+ to: string;
906
+ amount: string;
907
+ }>, "many">;
908
+ events: z.ZodArray<z.ZodObject<{
909
+ contract: z.ZodString;
910
+ topics: z.ZodArray<z.ZodString, "many">;
911
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
912
+ }, "strip", z.ZodTypeAny, {
913
+ contract: string;
914
+ topics: string[];
915
+ data?: unknown;
916
+ }, {
917
+ contract: string;
918
+ topics: string[];
919
+ data?: unknown;
920
+ }>, "many">;
921
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
922
+ ledgerSequence: z.ZodNumber;
923
+ fetchedAt: z.ZodNumber;
924
+ parseConfidence: z.ZodObject<{
925
+ overall: z.ZodNumber;
926
+ knownContracts: z.ZodArray<z.ZodString, "many">;
927
+ unknownContracts: z.ZodArray<z.ZodObject<{
928
+ contract: z.ZodString;
929
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
930
+ }, "strip", z.ZodTypeAny, {
931
+ contract: string;
932
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
933
+ }, {
934
+ contract: string;
935
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
936
+ }>, "many">;
937
+ opaqueScVals: z.ZodArray<z.ZodObject<{
938
+ path: z.ZodString;
939
+ type: z.ZodString;
940
+ }, "strip", z.ZodTypeAny, {
941
+ path: string;
942
+ type: string;
943
+ }, {
944
+ path: string;
945
+ type: string;
946
+ }>, "many">;
947
+ thresholdUsed: z.ZodNumber;
948
+ }, "strip", z.ZodTypeAny, {
949
+ overall: number;
950
+ knownContracts: string[];
951
+ unknownContracts: {
952
+ contract: string;
953
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
954
+ }[];
955
+ opaqueScVals: {
956
+ path: string;
957
+ type: string;
958
+ }[];
959
+ thresholdUsed: number;
960
+ }, {
961
+ overall: number;
962
+ knownContracts: string[];
963
+ unknownContracts: {
964
+ contract: string;
965
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
966
+ }[];
967
+ opaqueScVals: {
968
+ path: string;
969
+ type: string;
970
+ }[];
971
+ thresholdUsed: number;
972
+ }>;
973
+ sourceAccount: z.ZodString;
974
+ }, z.ZodTypeAny, "passthrough">>;
975
+ network: z.ZodEnum<["mainnet", "testnet"]>;
976
+ userResponses: z.ZodOptional<z.ZodObject<{
977
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
978
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
979
+ limitAmount: z.ZodOptional<z.ZodString>;
980
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
981
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
982
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
983
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
984
+ limitAmount: z.ZodOptional<z.ZodString>;
985
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
986
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
987
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
988
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
989
+ limitAmount: z.ZodOptional<z.ZodString>;
990
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
991
+ }, z.ZodTypeAny, "passthrough">>>;
992
+ confidenceOverride: z.ZodOptional<z.ZodObject<{
993
+ threshold: z.ZodNumber;
994
+ }, "strip", z.ZodTypeAny, {
995
+ threshold: number;
996
+ }, {
997
+ threshold: number;
998
+ }>>;
999
+ ozConfig: z.ZodOptional<z.ZodObject<{
1000
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1001
+ instances: z.ZodObject<{
1002
+ spending_limit: z.ZodString;
1003
+ simple_threshold: z.ZodString;
1004
+ weighted_threshold: z.ZodString;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ spending_limit: string;
1007
+ simple_threshold: string;
1008
+ weighted_threshold: string;
1009
+ }, {
1010
+ spending_limit: string;
1011
+ simple_threshold: string;
1012
+ weighted_threshold: string;
1013
+ }>;
1014
+ }, "strip", z.ZodTypeAny, {
1015
+ network: "mainnet" | "testnet";
1016
+ instances: {
1017
+ spending_limit: string;
1018
+ simple_threshold: string;
1019
+ weighted_threshold: string;
1020
+ };
1021
+ }, {
1022
+ network: "mainnet" | "testnet";
1023
+ instances: {
1024
+ spending_limit: string;
1025
+ simple_threshold: string;
1026
+ weighted_threshold: string;
1027
+ };
1028
+ }>>;
1029
+ }, "strip", z.ZodTypeAny, {
1030
+ network: "mainnet" | "testnet";
1031
+ source: "recording";
1032
+ recordedTx: {
1033
+ network: "mainnet" | "testnet";
1034
+ signers: string[];
1035
+ invocations: unknown[];
1036
+ tokenMovements: {
1037
+ token: string;
1038
+ from: string;
1039
+ to: string;
1040
+ amount: string;
1041
+ }[];
1042
+ events: {
1043
+ contract: string;
1044
+ topics: string[];
1045
+ data?: unknown;
1046
+ }[];
1047
+ authEntries: unknown[];
1048
+ ledgerSequence: number;
1049
+ fetchedAt: number;
1050
+ parseConfidence: {
1051
+ overall: number;
1052
+ knownContracts: string[];
1053
+ unknownContracts: {
1054
+ contract: string;
1055
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1056
+ }[];
1057
+ opaqueScVals: {
1058
+ path: string;
1059
+ type: string;
1060
+ }[];
1061
+ thresholdUsed: number;
1062
+ };
1063
+ sourceAccount: string;
1064
+ } & {
1065
+ [k: string]: unknown;
1066
+ };
1067
+ confidenceOverride?: {
1068
+ threshold: number;
1069
+ } | undefined;
1070
+ ozConfig?: {
1071
+ network: "mainnet" | "testnet";
1072
+ instances: {
1073
+ spending_limit: string;
1074
+ simple_threshold: string;
1075
+ weighted_threshold: string;
1076
+ };
1077
+ } | undefined;
1078
+ userResponses?: z.objectOutputType<{
1079
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1080
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1081
+ limitAmount: z.ZodOptional<z.ZodString>;
1082
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1083
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1084
+ }, {
1085
+ network: "mainnet" | "testnet";
1086
+ source: "recording";
1087
+ recordedTx: {
1088
+ network: "mainnet" | "testnet";
1089
+ signers: string[];
1090
+ invocations: unknown[];
1091
+ tokenMovements: {
1092
+ token: string;
1093
+ from: string;
1094
+ to: string;
1095
+ amount: string;
1096
+ }[];
1097
+ events: {
1098
+ contract: string;
1099
+ topics: string[];
1100
+ data?: unknown;
1101
+ }[];
1102
+ authEntries: unknown[];
1103
+ ledgerSequence: number;
1104
+ fetchedAt: number;
1105
+ parseConfidence: {
1106
+ overall: number;
1107
+ knownContracts: string[];
1108
+ unknownContracts: {
1109
+ contract: string;
1110
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1111
+ }[];
1112
+ opaqueScVals: {
1113
+ path: string;
1114
+ type: string;
1115
+ }[];
1116
+ thresholdUsed: number;
1117
+ };
1118
+ sourceAccount: string;
1119
+ } & {
1120
+ [k: string]: unknown;
1121
+ };
1122
+ confidenceOverride?: {
1123
+ threshold: number;
1124
+ } | undefined;
1125
+ ozConfig?: {
1126
+ network: "mainnet" | "testnet";
1127
+ instances: {
1128
+ spending_limit: string;
1129
+ simple_threshold: string;
1130
+ weighted_threshold: string;
1131
+ };
1132
+ } | undefined;
1133
+ userResponses?: z.objectInputType<{
1134
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1135
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1136
+ limitAmount: z.ZodOptional<z.ZodString>;
1137
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1138
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1139
+ }>;
1140
+ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
1141
+ source: z.ZodLiteral<"mandate">;
1142
+ mandate: z.ZodObject<{
1143
+ chain: z.ZodLiteral<"stellar">;
1144
+ contract: z.ZodString;
1145
+ method: z.ZodOptional<z.ZodString>;
1146
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1147
+ token: z.ZodString;
1148
+ limit: z.ZodString;
1149
+ windowSeconds: z.ZodNumber;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ token: string;
1152
+ limit: string;
1153
+ windowSeconds: number;
1154
+ }, {
1155
+ token: string;
1156
+ limit: string;
1157
+ windowSeconds: number;
1158
+ }>>;
1159
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1160
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1161
+ expiry: z.ZodOptional<z.ZodObject<{
1162
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1163
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1164
+ }, "strip", z.ZodTypeAny, {
1165
+ validUntilLedger?: number | undefined;
1166
+ validUntilUnixSeconds?: number | undefined;
1167
+ }, {
1168
+ validUntilLedger?: number | undefined;
1169
+ validUntilUnixSeconds?: number | undefined;
1170
+ }>>;
1171
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1172
+ chain: z.ZodLiteral<"stellar">;
1173
+ contract: z.ZodString;
1174
+ method: z.ZodOptional<z.ZodString>;
1175
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1176
+ token: z.ZodString;
1177
+ limit: z.ZodString;
1178
+ windowSeconds: z.ZodNumber;
1179
+ }, "strip", z.ZodTypeAny, {
1180
+ token: string;
1181
+ limit: string;
1182
+ windowSeconds: number;
1183
+ }, {
1184
+ token: string;
1185
+ limit: string;
1186
+ windowSeconds: number;
1187
+ }>>;
1188
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1189
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1190
+ expiry: z.ZodOptional<z.ZodObject<{
1191
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1192
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ validUntilLedger?: number | undefined;
1195
+ validUntilUnixSeconds?: number | undefined;
1196
+ }, {
1197
+ validUntilLedger?: number | undefined;
1198
+ validUntilUnixSeconds?: number | undefined;
1199
+ }>>;
1200
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1201
+ chain: z.ZodLiteral<"stellar">;
1202
+ contract: z.ZodString;
1203
+ method: z.ZodOptional<z.ZodString>;
1204
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1205
+ token: z.ZodString;
1206
+ limit: z.ZodString;
1207
+ windowSeconds: z.ZodNumber;
1208
+ }, "strip", z.ZodTypeAny, {
1209
+ token: string;
1210
+ limit: string;
1211
+ windowSeconds: number;
1212
+ }, {
1213
+ token: string;
1214
+ limit: string;
1215
+ windowSeconds: number;
1216
+ }>>;
1217
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1218
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1219
+ expiry: z.ZodOptional<z.ZodObject<{
1220
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1221
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ validUntilLedger?: number | undefined;
1224
+ validUntilUnixSeconds?: number | undefined;
1225
+ }, {
1226
+ validUntilLedger?: number | undefined;
1227
+ validUntilUnixSeconds?: number | undefined;
1228
+ }>>;
1229
+ }, z.ZodTypeAny, "passthrough">>;
1230
+ ozConfig: z.ZodOptional<z.ZodObject<{
1231
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1232
+ instances: z.ZodObject<{
1233
+ spending_limit: z.ZodString;
1234
+ simple_threshold: z.ZodString;
1235
+ weighted_threshold: z.ZodString;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ spending_limit: string;
1238
+ simple_threshold: string;
1239
+ weighted_threshold: string;
1240
+ }, {
1241
+ spending_limit: string;
1242
+ simple_threshold: string;
1243
+ weighted_threshold: string;
1244
+ }>;
1245
+ }, "strip", z.ZodTypeAny, {
1246
+ network: "mainnet" | "testnet";
1247
+ instances: {
1248
+ spending_limit: string;
1249
+ simple_threshold: string;
1250
+ weighted_threshold: string;
1251
+ };
1252
+ }, {
1253
+ network: "mainnet" | "testnet";
1254
+ instances: {
1255
+ spending_limit: string;
1256
+ simple_threshold: string;
1257
+ weighted_threshold: string;
1258
+ };
1259
+ }>>;
1260
+ }, "strip", z.ZodTypeAny, {
1261
+ source: "mandate";
1262
+ mandate: {
1263
+ contract: string;
1264
+ chain: "stellar";
1265
+ method?: string | undefined;
1266
+ spendingLimit?: {
1267
+ token: string;
1268
+ limit: string;
1269
+ windowSeconds: number;
1270
+ } | undefined;
1271
+ approvalThreshold?: number | undefined;
1272
+ recipients?: string[] | undefined;
1273
+ expiry?: {
1274
+ validUntilLedger?: number | undefined;
1275
+ validUntilUnixSeconds?: number | undefined;
1276
+ } | undefined;
1277
+ } & {
1278
+ [k: string]: unknown;
1279
+ };
1280
+ ozConfig?: {
1281
+ network: "mainnet" | "testnet";
1282
+ instances: {
1283
+ spending_limit: string;
1284
+ simple_threshold: string;
1285
+ weighted_threshold: string;
1286
+ };
1287
+ } | undefined;
1288
+ }, {
1289
+ source: "mandate";
1290
+ mandate: {
1291
+ contract: string;
1292
+ chain: "stellar";
1293
+ method?: string | undefined;
1294
+ spendingLimit?: {
1295
+ token: string;
1296
+ limit: string;
1297
+ windowSeconds: number;
1298
+ } | undefined;
1299
+ approvalThreshold?: number | undefined;
1300
+ recipients?: string[] | undefined;
1301
+ expiry?: {
1302
+ validUntilLedger?: number | undefined;
1303
+ validUntilUnixSeconds?: number | undefined;
1304
+ } | undefined;
1305
+ } & {
1306
+ [k: string]: unknown;
1307
+ };
1308
+ ozConfig?: {
1309
+ network: "mainnet" | "testnet";
1310
+ instances: {
1311
+ spending_limit: string;
1312
+ simple_threshold: string;
1313
+ weighted_threshold: string;
1314
+ };
1315
+ } | undefined;
1316
+ }>, z.ZodObject<{
1317
+ source: z.ZodLiteral<"recording">;
1318
+ recordedTx: z.ZodObject<{
1319
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1320
+ signers: z.ZodArray<z.ZodString, "many">;
1321
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1322
+ tokenMovements: z.ZodArray<z.ZodObject<{
1323
+ token: z.ZodString;
1324
+ from: z.ZodString;
1325
+ to: z.ZodString;
1326
+ amount: z.ZodString;
1327
+ }, "strip", z.ZodTypeAny, {
1328
+ token: string;
1329
+ from: string;
1330
+ to: string;
1331
+ amount: string;
1332
+ }, {
1333
+ token: string;
1334
+ from: string;
1335
+ to: string;
1336
+ amount: string;
1337
+ }>, "many">;
1338
+ events: z.ZodArray<z.ZodObject<{
1339
+ contract: z.ZodString;
1340
+ topics: z.ZodArray<z.ZodString, "many">;
1341
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ contract: string;
1344
+ topics: string[];
1345
+ data?: unknown;
1346
+ }, {
1347
+ contract: string;
1348
+ topics: string[];
1349
+ data?: unknown;
1350
+ }>, "many">;
1351
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1352
+ ledgerSequence: z.ZodNumber;
1353
+ fetchedAt: z.ZodNumber;
1354
+ parseConfidence: z.ZodObject<{
1355
+ overall: z.ZodNumber;
1356
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1357
+ unknownContracts: z.ZodArray<z.ZodObject<{
1358
+ contract: z.ZodString;
1359
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1360
+ }, "strip", z.ZodTypeAny, {
1361
+ contract: string;
1362
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1363
+ }, {
1364
+ contract: string;
1365
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1366
+ }>, "many">;
1367
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1368
+ path: z.ZodString;
1369
+ type: z.ZodString;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ path: string;
1372
+ type: string;
1373
+ }, {
1374
+ path: string;
1375
+ type: string;
1376
+ }>, "many">;
1377
+ thresholdUsed: z.ZodNumber;
1378
+ }, "strip", z.ZodTypeAny, {
1379
+ overall: number;
1380
+ knownContracts: string[];
1381
+ unknownContracts: {
1382
+ contract: string;
1383
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1384
+ }[];
1385
+ opaqueScVals: {
1386
+ path: string;
1387
+ type: string;
1388
+ }[];
1389
+ thresholdUsed: number;
1390
+ }, {
1391
+ overall: number;
1392
+ knownContracts: string[];
1393
+ unknownContracts: {
1394
+ contract: string;
1395
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1396
+ }[];
1397
+ opaqueScVals: {
1398
+ path: string;
1399
+ type: string;
1400
+ }[];
1401
+ thresholdUsed: number;
1402
+ }>;
1403
+ sourceAccount: z.ZodString;
1404
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1405
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1406
+ signers: z.ZodArray<z.ZodString, "many">;
1407
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1408
+ tokenMovements: z.ZodArray<z.ZodObject<{
1409
+ token: z.ZodString;
1410
+ from: z.ZodString;
1411
+ to: z.ZodString;
1412
+ amount: z.ZodString;
1413
+ }, "strip", z.ZodTypeAny, {
1414
+ token: string;
1415
+ from: string;
1416
+ to: string;
1417
+ amount: string;
1418
+ }, {
1419
+ token: string;
1420
+ from: string;
1421
+ to: string;
1422
+ amount: string;
1423
+ }>, "many">;
1424
+ events: z.ZodArray<z.ZodObject<{
1425
+ contract: z.ZodString;
1426
+ topics: z.ZodArray<z.ZodString, "many">;
1427
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ contract: string;
1430
+ topics: string[];
1431
+ data?: unknown;
1432
+ }, {
1433
+ contract: string;
1434
+ topics: string[];
1435
+ data?: unknown;
1436
+ }>, "many">;
1437
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1438
+ ledgerSequence: z.ZodNumber;
1439
+ fetchedAt: z.ZodNumber;
1440
+ parseConfidence: z.ZodObject<{
1441
+ overall: z.ZodNumber;
1442
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1443
+ unknownContracts: z.ZodArray<z.ZodObject<{
1444
+ contract: z.ZodString;
1445
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1446
+ }, "strip", z.ZodTypeAny, {
1447
+ contract: string;
1448
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1449
+ }, {
1450
+ contract: string;
1451
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1452
+ }>, "many">;
1453
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1454
+ path: z.ZodString;
1455
+ type: z.ZodString;
1456
+ }, "strip", z.ZodTypeAny, {
1457
+ path: string;
1458
+ type: string;
1459
+ }, {
1460
+ path: string;
1461
+ type: string;
1462
+ }>, "many">;
1463
+ thresholdUsed: z.ZodNumber;
1464
+ }, "strip", z.ZodTypeAny, {
1465
+ overall: number;
1466
+ knownContracts: string[];
1467
+ unknownContracts: {
1468
+ contract: string;
1469
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1470
+ }[];
1471
+ opaqueScVals: {
1472
+ path: string;
1473
+ type: string;
1474
+ }[];
1475
+ thresholdUsed: number;
1476
+ }, {
1477
+ overall: number;
1478
+ knownContracts: string[];
1479
+ unknownContracts: {
1480
+ contract: string;
1481
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1482
+ }[];
1483
+ opaqueScVals: {
1484
+ path: string;
1485
+ type: string;
1486
+ }[];
1487
+ thresholdUsed: number;
1488
+ }>;
1489
+ sourceAccount: z.ZodString;
1490
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1491
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1492
+ signers: z.ZodArray<z.ZodString, "many">;
1493
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1494
+ tokenMovements: z.ZodArray<z.ZodObject<{
1495
+ token: z.ZodString;
1496
+ from: z.ZodString;
1497
+ to: z.ZodString;
1498
+ amount: z.ZodString;
1499
+ }, "strip", z.ZodTypeAny, {
1500
+ token: string;
1501
+ from: string;
1502
+ to: string;
1503
+ amount: string;
1504
+ }, {
1505
+ token: string;
1506
+ from: string;
1507
+ to: string;
1508
+ amount: string;
1509
+ }>, "many">;
1510
+ events: z.ZodArray<z.ZodObject<{
1511
+ contract: z.ZodString;
1512
+ topics: z.ZodArray<z.ZodString, "many">;
1513
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1514
+ }, "strip", z.ZodTypeAny, {
1515
+ contract: string;
1516
+ topics: string[];
1517
+ data?: unknown;
1518
+ }, {
1519
+ contract: string;
1520
+ topics: string[];
1521
+ data?: unknown;
1522
+ }>, "many">;
1523
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1524
+ ledgerSequence: z.ZodNumber;
1525
+ fetchedAt: z.ZodNumber;
1526
+ parseConfidence: z.ZodObject<{
1527
+ overall: z.ZodNumber;
1528
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1529
+ unknownContracts: z.ZodArray<z.ZodObject<{
1530
+ contract: z.ZodString;
1531
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1532
+ }, "strip", z.ZodTypeAny, {
1533
+ contract: string;
1534
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1535
+ }, {
1536
+ contract: string;
1537
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1538
+ }>, "many">;
1539
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1540
+ path: z.ZodString;
1541
+ type: z.ZodString;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ path: string;
1544
+ type: string;
1545
+ }, {
1546
+ path: string;
1547
+ type: string;
1548
+ }>, "many">;
1549
+ thresholdUsed: z.ZodNumber;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ overall: number;
1552
+ knownContracts: string[];
1553
+ unknownContracts: {
1554
+ contract: string;
1555
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1556
+ }[];
1557
+ opaqueScVals: {
1558
+ path: string;
1559
+ type: string;
1560
+ }[];
1561
+ thresholdUsed: number;
1562
+ }, {
1563
+ overall: number;
1564
+ knownContracts: string[];
1565
+ unknownContracts: {
1566
+ contract: string;
1567
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1568
+ }[];
1569
+ opaqueScVals: {
1570
+ path: string;
1571
+ type: string;
1572
+ }[];
1573
+ thresholdUsed: number;
1574
+ }>;
1575
+ sourceAccount: z.ZodString;
1576
+ }, z.ZodTypeAny, "passthrough">>;
1577
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1578
+ userResponses: z.ZodOptional<z.ZodObject<{
1579
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1580
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1581
+ limitAmount: z.ZodOptional<z.ZodString>;
1582
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1583
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1584
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1585
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1586
+ limitAmount: z.ZodOptional<z.ZodString>;
1587
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1588
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1589
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1590
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1591
+ limitAmount: z.ZodOptional<z.ZodString>;
1592
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1593
+ }, z.ZodTypeAny, "passthrough">>>;
1594
+ confidenceOverride: z.ZodOptional<z.ZodObject<{
1595
+ threshold: z.ZodNumber;
1596
+ }, "strip", z.ZodTypeAny, {
1597
+ threshold: number;
1598
+ }, {
1599
+ threshold: number;
1600
+ }>>;
1601
+ ozConfig: z.ZodOptional<z.ZodObject<{
1602
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1603
+ instances: z.ZodObject<{
1604
+ spending_limit: z.ZodString;
1605
+ simple_threshold: z.ZodString;
1606
+ weighted_threshold: z.ZodString;
1607
+ }, "strip", z.ZodTypeAny, {
1608
+ spending_limit: string;
1609
+ simple_threshold: string;
1610
+ weighted_threshold: string;
1611
+ }, {
1612
+ spending_limit: string;
1613
+ simple_threshold: string;
1614
+ weighted_threshold: string;
1615
+ }>;
1616
+ }, "strip", z.ZodTypeAny, {
1617
+ network: "mainnet" | "testnet";
1618
+ instances: {
1619
+ spending_limit: string;
1620
+ simple_threshold: string;
1621
+ weighted_threshold: string;
1622
+ };
1623
+ }, {
1624
+ network: "mainnet" | "testnet";
1625
+ instances: {
1626
+ spending_limit: string;
1627
+ simple_threshold: string;
1628
+ weighted_threshold: string;
1629
+ };
1630
+ }>>;
1631
+ }, "strip", z.ZodTypeAny, {
1632
+ network: "mainnet" | "testnet";
1633
+ source: "recording";
1634
+ recordedTx: {
1635
+ network: "mainnet" | "testnet";
1636
+ signers: string[];
1637
+ invocations: unknown[];
1638
+ tokenMovements: {
1639
+ token: string;
1640
+ from: string;
1641
+ to: string;
1642
+ amount: string;
1643
+ }[];
1644
+ events: {
1645
+ contract: string;
1646
+ topics: string[];
1647
+ data?: unknown;
1648
+ }[];
1649
+ authEntries: unknown[];
1650
+ ledgerSequence: number;
1651
+ fetchedAt: number;
1652
+ parseConfidence: {
1653
+ overall: number;
1654
+ knownContracts: string[];
1655
+ unknownContracts: {
1656
+ contract: string;
1657
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1658
+ }[];
1659
+ opaqueScVals: {
1660
+ path: string;
1661
+ type: string;
1662
+ }[];
1663
+ thresholdUsed: number;
1664
+ };
1665
+ sourceAccount: string;
1666
+ } & {
1667
+ [k: string]: unknown;
1668
+ };
1669
+ confidenceOverride?: {
1670
+ threshold: number;
1671
+ } | undefined;
1672
+ ozConfig?: {
1673
+ network: "mainnet" | "testnet";
1674
+ instances: {
1675
+ spending_limit: string;
1676
+ simple_threshold: string;
1677
+ weighted_threshold: string;
1678
+ };
1679
+ } | undefined;
1680
+ userResponses?: z.objectOutputType<{
1681
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1682
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1683
+ limitAmount: z.ZodOptional<z.ZodString>;
1684
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1685
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1686
+ }, {
1687
+ network: "mainnet" | "testnet";
1688
+ source: "recording";
1689
+ recordedTx: {
1690
+ network: "mainnet" | "testnet";
1691
+ signers: string[];
1692
+ invocations: unknown[];
1693
+ tokenMovements: {
1694
+ token: string;
1695
+ from: string;
1696
+ to: string;
1697
+ amount: string;
1698
+ }[];
1699
+ events: {
1700
+ contract: string;
1701
+ topics: string[];
1702
+ data?: unknown;
1703
+ }[];
1704
+ authEntries: unknown[];
1705
+ ledgerSequence: number;
1706
+ fetchedAt: number;
1707
+ parseConfidence: {
1708
+ overall: number;
1709
+ knownContracts: string[];
1710
+ unknownContracts: {
1711
+ contract: string;
1712
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1713
+ }[];
1714
+ opaqueScVals: {
1715
+ path: string;
1716
+ type: string;
1717
+ }[];
1718
+ thresholdUsed: number;
1719
+ };
1720
+ sourceAccount: string;
1721
+ } & {
1722
+ [k: string]: unknown;
1723
+ };
1724
+ confidenceOverride?: {
1725
+ threshold: number;
1726
+ } | undefined;
1727
+ ozConfig?: {
1728
+ network: "mainnet" | "testnet";
1729
+ instances: {
1730
+ spending_limit: string;
1731
+ simple_threshold: string;
1732
+ weighted_threshold: string;
1733
+ };
1734
+ } | undefined;
1735
+ userResponses?: z.objectInputType<{
1736
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1737
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1738
+ limitAmount: z.ZodOptional<z.ZodString>;
1739
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1740
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1741
+ }>]>;
1742
+ export type SynthesizePolicyInput = z.infer<typeof SynthesizePolicyInputSchema>;
1743
+ /** Flat ZodRawShape used for MCP tool registration. Every field is optional
1744
+ * so the JSON-Schema the SDK exposes to clients does not forbid either
1745
+ * front-end; the body re-validates against the discriminated union. */
1746
+ export declare const SynthesizePolicyToolShape: {
1747
+ readonly source: z.ZodOptional<z.ZodEnum<["mandate", "recording"]>>;
1748
+ readonly mandate: z.ZodOptional<z.ZodObject<{
1749
+ chain: z.ZodLiteral<"stellar">;
1750
+ contract: z.ZodString;
1751
+ method: z.ZodOptional<z.ZodString>;
1752
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1753
+ token: z.ZodString;
1754
+ limit: z.ZodString;
1755
+ windowSeconds: z.ZodNumber;
1756
+ }, "strip", z.ZodTypeAny, {
1757
+ token: string;
1758
+ limit: string;
1759
+ windowSeconds: number;
1760
+ }, {
1761
+ token: string;
1762
+ limit: string;
1763
+ windowSeconds: number;
1764
+ }>>;
1765
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1766
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1767
+ expiry: z.ZodOptional<z.ZodObject<{
1768
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1769
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1770
+ }, "strip", z.ZodTypeAny, {
1771
+ validUntilLedger?: number | undefined;
1772
+ validUntilUnixSeconds?: number | undefined;
1773
+ }, {
1774
+ validUntilLedger?: number | undefined;
1775
+ validUntilUnixSeconds?: number | undefined;
1776
+ }>>;
1777
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1778
+ chain: z.ZodLiteral<"stellar">;
1779
+ contract: z.ZodString;
1780
+ method: z.ZodOptional<z.ZodString>;
1781
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1782
+ token: z.ZodString;
1783
+ limit: z.ZodString;
1784
+ windowSeconds: z.ZodNumber;
1785
+ }, "strip", z.ZodTypeAny, {
1786
+ token: string;
1787
+ limit: string;
1788
+ windowSeconds: number;
1789
+ }, {
1790
+ token: string;
1791
+ limit: string;
1792
+ windowSeconds: number;
1793
+ }>>;
1794
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1795
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1796
+ expiry: z.ZodOptional<z.ZodObject<{
1797
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1798
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1799
+ }, "strip", z.ZodTypeAny, {
1800
+ validUntilLedger?: number | undefined;
1801
+ validUntilUnixSeconds?: number | undefined;
1802
+ }, {
1803
+ validUntilLedger?: number | undefined;
1804
+ validUntilUnixSeconds?: number | undefined;
1805
+ }>>;
1806
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1807
+ chain: z.ZodLiteral<"stellar">;
1808
+ contract: z.ZodString;
1809
+ method: z.ZodOptional<z.ZodString>;
1810
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1811
+ token: z.ZodString;
1812
+ limit: z.ZodString;
1813
+ windowSeconds: z.ZodNumber;
1814
+ }, "strip", z.ZodTypeAny, {
1815
+ token: string;
1816
+ limit: string;
1817
+ windowSeconds: number;
1818
+ }, {
1819
+ token: string;
1820
+ limit: string;
1821
+ windowSeconds: number;
1822
+ }>>;
1823
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1824
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1825
+ expiry: z.ZodOptional<z.ZodObject<{
1826
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1827
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1828
+ }, "strip", z.ZodTypeAny, {
1829
+ validUntilLedger?: number | undefined;
1830
+ validUntilUnixSeconds?: number | undefined;
1831
+ }, {
1832
+ validUntilLedger?: number | undefined;
1833
+ validUntilUnixSeconds?: number | undefined;
1834
+ }>>;
1835
+ }, z.ZodTypeAny, "passthrough">>>;
1836
+ readonly recordedTx: z.ZodOptional<z.ZodObject<{
1837
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1838
+ signers: z.ZodArray<z.ZodString, "many">;
1839
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1840
+ tokenMovements: z.ZodArray<z.ZodObject<{
1841
+ token: z.ZodString;
1842
+ from: z.ZodString;
1843
+ to: z.ZodString;
1844
+ amount: z.ZodString;
1845
+ }, "strip", z.ZodTypeAny, {
1846
+ token: string;
1847
+ from: string;
1848
+ to: string;
1849
+ amount: string;
1850
+ }, {
1851
+ token: string;
1852
+ from: string;
1853
+ to: string;
1854
+ amount: string;
1855
+ }>, "many">;
1856
+ events: z.ZodArray<z.ZodObject<{
1857
+ contract: z.ZodString;
1858
+ topics: z.ZodArray<z.ZodString, "many">;
1859
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1860
+ }, "strip", z.ZodTypeAny, {
1861
+ contract: string;
1862
+ topics: string[];
1863
+ data?: unknown;
1864
+ }, {
1865
+ contract: string;
1866
+ topics: string[];
1867
+ data?: unknown;
1868
+ }>, "many">;
1869
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1870
+ ledgerSequence: z.ZodNumber;
1871
+ fetchedAt: z.ZodNumber;
1872
+ parseConfidence: z.ZodObject<{
1873
+ overall: z.ZodNumber;
1874
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1875
+ unknownContracts: z.ZodArray<z.ZodObject<{
1876
+ contract: z.ZodString;
1877
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ contract: string;
1880
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1881
+ }, {
1882
+ contract: string;
1883
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1884
+ }>, "many">;
1885
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1886
+ path: z.ZodString;
1887
+ type: z.ZodString;
1888
+ }, "strip", z.ZodTypeAny, {
1889
+ path: string;
1890
+ type: string;
1891
+ }, {
1892
+ path: string;
1893
+ type: string;
1894
+ }>, "many">;
1895
+ thresholdUsed: z.ZodNumber;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ overall: number;
1898
+ knownContracts: string[];
1899
+ unknownContracts: {
1900
+ contract: string;
1901
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1902
+ }[];
1903
+ opaqueScVals: {
1904
+ path: string;
1905
+ type: string;
1906
+ }[];
1907
+ thresholdUsed: number;
1908
+ }, {
1909
+ overall: number;
1910
+ knownContracts: string[];
1911
+ unknownContracts: {
1912
+ contract: string;
1913
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1914
+ }[];
1915
+ opaqueScVals: {
1916
+ path: string;
1917
+ type: string;
1918
+ }[];
1919
+ thresholdUsed: number;
1920
+ }>;
1921
+ sourceAccount: z.ZodString;
1922
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1923
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1924
+ signers: z.ZodArray<z.ZodString, "many">;
1925
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1926
+ tokenMovements: z.ZodArray<z.ZodObject<{
1927
+ token: z.ZodString;
1928
+ from: z.ZodString;
1929
+ to: z.ZodString;
1930
+ amount: z.ZodString;
1931
+ }, "strip", z.ZodTypeAny, {
1932
+ token: string;
1933
+ from: string;
1934
+ to: string;
1935
+ amount: string;
1936
+ }, {
1937
+ token: string;
1938
+ from: string;
1939
+ to: string;
1940
+ amount: string;
1941
+ }>, "many">;
1942
+ events: z.ZodArray<z.ZodObject<{
1943
+ contract: z.ZodString;
1944
+ topics: z.ZodArray<z.ZodString, "many">;
1945
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1946
+ }, "strip", z.ZodTypeAny, {
1947
+ contract: string;
1948
+ topics: string[];
1949
+ data?: unknown;
1950
+ }, {
1951
+ contract: string;
1952
+ topics: string[];
1953
+ data?: unknown;
1954
+ }>, "many">;
1955
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1956
+ ledgerSequence: z.ZodNumber;
1957
+ fetchedAt: z.ZodNumber;
1958
+ parseConfidence: z.ZodObject<{
1959
+ overall: z.ZodNumber;
1960
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1961
+ unknownContracts: z.ZodArray<z.ZodObject<{
1962
+ contract: z.ZodString;
1963
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1964
+ }, "strip", z.ZodTypeAny, {
1965
+ contract: string;
1966
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1967
+ }, {
1968
+ contract: string;
1969
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1970
+ }>, "many">;
1971
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1972
+ path: z.ZodString;
1973
+ type: z.ZodString;
1974
+ }, "strip", z.ZodTypeAny, {
1975
+ path: string;
1976
+ type: string;
1977
+ }, {
1978
+ path: string;
1979
+ type: string;
1980
+ }>, "many">;
1981
+ thresholdUsed: z.ZodNumber;
1982
+ }, "strip", z.ZodTypeAny, {
1983
+ overall: number;
1984
+ knownContracts: string[];
1985
+ unknownContracts: {
1986
+ contract: string;
1987
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1988
+ }[];
1989
+ opaqueScVals: {
1990
+ path: string;
1991
+ type: string;
1992
+ }[];
1993
+ thresholdUsed: number;
1994
+ }, {
1995
+ overall: number;
1996
+ knownContracts: string[];
1997
+ unknownContracts: {
1998
+ contract: string;
1999
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
2000
+ }[];
2001
+ opaqueScVals: {
2002
+ path: string;
2003
+ type: string;
2004
+ }[];
2005
+ thresholdUsed: number;
2006
+ }>;
2007
+ sourceAccount: z.ZodString;
2008
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2009
+ network: z.ZodEnum<["mainnet", "testnet"]>;
2010
+ signers: z.ZodArray<z.ZodString, "many">;
2011
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
2012
+ tokenMovements: z.ZodArray<z.ZodObject<{
2013
+ token: z.ZodString;
2014
+ from: z.ZodString;
2015
+ to: z.ZodString;
2016
+ amount: z.ZodString;
2017
+ }, "strip", z.ZodTypeAny, {
2018
+ token: string;
2019
+ from: string;
2020
+ to: string;
2021
+ amount: string;
2022
+ }, {
2023
+ token: string;
2024
+ from: string;
2025
+ to: string;
2026
+ amount: string;
2027
+ }>, "many">;
2028
+ events: z.ZodArray<z.ZodObject<{
2029
+ contract: z.ZodString;
2030
+ topics: z.ZodArray<z.ZodString, "many">;
2031
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2032
+ }, "strip", z.ZodTypeAny, {
2033
+ contract: string;
2034
+ topics: string[];
2035
+ data?: unknown;
2036
+ }, {
2037
+ contract: string;
2038
+ topics: string[];
2039
+ data?: unknown;
2040
+ }>, "many">;
2041
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
2042
+ ledgerSequence: z.ZodNumber;
2043
+ fetchedAt: z.ZodNumber;
2044
+ parseConfidence: z.ZodObject<{
2045
+ overall: z.ZodNumber;
2046
+ knownContracts: z.ZodArray<z.ZodString, "many">;
2047
+ unknownContracts: z.ZodArray<z.ZodObject<{
2048
+ contract: z.ZodString;
2049
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ contract: string;
2052
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
2053
+ }, {
2054
+ contract: string;
2055
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
2056
+ }>, "many">;
2057
+ opaqueScVals: z.ZodArray<z.ZodObject<{
2058
+ path: z.ZodString;
2059
+ type: z.ZodString;
2060
+ }, "strip", z.ZodTypeAny, {
2061
+ path: string;
2062
+ type: string;
2063
+ }, {
2064
+ path: string;
2065
+ type: string;
2066
+ }>, "many">;
2067
+ thresholdUsed: z.ZodNumber;
2068
+ }, "strip", z.ZodTypeAny, {
2069
+ overall: number;
2070
+ knownContracts: string[];
2071
+ unknownContracts: {
2072
+ contract: string;
2073
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
2074
+ }[];
2075
+ opaqueScVals: {
2076
+ path: string;
2077
+ type: string;
2078
+ }[];
2079
+ thresholdUsed: number;
2080
+ }, {
2081
+ overall: number;
2082
+ knownContracts: string[];
2083
+ unknownContracts: {
2084
+ contract: string;
2085
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
2086
+ }[];
2087
+ opaqueScVals: {
2088
+ path: string;
2089
+ type: string;
2090
+ }[];
2091
+ thresholdUsed: number;
2092
+ }>;
2093
+ sourceAccount: z.ZodString;
2094
+ }, z.ZodTypeAny, "passthrough">>>;
2095
+ readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
2096
+ readonly userResponses: z.ZodOptional<z.ZodObject<{
2097
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
2098
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
2099
+ limitAmount: z.ZodOptional<z.ZodString>;
2100
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
2101
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2102
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
2103
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
2104
+ limitAmount: z.ZodOptional<z.ZodString>;
2105
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
2106
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2107
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
2108
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
2109
+ limitAmount: z.ZodOptional<z.ZodString>;
2110
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
2111
+ }, z.ZodTypeAny, "passthrough">>>;
2112
+ readonly confidenceOverride: z.ZodOptional<z.ZodObject<{
2113
+ threshold: z.ZodNumber;
2114
+ }, "strip", z.ZodTypeAny, {
2115
+ threshold: number;
2116
+ }, {
2117
+ threshold: number;
2118
+ }>>;
2119
+ readonly ozConfig: z.ZodOptional<z.ZodObject<{
2120
+ network: z.ZodEnum<["mainnet", "testnet"]>;
2121
+ instances: z.ZodObject<{
2122
+ spending_limit: z.ZodString;
2123
+ simple_threshold: z.ZodString;
2124
+ weighted_threshold: z.ZodString;
2125
+ }, "strip", z.ZodTypeAny, {
2126
+ spending_limit: string;
2127
+ simple_threshold: string;
2128
+ weighted_threshold: string;
2129
+ }, {
2130
+ spending_limit: string;
2131
+ simple_threshold: string;
2132
+ weighted_threshold: string;
2133
+ }>;
2134
+ }, "strip", z.ZodTypeAny, {
2135
+ network: "mainnet" | "testnet";
2136
+ instances: {
2137
+ spending_limit: string;
2138
+ simple_threshold: string;
2139
+ weighted_threshold: string;
2140
+ };
2141
+ }, {
2142
+ network: "mainnet" | "testnet";
2143
+ instances: {
2144
+ spending_limit: string;
2145
+ simple_threshold: string;
2146
+ weighted_threshold: string;
2147
+ };
2148
+ }>>;
2149
+ };
2150
+ export declare const ToolErrorSchema: z.ZodObject<{
2151
+ code: z.ZodString;
2152
+ message: z.ZodString;
2153
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
2154
+ retryable: z.ZodBoolean;
2155
+ remediation: z.ZodOptional<z.ZodObject<{
2156
+ toolCall: z.ZodOptional<z.ZodObject<{
2157
+ name: z.ZodString;
2158
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2159
+ }, "strip", z.ZodTypeAny, {
2160
+ args: Record<string, unknown>;
2161
+ name: string;
2162
+ }, {
2163
+ args: Record<string, unknown>;
2164
+ name: string;
2165
+ }>>;
2166
+ userQuestion: z.ZodOptional<z.ZodObject<{
2167
+ code: z.ZodString;
2168
+ question: z.ZodString;
2169
+ }, "strip", z.ZodTypeAny, {
2170
+ code: string;
2171
+ question: string;
2172
+ }, {
2173
+ code: string;
2174
+ question: string;
2175
+ }>>;
2176
+ docsUrl: z.ZodOptional<z.ZodString>;
2177
+ }, "strip", z.ZodTypeAny, {
2178
+ toolCall?: {
2179
+ args: Record<string, unknown>;
2180
+ name: string;
2181
+ } | undefined;
2182
+ userQuestion?: {
2183
+ code: string;
2184
+ question: string;
2185
+ } | undefined;
2186
+ docsUrl?: string | undefined;
2187
+ }, {
2188
+ toolCall?: {
2189
+ args: Record<string, unknown>;
2190
+ name: string;
2191
+ } | undefined;
2192
+ userQuestion?: {
2193
+ code: string;
2194
+ question: string;
2195
+ } | undefined;
2196
+ docsUrl?: string | undefined;
2197
+ }>>;
2198
+ details: z.ZodOptional<z.ZodUnknown>;
2199
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2200
+ code: z.ZodString;
2201
+ message: z.ZodString;
2202
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
2203
+ retryable: z.ZodBoolean;
2204
+ remediation: z.ZodOptional<z.ZodObject<{
2205
+ toolCall: z.ZodOptional<z.ZodObject<{
2206
+ name: z.ZodString;
2207
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2208
+ }, "strip", z.ZodTypeAny, {
2209
+ args: Record<string, unknown>;
2210
+ name: string;
2211
+ }, {
2212
+ args: Record<string, unknown>;
2213
+ name: string;
2214
+ }>>;
2215
+ userQuestion: z.ZodOptional<z.ZodObject<{
2216
+ code: z.ZodString;
2217
+ question: z.ZodString;
2218
+ }, "strip", z.ZodTypeAny, {
2219
+ code: string;
2220
+ question: string;
2221
+ }, {
2222
+ code: string;
2223
+ question: string;
2224
+ }>>;
2225
+ docsUrl: z.ZodOptional<z.ZodString>;
2226
+ }, "strip", z.ZodTypeAny, {
2227
+ toolCall?: {
2228
+ args: Record<string, unknown>;
2229
+ name: string;
2230
+ } | undefined;
2231
+ userQuestion?: {
2232
+ code: string;
2233
+ question: string;
2234
+ } | undefined;
2235
+ docsUrl?: string | undefined;
2236
+ }, {
2237
+ toolCall?: {
2238
+ args: Record<string, unknown>;
2239
+ name: string;
2240
+ } | undefined;
2241
+ userQuestion?: {
2242
+ code: string;
2243
+ question: string;
2244
+ } | undefined;
2245
+ docsUrl?: string | undefined;
2246
+ }>>;
2247
+ details: z.ZodOptional<z.ZodUnknown>;
2248
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2249
+ code: z.ZodString;
2250
+ message: z.ZodString;
2251
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
2252
+ retryable: z.ZodBoolean;
2253
+ remediation: z.ZodOptional<z.ZodObject<{
2254
+ toolCall: z.ZodOptional<z.ZodObject<{
2255
+ name: z.ZodString;
2256
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2257
+ }, "strip", z.ZodTypeAny, {
2258
+ args: Record<string, unknown>;
2259
+ name: string;
2260
+ }, {
2261
+ args: Record<string, unknown>;
2262
+ name: string;
2263
+ }>>;
2264
+ userQuestion: z.ZodOptional<z.ZodObject<{
2265
+ code: z.ZodString;
2266
+ question: z.ZodString;
2267
+ }, "strip", z.ZodTypeAny, {
2268
+ code: string;
2269
+ question: string;
2270
+ }, {
2271
+ code: string;
2272
+ question: string;
2273
+ }>>;
2274
+ docsUrl: z.ZodOptional<z.ZodString>;
2275
+ }, "strip", z.ZodTypeAny, {
2276
+ toolCall?: {
2277
+ args: Record<string, unknown>;
2278
+ name: string;
2279
+ } | undefined;
2280
+ userQuestion?: {
2281
+ code: string;
2282
+ question: string;
2283
+ } | undefined;
2284
+ docsUrl?: string | undefined;
2285
+ }, {
2286
+ toolCall?: {
2287
+ args: Record<string, unknown>;
2288
+ name: string;
2289
+ } | undefined;
2290
+ userQuestion?: {
2291
+ code: string;
2292
+ question: string;
2293
+ } | undefined;
2294
+ docsUrl?: string | undefined;
2295
+ }>>;
2296
+ details: z.ZodOptional<z.ZodUnknown>;
2297
+ }, z.ZodTypeAny, "passthrough">>;