@crediolabs/policy-synth 0.1.4 → 0.1.6

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 (154) hide show
  1. package/LICENSE +21 -0
  2. package/dist/codegen/template.js +3 -3
  3. package/dist/record/decode.d.ts +6 -3
  4. package/dist/record/decode.js +56 -3
  5. package/dist/record/freshness.d.ts +14 -1
  6. package/dist/record/freshness.js +32 -2
  7. package/dist/record/index.d.ts +11 -0
  8. package/dist/record/index.js +25 -0
  9. package/dist/record/movements.d.ts +15 -3
  10. package/dist/record/movements.js +42 -7
  11. package/dist/run/index.d.ts +43 -0
  12. package/dist/run/index.js +222 -0
  13. package/dist/run/schemas.d.ts +2016 -0
  14. package/dist/run/schemas.js +223 -0
  15. package/dist/synth/address.d.ts +7 -0
  16. package/dist/synth/address.js +12 -0
  17. package/dist/synth/compose-from-recording.d.ts +4 -3
  18. package/dist/synth/compose-from-recording.js +16 -6
  19. package/dist/synth/deny-cases.d.ts +12 -2
  20. package/dist/synth/deny-cases.js +76 -4
  21. package/dist/synth/evaluate.js +2 -2
  22. package/dist/synth/index.d.ts +1 -0
  23. package/dist/synth/index.js +4 -0
  24. package/dist/synth/minimize.d.ts +1 -1
  25. package/dist/synth/minimize.js +3 -3
  26. package/dist/synth/synthesize-from-recording.d.ts +5 -2
  27. package/dist/synth/synthesize-from-recording.js +175 -69
  28. package/dist/types.d.ts +41 -1
  29. package/dist/types.js +17 -0
  30. package/dist/verify/simulate.js +18 -2
  31. package/dist/verify/verify.js +18 -2
  32. package/dist-cjs/adapters/interpreter/adapter.d.ts +38 -0
  33. package/dist-cjs/adapters/interpreter/adapter.js +527 -0
  34. package/dist-cjs/adapters/interpreter/index.d.ts +1 -0
  35. package/dist-cjs/adapters/interpreter/index.js +8 -0
  36. package/dist-cjs/adapters/oz/adapter.d.ts +20 -0
  37. package/dist-cjs/adapters/oz/adapter.js +289 -0
  38. package/dist-cjs/adapters/oz/index.d.ts +1 -0
  39. package/dist-cjs/adapters/oz/index.js +8 -0
  40. package/dist-cjs/codegen/compile-gate.d.ts +33 -0
  41. package/dist-cjs/codegen/compile-gate.js +123 -0
  42. package/dist-cjs/codegen/index.d.ts +2 -0
  43. package/dist-cjs/codegen/index.js +14 -0
  44. package/dist-cjs/codegen/template.d.ts +18 -0
  45. package/dist-cjs/codegen/template.js +134 -0
  46. package/dist-cjs/errors.d.ts +37 -0
  47. package/dist-cjs/errors.js +3 -0
  48. package/dist-cjs/index.d.ts +11 -0
  49. package/dist-cjs/index.js +27 -0
  50. package/dist-cjs/ir/index.d.ts +1 -0
  51. package/dist-cjs/ir/index.js +3 -0
  52. package/dist-cjs/ir/types.d.ts +108 -0
  53. package/dist-cjs/ir/types.js +12 -0
  54. package/dist-cjs/mandate/index.d.ts +2 -0
  55. package/dist-cjs/mandate/index.js +6 -0
  56. package/dist-cjs/mandate/to-ir.d.ts +3 -0
  57. package/dist-cjs/mandate/to-ir.js +63 -0
  58. package/dist-cjs/mandate/types.d.ts +20 -0
  59. package/dist-cjs/mandate/types.js +9 -0
  60. package/dist-cjs/package.json +3 -0
  61. package/dist-cjs/predicate/encode.d.ts +10 -0
  62. package/dist-cjs/predicate/encode.js +252 -0
  63. package/dist-cjs/predicate/index.d.ts +1 -0
  64. package/dist-cjs/predicate/index.js +6 -0
  65. package/dist-cjs/record/decode.d.ts +79 -0
  66. package/dist-cjs/record/decode.js +441 -0
  67. package/dist-cjs/record/freshness.d.ts +30 -0
  68. package/dist-cjs/record/freshness.js +85 -0
  69. package/dist-cjs/record/index.d.ts +32 -0
  70. package/dist-cjs/record/index.js +191 -0
  71. package/dist-cjs/record/movements.d.ts +32 -0
  72. package/dist-cjs/record/movements.js +227 -0
  73. package/dist-cjs/record/rpc.d.ts +22 -0
  74. package/dist-cjs/record/rpc.js +74 -0
  75. package/dist-cjs/record/validate.d.ts +22 -0
  76. package/dist-cjs/record/validate.js +63 -0
  77. package/dist-cjs/registry/identify.d.ts +11 -0
  78. package/dist-cjs/registry/identify.js +87 -0
  79. package/dist-cjs/registry/index.d.ts +3 -0
  80. package/dist-cjs/registry/index.js +15 -0
  81. package/dist-cjs/registry/known-addresses.d.ts +16 -0
  82. package/dist-cjs/registry/known-addresses.js +53 -0
  83. package/dist-cjs/registry/protocols.d.ts +38 -0
  84. package/dist-cjs/registry/protocols.js +153 -0
  85. package/dist-cjs/review-card/builder.d.ts +14 -0
  86. package/dist-cjs/review-card/builder.js +264 -0
  87. package/dist-cjs/review-card/conflict.d.ts +40 -0
  88. package/dist-cjs/review-card/conflict.js +114 -0
  89. package/dist-cjs/review-card/cross-check.d.ts +11 -0
  90. package/dist-cjs/review-card/cross-check.js +151 -0
  91. package/dist-cjs/review-card/index.d.ts +3 -0
  92. package/dist-cjs/review-card/index.js +10 -0
  93. package/dist-cjs/run/index.d.ts +43 -0
  94. package/dist-cjs/run/index.js +237 -0
  95. package/dist-cjs/run/schemas.d.ts +2016 -0
  96. package/dist-cjs/run/schemas.js +226 -0
  97. package/dist-cjs/seams/index.d.ts +1 -0
  98. package/dist-cjs/seams/index.js +3 -0
  99. package/dist-cjs/seams/types.d.ts +66 -0
  100. package/dist-cjs/seams/types.js +12 -0
  101. package/dist-cjs/synth/address.d.ts +7 -0
  102. package/dist-cjs/synth/address.js +15 -0
  103. package/dist-cjs/synth/compose-from-recording.d.ts +65 -0
  104. package/dist-cjs/synth/compose-from-recording.js +366 -0
  105. package/dist-cjs/synth/deny-cases.d.ts +22 -0
  106. package/dist-cjs/synth/deny-cases.js +438 -0
  107. package/dist-cjs/synth/evaluate.d.ts +39 -0
  108. package/dist-cjs/synth/evaluate.js +428 -0
  109. package/dist-cjs/synth/harness.d.ts +16 -0
  110. package/dist-cjs/synth/harness.js +29 -0
  111. package/dist-cjs/synth/index.d.ts +10 -0
  112. package/dist-cjs/synth/index.js +28 -0
  113. package/dist-cjs/synth/lower.d.ts +23 -0
  114. package/dist-cjs/synth/lower.js +119 -0
  115. package/dist-cjs/synth/minimize.d.ts +4 -0
  116. package/dist-cjs/synth/minimize.js +41 -0
  117. package/dist-cjs/synth/predicate-literals.d.ts +5 -0
  118. package/dist-cjs/synth/predicate-literals.js +28 -0
  119. package/dist-cjs/synth/scope.d.ts +26 -0
  120. package/dist-cjs/synth/scope.js +81 -0
  121. package/dist-cjs/synth/synthesize-from-mandate.d.ts +5 -0
  122. package/dist-cjs/synth/synthesize-from-mandate.js +37 -0
  123. package/dist-cjs/synth/synthesize-from-recording.d.ts +49 -0
  124. package/dist-cjs/synth/synthesize-from-recording.js +759 -0
  125. package/dist-cjs/types.d.ts +311 -0
  126. package/dist-cjs/types.js +55 -0
  127. package/dist-cjs/verify/envelope.d.ts +15 -0
  128. package/dist-cjs/verify/envelope.js +23 -0
  129. package/dist-cjs/verify/index.d.ts +3 -0
  130. package/dist-cjs/verify/index.js +8 -0
  131. package/dist-cjs/verify/simulate.d.ts +31 -0
  132. package/dist-cjs/verify/simulate.js +261 -0
  133. package/dist-cjs/verify/verify.d.ts +21 -0
  134. package/dist-cjs/verify/verify.js +192 -0
  135. package/package.json +43 -3
  136. package/src/codegen/template.ts +3 -3
  137. package/src/contracts/policy-template/OZ_POLICY_TRAIT.md +171 -0
  138. package/src/record/corpus-fixtures.json +532 -0
  139. package/src/record/decode.ts +63 -10
  140. package/src/record/freshness.ts +34 -2
  141. package/src/record/index.ts +40 -0
  142. package/src/record/movements.ts +40 -7
  143. package/src/run/index.ts +277 -0
  144. package/src/run/schemas.ts +250 -0
  145. package/src/synth/address.ts +14 -0
  146. package/src/synth/compose-from-recording.ts +20 -9
  147. package/src/synth/deny-cases.ts +87 -4
  148. package/src/synth/evaluate.ts +2 -2
  149. package/src/synth/index.ts +4 -0
  150. package/src/synth/minimize.ts +7 -3
  151. package/src/synth/synthesize-from-recording.ts +200 -68
  152. package/src/types.ts +37 -1
  153. package/src/verify/simulate.ts +21 -2
  154. package/src/verify/verify.ts +21 -2
@@ -0,0 +1,2016 @@
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
+ amount: string;
18
+ token: string;
19
+ from: string;
20
+ to: string;
21
+ }, {
22
+ amount: string;
23
+ token: string;
24
+ from: string;
25
+ to: 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
+ type: string;
58
+ path: string;
59
+ }, {
60
+ type: string;
61
+ path: string;
62
+ }>, "many">;
63
+ thresholdUsed: z.ZodNumber;
64
+ }, "strip", z.ZodTypeAny, {
65
+ opaqueScVals: {
66
+ type: string;
67
+ path: string;
68
+ }[];
69
+ unknownContracts: {
70
+ contract: string;
71
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
72
+ }[];
73
+ overall: number;
74
+ knownContracts: string[];
75
+ thresholdUsed: number;
76
+ }, {
77
+ opaqueScVals: {
78
+ type: string;
79
+ path: string;
80
+ }[];
81
+ unknownContracts: {
82
+ contract: string;
83
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
84
+ }[];
85
+ overall: number;
86
+ knownContracts: string[];
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
+ amount: string;
104
+ token: string;
105
+ from: string;
106
+ to: string;
107
+ }, {
108
+ amount: string;
109
+ token: string;
110
+ from: string;
111
+ to: 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
+ type: string;
147
+ path: string;
148
+ }, {
149
+ type: string;
150
+ path: string;
151
+ }>, "many">;
152
+ thresholdUsed: z.ZodNumber;
153
+ }, "strip", z.ZodTypeAny, {
154
+ opaqueScVals: {
155
+ type: string;
156
+ path: string;
157
+ }[];
158
+ unknownContracts: {
159
+ contract: string;
160
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
161
+ }[];
162
+ overall: number;
163
+ knownContracts: string[];
164
+ thresholdUsed: number;
165
+ }, {
166
+ opaqueScVals: {
167
+ type: string;
168
+ path: string;
169
+ }[];
170
+ unknownContracts: {
171
+ contract: string;
172
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
173
+ }[];
174
+ overall: number;
175
+ knownContracts: string[];
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
+ amount: string;
190
+ token: string;
191
+ from: string;
192
+ to: string;
193
+ }, {
194
+ amount: string;
195
+ token: string;
196
+ from: string;
197
+ to: 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
+ type: string;
233
+ path: string;
234
+ }, {
235
+ type: string;
236
+ path: string;
237
+ }>, "many">;
238
+ thresholdUsed: z.ZodNumber;
239
+ }, "strip", z.ZodTypeAny, {
240
+ opaqueScVals: {
241
+ type: string;
242
+ path: string;
243
+ }[];
244
+ unknownContracts: {
245
+ contract: string;
246
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
247
+ }[];
248
+ overall: number;
249
+ knownContracts: string[];
250
+ thresholdUsed: number;
251
+ }, {
252
+ opaqueScVals: {
253
+ type: string;
254
+ path: string;
255
+ }[];
256
+ unknownContracts: {
257
+ contract: string;
258
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
259
+ }[];
260
+ overall: number;
261
+ knownContracts: string[];
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
+ amount: string;
276
+ token: string;
277
+ from: string;
278
+ to: string;
279
+ }, {
280
+ amount: string;
281
+ token: string;
282
+ from: string;
283
+ to: 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
+ type: string;
319
+ path: string;
320
+ }, {
321
+ type: string;
322
+ path: string;
323
+ }>, "many">;
324
+ thresholdUsed: z.ZodNumber;
325
+ }, "strip", z.ZodTypeAny, {
326
+ opaqueScVals: {
327
+ type: string;
328
+ path: string;
329
+ }[];
330
+ unknownContracts: {
331
+ contract: string;
332
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
333
+ }[];
334
+ overall: number;
335
+ knownContracts: string[];
336
+ thresholdUsed: number;
337
+ }, {
338
+ opaqueScVals: {
339
+ type: string;
340
+ path: string;
341
+ }[];
342
+ unknownContracts: {
343
+ contract: string;
344
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
345
+ }[];
346
+ overall: number;
347
+ knownContracts: string[];
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
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
450
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
451
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
452
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
453
+ limitAmount: z.ZodOptional<z.ZodString>;
454
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
455
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
456
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
457
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
458
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
459
+ limitAmount: z.ZodOptional<z.ZodString>;
460
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
461
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
462
+ }, z.ZodTypeAny, "passthrough">>;
463
+ /** OzAdapterConfig - the per-network OZ built-in instance addresses. */
464
+ export declare const OzAdapterConfigSchema: z.ZodObject<{
465
+ network: z.ZodEnum<["mainnet", "testnet"]>;
466
+ instances: z.ZodObject<{
467
+ spending_limit: z.ZodString;
468
+ simple_threshold: z.ZodString;
469
+ weighted_threshold: z.ZodString;
470
+ }, "strip", z.ZodTypeAny, {
471
+ spending_limit: string;
472
+ simple_threshold: string;
473
+ weighted_threshold: string;
474
+ }, {
475
+ spending_limit: string;
476
+ simple_threshold: string;
477
+ weighted_threshold: string;
478
+ }>;
479
+ }, "strip", z.ZodTypeAny, {
480
+ network: "mainnet" | "testnet";
481
+ instances: {
482
+ spending_limit: string;
483
+ simple_threshold: string;
484
+ weighted_threshold: string;
485
+ };
486
+ }, {
487
+ network: "mainnet" | "testnet";
488
+ instances: {
489
+ spending_limit: string;
490
+ simple_threshold: string;
491
+ weighted_threshold: string;
492
+ };
493
+ }>;
494
+ export declare const RecordTransactionInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
495
+ hash: z.ZodOptional<z.ZodString>;
496
+ xdr: z.ZodOptional<z.ZodString>;
497
+ network: z.ZodEnum<["mainnet", "testnet"]>;
498
+ confidenceOverride: z.ZodOptional<z.ZodNumber>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ network: "mainnet" | "testnet";
501
+ hash?: string | undefined;
502
+ xdr?: string | undefined;
503
+ confidenceOverride?: number | undefined;
504
+ }, {
505
+ network: "mainnet" | "testnet";
506
+ hash?: string | undefined;
507
+ xdr?: string | undefined;
508
+ confidenceOverride?: number | undefined;
509
+ }>, {
510
+ network: "mainnet" | "testnet";
511
+ hash?: string | undefined;
512
+ xdr?: string | undefined;
513
+ confidenceOverride?: number | undefined;
514
+ }, {
515
+ network: "mainnet" | "testnet";
516
+ hash?: string | undefined;
517
+ xdr?: string | undefined;
518
+ confidenceOverride?: number | undefined;
519
+ }>, {
520
+ network: "mainnet" | "testnet";
521
+ hash?: string | undefined;
522
+ xdr?: string | undefined;
523
+ confidenceOverride?: number | undefined;
524
+ }, {
525
+ network: "mainnet" | "testnet";
526
+ hash?: string | undefined;
527
+ xdr?: string | undefined;
528
+ confidenceOverride?: number | undefined;
529
+ }>;
530
+ export type RecordTransactionInput = z.infer<typeof RecordTransactionInputSchema>;
531
+ export declare const SynthesizePolicyMandateInputSchema: z.ZodObject<{
532
+ source: z.ZodLiteral<"mandate">;
533
+ mandate: z.ZodObject<{
534
+ chain: z.ZodLiteral<"stellar">;
535
+ contract: z.ZodString;
536
+ method: z.ZodOptional<z.ZodString>;
537
+ spendingLimit: z.ZodOptional<z.ZodObject<{
538
+ token: z.ZodString;
539
+ limit: z.ZodString;
540
+ windowSeconds: z.ZodNumber;
541
+ }, "strip", z.ZodTypeAny, {
542
+ token: string;
543
+ limit: string;
544
+ windowSeconds: number;
545
+ }, {
546
+ token: string;
547
+ limit: string;
548
+ windowSeconds: number;
549
+ }>>;
550
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
551
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
552
+ expiry: z.ZodOptional<z.ZodObject<{
553
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
554
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ validUntilLedger?: number | undefined;
557
+ validUntilUnixSeconds?: number | undefined;
558
+ }, {
559
+ validUntilLedger?: number | undefined;
560
+ validUntilUnixSeconds?: number | undefined;
561
+ }>>;
562
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
563
+ chain: z.ZodLiteral<"stellar">;
564
+ contract: z.ZodString;
565
+ method: z.ZodOptional<z.ZodString>;
566
+ spendingLimit: z.ZodOptional<z.ZodObject<{
567
+ token: z.ZodString;
568
+ limit: z.ZodString;
569
+ windowSeconds: z.ZodNumber;
570
+ }, "strip", z.ZodTypeAny, {
571
+ token: string;
572
+ limit: string;
573
+ windowSeconds: number;
574
+ }, {
575
+ token: string;
576
+ limit: string;
577
+ windowSeconds: number;
578
+ }>>;
579
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
580
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
581
+ expiry: z.ZodOptional<z.ZodObject<{
582
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
583
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ validUntilLedger?: number | undefined;
586
+ validUntilUnixSeconds?: number | undefined;
587
+ }, {
588
+ validUntilLedger?: number | undefined;
589
+ validUntilUnixSeconds?: number | undefined;
590
+ }>>;
591
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
592
+ chain: z.ZodLiteral<"stellar">;
593
+ contract: z.ZodString;
594
+ method: z.ZodOptional<z.ZodString>;
595
+ spendingLimit: z.ZodOptional<z.ZodObject<{
596
+ token: z.ZodString;
597
+ limit: z.ZodString;
598
+ windowSeconds: z.ZodNumber;
599
+ }, "strip", z.ZodTypeAny, {
600
+ token: string;
601
+ limit: string;
602
+ windowSeconds: number;
603
+ }, {
604
+ token: string;
605
+ limit: string;
606
+ windowSeconds: number;
607
+ }>>;
608
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
609
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
610
+ expiry: z.ZodOptional<z.ZodObject<{
611
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
612
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ validUntilLedger?: number | undefined;
615
+ validUntilUnixSeconds?: number | undefined;
616
+ }, {
617
+ validUntilLedger?: number | undefined;
618
+ validUntilUnixSeconds?: number | undefined;
619
+ }>>;
620
+ }, z.ZodTypeAny, "passthrough">>;
621
+ ozConfig: z.ZodOptional<z.ZodObject<{
622
+ network: z.ZodEnum<["mainnet", "testnet"]>;
623
+ instances: z.ZodObject<{
624
+ spending_limit: z.ZodString;
625
+ simple_threshold: z.ZodString;
626
+ weighted_threshold: z.ZodString;
627
+ }, "strip", z.ZodTypeAny, {
628
+ spending_limit: string;
629
+ simple_threshold: string;
630
+ weighted_threshold: string;
631
+ }, {
632
+ spending_limit: string;
633
+ simple_threshold: string;
634
+ weighted_threshold: string;
635
+ }>;
636
+ }, "strip", z.ZodTypeAny, {
637
+ network: "mainnet" | "testnet";
638
+ instances: {
639
+ spending_limit: string;
640
+ simple_threshold: string;
641
+ weighted_threshold: string;
642
+ };
643
+ }, {
644
+ network: "mainnet" | "testnet";
645
+ instances: {
646
+ spending_limit: string;
647
+ simple_threshold: string;
648
+ weighted_threshold: string;
649
+ };
650
+ }>>;
651
+ }, "strip", z.ZodTypeAny, {
652
+ source: "mandate";
653
+ mandate: {
654
+ contract: string;
655
+ chain: "stellar";
656
+ expiry?: {
657
+ validUntilLedger?: number | undefined;
658
+ validUntilUnixSeconds?: number | undefined;
659
+ } | undefined;
660
+ method?: string | undefined;
661
+ spendingLimit?: {
662
+ token: string;
663
+ limit: string;
664
+ windowSeconds: number;
665
+ } | undefined;
666
+ approvalThreshold?: number | undefined;
667
+ recipients?: string[] | undefined;
668
+ } & {
669
+ [k: string]: unknown;
670
+ };
671
+ ozConfig?: {
672
+ network: "mainnet" | "testnet";
673
+ instances: {
674
+ spending_limit: string;
675
+ simple_threshold: string;
676
+ weighted_threshold: string;
677
+ };
678
+ } | undefined;
679
+ }, {
680
+ source: "mandate";
681
+ mandate: {
682
+ contract: string;
683
+ chain: "stellar";
684
+ expiry?: {
685
+ validUntilLedger?: number | undefined;
686
+ validUntilUnixSeconds?: number | undefined;
687
+ } | undefined;
688
+ method?: string | undefined;
689
+ spendingLimit?: {
690
+ token: string;
691
+ limit: string;
692
+ windowSeconds: number;
693
+ } | undefined;
694
+ approvalThreshold?: number | undefined;
695
+ recipients?: string[] | undefined;
696
+ } & {
697
+ [k: string]: unknown;
698
+ };
699
+ ozConfig?: {
700
+ network: "mainnet" | "testnet";
701
+ instances: {
702
+ spending_limit: string;
703
+ simple_threshold: string;
704
+ weighted_threshold: string;
705
+ };
706
+ } | undefined;
707
+ }>;
708
+ /** Interpreter opt-in for the recording path. Present -> constraints OZ cannot
709
+ * express (per-method scoping, invocation-count windows, oracle bounds, exact
710
+ * hop paths) lower to a real interpreter predicate document instead of being
711
+ * surfaced as warnings. The core deep-validates `smartAccountAddress` (a C...
712
+ * contract, not the recording's G... source) and the tighten-only oracle
713
+ * bounds; the schema stays light so the core owns the friendly ToolErrors. */
714
+ export declare const InterpreterOptionsSchema: z.ZodObject<{
715
+ smartAccountAddress: z.ZodString;
716
+ installNonce: z.ZodOptional<z.ZodNumber>;
717
+ oracleParams: z.ZodOptional<z.ZodObject<{
718
+ maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
719
+ maxDeviationBps: z.ZodOptional<z.ZodNumber>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ maxStalenessSeconds?: number | undefined;
722
+ maxDeviationBps?: number | undefined;
723
+ }, {
724
+ maxStalenessSeconds?: number | undefined;
725
+ maxDeviationBps?: number | undefined;
726
+ }>>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ smartAccountAddress: string;
729
+ oracleParams?: {
730
+ maxStalenessSeconds?: number | undefined;
731
+ maxDeviationBps?: number | undefined;
732
+ } | undefined;
733
+ installNonce?: number | undefined;
734
+ }, {
735
+ smartAccountAddress: string;
736
+ oracleParams?: {
737
+ maxStalenessSeconds?: number | undefined;
738
+ maxDeviationBps?: number | undefined;
739
+ } | undefined;
740
+ installNonce?: number | undefined;
741
+ }>;
742
+ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
743
+ source: z.ZodLiteral<"recording">;
744
+ recordedTx: z.ZodObject<{
745
+ network: z.ZodEnum<["mainnet", "testnet"]>;
746
+ signers: z.ZodArray<z.ZodString, "many">;
747
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
748
+ tokenMovements: z.ZodArray<z.ZodObject<{
749
+ token: z.ZodString;
750
+ from: z.ZodString;
751
+ to: z.ZodString;
752
+ amount: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ amount: string;
755
+ token: string;
756
+ from: string;
757
+ to: string;
758
+ }, {
759
+ amount: string;
760
+ token: string;
761
+ from: string;
762
+ to: string;
763
+ }>, "many">;
764
+ events: z.ZodArray<z.ZodObject<{
765
+ contract: z.ZodString;
766
+ topics: z.ZodArray<z.ZodString, "many">;
767
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
768
+ }, "strip", z.ZodTypeAny, {
769
+ contract: string;
770
+ topics: string[];
771
+ data?: unknown;
772
+ }, {
773
+ contract: string;
774
+ topics: string[];
775
+ data?: unknown;
776
+ }>, "many">;
777
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
778
+ ledgerSequence: z.ZodNumber;
779
+ fetchedAt: z.ZodNumber;
780
+ parseConfidence: z.ZodObject<{
781
+ overall: z.ZodNumber;
782
+ knownContracts: z.ZodArray<z.ZodString, "many">;
783
+ unknownContracts: z.ZodArray<z.ZodObject<{
784
+ contract: z.ZodString;
785
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
786
+ }, "strip", z.ZodTypeAny, {
787
+ contract: string;
788
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
789
+ }, {
790
+ contract: string;
791
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
792
+ }>, "many">;
793
+ opaqueScVals: z.ZodArray<z.ZodObject<{
794
+ path: z.ZodString;
795
+ type: z.ZodString;
796
+ }, "strip", z.ZodTypeAny, {
797
+ type: string;
798
+ path: string;
799
+ }, {
800
+ type: string;
801
+ path: string;
802
+ }>, "many">;
803
+ thresholdUsed: z.ZodNumber;
804
+ }, "strip", z.ZodTypeAny, {
805
+ opaqueScVals: {
806
+ type: string;
807
+ path: string;
808
+ }[];
809
+ unknownContracts: {
810
+ contract: string;
811
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
812
+ }[];
813
+ overall: number;
814
+ knownContracts: string[];
815
+ thresholdUsed: number;
816
+ }, {
817
+ opaqueScVals: {
818
+ type: string;
819
+ path: string;
820
+ }[];
821
+ unknownContracts: {
822
+ contract: string;
823
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
824
+ }[];
825
+ overall: number;
826
+ knownContracts: string[];
827
+ thresholdUsed: number;
828
+ }>;
829
+ sourceAccount: z.ZodString;
830
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
831
+ network: z.ZodEnum<["mainnet", "testnet"]>;
832
+ signers: z.ZodArray<z.ZodString, "many">;
833
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
834
+ tokenMovements: z.ZodArray<z.ZodObject<{
835
+ token: z.ZodString;
836
+ from: z.ZodString;
837
+ to: z.ZodString;
838
+ amount: z.ZodString;
839
+ }, "strip", z.ZodTypeAny, {
840
+ amount: string;
841
+ token: string;
842
+ from: string;
843
+ to: string;
844
+ }, {
845
+ amount: string;
846
+ token: string;
847
+ from: string;
848
+ to: string;
849
+ }>, "many">;
850
+ events: z.ZodArray<z.ZodObject<{
851
+ contract: z.ZodString;
852
+ topics: z.ZodArray<z.ZodString, "many">;
853
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ contract: string;
856
+ topics: string[];
857
+ data?: unknown;
858
+ }, {
859
+ contract: string;
860
+ topics: string[];
861
+ data?: unknown;
862
+ }>, "many">;
863
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
864
+ ledgerSequence: z.ZodNumber;
865
+ fetchedAt: z.ZodNumber;
866
+ parseConfidence: z.ZodObject<{
867
+ overall: z.ZodNumber;
868
+ knownContracts: z.ZodArray<z.ZodString, "many">;
869
+ unknownContracts: z.ZodArray<z.ZodObject<{
870
+ contract: z.ZodString;
871
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
872
+ }, "strip", z.ZodTypeAny, {
873
+ contract: string;
874
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
875
+ }, {
876
+ contract: string;
877
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
878
+ }>, "many">;
879
+ opaqueScVals: z.ZodArray<z.ZodObject<{
880
+ path: z.ZodString;
881
+ type: z.ZodString;
882
+ }, "strip", z.ZodTypeAny, {
883
+ type: string;
884
+ path: string;
885
+ }, {
886
+ type: string;
887
+ path: string;
888
+ }>, "many">;
889
+ thresholdUsed: z.ZodNumber;
890
+ }, "strip", z.ZodTypeAny, {
891
+ opaqueScVals: {
892
+ type: string;
893
+ path: string;
894
+ }[];
895
+ unknownContracts: {
896
+ contract: string;
897
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
898
+ }[];
899
+ overall: number;
900
+ knownContracts: string[];
901
+ thresholdUsed: number;
902
+ }, {
903
+ opaqueScVals: {
904
+ type: string;
905
+ path: string;
906
+ }[];
907
+ unknownContracts: {
908
+ contract: string;
909
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
910
+ }[];
911
+ overall: number;
912
+ knownContracts: string[];
913
+ thresholdUsed: number;
914
+ }>;
915
+ sourceAccount: z.ZodString;
916
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
917
+ network: z.ZodEnum<["mainnet", "testnet"]>;
918
+ signers: z.ZodArray<z.ZodString, "many">;
919
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
920
+ tokenMovements: z.ZodArray<z.ZodObject<{
921
+ token: z.ZodString;
922
+ from: z.ZodString;
923
+ to: z.ZodString;
924
+ amount: z.ZodString;
925
+ }, "strip", z.ZodTypeAny, {
926
+ amount: string;
927
+ token: string;
928
+ from: string;
929
+ to: string;
930
+ }, {
931
+ amount: string;
932
+ token: string;
933
+ from: string;
934
+ to: string;
935
+ }>, "many">;
936
+ events: z.ZodArray<z.ZodObject<{
937
+ contract: z.ZodString;
938
+ topics: z.ZodArray<z.ZodString, "many">;
939
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
940
+ }, "strip", z.ZodTypeAny, {
941
+ contract: string;
942
+ topics: string[];
943
+ data?: unknown;
944
+ }, {
945
+ contract: string;
946
+ topics: string[];
947
+ data?: unknown;
948
+ }>, "many">;
949
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
950
+ ledgerSequence: z.ZodNumber;
951
+ fetchedAt: z.ZodNumber;
952
+ parseConfidence: z.ZodObject<{
953
+ overall: z.ZodNumber;
954
+ knownContracts: z.ZodArray<z.ZodString, "many">;
955
+ unknownContracts: z.ZodArray<z.ZodObject<{
956
+ contract: z.ZodString;
957
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
958
+ }, "strip", z.ZodTypeAny, {
959
+ contract: string;
960
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
961
+ }, {
962
+ contract: string;
963
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
964
+ }>, "many">;
965
+ opaqueScVals: z.ZodArray<z.ZodObject<{
966
+ path: z.ZodString;
967
+ type: z.ZodString;
968
+ }, "strip", z.ZodTypeAny, {
969
+ type: string;
970
+ path: string;
971
+ }, {
972
+ type: string;
973
+ path: string;
974
+ }>, "many">;
975
+ thresholdUsed: z.ZodNumber;
976
+ }, "strip", z.ZodTypeAny, {
977
+ opaqueScVals: {
978
+ type: string;
979
+ path: string;
980
+ }[];
981
+ unknownContracts: {
982
+ contract: string;
983
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
984
+ }[];
985
+ overall: number;
986
+ knownContracts: string[];
987
+ thresholdUsed: number;
988
+ }, {
989
+ opaqueScVals: {
990
+ type: string;
991
+ path: string;
992
+ }[];
993
+ unknownContracts: {
994
+ contract: string;
995
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
996
+ }[];
997
+ overall: number;
998
+ knownContracts: string[];
999
+ thresholdUsed: number;
1000
+ }>;
1001
+ sourceAccount: z.ZodString;
1002
+ }, z.ZodTypeAny, "passthrough">>;
1003
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1004
+ userResponses: z.ZodOptional<z.ZodObject<{
1005
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1006
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1007
+ limitAmount: z.ZodOptional<z.ZodString>;
1008
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1009
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1010
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1011
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1012
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1013
+ limitAmount: z.ZodOptional<z.ZodString>;
1014
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1015
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1016
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1017
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1018
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1019
+ limitAmount: z.ZodOptional<z.ZodString>;
1020
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1021
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1022
+ }, z.ZodTypeAny, "passthrough">>>;
1023
+ confidenceOverride: z.ZodOptional<z.ZodObject<{
1024
+ threshold: z.ZodNumber;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ threshold: number;
1027
+ }, {
1028
+ threshold: number;
1029
+ }>>;
1030
+ interpreter: z.ZodOptional<z.ZodObject<{
1031
+ smartAccountAddress: z.ZodString;
1032
+ installNonce: z.ZodOptional<z.ZodNumber>;
1033
+ oracleParams: z.ZodOptional<z.ZodObject<{
1034
+ maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
1035
+ maxDeviationBps: z.ZodOptional<z.ZodNumber>;
1036
+ }, "strip", z.ZodTypeAny, {
1037
+ maxStalenessSeconds?: number | undefined;
1038
+ maxDeviationBps?: number | undefined;
1039
+ }, {
1040
+ maxStalenessSeconds?: number | undefined;
1041
+ maxDeviationBps?: number | undefined;
1042
+ }>>;
1043
+ }, "strip", z.ZodTypeAny, {
1044
+ smartAccountAddress: string;
1045
+ oracleParams?: {
1046
+ maxStalenessSeconds?: number | undefined;
1047
+ maxDeviationBps?: number | undefined;
1048
+ } | undefined;
1049
+ installNonce?: number | undefined;
1050
+ }, {
1051
+ smartAccountAddress: string;
1052
+ oracleParams?: {
1053
+ maxStalenessSeconds?: number | undefined;
1054
+ maxDeviationBps?: number | undefined;
1055
+ } | undefined;
1056
+ installNonce?: number | undefined;
1057
+ }>>;
1058
+ ozConfig: z.ZodOptional<z.ZodObject<{
1059
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1060
+ instances: z.ZodObject<{
1061
+ spending_limit: z.ZodString;
1062
+ simple_threshold: z.ZodString;
1063
+ weighted_threshold: z.ZodString;
1064
+ }, "strip", z.ZodTypeAny, {
1065
+ spending_limit: string;
1066
+ simple_threshold: string;
1067
+ weighted_threshold: string;
1068
+ }, {
1069
+ spending_limit: string;
1070
+ simple_threshold: string;
1071
+ weighted_threshold: string;
1072
+ }>;
1073
+ }, "strip", z.ZodTypeAny, {
1074
+ network: "mainnet" | "testnet";
1075
+ instances: {
1076
+ spending_limit: string;
1077
+ simple_threshold: string;
1078
+ weighted_threshold: string;
1079
+ };
1080
+ }, {
1081
+ network: "mainnet" | "testnet";
1082
+ instances: {
1083
+ spending_limit: string;
1084
+ simple_threshold: string;
1085
+ weighted_threshold: string;
1086
+ };
1087
+ }>>;
1088
+ }, "strip", z.ZodTypeAny, {
1089
+ network: "mainnet" | "testnet";
1090
+ source: "recording";
1091
+ recordedTx: {
1092
+ events: {
1093
+ contract: string;
1094
+ topics: string[];
1095
+ data?: unknown;
1096
+ }[];
1097
+ network: "mainnet" | "testnet";
1098
+ signers: string[];
1099
+ invocations: unknown[];
1100
+ tokenMovements: {
1101
+ amount: string;
1102
+ token: string;
1103
+ from: string;
1104
+ to: string;
1105
+ }[];
1106
+ authEntries: unknown[];
1107
+ ledgerSequence: number;
1108
+ fetchedAt: number;
1109
+ parseConfidence: {
1110
+ opaqueScVals: {
1111
+ type: string;
1112
+ path: string;
1113
+ }[];
1114
+ unknownContracts: {
1115
+ contract: string;
1116
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1117
+ }[];
1118
+ overall: number;
1119
+ knownContracts: string[];
1120
+ thresholdUsed: number;
1121
+ };
1122
+ sourceAccount: string;
1123
+ } & {
1124
+ [k: string]: unknown;
1125
+ };
1126
+ interpreter?: {
1127
+ smartAccountAddress: string;
1128
+ oracleParams?: {
1129
+ maxStalenessSeconds?: number | undefined;
1130
+ maxDeviationBps?: number | undefined;
1131
+ } | undefined;
1132
+ installNonce?: number | undefined;
1133
+ } | undefined;
1134
+ userResponses?: z.objectOutputType<{
1135
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1136
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1137
+ limitAmount: z.ZodOptional<z.ZodString>;
1138
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1139
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1140
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1141
+ confidenceOverride?: {
1142
+ threshold: number;
1143
+ } | undefined;
1144
+ ozConfig?: {
1145
+ network: "mainnet" | "testnet";
1146
+ instances: {
1147
+ spending_limit: string;
1148
+ simple_threshold: string;
1149
+ weighted_threshold: string;
1150
+ };
1151
+ } | undefined;
1152
+ }, {
1153
+ network: "mainnet" | "testnet";
1154
+ source: "recording";
1155
+ recordedTx: {
1156
+ events: {
1157
+ contract: string;
1158
+ topics: string[];
1159
+ data?: unknown;
1160
+ }[];
1161
+ network: "mainnet" | "testnet";
1162
+ signers: string[];
1163
+ invocations: unknown[];
1164
+ tokenMovements: {
1165
+ amount: string;
1166
+ token: string;
1167
+ from: string;
1168
+ to: string;
1169
+ }[];
1170
+ authEntries: unknown[];
1171
+ ledgerSequence: number;
1172
+ fetchedAt: number;
1173
+ parseConfidence: {
1174
+ opaqueScVals: {
1175
+ type: string;
1176
+ path: string;
1177
+ }[];
1178
+ unknownContracts: {
1179
+ contract: string;
1180
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1181
+ }[];
1182
+ overall: number;
1183
+ knownContracts: string[];
1184
+ thresholdUsed: number;
1185
+ };
1186
+ sourceAccount: string;
1187
+ } & {
1188
+ [k: string]: unknown;
1189
+ };
1190
+ interpreter?: {
1191
+ smartAccountAddress: string;
1192
+ oracleParams?: {
1193
+ maxStalenessSeconds?: number | undefined;
1194
+ maxDeviationBps?: number | undefined;
1195
+ } | undefined;
1196
+ installNonce?: number | undefined;
1197
+ } | undefined;
1198
+ userResponses?: z.objectInputType<{
1199
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1200
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1201
+ limitAmount: z.ZodOptional<z.ZodString>;
1202
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1203
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1204
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1205
+ confidenceOverride?: {
1206
+ threshold: number;
1207
+ } | undefined;
1208
+ ozConfig?: {
1209
+ network: "mainnet" | "testnet";
1210
+ instances: {
1211
+ spending_limit: string;
1212
+ simple_threshold: string;
1213
+ weighted_threshold: string;
1214
+ };
1215
+ } | undefined;
1216
+ }>;
1217
+ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
1218
+ source: z.ZodLiteral<"mandate">;
1219
+ mandate: z.ZodObject<{
1220
+ chain: z.ZodLiteral<"stellar">;
1221
+ contract: z.ZodString;
1222
+ method: z.ZodOptional<z.ZodString>;
1223
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1224
+ token: z.ZodString;
1225
+ limit: z.ZodString;
1226
+ windowSeconds: z.ZodNumber;
1227
+ }, "strip", z.ZodTypeAny, {
1228
+ token: string;
1229
+ limit: string;
1230
+ windowSeconds: number;
1231
+ }, {
1232
+ token: string;
1233
+ limit: string;
1234
+ windowSeconds: number;
1235
+ }>>;
1236
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1237
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1238
+ expiry: z.ZodOptional<z.ZodObject<{
1239
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1240
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1241
+ }, "strip", z.ZodTypeAny, {
1242
+ validUntilLedger?: number | undefined;
1243
+ validUntilUnixSeconds?: number | undefined;
1244
+ }, {
1245
+ validUntilLedger?: number | undefined;
1246
+ validUntilUnixSeconds?: number | undefined;
1247
+ }>>;
1248
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1249
+ chain: z.ZodLiteral<"stellar">;
1250
+ contract: z.ZodString;
1251
+ method: z.ZodOptional<z.ZodString>;
1252
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1253
+ token: z.ZodString;
1254
+ limit: z.ZodString;
1255
+ windowSeconds: z.ZodNumber;
1256
+ }, "strip", z.ZodTypeAny, {
1257
+ token: string;
1258
+ limit: string;
1259
+ windowSeconds: number;
1260
+ }, {
1261
+ token: string;
1262
+ limit: string;
1263
+ windowSeconds: number;
1264
+ }>>;
1265
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1266
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1267
+ expiry: z.ZodOptional<z.ZodObject<{
1268
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1269
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1270
+ }, "strip", z.ZodTypeAny, {
1271
+ validUntilLedger?: number | undefined;
1272
+ validUntilUnixSeconds?: number | undefined;
1273
+ }, {
1274
+ validUntilLedger?: number | undefined;
1275
+ validUntilUnixSeconds?: number | undefined;
1276
+ }>>;
1277
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1278
+ chain: z.ZodLiteral<"stellar">;
1279
+ contract: z.ZodString;
1280
+ method: z.ZodOptional<z.ZodString>;
1281
+ spendingLimit: z.ZodOptional<z.ZodObject<{
1282
+ token: z.ZodString;
1283
+ limit: z.ZodString;
1284
+ windowSeconds: z.ZodNumber;
1285
+ }, "strip", z.ZodTypeAny, {
1286
+ token: string;
1287
+ limit: string;
1288
+ windowSeconds: number;
1289
+ }, {
1290
+ token: string;
1291
+ limit: string;
1292
+ windowSeconds: number;
1293
+ }>>;
1294
+ approvalThreshold: z.ZodOptional<z.ZodNumber>;
1295
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1296
+ expiry: z.ZodOptional<z.ZodObject<{
1297
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1298
+ validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ validUntilLedger?: number | undefined;
1301
+ validUntilUnixSeconds?: number | undefined;
1302
+ }, {
1303
+ validUntilLedger?: number | undefined;
1304
+ validUntilUnixSeconds?: number | undefined;
1305
+ }>>;
1306
+ }, z.ZodTypeAny, "passthrough">>;
1307
+ ozConfig: z.ZodOptional<z.ZodObject<{
1308
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1309
+ instances: z.ZodObject<{
1310
+ spending_limit: z.ZodString;
1311
+ simple_threshold: z.ZodString;
1312
+ weighted_threshold: z.ZodString;
1313
+ }, "strip", z.ZodTypeAny, {
1314
+ spending_limit: string;
1315
+ simple_threshold: string;
1316
+ weighted_threshold: string;
1317
+ }, {
1318
+ spending_limit: string;
1319
+ simple_threshold: string;
1320
+ weighted_threshold: string;
1321
+ }>;
1322
+ }, "strip", z.ZodTypeAny, {
1323
+ network: "mainnet" | "testnet";
1324
+ instances: {
1325
+ spending_limit: string;
1326
+ simple_threshold: string;
1327
+ weighted_threshold: string;
1328
+ };
1329
+ }, {
1330
+ network: "mainnet" | "testnet";
1331
+ instances: {
1332
+ spending_limit: string;
1333
+ simple_threshold: string;
1334
+ weighted_threshold: string;
1335
+ };
1336
+ }>>;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ source: "mandate";
1339
+ mandate: {
1340
+ contract: string;
1341
+ chain: "stellar";
1342
+ expiry?: {
1343
+ validUntilLedger?: number | undefined;
1344
+ validUntilUnixSeconds?: number | undefined;
1345
+ } | undefined;
1346
+ method?: string | undefined;
1347
+ spendingLimit?: {
1348
+ token: string;
1349
+ limit: string;
1350
+ windowSeconds: number;
1351
+ } | undefined;
1352
+ approvalThreshold?: number | undefined;
1353
+ recipients?: string[] | undefined;
1354
+ } & {
1355
+ [k: string]: unknown;
1356
+ };
1357
+ ozConfig?: {
1358
+ network: "mainnet" | "testnet";
1359
+ instances: {
1360
+ spending_limit: string;
1361
+ simple_threshold: string;
1362
+ weighted_threshold: string;
1363
+ };
1364
+ } | undefined;
1365
+ }, {
1366
+ source: "mandate";
1367
+ mandate: {
1368
+ contract: string;
1369
+ chain: "stellar";
1370
+ expiry?: {
1371
+ validUntilLedger?: number | undefined;
1372
+ validUntilUnixSeconds?: number | undefined;
1373
+ } | undefined;
1374
+ method?: string | undefined;
1375
+ spendingLimit?: {
1376
+ token: string;
1377
+ limit: string;
1378
+ windowSeconds: number;
1379
+ } | undefined;
1380
+ approvalThreshold?: number | undefined;
1381
+ recipients?: string[] | undefined;
1382
+ } & {
1383
+ [k: string]: unknown;
1384
+ };
1385
+ ozConfig?: {
1386
+ network: "mainnet" | "testnet";
1387
+ instances: {
1388
+ spending_limit: string;
1389
+ simple_threshold: string;
1390
+ weighted_threshold: string;
1391
+ };
1392
+ } | undefined;
1393
+ }>, z.ZodObject<{
1394
+ source: z.ZodLiteral<"recording">;
1395
+ recordedTx: z.ZodObject<{
1396
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1397
+ signers: z.ZodArray<z.ZodString, "many">;
1398
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1399
+ tokenMovements: z.ZodArray<z.ZodObject<{
1400
+ token: z.ZodString;
1401
+ from: z.ZodString;
1402
+ to: z.ZodString;
1403
+ amount: z.ZodString;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ amount: string;
1406
+ token: string;
1407
+ from: string;
1408
+ to: string;
1409
+ }, {
1410
+ amount: string;
1411
+ token: string;
1412
+ from: string;
1413
+ to: string;
1414
+ }>, "many">;
1415
+ events: z.ZodArray<z.ZodObject<{
1416
+ contract: z.ZodString;
1417
+ topics: z.ZodArray<z.ZodString, "many">;
1418
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ contract: string;
1421
+ topics: string[];
1422
+ data?: unknown;
1423
+ }, {
1424
+ contract: string;
1425
+ topics: string[];
1426
+ data?: unknown;
1427
+ }>, "many">;
1428
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1429
+ ledgerSequence: z.ZodNumber;
1430
+ fetchedAt: z.ZodNumber;
1431
+ parseConfidence: z.ZodObject<{
1432
+ overall: z.ZodNumber;
1433
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1434
+ unknownContracts: z.ZodArray<z.ZodObject<{
1435
+ contract: z.ZodString;
1436
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ contract: string;
1439
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1440
+ }, {
1441
+ contract: string;
1442
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1443
+ }>, "many">;
1444
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1445
+ path: z.ZodString;
1446
+ type: z.ZodString;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ type: string;
1449
+ path: string;
1450
+ }, {
1451
+ type: string;
1452
+ path: string;
1453
+ }>, "many">;
1454
+ thresholdUsed: z.ZodNumber;
1455
+ }, "strip", z.ZodTypeAny, {
1456
+ opaqueScVals: {
1457
+ type: string;
1458
+ path: string;
1459
+ }[];
1460
+ unknownContracts: {
1461
+ contract: string;
1462
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1463
+ }[];
1464
+ overall: number;
1465
+ knownContracts: string[];
1466
+ thresholdUsed: number;
1467
+ }, {
1468
+ opaqueScVals: {
1469
+ type: string;
1470
+ path: string;
1471
+ }[];
1472
+ unknownContracts: {
1473
+ contract: string;
1474
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1475
+ }[];
1476
+ overall: number;
1477
+ knownContracts: string[];
1478
+ thresholdUsed: number;
1479
+ }>;
1480
+ sourceAccount: z.ZodString;
1481
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1482
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1483
+ signers: z.ZodArray<z.ZodString, "many">;
1484
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1485
+ tokenMovements: z.ZodArray<z.ZodObject<{
1486
+ token: z.ZodString;
1487
+ from: z.ZodString;
1488
+ to: z.ZodString;
1489
+ amount: z.ZodString;
1490
+ }, "strip", z.ZodTypeAny, {
1491
+ amount: string;
1492
+ token: string;
1493
+ from: string;
1494
+ to: string;
1495
+ }, {
1496
+ amount: string;
1497
+ token: string;
1498
+ from: string;
1499
+ to: string;
1500
+ }>, "many">;
1501
+ events: z.ZodArray<z.ZodObject<{
1502
+ contract: z.ZodString;
1503
+ topics: z.ZodArray<z.ZodString, "many">;
1504
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1505
+ }, "strip", z.ZodTypeAny, {
1506
+ contract: string;
1507
+ topics: string[];
1508
+ data?: unknown;
1509
+ }, {
1510
+ contract: string;
1511
+ topics: string[];
1512
+ data?: unknown;
1513
+ }>, "many">;
1514
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1515
+ ledgerSequence: z.ZodNumber;
1516
+ fetchedAt: z.ZodNumber;
1517
+ parseConfidence: z.ZodObject<{
1518
+ overall: z.ZodNumber;
1519
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1520
+ unknownContracts: z.ZodArray<z.ZodObject<{
1521
+ contract: z.ZodString;
1522
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1523
+ }, "strip", z.ZodTypeAny, {
1524
+ contract: string;
1525
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1526
+ }, {
1527
+ contract: string;
1528
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1529
+ }>, "many">;
1530
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1531
+ path: z.ZodString;
1532
+ type: z.ZodString;
1533
+ }, "strip", z.ZodTypeAny, {
1534
+ type: string;
1535
+ path: string;
1536
+ }, {
1537
+ type: string;
1538
+ path: string;
1539
+ }>, "many">;
1540
+ thresholdUsed: z.ZodNumber;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ opaqueScVals: {
1543
+ type: string;
1544
+ path: string;
1545
+ }[];
1546
+ unknownContracts: {
1547
+ contract: string;
1548
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1549
+ }[];
1550
+ overall: number;
1551
+ knownContracts: string[];
1552
+ thresholdUsed: number;
1553
+ }, {
1554
+ opaqueScVals: {
1555
+ type: string;
1556
+ path: string;
1557
+ }[];
1558
+ unknownContracts: {
1559
+ contract: string;
1560
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1561
+ }[];
1562
+ overall: number;
1563
+ knownContracts: string[];
1564
+ thresholdUsed: number;
1565
+ }>;
1566
+ sourceAccount: z.ZodString;
1567
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1568
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1569
+ signers: z.ZodArray<z.ZodString, "many">;
1570
+ invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1571
+ tokenMovements: z.ZodArray<z.ZodObject<{
1572
+ token: z.ZodString;
1573
+ from: z.ZodString;
1574
+ to: z.ZodString;
1575
+ amount: z.ZodString;
1576
+ }, "strip", z.ZodTypeAny, {
1577
+ amount: string;
1578
+ token: string;
1579
+ from: string;
1580
+ to: string;
1581
+ }, {
1582
+ amount: string;
1583
+ token: string;
1584
+ from: string;
1585
+ to: string;
1586
+ }>, "many">;
1587
+ events: z.ZodArray<z.ZodObject<{
1588
+ contract: z.ZodString;
1589
+ topics: z.ZodArray<z.ZodString, "many">;
1590
+ data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ contract: string;
1593
+ topics: string[];
1594
+ data?: unknown;
1595
+ }, {
1596
+ contract: string;
1597
+ topics: string[];
1598
+ data?: unknown;
1599
+ }>, "many">;
1600
+ authEntries: z.ZodArray<z.ZodUnknown, "many">;
1601
+ ledgerSequence: z.ZodNumber;
1602
+ fetchedAt: z.ZodNumber;
1603
+ parseConfidence: z.ZodObject<{
1604
+ overall: z.ZodNumber;
1605
+ knownContracts: z.ZodArray<z.ZodString, "many">;
1606
+ unknownContracts: z.ZodArray<z.ZodObject<{
1607
+ contract: z.ZodString;
1608
+ reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1609
+ }, "strip", z.ZodTypeAny, {
1610
+ contract: string;
1611
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1612
+ }, {
1613
+ contract: string;
1614
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1615
+ }>, "many">;
1616
+ opaqueScVals: z.ZodArray<z.ZodObject<{
1617
+ path: z.ZodString;
1618
+ type: z.ZodString;
1619
+ }, "strip", z.ZodTypeAny, {
1620
+ type: string;
1621
+ path: string;
1622
+ }, {
1623
+ type: string;
1624
+ path: string;
1625
+ }>, "many">;
1626
+ thresholdUsed: z.ZodNumber;
1627
+ }, "strip", z.ZodTypeAny, {
1628
+ opaqueScVals: {
1629
+ type: string;
1630
+ path: string;
1631
+ }[];
1632
+ unknownContracts: {
1633
+ contract: string;
1634
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1635
+ }[];
1636
+ overall: number;
1637
+ knownContracts: string[];
1638
+ thresholdUsed: number;
1639
+ }, {
1640
+ opaqueScVals: {
1641
+ type: string;
1642
+ path: string;
1643
+ }[];
1644
+ unknownContracts: {
1645
+ contract: string;
1646
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1647
+ }[];
1648
+ overall: number;
1649
+ knownContracts: string[];
1650
+ thresholdUsed: number;
1651
+ }>;
1652
+ sourceAccount: z.ZodString;
1653
+ }, z.ZodTypeAny, "passthrough">>;
1654
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1655
+ userResponses: z.ZodOptional<z.ZodObject<{
1656
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1657
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1658
+ limitAmount: z.ZodOptional<z.ZodString>;
1659
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1660
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1661
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1662
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1663
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1664
+ limitAmount: z.ZodOptional<z.ZodString>;
1665
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1666
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1667
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1668
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1669
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1670
+ limitAmount: z.ZodOptional<z.ZodString>;
1671
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1672
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1673
+ }, z.ZodTypeAny, "passthrough">>>;
1674
+ confidenceOverride: z.ZodOptional<z.ZodObject<{
1675
+ threshold: z.ZodNumber;
1676
+ }, "strip", z.ZodTypeAny, {
1677
+ threshold: number;
1678
+ }, {
1679
+ threshold: number;
1680
+ }>>;
1681
+ interpreter: z.ZodOptional<z.ZodObject<{
1682
+ smartAccountAddress: z.ZodString;
1683
+ installNonce: z.ZodOptional<z.ZodNumber>;
1684
+ oracleParams: z.ZodOptional<z.ZodObject<{
1685
+ maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
1686
+ maxDeviationBps: z.ZodOptional<z.ZodNumber>;
1687
+ }, "strip", z.ZodTypeAny, {
1688
+ maxStalenessSeconds?: number | undefined;
1689
+ maxDeviationBps?: number | undefined;
1690
+ }, {
1691
+ maxStalenessSeconds?: number | undefined;
1692
+ maxDeviationBps?: number | undefined;
1693
+ }>>;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ smartAccountAddress: string;
1696
+ oracleParams?: {
1697
+ maxStalenessSeconds?: number | undefined;
1698
+ maxDeviationBps?: number | undefined;
1699
+ } | undefined;
1700
+ installNonce?: number | undefined;
1701
+ }, {
1702
+ smartAccountAddress: string;
1703
+ oracleParams?: {
1704
+ maxStalenessSeconds?: number | undefined;
1705
+ maxDeviationBps?: number | undefined;
1706
+ } | undefined;
1707
+ installNonce?: number | undefined;
1708
+ }>>;
1709
+ ozConfig: z.ZodOptional<z.ZodObject<{
1710
+ network: z.ZodEnum<["mainnet", "testnet"]>;
1711
+ instances: z.ZodObject<{
1712
+ spending_limit: z.ZodString;
1713
+ simple_threshold: z.ZodString;
1714
+ weighted_threshold: z.ZodString;
1715
+ }, "strip", z.ZodTypeAny, {
1716
+ spending_limit: string;
1717
+ simple_threshold: string;
1718
+ weighted_threshold: string;
1719
+ }, {
1720
+ spending_limit: string;
1721
+ simple_threshold: string;
1722
+ weighted_threshold: string;
1723
+ }>;
1724
+ }, "strip", z.ZodTypeAny, {
1725
+ network: "mainnet" | "testnet";
1726
+ instances: {
1727
+ spending_limit: string;
1728
+ simple_threshold: string;
1729
+ weighted_threshold: string;
1730
+ };
1731
+ }, {
1732
+ network: "mainnet" | "testnet";
1733
+ instances: {
1734
+ spending_limit: string;
1735
+ simple_threshold: string;
1736
+ weighted_threshold: string;
1737
+ };
1738
+ }>>;
1739
+ }, "strip", z.ZodTypeAny, {
1740
+ network: "mainnet" | "testnet";
1741
+ source: "recording";
1742
+ recordedTx: {
1743
+ events: {
1744
+ contract: string;
1745
+ topics: string[];
1746
+ data?: unknown;
1747
+ }[];
1748
+ network: "mainnet" | "testnet";
1749
+ signers: string[];
1750
+ invocations: unknown[];
1751
+ tokenMovements: {
1752
+ amount: string;
1753
+ token: string;
1754
+ from: string;
1755
+ to: string;
1756
+ }[];
1757
+ authEntries: unknown[];
1758
+ ledgerSequence: number;
1759
+ fetchedAt: number;
1760
+ parseConfidence: {
1761
+ opaqueScVals: {
1762
+ type: string;
1763
+ path: string;
1764
+ }[];
1765
+ unknownContracts: {
1766
+ contract: string;
1767
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1768
+ }[];
1769
+ overall: number;
1770
+ knownContracts: string[];
1771
+ thresholdUsed: number;
1772
+ };
1773
+ sourceAccount: string;
1774
+ } & {
1775
+ [k: string]: unknown;
1776
+ };
1777
+ interpreter?: {
1778
+ smartAccountAddress: string;
1779
+ oracleParams?: {
1780
+ maxStalenessSeconds?: number | undefined;
1781
+ maxDeviationBps?: number | undefined;
1782
+ } | undefined;
1783
+ installNonce?: number | undefined;
1784
+ } | undefined;
1785
+ userResponses?: z.objectOutputType<{
1786
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1787
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1788
+ limitAmount: z.ZodOptional<z.ZodString>;
1789
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1790
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1791
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1792
+ confidenceOverride?: {
1793
+ threshold: number;
1794
+ } | undefined;
1795
+ ozConfig?: {
1796
+ network: "mainnet" | "testnet";
1797
+ instances: {
1798
+ spending_limit: string;
1799
+ simple_threshold: string;
1800
+ weighted_threshold: string;
1801
+ };
1802
+ } | undefined;
1803
+ }, {
1804
+ network: "mainnet" | "testnet";
1805
+ source: "recording";
1806
+ recordedTx: {
1807
+ events: {
1808
+ contract: string;
1809
+ topics: string[];
1810
+ data?: unknown;
1811
+ }[];
1812
+ network: "mainnet" | "testnet";
1813
+ signers: string[];
1814
+ invocations: unknown[];
1815
+ tokenMovements: {
1816
+ amount: string;
1817
+ token: string;
1818
+ from: string;
1819
+ to: string;
1820
+ }[];
1821
+ authEntries: unknown[];
1822
+ ledgerSequence: number;
1823
+ fetchedAt: number;
1824
+ parseConfidence: {
1825
+ opaqueScVals: {
1826
+ type: string;
1827
+ path: string;
1828
+ }[];
1829
+ unknownContracts: {
1830
+ contract: string;
1831
+ reason: "no-abi" | "version-mismatch" | "opaque-result";
1832
+ }[];
1833
+ overall: number;
1834
+ knownContracts: string[];
1835
+ thresholdUsed: number;
1836
+ };
1837
+ sourceAccount: string;
1838
+ } & {
1839
+ [k: string]: unknown;
1840
+ };
1841
+ interpreter?: {
1842
+ smartAccountAddress: string;
1843
+ oracleParams?: {
1844
+ maxStalenessSeconds?: number | undefined;
1845
+ maxDeviationBps?: number | undefined;
1846
+ } | undefined;
1847
+ installNonce?: number | undefined;
1848
+ } | undefined;
1849
+ userResponses?: z.objectInputType<{
1850
+ windowSeconds: z.ZodOptional<z.ZodNumber>;
1851
+ validUntilLedger: z.ZodOptional<z.ZodNumber>;
1852
+ limitAmount: z.ZodOptional<z.ZodString>;
1853
+ invocationLimit: z.ZodOptional<z.ZodNumber>;
1854
+ swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1855
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1856
+ confidenceOverride?: {
1857
+ threshold: number;
1858
+ } | undefined;
1859
+ ozConfig?: {
1860
+ network: "mainnet" | "testnet";
1861
+ instances: {
1862
+ spending_limit: string;
1863
+ simple_threshold: string;
1864
+ weighted_threshold: string;
1865
+ };
1866
+ } | undefined;
1867
+ }>]>;
1868
+ export type SynthesizePolicyInput = z.infer<typeof SynthesizePolicyInputSchema>;
1869
+ export declare const ToolErrorSchema: z.ZodObject<{
1870
+ code: z.ZodString;
1871
+ message: z.ZodString;
1872
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
1873
+ retryable: z.ZodBoolean;
1874
+ remediation: z.ZodOptional<z.ZodObject<{
1875
+ toolCall: z.ZodOptional<z.ZodObject<{
1876
+ name: z.ZodString;
1877
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ args: Record<string, unknown>;
1880
+ name: string;
1881
+ }, {
1882
+ args: Record<string, unknown>;
1883
+ name: string;
1884
+ }>>;
1885
+ userQuestion: z.ZodOptional<z.ZodObject<{
1886
+ code: z.ZodString;
1887
+ question: z.ZodString;
1888
+ }, "strip", z.ZodTypeAny, {
1889
+ code: string;
1890
+ question: string;
1891
+ }, {
1892
+ code: string;
1893
+ question: string;
1894
+ }>>;
1895
+ docsUrl: z.ZodOptional<z.ZodString>;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ toolCall?: {
1898
+ args: Record<string, unknown>;
1899
+ name: string;
1900
+ } | undefined;
1901
+ userQuestion?: {
1902
+ code: string;
1903
+ question: string;
1904
+ } | undefined;
1905
+ docsUrl?: string | undefined;
1906
+ }, {
1907
+ toolCall?: {
1908
+ args: Record<string, unknown>;
1909
+ name: string;
1910
+ } | undefined;
1911
+ userQuestion?: {
1912
+ code: string;
1913
+ question: string;
1914
+ } | undefined;
1915
+ docsUrl?: string | undefined;
1916
+ }>>;
1917
+ details: z.ZodOptional<z.ZodUnknown>;
1918
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1919
+ code: z.ZodString;
1920
+ message: z.ZodString;
1921
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
1922
+ retryable: z.ZodBoolean;
1923
+ remediation: z.ZodOptional<z.ZodObject<{
1924
+ toolCall: z.ZodOptional<z.ZodObject<{
1925
+ name: z.ZodString;
1926
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1927
+ }, "strip", z.ZodTypeAny, {
1928
+ args: Record<string, unknown>;
1929
+ name: string;
1930
+ }, {
1931
+ args: Record<string, unknown>;
1932
+ name: string;
1933
+ }>>;
1934
+ userQuestion: z.ZodOptional<z.ZodObject<{
1935
+ code: z.ZodString;
1936
+ question: z.ZodString;
1937
+ }, "strip", z.ZodTypeAny, {
1938
+ code: string;
1939
+ question: string;
1940
+ }, {
1941
+ code: string;
1942
+ question: string;
1943
+ }>>;
1944
+ docsUrl: z.ZodOptional<z.ZodString>;
1945
+ }, "strip", z.ZodTypeAny, {
1946
+ toolCall?: {
1947
+ args: Record<string, unknown>;
1948
+ name: string;
1949
+ } | undefined;
1950
+ userQuestion?: {
1951
+ code: string;
1952
+ question: string;
1953
+ } | undefined;
1954
+ docsUrl?: string | undefined;
1955
+ }, {
1956
+ toolCall?: {
1957
+ args: Record<string, unknown>;
1958
+ name: string;
1959
+ } | undefined;
1960
+ userQuestion?: {
1961
+ code: string;
1962
+ question: string;
1963
+ } | undefined;
1964
+ docsUrl?: string | undefined;
1965
+ }>>;
1966
+ details: z.ZodOptional<z.ZodUnknown>;
1967
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1968
+ code: z.ZodString;
1969
+ message: z.ZodString;
1970
+ severity: z.ZodEnum<["info", "warning", "error", "fatal"]>;
1971
+ retryable: z.ZodBoolean;
1972
+ remediation: z.ZodOptional<z.ZodObject<{
1973
+ toolCall: z.ZodOptional<z.ZodObject<{
1974
+ name: z.ZodString;
1975
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1976
+ }, "strip", z.ZodTypeAny, {
1977
+ args: Record<string, unknown>;
1978
+ name: string;
1979
+ }, {
1980
+ args: Record<string, unknown>;
1981
+ name: string;
1982
+ }>>;
1983
+ userQuestion: z.ZodOptional<z.ZodObject<{
1984
+ code: z.ZodString;
1985
+ question: z.ZodString;
1986
+ }, "strip", z.ZodTypeAny, {
1987
+ code: string;
1988
+ question: string;
1989
+ }, {
1990
+ code: string;
1991
+ question: string;
1992
+ }>>;
1993
+ docsUrl: z.ZodOptional<z.ZodString>;
1994
+ }, "strip", z.ZodTypeAny, {
1995
+ toolCall?: {
1996
+ args: Record<string, unknown>;
1997
+ name: string;
1998
+ } | undefined;
1999
+ userQuestion?: {
2000
+ code: string;
2001
+ question: string;
2002
+ } | undefined;
2003
+ docsUrl?: string | undefined;
2004
+ }, {
2005
+ toolCall?: {
2006
+ args: Record<string, unknown>;
2007
+ name: string;
2008
+ } | undefined;
2009
+ userQuestion?: {
2010
+ code: string;
2011
+ question: string;
2012
+ } | undefined;
2013
+ docsUrl?: string | undefined;
2014
+ }>>;
2015
+ details: z.ZodOptional<z.ZodUnknown>;
2016
+ }, z.ZodTypeAny, "passthrough">>;