@crediolabs/policy-synth 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +4 -4
  2. package/dist/adapters/interpreter/adapter.d.ts +19 -25
  3. package/dist/adapters/interpreter/adapter.js +54 -487
  4. package/dist/adapters/interpreter/index.d.ts +1 -1
  5. package/dist/adapters/interpreter/index.js +1 -1
  6. package/dist/adapters/oz/adapter.js +1 -15
  7. package/dist/errors.d.ts +1 -1
  8. package/dist/index.d.ts +1 -4
  9. package/dist/index.js +1 -4
  10. package/dist/install/build-add-context-rule.d.ts +3 -19
  11. package/dist/install/build-add-context-rule.js +3 -98
  12. package/dist/install/build-install-policy.d.ts +4 -53
  13. package/dist/install/build-install-policy.js +44 -123
  14. package/dist/install/index.d.ts +0 -2
  15. package/dist/install/index.js +0 -7
  16. package/dist/ir/index.d.ts +1 -1
  17. package/dist/ir/types.d.ts +7 -76
  18. package/dist/ir/types.js +0 -2
  19. package/dist/predicate/decode.d.ts +1 -1
  20. package/dist/predicate/decode.js +2 -70
  21. package/dist/predicate/encode.js +45 -229
  22. package/dist/predicate/from-json.js +1 -42
  23. package/dist/record/decode.js +3 -8
  24. package/dist/review-card/builder.d.ts +4 -3
  25. package/dist/review-card/builder.js +18 -162
  26. package/dist/review-card/cross-check.js +2 -105
  27. package/dist/review-card/render-leaf.d.ts +4 -0
  28. package/dist/review-card/render-leaf.js +47 -0
  29. package/dist/run/index.d.ts +36 -139
  30. package/dist/run/index.js +125 -437
  31. package/dist/run/schemas.d.ts +168 -1929
  32. package/dist/run/schemas.js +40 -269
  33. package/dist/seams/types.d.ts +0 -2
  34. package/dist/simulate/deny-cases.d.ts +26 -0
  35. package/dist/simulate/deny-cases.js +282 -0
  36. package/dist/simulate/evaluate.d.ts +18 -0
  37. package/dist/simulate/evaluate.js +271 -0
  38. package/dist/simulate/index.d.ts +4 -0
  39. package/dist/simulate/index.js +8 -0
  40. package/dist/synth/compose-from-recording.d.ts +24 -51
  41. package/dist/synth/compose-from-recording.js +120 -282
  42. package/dist/synth/deny-cases.d.ts +5 -7
  43. package/dist/synth/deny-cases.js +23 -373
  44. package/dist/synth/evaluate.d.ts +0 -21
  45. package/dist/synth/evaluate.js +56 -336
  46. package/dist/synth/index.d.ts +0 -5
  47. package/dist/synth/index.js +0 -5
  48. package/dist/synth/permit-context.d.ts +2 -9
  49. package/dist/synth/permit-context.js +1 -82
  50. package/dist/synth/synthesize-from-recording.d.ts +1 -29
  51. package/dist/synth/synthesize-from-recording.js +41 -356
  52. package/dist/types.d.ts +8 -60
  53. package/dist/types.js +5 -2
  54. package/dist/verify/simulate.d.ts +1 -14
  55. package/dist/verify/simulate.js +2 -88
  56. package/dist/verify/verify.d.ts +1 -7
  57. package/dist/verify/verify.js +0 -8
  58. package/dist-cjs/adapters/interpreter/adapter.d.ts +19 -25
  59. package/dist-cjs/adapters/interpreter/adapter.js +56 -489
  60. package/dist-cjs/adapters/interpreter/index.d.ts +1 -1
  61. package/dist-cjs/adapters/interpreter/index.js +1 -2
  62. package/dist-cjs/adapters/oz/adapter.js +1 -15
  63. package/dist-cjs/errors.d.ts +1 -1
  64. package/dist-cjs/index.d.ts +1 -4
  65. package/dist-cjs/index.js +1 -4
  66. package/dist-cjs/install/build-add-context-rule.d.ts +3 -19
  67. package/dist-cjs/install/build-add-context-rule.js +1 -97
  68. package/dist-cjs/install/build-install-policy.d.ts +4 -53
  69. package/dist-cjs/install/build-install-policy.js +44 -122
  70. package/dist-cjs/install/index.d.ts +0 -2
  71. package/dist-cjs/install/index.js +2 -23
  72. package/dist-cjs/ir/index.d.ts +1 -1
  73. package/dist-cjs/ir/types.d.ts +7 -76
  74. package/dist-cjs/ir/types.js +0 -2
  75. package/dist-cjs/predicate/decode.d.ts +1 -1
  76. package/dist-cjs/predicate/decode.js +2 -70
  77. package/dist-cjs/predicate/encode.js +45 -229
  78. package/dist-cjs/predicate/from-json.js +1 -42
  79. package/dist-cjs/record/decode.js +3 -8
  80. package/dist-cjs/review-card/builder.d.ts +4 -3
  81. package/dist-cjs/review-card/builder.js +23 -167
  82. package/dist-cjs/review-card/cross-check.js +7 -110
  83. package/dist-cjs/review-card/render-leaf.d.ts +4 -0
  84. package/dist-cjs/review-card/render-leaf.js +52 -0
  85. package/dist-cjs/run/index.d.ts +36 -139
  86. package/dist-cjs/run/index.js +125 -444
  87. package/dist-cjs/run/schemas.d.ts +168 -1929
  88. package/dist-cjs/run/schemas.js +41 -270
  89. package/dist-cjs/seams/types.d.ts +0 -2
  90. package/dist-cjs/simulate/deny-cases.d.ts +26 -0
  91. package/dist-cjs/simulate/deny-cases.js +286 -0
  92. package/dist-cjs/simulate/evaluate.d.ts +18 -0
  93. package/dist-cjs/simulate/evaluate.js +274 -0
  94. package/dist-cjs/simulate/index.d.ts +4 -0
  95. package/dist-cjs/simulate/index.js +13 -0
  96. package/dist-cjs/synth/compose-from-recording.d.ts +24 -51
  97. package/dist-cjs/synth/compose-from-recording.js +120 -282
  98. package/dist-cjs/synth/deny-cases.d.ts +5 -7
  99. package/dist-cjs/synth/deny-cases.js +23 -374
  100. package/dist-cjs/synth/evaluate.d.ts +0 -21
  101. package/dist-cjs/synth/evaluate.js +57 -337
  102. package/dist-cjs/synth/index.d.ts +0 -5
  103. package/dist-cjs/synth/index.js +1 -11
  104. package/dist-cjs/synth/permit-context.d.ts +2 -9
  105. package/dist-cjs/synth/permit-context.js +1 -82
  106. package/dist-cjs/synth/synthesize-from-recording.d.ts +1 -29
  107. package/dist-cjs/synth/synthesize-from-recording.js +39 -354
  108. package/dist-cjs/types.d.ts +8 -60
  109. package/dist-cjs/types.js +6 -3
  110. package/dist-cjs/verify/simulate.d.ts +1 -14
  111. package/dist-cjs/verify/simulate.js +2 -88
  112. package/dist-cjs/verify/verify.d.ts +1 -7
  113. package/dist-cjs/verify/verify.js +0 -8
  114. package/package.json +4 -4
  115. package/src/adapters/interpreter/adapter.ts +76 -572
  116. package/src/errors.ts +0 -19
  117. package/src/index.ts +1 -4
  118. package/src/install/build-add-context-rule.ts +5 -139
  119. package/src/install/build-install-policy.ts +93 -214
  120. package/src/install/index.ts +0 -34
  121. package/src/predicate/decode.ts +2 -70
  122. package/src/predicate/encode.ts +49 -261
  123. package/src/predicate/from-json.ts +1 -43
  124. package/src/record/decode.ts +3 -8
  125. package/src/review-card/builder.ts +19 -168
  126. package/src/review-card/cross-check.ts +3 -105
  127. package/src/review-card/render-leaf.ts +48 -0
  128. package/src/run/index.ts +144 -572
  129. package/src/run/schemas.ts +42 -291
  130. package/src/simulate/deny-cases.ts +334 -0
  131. package/src/simulate/evaluate.ts +284 -0
  132. package/src/simulate/index.ts +11 -0
  133. package/src/synth/compose-from-recording.ts +148 -347
  134. package/src/synth/index.ts +0 -13
  135. package/src/synth/synthesize-from-recording.ts +43 -456
  136. package/src/types.ts +13 -49
  137. package/dist/install/authority-overlap.d.ts +0 -134
  138. package/dist/install/authority-overlap.js +0 -0
  139. package/dist/install/build-install-predicate.d.ts +0 -96
  140. package/dist/install/build-install-predicate.js +0 -444
  141. package/dist/install/build-merge-policy.d.ts +0 -70
  142. package/dist/install/build-merge-policy.js +0 -130
  143. package/dist/install/plan-merge-policy.d.ts +0 -49
  144. package/dist/install/plan-merge-policy.js +0 -86
  145. package/dist/install/read-account-rules.d.ts +0 -100
  146. package/dist/install/read-account-rules.js +0 -283
  147. package/dist-cjs/install/authority-overlap.d.ts +0 -134
  148. package/dist-cjs/install/authority-overlap.js +0 -0
  149. package/dist-cjs/install/build-install-predicate.d.ts +0 -96
  150. package/dist-cjs/install/build-install-predicate.js +0 -479
  151. package/dist-cjs/install/build-merge-policy.d.ts +0 -70
  152. package/dist-cjs/install/build-merge-policy.js +0 -134
  153. package/dist-cjs/install/plan-merge-policy.d.ts +0 -49
  154. package/dist-cjs/install/plan-merge-policy.js +0 -90
  155. package/dist-cjs/install/read-account-rules.d.ts +0 -100
  156. package/dist-cjs/install/read-account-rules.js +0 -296
  157. package/src/adapters/interpreter/index.ts +0 -8
  158. package/src/adapters/oz/adapter.ts +0 -376
  159. package/src/adapters/oz/index.ts +0 -9
  160. package/src/codegen/compile-gate.ts +0 -167
  161. package/src/codegen/index.ts +0 -17
  162. package/src/codegen/template.ts +0 -165
  163. package/src/install/authority-overlap.ts +0 -0
  164. package/src/install/build-merge-policy.ts +0 -219
  165. package/src/install/plan-merge-policy.ts +0 -133
  166. package/src/install/read-account-rules.ts +0 -376
  167. package/src/ir/index.ts +0 -13
  168. package/src/ir/types.ts +0 -132
  169. package/src/mandate/index.ts +0 -4
  170. package/src/mandate/to-ir.ts +0 -71
  171. package/src/mandate/types.ts +0 -21
  172. package/src/seams/index.ts +0 -11
  173. package/src/seams/types.ts +0 -81
  174. package/src/synth/deny-cases.ts +0 -663
  175. package/src/synth/evaluate.ts +0 -613
  176. package/src/synth/harness.ts +0 -68
  177. package/src/synth/minimize.ts +0 -48
  178. package/src/synth/permit-context.ts +0 -136
  179. package/src/synth/predicate-literals.ts +0 -27
  180. package/src/synth/synthesize-from-mandate.ts +0 -82
  181. package/src/verify/envelope.ts +0 -28
  182. package/src/verify/index.ts +0 -5
  183. package/src/verify/simulate.ts +0 -311
  184. package/src/verify/verify.ts +0 -243
@@ -14,15 +14,15 @@ export declare const TokenMovementSchema: z.ZodObject<{
14
14
  to: z.ZodString;
15
15
  amount: z.ZodString;
16
16
  }, "strip", z.ZodTypeAny, {
17
- amount: string;
18
- token: string;
19
17
  from: string;
20
18
  to: string;
21
- }, {
22
19
  amount: string;
23
20
  token: string;
21
+ }, {
24
22
  from: string;
25
23
  to: string;
24
+ amount: string;
25
+ token: string;
26
26
  }>;
27
27
  export declare const OnChainEventSchema: z.ZodObject<{
28
28
  contract: z.ZodString;
@@ -100,15 +100,15 @@ export declare const RecordedTransactionSchema: z.ZodObject<{
100
100
  to: z.ZodString;
101
101
  amount: z.ZodString;
102
102
  }, "strip", z.ZodTypeAny, {
103
- amount: string;
104
- token: string;
105
103
  from: string;
106
104
  to: string;
107
- }, {
108
105
  amount: string;
109
106
  token: string;
107
+ }, {
110
108
  from: string;
111
109
  to: string;
110
+ amount: string;
111
+ token: string;
112
112
  }>, "many">;
113
113
  events: z.ZodArray<z.ZodObject<{
114
114
  contract: z.ZodString;
@@ -186,15 +186,15 @@ export declare const RecordedTransactionSchema: z.ZodObject<{
186
186
  to: z.ZodString;
187
187
  amount: z.ZodString;
188
188
  }, "strip", z.ZodTypeAny, {
189
- amount: string;
190
- token: string;
191
189
  from: string;
192
190
  to: string;
193
- }, {
194
191
  amount: string;
195
192
  token: string;
193
+ }, {
196
194
  from: string;
197
195
  to: string;
196
+ amount: string;
197
+ token: string;
198
198
  }>, "many">;
199
199
  events: z.ZodArray<z.ZodObject<{
200
200
  contract: z.ZodString;
@@ -272,15 +272,15 @@ export declare const RecordedTransactionSchema: z.ZodObject<{
272
272
  to: z.ZodString;
273
273
  amount: z.ZodString;
274
274
  }, "strip", z.ZodTypeAny, {
275
- amount: string;
276
- token: string;
277
275
  from: string;
278
276
  to: string;
279
- }, {
280
277
  amount: string;
281
278
  token: string;
279
+ }, {
282
280
  from: string;
283
281
  to: string;
282
+ amount: string;
283
+ token: string;
284
284
  }>, "many">;
285
285
  events: z.ZodArray<z.ZodObject<{
286
286
  contract: z.ZodString;
@@ -349,253 +349,18 @@ export declare const RecordedTransactionSchema: z.ZodObject<{
349
349
  }>;
350
350
  sourceAccount: z.ZodString;
351
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.ZodEffects<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">>, z.objectOutputType<{
443
- chain: z.ZodLiteral<"stellar">;
444
- contract: z.ZodString;
445
- method: z.ZodOptional<z.ZodString>;
446
- spendingLimit: z.ZodOptional<z.ZodObject<{
447
- token: z.ZodString;
448
- limit: z.ZodString;
449
- windowSeconds: z.ZodNumber;
450
- }, "strip", z.ZodTypeAny, {
451
- token: string;
452
- limit: string;
453
- windowSeconds: number;
454
- }, {
455
- token: string;
456
- limit: string;
457
- windowSeconds: number;
458
- }>>;
459
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
460
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
461
- expiry: z.ZodOptional<z.ZodObject<{
462
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
463
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
464
- }, "strip", z.ZodTypeAny, {
465
- validUntilLedger?: number | undefined;
466
- validUntilUnixSeconds?: number | undefined;
467
- }, {
468
- validUntilLedger?: number | undefined;
469
- validUntilUnixSeconds?: number | undefined;
470
- }>>;
471
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
472
- chain: z.ZodLiteral<"stellar">;
473
- contract: z.ZodString;
474
- method: z.ZodOptional<z.ZodString>;
475
- spendingLimit: z.ZodOptional<z.ZodObject<{
476
- token: z.ZodString;
477
- limit: z.ZodString;
478
- windowSeconds: z.ZodNumber;
479
- }, "strip", z.ZodTypeAny, {
480
- token: string;
481
- limit: string;
482
- windowSeconds: number;
483
- }, {
484
- token: string;
485
- limit: string;
486
- windowSeconds: number;
487
- }>>;
488
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
489
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
490
- expiry: z.ZodOptional<z.ZodObject<{
491
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
492
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
493
- }, "strip", z.ZodTypeAny, {
494
- validUntilLedger?: number | undefined;
495
- validUntilUnixSeconds?: number | undefined;
496
- }, {
497
- validUntilLedger?: number | undefined;
498
- validUntilUnixSeconds?: number | undefined;
499
- }>>;
500
- }, z.ZodTypeAny, "passthrough">>;
501
- /** ComposeUserResponses mirrors the core. */
502
352
  export declare const ComposeUserResponsesSchema: z.ZodObject<{
503
- windowSeconds: z.ZodOptional<z.ZodNumber>;
504
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
505
- limitAmount: z.ZodOptional<z.ZodString>;
506
- invocationLimit: z.ZodOptional<z.ZodNumber>;
507
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
508
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
509
- asset: z.ZodEffects<z.ZodString, string, string>;
510
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
511
- value: z.ZodString;
512
- decimals: z.ZodNumber;
513
- }, "strip", z.ZodTypeAny, {
514
- value: string;
515
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
516
- asset: string;
517
- decimals: number;
518
- }, {
519
- value: string;
520
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
521
- asset: string;
522
- decimals: number;
523
- }>, "many">>;
524
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
525
- windowSeconds: z.ZodOptional<z.ZodNumber>;
526
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
527
- limitAmount: z.ZodOptional<z.ZodString>;
528
- invocationLimit: z.ZodOptional<z.ZodNumber>;
529
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
530
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
531
- asset: z.ZodEffects<z.ZodString, string, string>;
532
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
533
- value: z.ZodString;
534
- decimals: z.ZodNumber;
535
- }, "strip", z.ZodTypeAny, {
536
- value: string;
537
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
538
- asset: string;
539
- decimals: number;
540
- }, {
541
- value: string;
542
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
543
- asset: string;
544
- decimals: number;
545
- }>, "many">>;
546
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
547
- windowSeconds: z.ZodOptional<z.ZodNumber>;
548
353
  validUntilLedger: z.ZodOptional<z.ZodNumber>;
549
354
  limitAmount: z.ZodOptional<z.ZodString>;
550
- invocationLimit: z.ZodOptional<z.ZodNumber>;
551
355
  swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
552
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
553
- asset: z.ZodEffects<z.ZodString, string, string>;
554
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
555
- value: z.ZodString;
556
- decimals: z.ZodNumber;
557
- }, "strip", z.ZodTypeAny, {
558
- value: string;
559
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
560
- asset: string;
561
- decimals: number;
562
- }, {
563
- value: string;
564
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
565
- asset: string;
566
- decimals: number;
567
- }>, "many">>;
568
- }, z.ZodTypeAny, "passthrough">>;
569
- /** OzAdapterConfig - the per-network OZ built-in instance addresses. */
570
- export declare const OzAdapterConfigSchema: z.ZodObject<{
571
- network: z.ZodEnum<["mainnet", "testnet"]>;
572
- instances: z.ZodObject<{
573
- spending_limit: z.ZodString;
574
- simple_threshold: z.ZodString;
575
- weighted_threshold: z.ZodString;
576
- }, "strip", z.ZodTypeAny, {
577
- spending_limit: string;
578
- simple_threshold: string;
579
- weighted_threshold: string;
580
- }, {
581
- spending_limit: string;
582
- simple_threshold: string;
583
- weighted_threshold: string;
584
- }>;
585
- }, "strip", z.ZodTypeAny, {
586
- network: "mainnet" | "testnet";
587
- instances: {
588
- spending_limit: string;
589
- simple_threshold: string;
590
- weighted_threshold: string;
591
- };
356
+ }, "strict", z.ZodTypeAny, {
357
+ limitAmount?: string | undefined;
358
+ validUntilLedger?: number | undefined;
359
+ swapRecipientAllowlist?: string[] | undefined;
592
360
  }, {
593
- network: "mainnet" | "testnet";
594
- instances: {
595
- spending_limit: string;
596
- simple_threshold: string;
597
- weighted_threshold: string;
598
- };
361
+ limitAmount?: string | undefined;
362
+ validUntilLedger?: number | undefined;
363
+ swapRecipientAllowlist?: string[] | undefined;
599
364
  }>;
600
365
  export declare const RecordTransactionInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
601
366
  hash: z.ZodOptional<z.ZodString>;
@@ -634,279 +399,17 @@ export declare const RecordTransactionInputSchema: z.ZodEffects<z.ZodEffects<z.Z
634
399
  confidenceOverride?: number | undefined;
635
400
  }>;
636
401
  export type RecordTransactionInput = z.infer<typeof RecordTransactionInputSchema>;
637
- export declare const SynthesizePolicyMandateInputSchema: z.ZodObject<{
638
- source: z.ZodLiteral<"mandate">;
639
- mandate: z.ZodEffects<z.ZodObject<{
640
- chain: z.ZodLiteral<"stellar">;
641
- contract: z.ZodString;
642
- method: z.ZodOptional<z.ZodString>;
643
- spendingLimit: z.ZodOptional<z.ZodObject<{
644
- token: z.ZodString;
645
- limit: z.ZodString;
646
- windowSeconds: z.ZodNumber;
647
- }, "strip", z.ZodTypeAny, {
648
- token: string;
649
- limit: string;
650
- windowSeconds: number;
651
- }, {
652
- token: string;
653
- limit: string;
654
- windowSeconds: number;
655
- }>>;
656
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
657
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
658
- expiry: z.ZodOptional<z.ZodObject<{
659
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
660
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
661
- }, "strip", z.ZodTypeAny, {
662
- validUntilLedger?: number | undefined;
663
- validUntilUnixSeconds?: number | undefined;
664
- }, {
665
- validUntilLedger?: number | undefined;
666
- validUntilUnixSeconds?: number | undefined;
667
- }>>;
668
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
669
- chain: z.ZodLiteral<"stellar">;
670
- contract: z.ZodString;
671
- method: z.ZodOptional<z.ZodString>;
672
- spendingLimit: z.ZodOptional<z.ZodObject<{
673
- token: z.ZodString;
674
- limit: z.ZodString;
675
- windowSeconds: z.ZodNumber;
676
- }, "strip", z.ZodTypeAny, {
677
- token: string;
678
- limit: string;
679
- windowSeconds: number;
680
- }, {
681
- token: string;
682
- limit: string;
683
- windowSeconds: number;
684
- }>>;
685
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
686
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
687
- expiry: z.ZodOptional<z.ZodObject<{
688
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
689
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
690
- }, "strip", z.ZodTypeAny, {
691
- validUntilLedger?: number | undefined;
692
- validUntilUnixSeconds?: number | undefined;
693
- }, {
694
- validUntilLedger?: number | undefined;
695
- validUntilUnixSeconds?: number | undefined;
696
- }>>;
697
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
698
- chain: z.ZodLiteral<"stellar">;
699
- contract: z.ZodString;
700
- method: z.ZodOptional<z.ZodString>;
701
- spendingLimit: z.ZodOptional<z.ZodObject<{
702
- token: z.ZodString;
703
- limit: z.ZodString;
704
- windowSeconds: z.ZodNumber;
705
- }, "strip", z.ZodTypeAny, {
706
- token: string;
707
- limit: string;
708
- windowSeconds: number;
709
- }, {
710
- token: string;
711
- limit: string;
712
- windowSeconds: number;
713
- }>>;
714
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
715
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
716
- expiry: z.ZodOptional<z.ZodObject<{
717
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
718
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
719
- }, "strip", z.ZodTypeAny, {
720
- validUntilLedger?: number | undefined;
721
- validUntilUnixSeconds?: number | undefined;
722
- }, {
723
- validUntilLedger?: number | undefined;
724
- validUntilUnixSeconds?: number | undefined;
725
- }>>;
726
- }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
727
- chain: z.ZodLiteral<"stellar">;
728
- contract: z.ZodString;
729
- method: z.ZodOptional<z.ZodString>;
730
- spendingLimit: z.ZodOptional<z.ZodObject<{
731
- token: z.ZodString;
732
- limit: z.ZodString;
733
- windowSeconds: z.ZodNumber;
734
- }, "strip", z.ZodTypeAny, {
735
- token: string;
736
- limit: string;
737
- windowSeconds: number;
738
- }, {
739
- token: string;
740
- limit: string;
741
- windowSeconds: number;
742
- }>>;
743
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
744
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
745
- expiry: z.ZodOptional<z.ZodObject<{
746
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
747
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
748
- }, "strip", z.ZodTypeAny, {
749
- validUntilLedger?: number | undefined;
750
- validUntilUnixSeconds?: number | undefined;
751
- }, {
752
- validUntilLedger?: number | undefined;
753
- validUntilUnixSeconds?: number | undefined;
754
- }>>;
755
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
756
- chain: z.ZodLiteral<"stellar">;
757
- contract: z.ZodString;
758
- method: z.ZodOptional<z.ZodString>;
759
- spendingLimit: z.ZodOptional<z.ZodObject<{
760
- token: z.ZodString;
761
- limit: z.ZodString;
762
- windowSeconds: z.ZodNumber;
763
- }, "strip", z.ZodTypeAny, {
764
- token: string;
765
- limit: string;
766
- windowSeconds: number;
767
- }, {
768
- token: string;
769
- limit: string;
770
- windowSeconds: number;
771
- }>>;
772
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
773
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
774
- expiry: z.ZodOptional<z.ZodObject<{
775
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
776
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
777
- }, "strip", z.ZodTypeAny, {
778
- validUntilLedger?: number | undefined;
779
- validUntilUnixSeconds?: number | undefined;
780
- }, {
781
- validUntilLedger?: number | undefined;
782
- validUntilUnixSeconds?: number | undefined;
783
- }>>;
784
- }, z.ZodTypeAny, "passthrough">>;
785
- ozConfig: z.ZodOptional<z.ZodObject<{
786
- network: z.ZodEnum<["mainnet", "testnet"]>;
787
- instances: z.ZodObject<{
788
- spending_limit: z.ZodString;
789
- simple_threshold: z.ZodString;
790
- weighted_threshold: z.ZodString;
791
- }, "strip", z.ZodTypeAny, {
792
- spending_limit: string;
793
- simple_threshold: string;
794
- weighted_threshold: string;
795
- }, {
796
- spending_limit: string;
797
- simple_threshold: string;
798
- weighted_threshold: string;
799
- }>;
800
- }, "strip", z.ZodTypeAny, {
801
- network: "mainnet" | "testnet";
802
- instances: {
803
- spending_limit: string;
804
- simple_threshold: string;
805
- weighted_threshold: string;
806
- };
807
- }, {
808
- network: "mainnet" | "testnet";
809
- instances: {
810
- spending_limit: string;
811
- simple_threshold: string;
812
- weighted_threshold: string;
813
- };
814
- }>>;
815
- explain: z.ZodOptional<z.ZodBoolean>;
816
- }, "strip", z.ZodTypeAny, {
817
- source: "mandate";
818
- mandate: {
819
- contract: string;
820
- chain: "stellar";
821
- expiry?: {
822
- validUntilLedger?: number | undefined;
823
- validUntilUnixSeconds?: number | undefined;
824
- } | undefined;
825
- method?: string | undefined;
826
- spendingLimit?: {
827
- token: string;
828
- limit: string;
829
- windowSeconds: number;
830
- } | undefined;
831
- approvalThreshold?: number | undefined;
832
- recipients?: string[] | undefined;
833
- } & {
834
- [k: string]: unknown;
835
- };
836
- ozConfig?: {
837
- network: "mainnet" | "testnet";
838
- instances: {
839
- spending_limit: string;
840
- simple_threshold: string;
841
- weighted_threshold: string;
842
- };
843
- } | undefined;
844
- explain?: boolean | undefined;
845
- }, {
846
- source: "mandate";
847
- mandate: {
848
- contract: string;
849
- chain: "stellar";
850
- expiry?: {
851
- validUntilLedger?: number | undefined;
852
- validUntilUnixSeconds?: number | undefined;
853
- } | undefined;
854
- method?: string | undefined;
855
- spendingLimit?: {
856
- token: string;
857
- limit: string;
858
- windowSeconds: number;
859
- } | undefined;
860
- approvalThreshold?: number | undefined;
861
- recipients?: string[] | undefined;
862
- } & {
863
- [k: string]: unknown;
864
- };
865
- ozConfig?: {
866
- network: "mainnet" | "testnet";
867
- instances: {
868
- spending_limit: string;
869
- simple_threshold: string;
870
- weighted_threshold: string;
871
- };
872
- } | undefined;
873
- explain?: boolean | undefined;
874
- }>;
875
- /** Interpreter opt-in for the recording path. Present -> constraints OZ cannot
876
- * express (per-method scoping, invocation-count windows, oracle bounds, exact
877
- * hop paths) lower to a real interpreter predicate document instead of being
878
- * surfaced as warnings. The core deep-validates `smartAccountAddress` (a C...
879
- * contract, not the recording's G... source) and the tighten-only oracle
880
- * bounds; the schema stays light so the core owns the friendly ToolErrors. */
881
402
  export declare const InterpreterOptionsSchema: z.ZodObject<{
882
403
  smartAccountAddress: z.ZodString;
883
404
  installNonce: z.ZodOptional<z.ZodNumber>;
884
- oracleParams: z.ZodOptional<z.ZodObject<{
885
- maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
886
- maxDeviationBps: z.ZodOptional<z.ZodNumber>;
887
- }, "strip", z.ZodTypeAny, {
888
- maxStalenessSeconds?: number | undefined;
889
- maxDeviationBps?: number | undefined;
890
- }, {
891
- maxStalenessSeconds?: number | undefined;
892
- maxDeviationBps?: number | undefined;
893
- }>>;
894
405
  }, "strip", z.ZodTypeAny, {
895
406
  smartAccountAddress: string;
896
- oracleParams?: {
897
- maxStalenessSeconds?: number | undefined;
898
- maxDeviationBps?: number | undefined;
899
- } | undefined;
900
407
  installNonce?: number | undefined;
901
408
  }, {
902
409
  smartAccountAddress: string;
903
- oracleParams?: {
904
- maxStalenessSeconds?: number | undefined;
905
- maxDeviationBps?: number | undefined;
906
- } | undefined;
907
410
  installNonce?: number | undefined;
908
411
  }>;
909
- export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
412
+ export declare const SynthesizePolicyInputSchema: z.ZodObject<{
910
413
  source: z.ZodLiteral<"recording">;
911
414
  recordedTx: z.ZodObject<{
912
415
  network: z.ZodEnum<["mainnet", "testnet"]>;
@@ -918,15 +421,15 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
918
421
  to: z.ZodString;
919
422
  amount: z.ZodString;
920
423
  }, "strip", z.ZodTypeAny, {
921
- amount: string;
922
- token: string;
923
424
  from: string;
924
425
  to: string;
925
- }, {
926
426
  amount: string;
927
427
  token: string;
428
+ }, {
928
429
  from: string;
929
430
  to: string;
431
+ amount: string;
432
+ token: string;
930
433
  }>, "many">;
931
434
  events: z.ZodArray<z.ZodObject<{
932
435
  contract: z.ZodString;
@@ -1004,15 +507,15 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1004
507
  to: z.ZodString;
1005
508
  amount: z.ZodString;
1006
509
  }, "strip", z.ZodTypeAny, {
1007
- amount: string;
1008
- token: string;
1009
510
  from: string;
1010
511
  to: string;
1011
- }, {
1012
512
  amount: string;
1013
513
  token: string;
514
+ }, {
1014
515
  from: string;
1015
516
  to: string;
517
+ amount: string;
518
+ token: string;
1016
519
  }>, "many">;
1017
520
  events: z.ZodArray<z.ZodObject<{
1018
521
  contract: z.ZodString;
@@ -1090,15 +593,15 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1090
593
  to: z.ZodString;
1091
594
  amount: z.ZodString;
1092
595
  }, "strip", z.ZodTypeAny, {
1093
- amount: string;
1094
- token: string;
1095
596
  from: string;
1096
597
  to: string;
1097
- }, {
1098
598
  amount: string;
1099
599
  token: string;
600
+ }, {
1100
601
  from: string;
1101
602
  to: string;
603
+ amount: string;
604
+ token: string;
1102
605
  }>, "many">;
1103
606
  events: z.ZodArray<z.ZodObject<{
1104
607
  contract: z.ZodString;
@@ -1169,72 +672,18 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1169
672
  }, z.ZodTypeAny, "passthrough">>;
1170
673
  network: z.ZodEnum<["mainnet", "testnet"]>;
1171
674
  userResponses: z.ZodOptional<z.ZodObject<{
1172
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1173
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1174
- limitAmount: z.ZodOptional<z.ZodString>;
1175
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1176
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1177
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1178
- asset: z.ZodEffects<z.ZodString, string, string>;
1179
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1180
- value: z.ZodString;
1181
- decimals: z.ZodNumber;
1182
- }, "strip", z.ZodTypeAny, {
1183
- value: string;
1184
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1185
- asset: string;
1186
- decimals: number;
1187
- }, {
1188
- value: string;
1189
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1190
- asset: string;
1191
- decimals: number;
1192
- }>, "many">>;
1193
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1194
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1195
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1196
- limitAmount: z.ZodOptional<z.ZodString>;
1197
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1198
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1199
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1200
- asset: z.ZodEffects<z.ZodString, string, string>;
1201
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1202
- value: z.ZodString;
1203
- decimals: z.ZodNumber;
1204
- }, "strip", z.ZodTypeAny, {
1205
- value: string;
1206
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1207
- asset: string;
1208
- decimals: number;
1209
- }, {
1210
- value: string;
1211
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1212
- asset: string;
1213
- decimals: number;
1214
- }>, "many">>;
1215
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1216
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1217
675
  validUntilLedger: z.ZodOptional<z.ZodNumber>;
1218
676
  limitAmount: z.ZodOptional<z.ZodString>;
1219
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1220
677
  swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1221
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1222
- asset: z.ZodEffects<z.ZodString, string, string>;
1223
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1224
- value: z.ZodString;
1225
- decimals: z.ZodNumber;
1226
- }, "strip", z.ZodTypeAny, {
1227
- value: string;
1228
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1229
- asset: string;
1230
- decimals: number;
1231
- }, {
1232
- value: string;
1233
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1234
- asset: string;
1235
- decimals: number;
1236
- }>, "many">>;
1237
- }, z.ZodTypeAny, "passthrough">>>;
678
+ }, "strict", z.ZodTypeAny, {
679
+ limitAmount?: string | undefined;
680
+ validUntilLedger?: number | undefined;
681
+ swapRecipientAllowlist?: string[] | undefined;
682
+ }, {
683
+ limitAmount?: string | undefined;
684
+ validUntilLedger?: number | undefined;
685
+ swapRecipientAllowlist?: string[] | undefined;
686
+ }>>;
1238
687
  confidenceOverride: z.ZodOptional<z.ZodObject<{
1239
688
  threshold: z.ZodNumber;
1240
689
  }, "strip", z.ZodTypeAny, {
@@ -1245,61 +694,13 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1245
694
  interpreter: z.ZodOptional<z.ZodObject<{
1246
695
  smartAccountAddress: z.ZodString;
1247
696
  installNonce: z.ZodOptional<z.ZodNumber>;
1248
- oracleParams: z.ZodOptional<z.ZodObject<{
1249
- maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
1250
- maxDeviationBps: z.ZodOptional<z.ZodNumber>;
1251
- }, "strip", z.ZodTypeAny, {
1252
- maxStalenessSeconds?: number | undefined;
1253
- maxDeviationBps?: number | undefined;
1254
- }, {
1255
- maxStalenessSeconds?: number | undefined;
1256
- maxDeviationBps?: number | undefined;
1257
- }>>;
1258
697
  }, "strip", z.ZodTypeAny, {
1259
698
  smartAccountAddress: string;
1260
- oracleParams?: {
1261
- maxStalenessSeconds?: number | undefined;
1262
- maxDeviationBps?: number | undefined;
1263
- } | undefined;
1264
699
  installNonce?: number | undefined;
1265
700
  }, {
1266
701
  smartAccountAddress: string;
1267
- oracleParams?: {
1268
- maxStalenessSeconds?: number | undefined;
1269
- maxDeviationBps?: number | undefined;
1270
- } | undefined;
1271
702
  installNonce?: number | undefined;
1272
703
  }>>;
1273
- ozConfig: z.ZodOptional<z.ZodObject<{
1274
- network: z.ZodEnum<["mainnet", "testnet"]>;
1275
- instances: z.ZodObject<{
1276
- spending_limit: z.ZodString;
1277
- simple_threshold: z.ZodString;
1278
- weighted_threshold: z.ZodString;
1279
- }, "strip", z.ZodTypeAny, {
1280
- spending_limit: string;
1281
- simple_threshold: string;
1282
- weighted_threshold: string;
1283
- }, {
1284
- spending_limit: string;
1285
- simple_threshold: string;
1286
- weighted_threshold: string;
1287
- }>;
1288
- }, "strip", z.ZodTypeAny, {
1289
- network: "mainnet" | "testnet";
1290
- instances: {
1291
- spending_limit: string;
1292
- simple_threshold: string;
1293
- weighted_threshold: string;
1294
- };
1295
- }, {
1296
- network: "mainnet" | "testnet";
1297
- instances: {
1298
- spending_limit: string;
1299
- simple_threshold: string;
1300
- weighted_threshold: string;
1301
- };
1302
- }>>;
1303
704
  explain: z.ZodOptional<z.ZodBoolean>;
1304
705
  }, "strip", z.ZodTypeAny, {
1305
706
  network: "mainnet" | "testnet";
@@ -1315,91 +716,10 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1315
716
  network: "mainnet" | "testnet";
1316
717
  invocations: unknown[];
1317
718
  tokenMovements: {
1318
- amount: string;
1319
- token: string;
1320
719
  from: string;
1321
720
  to: string;
1322
- }[];
1323
- authEntries: unknown[];
1324
- ledgerSequence: number;
1325
- fetchedAt: number;
1326
- parseConfidence: {
1327
- opaqueScVals: {
1328
- type: string;
1329
- path: string;
1330
- }[];
1331
- unknownContracts: {
1332
- contract: string;
1333
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1334
- }[];
1335
- overall: number;
1336
- knownContracts: string[];
1337
- thresholdUsed: number;
1338
- };
1339
- } & {
1340
- [k: string]: unknown;
1341
- };
1342
- interpreter?: {
1343
- smartAccountAddress: string;
1344
- oracleParams?: {
1345
- maxStalenessSeconds?: number | undefined;
1346
- maxDeviationBps?: number | undefined;
1347
- } | undefined;
1348
- installNonce?: number | undefined;
1349
- } | undefined;
1350
- userResponses?: z.objectOutputType<{
1351
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1352
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1353
- limitAmount: z.ZodOptional<z.ZodString>;
1354
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1355
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1356
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1357
- asset: z.ZodEffects<z.ZodString, string, string>;
1358
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1359
- value: z.ZodString;
1360
- decimals: z.ZodNumber;
1361
- }, "strip", z.ZodTypeAny, {
1362
- value: string;
1363
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1364
- asset: string;
1365
- decimals: number;
1366
- }, {
1367
- value: string;
1368
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1369
- asset: string;
1370
- decimals: number;
1371
- }>, "many">>;
1372
- }, z.ZodTypeAny, "passthrough"> | undefined;
1373
- confidenceOverride?: {
1374
- threshold: number;
1375
- } | undefined;
1376
- ozConfig?: {
1377
- network: "mainnet" | "testnet";
1378
- instances: {
1379
- spending_limit: string;
1380
- simple_threshold: string;
1381
- weighted_threshold: string;
1382
- };
1383
- } | undefined;
1384
- explain?: boolean | undefined;
1385
- }, {
1386
- network: "mainnet" | "testnet";
1387
- source: "recording";
1388
- recordedTx: {
1389
- signers: string[];
1390
- events: {
1391
- contract: string;
1392
- topics: string[];
1393
- data?: unknown;
1394
- }[];
1395
- sourceAccount: string;
1396
- network: "mainnet" | "testnet";
1397
- invocations: unknown[];
1398
- tokenMovements: {
1399
721
  amount: string;
1400
722
  token: string;
1401
- from: string;
1402
- to: string;
1403
723
  }[];
1404
724
  authEntries: unknown[];
1405
725
  ledgerSequence: number;
@@ -1422,760 +742,16 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
1422
742
  };
1423
743
  interpreter?: {
1424
744
  smartAccountAddress: string;
1425
- oracleParams?: {
1426
- maxStalenessSeconds?: number | undefined;
1427
- maxDeviationBps?: number | undefined;
1428
- } | undefined;
1429
745
  installNonce?: number | undefined;
1430
746
  } | undefined;
1431
- userResponses?: z.objectInputType<{
1432
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1433
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1434
- limitAmount: z.ZodOptional<z.ZodString>;
1435
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1436
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1437
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1438
- asset: z.ZodEffects<z.ZodString, string, string>;
1439
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1440
- value: z.ZodString;
1441
- decimals: z.ZodNumber;
1442
- }, "strip", z.ZodTypeAny, {
1443
- value: string;
1444
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1445
- asset: string;
1446
- decimals: number;
1447
- }, {
1448
- value: string;
1449
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1450
- asset: string;
1451
- decimals: number;
1452
- }>, "many">>;
1453
- }, z.ZodTypeAny, "passthrough"> | undefined;
1454
- confidenceOverride?: {
1455
- threshold: number;
1456
- } | undefined;
1457
- ozConfig?: {
1458
- network: "mainnet" | "testnet";
1459
- instances: {
1460
- spending_limit: string;
1461
- simple_threshold: string;
1462
- weighted_threshold: string;
1463
- };
1464
- } | undefined;
1465
- explain?: boolean | undefined;
1466
- }>;
1467
- export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
1468
- source: z.ZodLiteral<"mandate">;
1469
- mandate: z.ZodEffects<z.ZodObject<{
1470
- chain: z.ZodLiteral<"stellar">;
1471
- contract: z.ZodString;
1472
- method: z.ZodOptional<z.ZodString>;
1473
- spendingLimit: z.ZodOptional<z.ZodObject<{
1474
- token: z.ZodString;
1475
- limit: z.ZodString;
1476
- windowSeconds: z.ZodNumber;
1477
- }, "strip", z.ZodTypeAny, {
1478
- token: string;
1479
- limit: string;
1480
- windowSeconds: number;
1481
- }, {
1482
- token: string;
1483
- limit: string;
1484
- windowSeconds: number;
1485
- }>>;
1486
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
1487
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1488
- expiry: z.ZodOptional<z.ZodObject<{
1489
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1490
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1491
- }, "strip", z.ZodTypeAny, {
1492
- validUntilLedger?: number | undefined;
1493
- validUntilUnixSeconds?: number | undefined;
1494
- }, {
1495
- validUntilLedger?: number | undefined;
1496
- validUntilUnixSeconds?: number | undefined;
1497
- }>>;
1498
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1499
- chain: z.ZodLiteral<"stellar">;
1500
- contract: z.ZodString;
1501
- method: z.ZodOptional<z.ZodString>;
1502
- spendingLimit: z.ZodOptional<z.ZodObject<{
1503
- token: z.ZodString;
1504
- limit: z.ZodString;
1505
- windowSeconds: z.ZodNumber;
1506
- }, "strip", z.ZodTypeAny, {
1507
- token: string;
1508
- limit: string;
1509
- windowSeconds: number;
1510
- }, {
1511
- token: string;
1512
- limit: string;
1513
- windowSeconds: number;
1514
- }>>;
1515
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
1516
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1517
- expiry: z.ZodOptional<z.ZodObject<{
1518
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1519
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1520
- }, "strip", z.ZodTypeAny, {
1521
- validUntilLedger?: number | undefined;
1522
- validUntilUnixSeconds?: number | undefined;
1523
- }, {
1524
- validUntilLedger?: number | undefined;
1525
- validUntilUnixSeconds?: number | undefined;
1526
- }>>;
1527
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1528
- chain: z.ZodLiteral<"stellar">;
1529
- contract: z.ZodString;
1530
- method: z.ZodOptional<z.ZodString>;
1531
- spendingLimit: z.ZodOptional<z.ZodObject<{
1532
- token: z.ZodString;
1533
- limit: z.ZodString;
1534
- windowSeconds: z.ZodNumber;
1535
- }, "strip", z.ZodTypeAny, {
1536
- token: string;
1537
- limit: string;
1538
- windowSeconds: number;
1539
- }, {
1540
- token: string;
1541
- limit: string;
1542
- windowSeconds: number;
1543
- }>>;
1544
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
1545
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1546
- expiry: z.ZodOptional<z.ZodObject<{
1547
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1548
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1549
- }, "strip", z.ZodTypeAny, {
1550
- validUntilLedger?: number | undefined;
1551
- validUntilUnixSeconds?: number | undefined;
1552
- }, {
1553
- validUntilLedger?: number | undefined;
1554
- validUntilUnixSeconds?: number | undefined;
1555
- }>>;
1556
- }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1557
- chain: z.ZodLiteral<"stellar">;
1558
- contract: z.ZodString;
1559
- method: z.ZodOptional<z.ZodString>;
1560
- spendingLimit: z.ZodOptional<z.ZodObject<{
1561
- token: z.ZodString;
1562
- limit: z.ZodString;
1563
- windowSeconds: z.ZodNumber;
1564
- }, "strip", z.ZodTypeAny, {
1565
- token: string;
1566
- limit: string;
1567
- windowSeconds: number;
1568
- }, {
1569
- token: string;
1570
- limit: string;
1571
- windowSeconds: number;
1572
- }>>;
1573
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
1574
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1575
- expiry: z.ZodOptional<z.ZodObject<{
1576
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1577
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1578
- }, "strip", z.ZodTypeAny, {
1579
- validUntilLedger?: number | undefined;
1580
- validUntilUnixSeconds?: number | undefined;
1581
- }, {
1582
- validUntilLedger?: number | undefined;
1583
- validUntilUnixSeconds?: number | undefined;
1584
- }>>;
1585
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1586
- chain: z.ZodLiteral<"stellar">;
1587
- contract: z.ZodString;
1588
- method: z.ZodOptional<z.ZodString>;
1589
- spendingLimit: z.ZodOptional<z.ZodObject<{
1590
- token: z.ZodString;
1591
- limit: z.ZodString;
1592
- windowSeconds: z.ZodNumber;
1593
- }, "strip", z.ZodTypeAny, {
1594
- token: string;
1595
- limit: string;
1596
- windowSeconds: number;
1597
- }, {
1598
- token: string;
1599
- limit: string;
1600
- windowSeconds: number;
1601
- }>>;
1602
- approvalThreshold: z.ZodOptional<z.ZodNumber>;
1603
- recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1604
- expiry: z.ZodOptional<z.ZodObject<{
1605
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1606
- validUntilUnixSeconds: z.ZodOptional<z.ZodNumber>;
1607
- }, "strip", z.ZodTypeAny, {
1608
- validUntilLedger?: number | undefined;
1609
- validUntilUnixSeconds?: number | undefined;
1610
- }, {
1611
- validUntilLedger?: number | undefined;
1612
- validUntilUnixSeconds?: number | undefined;
1613
- }>>;
1614
- }, z.ZodTypeAny, "passthrough">>;
1615
- ozConfig: z.ZodOptional<z.ZodObject<{
1616
- network: z.ZodEnum<["mainnet", "testnet"]>;
1617
- instances: z.ZodObject<{
1618
- spending_limit: z.ZodString;
1619
- simple_threshold: z.ZodString;
1620
- weighted_threshold: z.ZodString;
1621
- }, "strip", z.ZodTypeAny, {
1622
- spending_limit: string;
1623
- simple_threshold: string;
1624
- weighted_threshold: string;
1625
- }, {
1626
- spending_limit: string;
1627
- simple_threshold: string;
1628
- weighted_threshold: string;
1629
- }>;
1630
- }, "strip", z.ZodTypeAny, {
1631
- network: "mainnet" | "testnet";
1632
- instances: {
1633
- spending_limit: string;
1634
- simple_threshold: string;
1635
- weighted_threshold: string;
1636
- };
1637
- }, {
1638
- network: "mainnet" | "testnet";
1639
- instances: {
1640
- spending_limit: string;
1641
- simple_threshold: string;
1642
- weighted_threshold: string;
1643
- };
1644
- }>>;
1645
- explain: z.ZodOptional<z.ZodBoolean>;
1646
- }, "strip", z.ZodTypeAny, {
1647
- source: "mandate";
1648
- mandate: {
1649
- contract: string;
1650
- chain: "stellar";
1651
- expiry?: {
1652
- validUntilLedger?: number | undefined;
1653
- validUntilUnixSeconds?: number | undefined;
1654
- } | undefined;
1655
- method?: string | undefined;
1656
- spendingLimit?: {
1657
- token: string;
1658
- limit: string;
1659
- windowSeconds: number;
1660
- } | undefined;
1661
- approvalThreshold?: number | undefined;
1662
- recipients?: string[] | undefined;
1663
- } & {
1664
- [k: string]: unknown;
1665
- };
1666
- ozConfig?: {
1667
- network: "mainnet" | "testnet";
1668
- instances: {
1669
- spending_limit: string;
1670
- simple_threshold: string;
1671
- weighted_threshold: string;
1672
- };
1673
- } | undefined;
1674
- explain?: boolean | undefined;
1675
- }, {
1676
- source: "mandate";
1677
- mandate: {
1678
- contract: string;
1679
- chain: "stellar";
1680
- expiry?: {
1681
- validUntilLedger?: number | undefined;
1682
- validUntilUnixSeconds?: number | undefined;
1683
- } | undefined;
1684
- method?: string | undefined;
1685
- spendingLimit?: {
1686
- token: string;
1687
- limit: string;
1688
- windowSeconds: number;
1689
- } | undefined;
1690
- approvalThreshold?: number | undefined;
1691
- recipients?: string[] | undefined;
1692
- } & {
1693
- [k: string]: unknown;
1694
- };
1695
- ozConfig?: {
1696
- network: "mainnet" | "testnet";
1697
- instances: {
1698
- spending_limit: string;
1699
- simple_threshold: string;
1700
- weighted_threshold: string;
1701
- };
1702
- } | undefined;
1703
- explain?: boolean | undefined;
1704
- }>, z.ZodObject<{
1705
- source: z.ZodLiteral<"recording">;
1706
- recordedTx: z.ZodObject<{
1707
- network: z.ZodEnum<["mainnet", "testnet"]>;
1708
- signers: z.ZodArray<z.ZodString, "many">;
1709
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1710
- tokenMovements: z.ZodArray<z.ZodObject<{
1711
- token: z.ZodString;
1712
- from: z.ZodString;
1713
- to: z.ZodString;
1714
- amount: z.ZodString;
1715
- }, "strip", z.ZodTypeAny, {
1716
- amount: string;
1717
- token: string;
1718
- from: string;
1719
- to: string;
1720
- }, {
1721
- amount: string;
1722
- token: string;
1723
- from: string;
1724
- to: string;
1725
- }>, "many">;
1726
- events: z.ZodArray<z.ZodObject<{
1727
- contract: z.ZodString;
1728
- topics: z.ZodArray<z.ZodString, "many">;
1729
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1730
- }, "strip", z.ZodTypeAny, {
1731
- contract: string;
1732
- topics: string[];
1733
- data?: unknown;
1734
- }, {
1735
- contract: string;
1736
- topics: string[];
1737
- data?: unknown;
1738
- }>, "many">;
1739
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
1740
- ledgerSequence: z.ZodNumber;
1741
- fetchedAt: z.ZodNumber;
1742
- parseConfidence: z.ZodObject<{
1743
- overall: z.ZodNumber;
1744
- knownContracts: z.ZodArray<z.ZodString, "many">;
1745
- unknownContracts: z.ZodArray<z.ZodObject<{
1746
- contract: z.ZodString;
1747
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1748
- }, "strip", z.ZodTypeAny, {
1749
- contract: string;
1750
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1751
- }, {
1752
- contract: string;
1753
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1754
- }>, "many">;
1755
- opaqueScVals: z.ZodArray<z.ZodObject<{
1756
- path: z.ZodString;
1757
- type: z.ZodString;
1758
- }, "strip", z.ZodTypeAny, {
1759
- type: string;
1760
- path: string;
1761
- }, {
1762
- type: string;
1763
- path: string;
1764
- }>, "many">;
1765
- thresholdUsed: z.ZodNumber;
1766
- }, "strip", z.ZodTypeAny, {
1767
- opaqueScVals: {
1768
- type: string;
1769
- path: string;
1770
- }[];
1771
- unknownContracts: {
1772
- contract: string;
1773
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1774
- }[];
1775
- overall: number;
1776
- knownContracts: string[];
1777
- thresholdUsed: number;
1778
- }, {
1779
- opaqueScVals: {
1780
- type: string;
1781
- path: string;
1782
- }[];
1783
- unknownContracts: {
1784
- contract: string;
1785
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1786
- }[];
1787
- overall: number;
1788
- knownContracts: string[];
1789
- thresholdUsed: number;
1790
- }>;
1791
- sourceAccount: z.ZodString;
1792
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1793
- network: z.ZodEnum<["mainnet", "testnet"]>;
1794
- signers: z.ZodArray<z.ZodString, "many">;
1795
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1796
- tokenMovements: z.ZodArray<z.ZodObject<{
1797
- token: z.ZodString;
1798
- from: z.ZodString;
1799
- to: z.ZodString;
1800
- amount: z.ZodString;
1801
- }, "strip", z.ZodTypeAny, {
1802
- amount: string;
1803
- token: string;
1804
- from: string;
1805
- to: string;
1806
- }, {
1807
- amount: string;
1808
- token: string;
1809
- from: string;
1810
- to: string;
1811
- }>, "many">;
1812
- events: z.ZodArray<z.ZodObject<{
1813
- contract: z.ZodString;
1814
- topics: z.ZodArray<z.ZodString, "many">;
1815
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1816
- }, "strip", z.ZodTypeAny, {
1817
- contract: string;
1818
- topics: string[];
1819
- data?: unknown;
1820
- }, {
1821
- contract: string;
1822
- topics: string[];
1823
- data?: unknown;
1824
- }>, "many">;
1825
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
1826
- ledgerSequence: z.ZodNumber;
1827
- fetchedAt: z.ZodNumber;
1828
- parseConfidence: z.ZodObject<{
1829
- overall: z.ZodNumber;
1830
- knownContracts: z.ZodArray<z.ZodString, "many">;
1831
- unknownContracts: z.ZodArray<z.ZodObject<{
1832
- contract: z.ZodString;
1833
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1834
- }, "strip", z.ZodTypeAny, {
1835
- contract: string;
1836
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1837
- }, {
1838
- contract: string;
1839
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1840
- }>, "many">;
1841
- opaqueScVals: z.ZodArray<z.ZodObject<{
1842
- path: z.ZodString;
1843
- type: z.ZodString;
1844
- }, "strip", z.ZodTypeAny, {
1845
- type: string;
1846
- path: string;
1847
- }, {
1848
- type: string;
1849
- path: string;
1850
- }>, "many">;
1851
- thresholdUsed: z.ZodNumber;
1852
- }, "strip", z.ZodTypeAny, {
1853
- opaqueScVals: {
1854
- type: string;
1855
- path: string;
1856
- }[];
1857
- unknownContracts: {
1858
- contract: string;
1859
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1860
- }[];
1861
- overall: number;
1862
- knownContracts: string[];
1863
- thresholdUsed: number;
1864
- }, {
1865
- opaqueScVals: {
1866
- type: string;
1867
- path: string;
1868
- }[];
1869
- unknownContracts: {
1870
- contract: string;
1871
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1872
- }[];
1873
- overall: number;
1874
- knownContracts: string[];
1875
- thresholdUsed: number;
1876
- }>;
1877
- sourceAccount: z.ZodString;
1878
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1879
- network: z.ZodEnum<["mainnet", "testnet"]>;
1880
- signers: z.ZodArray<z.ZodString, "many">;
1881
- invocations: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
1882
- tokenMovements: z.ZodArray<z.ZodObject<{
1883
- token: z.ZodString;
1884
- from: z.ZodString;
1885
- to: z.ZodString;
1886
- amount: z.ZodString;
1887
- }, "strip", z.ZodTypeAny, {
1888
- amount: string;
1889
- token: string;
1890
- from: string;
1891
- to: string;
1892
- }, {
1893
- amount: string;
1894
- token: string;
1895
- from: string;
1896
- to: string;
1897
- }>, "many">;
1898
- events: z.ZodArray<z.ZodObject<{
1899
- contract: z.ZodString;
1900
- topics: z.ZodArray<z.ZodString, "many">;
1901
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1902
- }, "strip", z.ZodTypeAny, {
1903
- contract: string;
1904
- topics: string[];
1905
- data?: unknown;
1906
- }, {
1907
- contract: string;
1908
- topics: string[];
1909
- data?: unknown;
1910
- }>, "many">;
1911
- authEntries: z.ZodArray<z.ZodUnknown, "many">;
1912
- ledgerSequence: z.ZodNumber;
1913
- fetchedAt: z.ZodNumber;
1914
- parseConfidence: z.ZodObject<{
1915
- overall: z.ZodNumber;
1916
- knownContracts: z.ZodArray<z.ZodString, "many">;
1917
- unknownContracts: z.ZodArray<z.ZodObject<{
1918
- contract: z.ZodString;
1919
- reason: z.ZodEnum<["no-abi", "version-mismatch", "opaque-result"]>;
1920
- }, "strip", z.ZodTypeAny, {
1921
- contract: string;
1922
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1923
- }, {
1924
- contract: string;
1925
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1926
- }>, "many">;
1927
- opaqueScVals: z.ZodArray<z.ZodObject<{
1928
- path: z.ZodString;
1929
- type: z.ZodString;
1930
- }, "strip", z.ZodTypeAny, {
1931
- type: string;
1932
- path: string;
1933
- }, {
1934
- type: string;
1935
- path: string;
1936
- }>, "many">;
1937
- thresholdUsed: z.ZodNumber;
1938
- }, "strip", z.ZodTypeAny, {
1939
- opaqueScVals: {
1940
- type: string;
1941
- path: string;
1942
- }[];
1943
- unknownContracts: {
1944
- contract: string;
1945
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1946
- }[];
1947
- overall: number;
1948
- knownContracts: string[];
1949
- thresholdUsed: number;
1950
- }, {
1951
- opaqueScVals: {
1952
- type: string;
1953
- path: string;
1954
- }[];
1955
- unknownContracts: {
1956
- contract: string;
1957
- reason: "no-abi" | "version-mismatch" | "opaque-result";
1958
- }[];
1959
- overall: number;
1960
- knownContracts: string[];
1961
- thresholdUsed: number;
1962
- }>;
1963
- sourceAccount: z.ZodString;
1964
- }, z.ZodTypeAny, "passthrough">>;
1965
- network: z.ZodEnum<["mainnet", "testnet"]>;
1966
- userResponses: z.ZodOptional<z.ZodObject<{
1967
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1968
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1969
- limitAmount: z.ZodOptional<z.ZodString>;
1970
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1971
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1972
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1973
- asset: z.ZodEffects<z.ZodString, string, string>;
1974
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1975
- value: z.ZodString;
1976
- decimals: z.ZodNumber;
1977
- }, "strip", z.ZodTypeAny, {
1978
- value: string;
1979
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1980
- asset: string;
1981
- decimals: number;
1982
- }, {
1983
- value: string;
1984
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
1985
- asset: string;
1986
- decimals: number;
1987
- }>, "many">>;
1988
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1989
- windowSeconds: z.ZodOptional<z.ZodNumber>;
1990
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
1991
- limitAmount: z.ZodOptional<z.ZodString>;
1992
- invocationLimit: z.ZodOptional<z.ZodNumber>;
1993
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1994
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
1995
- asset: z.ZodEffects<z.ZodString, string, string>;
1996
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
1997
- value: z.ZodString;
1998
- decimals: z.ZodNumber;
1999
- }, "strip", z.ZodTypeAny, {
2000
- value: string;
2001
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2002
- asset: string;
2003
- decimals: number;
2004
- }, {
2005
- value: string;
2006
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2007
- asset: string;
2008
- decimals: number;
2009
- }>, "many">>;
2010
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2011
- windowSeconds: z.ZodOptional<z.ZodNumber>;
2012
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
2013
- limitAmount: z.ZodOptional<z.ZodString>;
2014
- invocationLimit: z.ZodOptional<z.ZodNumber>;
2015
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
2016
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
2017
- asset: z.ZodEffects<z.ZodString, string, string>;
2018
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
2019
- value: z.ZodString;
2020
- decimals: z.ZodNumber;
2021
- }, "strip", z.ZodTypeAny, {
2022
- value: string;
2023
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2024
- asset: string;
2025
- decimals: number;
2026
- }, {
2027
- value: string;
2028
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2029
- asset: string;
2030
- decimals: number;
2031
- }>, "many">>;
2032
- }, z.ZodTypeAny, "passthrough">>>;
2033
- confidenceOverride: z.ZodOptional<z.ZodObject<{
2034
- threshold: z.ZodNumber;
2035
- }, "strip", z.ZodTypeAny, {
2036
- threshold: number;
2037
- }, {
2038
- threshold: number;
2039
- }>>;
2040
- interpreter: z.ZodOptional<z.ZodObject<{
2041
- smartAccountAddress: z.ZodString;
2042
- installNonce: z.ZodOptional<z.ZodNumber>;
2043
- oracleParams: z.ZodOptional<z.ZodObject<{
2044
- maxStalenessSeconds: z.ZodOptional<z.ZodNumber>;
2045
- maxDeviationBps: z.ZodOptional<z.ZodNumber>;
2046
- }, "strip", z.ZodTypeAny, {
2047
- maxStalenessSeconds?: number | undefined;
2048
- maxDeviationBps?: number | undefined;
2049
- }, {
2050
- maxStalenessSeconds?: number | undefined;
2051
- maxDeviationBps?: number | undefined;
2052
- }>>;
2053
- }, "strip", z.ZodTypeAny, {
2054
- smartAccountAddress: string;
2055
- oracleParams?: {
2056
- maxStalenessSeconds?: number | undefined;
2057
- maxDeviationBps?: number | undefined;
2058
- } | undefined;
2059
- installNonce?: number | undefined;
2060
- }, {
2061
- smartAccountAddress: string;
2062
- oracleParams?: {
2063
- maxStalenessSeconds?: number | undefined;
2064
- maxDeviationBps?: number | undefined;
2065
- } | undefined;
2066
- installNonce?: number | undefined;
2067
- }>>;
2068
- ozConfig: z.ZodOptional<z.ZodObject<{
2069
- network: z.ZodEnum<["mainnet", "testnet"]>;
2070
- instances: z.ZodObject<{
2071
- spending_limit: z.ZodString;
2072
- simple_threshold: z.ZodString;
2073
- weighted_threshold: z.ZodString;
2074
- }, "strip", z.ZodTypeAny, {
2075
- spending_limit: string;
2076
- simple_threshold: string;
2077
- weighted_threshold: string;
2078
- }, {
2079
- spending_limit: string;
2080
- simple_threshold: string;
2081
- weighted_threshold: string;
2082
- }>;
2083
- }, "strip", z.ZodTypeAny, {
2084
- network: "mainnet" | "testnet";
2085
- instances: {
2086
- spending_limit: string;
2087
- simple_threshold: string;
2088
- weighted_threshold: string;
2089
- };
2090
- }, {
2091
- network: "mainnet" | "testnet";
2092
- instances: {
2093
- spending_limit: string;
2094
- simple_threshold: string;
2095
- weighted_threshold: string;
2096
- };
2097
- }>>;
2098
- explain: z.ZodOptional<z.ZodBoolean>;
2099
- }, "strip", z.ZodTypeAny, {
2100
- network: "mainnet" | "testnet";
2101
- source: "recording";
2102
- recordedTx: {
2103
- signers: string[];
2104
- events: {
2105
- contract: string;
2106
- topics: string[];
2107
- data?: unknown;
2108
- }[];
2109
- sourceAccount: string;
2110
- network: "mainnet" | "testnet";
2111
- invocations: unknown[];
2112
- tokenMovements: {
2113
- amount: string;
2114
- token: string;
2115
- from: string;
2116
- to: string;
2117
- }[];
2118
- authEntries: unknown[];
2119
- ledgerSequence: number;
2120
- fetchedAt: number;
2121
- parseConfidence: {
2122
- opaqueScVals: {
2123
- type: string;
2124
- path: string;
2125
- }[];
2126
- unknownContracts: {
2127
- contract: string;
2128
- reason: "no-abi" | "version-mismatch" | "opaque-result";
2129
- }[];
2130
- overall: number;
2131
- knownContracts: string[];
2132
- thresholdUsed: number;
2133
- };
2134
- } & {
2135
- [k: string]: unknown;
2136
- };
2137
- interpreter?: {
2138
- smartAccountAddress: string;
2139
- oracleParams?: {
2140
- maxStalenessSeconds?: number | undefined;
2141
- maxDeviationBps?: number | undefined;
2142
- } | undefined;
2143
- installNonce?: number | undefined;
747
+ userResponses?: {
748
+ limitAmount?: string | undefined;
749
+ validUntilLedger?: number | undefined;
750
+ swapRecipientAllowlist?: string[] | undefined;
2144
751
  } | undefined;
2145
- userResponses?: z.objectOutputType<{
2146
- windowSeconds: z.ZodOptional<z.ZodNumber>;
2147
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
2148
- limitAmount: z.ZodOptional<z.ZodString>;
2149
- invocationLimit: z.ZodOptional<z.ZodNumber>;
2150
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
2151
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
2152
- asset: z.ZodEffects<z.ZodString, string, string>;
2153
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
2154
- value: z.ZodString;
2155
- decimals: z.ZodNumber;
2156
- }, "strip", z.ZodTypeAny, {
2157
- value: string;
2158
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2159
- asset: string;
2160
- decimals: number;
2161
- }, {
2162
- value: string;
2163
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2164
- asset: string;
2165
- decimals: number;
2166
- }>, "many">>;
2167
- }, z.ZodTypeAny, "passthrough"> | undefined;
2168
752
  confidenceOverride?: {
2169
753
  threshold: number;
2170
754
  } | undefined;
2171
- ozConfig?: {
2172
- network: "mainnet" | "testnet";
2173
- instances: {
2174
- spending_limit: string;
2175
- simple_threshold: string;
2176
- weighted_threshold: string;
2177
- };
2178
- } | undefined;
2179
755
  explain?: boolean | undefined;
2180
756
  }, {
2181
757
  network: "mainnet" | "testnet";
@@ -2191,10 +767,10 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
2191
767
  network: "mainnet" | "testnet";
2192
768
  invocations: unknown[];
2193
769
  tokenMovements: {
2194
- amount: string;
2195
- token: string;
2196
770
  from: string;
2197
771
  to: string;
772
+ amount: string;
773
+ token: string;
2198
774
  }[];
2199
775
  authEntries: unknown[];
2200
776
  ledgerSequence: number;
@@ -2217,48 +793,18 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
2217
793
  };
2218
794
  interpreter?: {
2219
795
  smartAccountAddress: string;
2220
- oracleParams?: {
2221
- maxStalenessSeconds?: number | undefined;
2222
- maxDeviationBps?: number | undefined;
2223
- } | undefined;
2224
796
  installNonce?: number | undefined;
2225
797
  } | undefined;
2226
- userResponses?: z.objectInputType<{
2227
- windowSeconds: z.ZodOptional<z.ZodNumber>;
2228
- validUntilLedger: z.ZodOptional<z.ZodNumber>;
2229
- limitAmount: z.ZodOptional<z.ZodString>;
2230
- invocationLimit: z.ZodOptional<z.ZodNumber>;
2231
- swapRecipientAllowlist: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
2232
- oraclePriceBound: z.ZodOptional<z.ZodArray<z.ZodObject<{
2233
- asset: z.ZodEffects<z.ZodString, string, string>;
2234
- operator: z.ZodEnum<["eq", "lt", "lte", "gt", "gte"]>;
2235
- value: z.ZodString;
2236
- decimals: z.ZodNumber;
2237
- }, "strip", z.ZodTypeAny, {
2238
- value: string;
2239
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2240
- asset: string;
2241
- decimals: number;
2242
- }, {
2243
- value: string;
2244
- operator: "eq" | "lt" | "lte" | "gt" | "gte";
2245
- asset: string;
2246
- decimals: number;
2247
- }>, "many">>;
2248
- }, z.ZodTypeAny, "passthrough"> | undefined;
798
+ userResponses?: {
799
+ limitAmount?: string | undefined;
800
+ validUntilLedger?: number | undefined;
801
+ swapRecipientAllowlist?: string[] | undefined;
802
+ } | undefined;
2249
803
  confidenceOverride?: {
2250
804
  threshold: number;
2251
805
  } | undefined;
2252
- ozConfig?: {
2253
- network: "mainnet" | "testnet";
2254
- instances: {
2255
- spending_limit: string;
2256
- simple_threshold: string;
2257
- weighted_threshold: string;
2258
- };
2259
- } | undefined;
2260
806
  explain?: boolean | undefined;
2261
- }>]>;
807
+ }>;
2262
808
  export type SynthesizePolicyInput = z.infer<typeof SynthesizePolicyInputSchema>;
2263
809
  /** PredicateLeaf mirrors the core `PredicateLeaf` union. Every variant
2264
810
  * is a `kind` discriminator; literals carry their primitive value inline.
@@ -2266,29 +812,10 @@ export type SynthesizePolicyInput = z.infer<typeof SynthesizePolicyInputSchema>;
2266
812
  * themselves nest) so the leaf schema is lazily self-referential. */
2267
813
  export declare const PredicateLeafSchema: z.ZodType<unknown>;
2268
814
  /** PredicateNode mirrors the core `PredicateNode` union. Recursive through
2269
- * `and`/`or`/`not`; the lazy + annotation pattern keeps the recursion
2270
- * type-safe. */
815
+ * `and`; the lazy + annotation pattern keeps the recursion type-safe. */
2271
816
  export declare const PredicateNodeSchema: z.ZodType<unknown>;
2272
- /** Oracle price fixture - mirror of the entry type in `SimulateOptions` /
2273
- * `VerifyOptions`. Discriminated by presence of `error` vs `price`. */
2274
- export declare const OraclePriceFixtureSchema: z.ZodUnion<[z.ZodObject<{
2275
- price: z.ZodString;
2276
- timestampSeconds: z.ZodNumber;
2277
- }, "strip", z.ZodTypeAny, {
2278
- price: string;
2279
- timestampSeconds: number;
2280
- }, {
2281
- price: string;
2282
- timestampSeconds: number;
2283
- }>, z.ZodObject<{
2284
- error: z.ZodEnum<["stale", "missing", "deviation", "paused", "decimals", "fingerprint"]>;
2285
- }, "strip", z.ZodTypeAny, {
2286
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2287
- }, {
2288
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2289
- }>]>;
2290
817
  export declare const SimulatePolicyInputSchema: z.ZodObject<{
2291
- predicate: z.ZodNullable<z.ZodType<unknown, z.ZodTypeDef, unknown>>;
818
+ predicate: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2292
819
  permitTx: z.ZodObject<{
2293
820
  network: z.ZodEnum<["mainnet", "testnet"]>;
2294
821
  signers: z.ZodArray<z.ZodString, "many">;
@@ -2299,15 +826,15 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2299
826
  to: z.ZodString;
2300
827
  amount: z.ZodString;
2301
828
  }, "strip", z.ZodTypeAny, {
2302
- amount: string;
2303
- token: string;
2304
829
  from: string;
2305
830
  to: string;
2306
- }, {
2307
831
  amount: string;
2308
832
  token: string;
833
+ }, {
2309
834
  from: string;
2310
835
  to: string;
836
+ amount: string;
837
+ token: string;
2311
838
  }>, "many">;
2312
839
  events: z.ZodArray<z.ZodObject<{
2313
840
  contract: z.ZodString;
@@ -2385,15 +912,15 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2385
912
  to: z.ZodString;
2386
913
  amount: z.ZodString;
2387
914
  }, "strip", z.ZodTypeAny, {
2388
- amount: string;
2389
- token: string;
2390
915
  from: string;
2391
916
  to: string;
2392
- }, {
2393
917
  amount: string;
2394
918
  token: string;
919
+ }, {
2395
920
  from: string;
2396
921
  to: string;
922
+ amount: string;
923
+ token: string;
2397
924
  }>, "many">;
2398
925
  events: z.ZodArray<z.ZodObject<{
2399
926
  contract: z.ZodString;
@@ -2471,15 +998,15 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2471
998
  to: z.ZodString;
2472
999
  amount: z.ZodString;
2473
1000
  }, "strip", z.ZodTypeAny, {
2474
- amount: string;
2475
- token: string;
2476
1001
  from: string;
2477
1002
  to: string;
2478
- }, {
2479
1003
  amount: string;
2480
1004
  token: string;
1005
+ }, {
2481
1006
  from: string;
2482
1007
  to: string;
1008
+ amount: string;
1009
+ token: string;
2483
1010
  }>, "many">;
2484
1011
  events: z.ZodArray<z.ZodObject<{
2485
1012
  contract: z.ZodString;
@@ -2549,22 +1076,6 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2549
1076
  sourceAccount: z.ZodString;
2550
1077
  }, z.ZodTypeAny, "passthrough">>;
2551
1078
  validUntilLedger: z.ZodOptional<z.ZodNumber>;
2552
- oraclePricesByAsset: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
2553
- price: z.ZodString;
2554
- timestampSeconds: z.ZodNumber;
2555
- }, "strip", z.ZodTypeAny, {
2556
- price: string;
2557
- timestampSeconds: number;
2558
- }, {
2559
- price: string;
2560
- timestampSeconds: number;
2561
- }>, z.ZodObject<{
2562
- error: z.ZodEnum<["stale", "missing", "deviation", "paused", "decimals", "fingerprint"]>;
2563
- }, "strip", z.ZodTypeAny, {
2564
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2565
- }, {
2566
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2567
- }>]>>>;
2568
1079
  }, "strip", z.ZodTypeAny, {
2569
1080
  permitTx: {
2570
1081
  signers: string[];
@@ -2577,10 +1088,10 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2577
1088
  network: "mainnet" | "testnet";
2578
1089
  invocations: unknown[];
2579
1090
  tokenMovements: {
2580
- amount: string;
2581
- token: string;
2582
1091
  from: string;
2583
1092
  to: string;
1093
+ amount: string;
1094
+ token: string;
2584
1095
  }[];
2585
1096
  authEntries: unknown[];
2586
1097
  ledgerSequence: number;
@@ -2603,12 +1114,6 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2603
1114
  };
2604
1115
  validUntilLedger?: number | undefined;
2605
1116
  predicate?: unknown;
2606
- oraclePricesByAsset?: Record<string, {
2607
- price: string;
2608
- timestampSeconds: number;
2609
- } | {
2610
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2611
- }> | undefined;
2612
1117
  }, {
2613
1118
  permitTx: {
2614
1119
  signers: string[];
@@ -2621,10 +1126,10 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2621
1126
  network: "mainnet" | "testnet";
2622
1127
  invocations: unknown[];
2623
1128
  tokenMovements: {
2624
- amount: string;
2625
- token: string;
2626
1129
  from: string;
2627
1130
  to: string;
1131
+ amount: string;
1132
+ token: string;
2628
1133
  }[];
2629
1134
  authEntries: unknown[];
2630
1135
  ledgerSequence: number;
@@ -2647,12 +1152,6 @@ export declare const SimulatePolicyInputSchema: z.ZodObject<{
2647
1152
  };
2648
1153
  validUntilLedger?: number | undefined;
2649
1154
  predicate?: unknown;
2650
- oraclePricesByAsset?: Record<string, {
2651
- price: string;
2652
- timestampSeconds: number;
2653
- } | {
2654
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2655
- }> | undefined;
2656
1155
  }>;
2657
1156
  export type SimulatePolicyInput = z.infer<typeof SimulatePolicyInputSchema>;
2658
1157
  export declare const VerifyPolicyInputSchema: z.ZodObject<{
@@ -2667,15 +1166,15 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2667
1166
  to: z.ZodString;
2668
1167
  amount: z.ZodString;
2669
1168
  }, "strip", z.ZodTypeAny, {
2670
- amount: string;
2671
- token: string;
2672
1169
  from: string;
2673
1170
  to: string;
2674
- }, {
2675
1171
  amount: string;
2676
1172
  token: string;
1173
+ }, {
2677
1174
  from: string;
2678
1175
  to: string;
1176
+ amount: string;
1177
+ token: string;
2679
1178
  }>, "many">;
2680
1179
  events: z.ZodArray<z.ZodObject<{
2681
1180
  contract: z.ZodString;
@@ -2753,15 +1252,15 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2753
1252
  to: z.ZodString;
2754
1253
  amount: z.ZodString;
2755
1254
  }, "strip", z.ZodTypeAny, {
2756
- amount: string;
2757
- token: string;
2758
1255
  from: string;
2759
1256
  to: string;
2760
- }, {
2761
1257
  amount: string;
2762
1258
  token: string;
1259
+ }, {
2763
1260
  from: string;
2764
1261
  to: string;
1262
+ amount: string;
1263
+ token: string;
2765
1264
  }>, "many">;
2766
1265
  events: z.ZodArray<z.ZodObject<{
2767
1266
  contract: z.ZodString;
@@ -2839,15 +1338,15 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2839
1338
  to: z.ZodString;
2840
1339
  amount: z.ZodString;
2841
1340
  }, "strip", z.ZodTypeAny, {
2842
- amount: string;
2843
- token: string;
2844
1341
  from: string;
2845
1342
  to: string;
2846
- }, {
2847
1343
  amount: string;
2848
1344
  token: string;
1345
+ }, {
2849
1346
  from: string;
2850
1347
  to: string;
1348
+ amount: string;
1349
+ token: string;
2851
1350
  }>, "many">;
2852
1351
  events: z.ZodArray<z.ZodObject<{
2853
1352
  contract: z.ZodString;
@@ -2917,22 +1416,6 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2917
1416
  sourceAccount: z.ZodString;
2918
1417
  }, z.ZodTypeAny, "passthrough">>;
2919
1418
  validUntilLedger: z.ZodOptional<z.ZodNumber>;
2920
- oraclePricesByAsset: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
2921
- price: z.ZodString;
2922
- timestampSeconds: z.ZodNumber;
2923
- }, "strip", z.ZodTypeAny, {
2924
- price: string;
2925
- timestampSeconds: number;
2926
- }, {
2927
- price: string;
2928
- timestampSeconds: number;
2929
- }>, z.ZodObject<{
2930
- error: z.ZodEnum<["stale", "missing", "deviation", "paused", "decimals", "fingerprint"]>;
2931
- }, "strip", z.ZodTypeAny, {
2932
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2933
- }, {
2934
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2935
- }>]>>>;
2936
1419
  }, "strip", z.ZodTypeAny, {
2937
1420
  permitTx: {
2938
1421
  signers: string[];
@@ -2945,10 +1428,10 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2945
1428
  network: "mainnet" | "testnet";
2946
1429
  invocations: unknown[];
2947
1430
  tokenMovements: {
2948
- amount: string;
2949
- token: string;
2950
1431
  from: string;
2951
1432
  to: string;
1433
+ amount: string;
1434
+ token: string;
2952
1435
  }[];
2953
1436
  authEntries: unknown[];
2954
1437
  ledgerSequence: number;
@@ -2971,12 +1454,6 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2971
1454
  };
2972
1455
  validUntilLedger?: number | undefined;
2973
1456
  predicate?: unknown;
2974
- oraclePricesByAsset?: Record<string, {
2975
- price: string;
2976
- timestampSeconds: number;
2977
- } | {
2978
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
2979
- }> | undefined;
2980
1457
  }, {
2981
1458
  permitTx: {
2982
1459
  signers: string[];
@@ -2989,10 +1466,10 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
2989
1466
  network: "mainnet" | "testnet";
2990
1467
  invocations: unknown[];
2991
1468
  tokenMovements: {
2992
- amount: string;
2993
- token: string;
2994
1469
  from: string;
2995
1470
  to: string;
1471
+ amount: string;
1472
+ token: string;
2996
1473
  }[];
2997
1474
  authEntries: unknown[];
2998
1475
  ledgerSequence: number;
@@ -3015,37 +1492,27 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
3015
1492
  };
3016
1493
  validUntilLedger?: number | undefined;
3017
1494
  predicate?: unknown;
3018
- oraclePricesByAsset?: Record<string, {
3019
- price: string;
3020
- timestampSeconds: number;
3021
- } | {
3022
- error: "stale" | "missing" | "deviation" | "paused" | "decimals" | "fingerprint";
3023
- }> | undefined;
3024
1495
  }>;
3025
1496
  export type VerifyPolicyInput = z.infer<typeof VerifyPolicyInputSchema>;
3026
1497
  /** Pinned interpreter address (testnet).
3027
1498
  * Single source for the MCP layer; do not embed elsewhere. */
3028
- export declare const PINNED_INTERPRETER_TESTNET_ADDRESS = "CALHNU4LXZRKFAXYRBODTGDANTNXHJPBTJNYGLUWLIFIP24NWSGWIE4K";
3029
- /** Pinned interpreter address (mainnet), deployed 2026-08-04.
3030
- * UNAUDITED at the time of writing. */
3031
- export declare const PINNED_INTERPRETER_MAINNET_ADDRESS = "CALZAMUPREIRY4TULBEXIK77AUTOEJG63XLCPUWEHHQDOVK6ZVVS7VQ2";
3032
- /** Pinned interpreter wasm sha256 (hex), mainnet.
1499
+ export declare const PINNED_INTERPRETER_TESTNET_ADDRESS = "CCL336TCK2Y5OFNRCMN2M3HVPBCEX4PW5H6EQ5VW5NPMXOCP4ESB5XR4";
1500
+ /** Pinned interpreter address (mainnet), redeployed 2026-08-22 from a reproducible build. The mainnet
1501
+ * interpreter IS the binary exercised on testnet - both instances were created
1502
+ * from the same uploaded wasm hash (see PINNED_INTERPRETER_WASM_SHA256), and
1503
+ * both were read back with `grammar_version()` returning 3. The address differs
1504
+ * because instance ids are network-scoped. UNAUDITED at the time of writing.
3033
1505
  *
3034
- * The two networks no longer run the same binary. Testnet carries the
3035
- * selector-leaf minimum and the signer-set cap; mainnet predates both. Read
3036
- * the hash through `PINNED_INTERPRETER_WASM_SHA256_BY_NETWORK` rather than
3037
- * this constant unless mainnet is specifically what is meant, or
3038
- * `get_interpreter_info` will report a hash the queried network does not
3039
- * run. */
3040
- export declare const PINNED_INTERPRETER_WASM_SHA256 = "6e6c13d93e197aa380303a42cd120f5ddb080dd36ef2a343ee1dbd04ca52a443";
3041
- /** Pinned interpreter wasm sha256 (hex), testnet. Byte-identical to the
3042
- * artifact built from `contracts/policy-interpreter` at the commit that
3043
- * introduced errors 216 and 217, verified by fetching the deployed wasm back
3044
- * off chain. */
3045
- export declare const PINNED_INTERPRETER_WASM_SHA256_TESTNET = "a4d58bc88fd82bbb8e223941ba5889db919717fae92ced13f6f55bfe583b8e22";
1506
+ * These four constants move together or not at all. The grammar version and
1507
+ * wasm hash are single values covering BOTH networks, so re-pinning one network
1508
+ * alone would have the builder emit a version the other network refuses - with
1509
+ * a green test run, since `grammar-version-parity.test.ts` would then pass. */
1510
+ export declare const PINNED_INTERPRETER_MAINNET_ADDRESS = "CBZXLSTQUITBFZHQH6XRXF3XIVRQR4RHRI64Q5WELS5KGY3ZKJPFWDPF";
1511
+ /** Pinned interpreter wasm sha256 (hex). */
1512
+ export declare const PINNED_INTERPRETER_WASM_SHA256 = "a2b36e8ac5a61caf3757af26aa79e83f2995b451099f44772383806a55fe3414";
3046
1513
  /** The grammar version the interpreter enforces (matches SELF_VERSION in
3047
1514
  * contracts/policy-interpreter/src/version.rs). */
3048
- export declare const PINNED_INTERPRETER_GRAMMAR_VERSION = 1;
1515
+ export declare const PINNED_INTERPRETER_GRAMMAR_VERSION = 3;
3049
1516
  /** Default Soroban RPC for the install / revoke / info tools. The recorder
3050
1517
  * keeps its own copy in record/rpc.ts because it hands back a fetcher rather
3051
1518
  * than a Server; the two are deliberately different surfaces, so this is
@@ -3056,16 +1523,12 @@ export declare const TESTNET_RPC_URL = "https://soroban-testnet.stellar.org";
3056
1523
  * RPC rather than always testnet. Public mainnet endpoint, the same one
3057
1524
  * the deploy script hit during the 2026-08-04 mainnet rollout. */
3058
1525
  export declare const MAINNET_RPC_URL = "https://mainnet.sorobanrpc.com";
3059
- /** Pin + RPC lookup for the gate enforcement. Addresses, RPCs and wasm
3060
- * hashes are all network-scoped: the networks diverged when the
3061
- * selector-leaf and signer-cap controls were deployed to testnet ahead of
3062
- * mainnet. */
1526
+ /** Pin + RPC lookup for the gate enforcement. The interpreters' wasm sha256
1527
+ * is identical across both networks (the same binary was uploaded both
1528
+ * places), so `PINNED_INTERPRETER_WASM_SHA256` stays
1529
+ * a single constant - only the addresses and RPCs are network-scoped. */
3063
1530
  export declare const PINNED_INTERPRETER_ADDRESS_BY_NETWORK: Record<Network, string>;
3064
- export declare const PINNED_INTERPRETER_WASM_SHA256_BY_NETWORK: Record<Network, string>;
3065
1531
  export declare const RPC_URL_BY_NETWORK: Record<Network, string>;
3066
- /** Soroban `valid_until` window (ledgers) added to the latest ledger when
3067
- * building the auth entry. ~25 minutes at 5s/ledger. */
3068
- export declare const DEFAULT_AUTH_VALID_UNTIL_LEDGERS = 300;
3069
1532
  /** Stellar network passphrases. Pinned here so the XDR envelope uses the
3070
1533
  * matching passphrase when the wallet signs (a mismatch yields invalid
3071
1534
  * hashes). */
@@ -3096,11 +1559,11 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3096
1559
  kind: z.ZodLiteral<"call_contract">;
3097
1560
  contract: z.ZodString;
3098
1561
  }, "strip", z.ZodTypeAny, {
3099
- contract: string;
3100
1562
  kind: "call_contract";
3101
- }, {
3102
1563
  contract: string;
1564
+ }, {
3103
1565
  kind: "call_contract";
1566
+ contract: string;
3104
1567
  }>, z.ZodObject<{
3105
1568
  kind: z.ZodLiteral<"create_contract">;
3106
1569
  wasmHash: z.ZodString;
@@ -3135,7 +1598,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3135
1598
  verifier: string;
3136
1599
  keyBytes: string;
3137
1600
  }>]>, "many">;
3138
- policies: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1601
+ policies: z.ZodArray<z.ZodObject<{
3139
1602
  kind: z.ZodLiteral<"interpreter">;
3140
1603
  interpreterAddress: z.ZodString;
3141
1604
  predicateBlobBase64: z.ZodString;
@@ -3147,34 +1610,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3147
1610
  kind: "interpreter";
3148
1611
  interpreterAddress: string;
3149
1612
  predicateBlobBase64: string;
3150
- }>, z.ZodObject<{
3151
- kind: z.ZodLiteral<"oz_builtin">;
3152
- primitive: z.ZodObject<{
3153
- primitive: z.ZodEnum<["spending_limit", "simple_threshold", "weighted_threshold"]>;
3154
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3155
- }, "strip", z.ZodTypeAny, {
3156
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3157
- params: Record<string, unknown>;
3158
- }, {
3159
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3160
- params: Record<string, unknown>;
3161
- }>;
3162
- instanceAddress: z.ZodString;
3163
- }, "strip", z.ZodTypeAny, {
3164
- instanceAddress: string;
3165
- primitive: {
3166
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3167
- params: Record<string, unknown>;
3168
- };
3169
- kind: "oz_builtin";
3170
- }, {
3171
- instanceAddress: string;
3172
- primitive: {
3173
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3174
- params: Record<string, unknown>;
3175
- };
3176
- kind: "oz_builtin";
3177
- }>]>, "many">;
1613
+ }>, "many">;
3178
1614
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3179
1615
  contextRuleType: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3180
1616
  kind: z.ZodLiteral<"default">;
@@ -3186,11 +1622,11 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3186
1622
  kind: z.ZodLiteral<"call_contract">;
3187
1623
  contract: z.ZodString;
3188
1624
  }, "strip", z.ZodTypeAny, {
3189
- contract: string;
3190
1625
  kind: "call_contract";
3191
- }, {
3192
1626
  contract: string;
1627
+ }, {
3193
1628
  kind: "call_contract";
1629
+ contract: string;
3194
1630
  }>, z.ZodObject<{
3195
1631
  kind: z.ZodLiteral<"create_contract">;
3196
1632
  wasmHash: z.ZodString;
@@ -3225,7 +1661,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3225
1661
  verifier: string;
3226
1662
  keyBytes: string;
3227
1663
  }>]>, "many">;
3228
- policies: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1664
+ policies: z.ZodArray<z.ZodObject<{
3229
1665
  kind: z.ZodLiteral<"interpreter">;
3230
1666
  interpreterAddress: z.ZodString;
3231
1667
  predicateBlobBase64: z.ZodString;
@@ -3237,34 +1673,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3237
1673
  kind: "interpreter";
3238
1674
  interpreterAddress: string;
3239
1675
  predicateBlobBase64: string;
3240
- }>, z.ZodObject<{
3241
- kind: z.ZodLiteral<"oz_builtin">;
3242
- primitive: z.ZodObject<{
3243
- primitive: z.ZodEnum<["spending_limit", "simple_threshold", "weighted_threshold"]>;
3244
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3245
- }, "strip", z.ZodTypeAny, {
3246
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3247
- params: Record<string, unknown>;
3248
- }, {
3249
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3250
- params: Record<string, unknown>;
3251
- }>;
3252
- instanceAddress: z.ZodString;
3253
- }, "strip", z.ZodTypeAny, {
3254
- instanceAddress: string;
3255
- primitive: {
3256
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3257
- params: Record<string, unknown>;
3258
- };
3259
- kind: "oz_builtin";
3260
- }, {
3261
- instanceAddress: string;
3262
- primitive: {
3263
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3264
- params: Record<string, unknown>;
3265
- };
3266
- kind: "oz_builtin";
3267
- }>]>, "many">;
1676
+ }>, "many">;
3268
1677
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3269
1678
  contextRuleType: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3270
1679
  kind: z.ZodLiteral<"default">;
@@ -3276,11 +1685,11 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3276
1685
  kind: z.ZodLiteral<"call_contract">;
3277
1686
  contract: z.ZodString;
3278
1687
  }, "strip", z.ZodTypeAny, {
3279
- contract: string;
3280
1688
  kind: "call_contract";
3281
- }, {
3282
1689
  contract: string;
1690
+ }, {
3283
1691
  kind: "call_contract";
1692
+ contract: string;
3284
1693
  }>, z.ZodObject<{
3285
1694
  kind: z.ZodLiteral<"create_contract">;
3286
1695
  wasmHash: z.ZodString;
@@ -3315,7 +1724,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3315
1724
  verifier: string;
3316
1725
  keyBytes: string;
3317
1726
  }>]>, "many">;
3318
- policies: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1727
+ policies: z.ZodArray<z.ZodObject<{
3319
1728
  kind: z.ZodLiteral<"interpreter">;
3320
1729
  interpreterAddress: z.ZodString;
3321
1730
  predicateBlobBase64: z.ZodString;
@@ -3327,34 +1736,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3327
1736
  kind: "interpreter";
3328
1737
  interpreterAddress: string;
3329
1738
  predicateBlobBase64: string;
3330
- }>, z.ZodObject<{
3331
- kind: z.ZodLiteral<"oz_builtin">;
3332
- primitive: z.ZodObject<{
3333
- primitive: z.ZodEnum<["spending_limit", "simple_threshold", "weighted_threshold"]>;
3334
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3335
- }, "strip", z.ZodTypeAny, {
3336
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3337
- params: Record<string, unknown>;
3338
- }, {
3339
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3340
- params: Record<string, unknown>;
3341
- }>;
3342
- instanceAddress: z.ZodString;
3343
- }, "strip", z.ZodTypeAny, {
3344
- instanceAddress: string;
3345
- primitive: {
3346
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3347
- params: Record<string, unknown>;
3348
- };
3349
- kind: "oz_builtin";
3350
- }, {
3351
- instanceAddress: string;
3352
- primitive: {
3353
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3354
- params: Record<string, unknown>;
3355
- };
3356
- kind: "oz_builtin";
3357
- }>]>, "many">;
1739
+ }>, "many">;
3358
1740
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
3359
1741
  contextRuleType: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3360
1742
  kind: z.ZodLiteral<"default">;
@@ -3366,11 +1748,11 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3366
1748
  kind: z.ZodLiteral<"call_contract">;
3367
1749
  contract: z.ZodString;
3368
1750
  }, "strip", z.ZodTypeAny, {
3369
- contract: string;
3370
1751
  kind: "call_contract";
3371
- }, {
3372
1752
  contract: string;
1753
+ }, {
3373
1754
  kind: "call_contract";
1755
+ contract: string;
3374
1756
  }>, z.ZodObject<{
3375
1757
  kind: z.ZodLiteral<"create_contract">;
3376
1758
  wasmHash: z.ZodString;
@@ -3405,7 +1787,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3405
1787
  verifier: string;
3406
1788
  keyBytes: string;
3407
1789
  }>]>, "many">;
3408
- policies: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1790
+ policies: z.ZodArray<z.ZodObject<{
3409
1791
  kind: z.ZodLiteral<"interpreter">;
3410
1792
  interpreterAddress: z.ZodString;
3411
1793
  predicateBlobBase64: z.ZodString;
@@ -3417,34 +1799,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3417
1799
  kind: "interpreter";
3418
1800
  interpreterAddress: string;
3419
1801
  predicateBlobBase64: string;
3420
- }>, z.ZodObject<{
3421
- kind: z.ZodLiteral<"oz_builtin">;
3422
- primitive: z.ZodObject<{
3423
- primitive: z.ZodEnum<["spending_limit", "simple_threshold", "weighted_threshold"]>;
3424
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3425
- }, "strip", z.ZodTypeAny, {
3426
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3427
- params: Record<string, unknown>;
3428
- }, {
3429
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3430
- params: Record<string, unknown>;
3431
- }>;
3432
- instanceAddress: z.ZodString;
3433
- }, "strip", z.ZodTypeAny, {
3434
- instanceAddress: string;
3435
- primitive: {
3436
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3437
- params: Record<string, unknown>;
3438
- };
3439
- kind: "oz_builtin";
3440
- }, {
3441
- instanceAddress: string;
3442
- primitive: {
3443
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3444
- params: Record<string, unknown>;
3445
- };
3446
- kind: "oz_builtin";
3447
- }>]>, "many">;
1802
+ }>, "many">;
3448
1803
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3449
1804
  contextRuleType: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3450
1805
  kind: z.ZodLiteral<"default">;
@@ -3456,11 +1811,11 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3456
1811
  kind: z.ZodLiteral<"call_contract">;
3457
1812
  contract: z.ZodString;
3458
1813
  }, "strip", z.ZodTypeAny, {
3459
- contract: string;
3460
1814
  kind: "call_contract";
3461
- }, {
3462
1815
  contract: string;
1816
+ }, {
3463
1817
  kind: "call_contract";
1818
+ contract: string;
3464
1819
  }>, z.ZodObject<{
3465
1820
  kind: z.ZodLiteral<"create_contract">;
3466
1821
  wasmHash: z.ZodString;
@@ -3495,7 +1850,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3495
1850
  verifier: string;
3496
1851
  keyBytes: string;
3497
1852
  }>]>, "many">;
3498
- policies: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1853
+ policies: z.ZodArray<z.ZodObject<{
3499
1854
  kind: z.ZodLiteral<"interpreter">;
3500
1855
  interpreterAddress: z.ZodString;
3501
1856
  predicateBlobBase64: z.ZodString;
@@ -3507,34 +1862,7 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3507
1862
  kind: "interpreter";
3508
1863
  interpreterAddress: string;
3509
1864
  predicateBlobBase64: string;
3510
- }>, z.ZodObject<{
3511
- kind: z.ZodLiteral<"oz_builtin">;
3512
- primitive: z.ZodObject<{
3513
- primitive: z.ZodEnum<["spending_limit", "simple_threshold", "weighted_threshold"]>;
3514
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3515
- }, "strip", z.ZodTypeAny, {
3516
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3517
- params: Record<string, unknown>;
3518
- }, {
3519
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3520
- params: Record<string, unknown>;
3521
- }>;
3522
- instanceAddress: z.ZodString;
3523
- }, "strip", z.ZodTypeAny, {
3524
- instanceAddress: string;
3525
- primitive: {
3526
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3527
- params: Record<string, unknown>;
3528
- };
3529
- kind: "oz_builtin";
3530
- }, {
3531
- instanceAddress: string;
3532
- primitive: {
3533
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3534
- params: Record<string, unknown>;
3535
- };
3536
- kind: "oz_builtin";
3537
- }>]>, "many">;
1865
+ }>, "many">;
3538
1866
  }, z.ZodTypeAny, "passthrough">>;
3539
1867
  /** Per-rule install nonce; 1 for a fresh install. */
3540
1868
  installNonce: z.ZodNumber;
@@ -3555,34 +1883,13 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3555
1883
  * everything. Selecting `network: 'mainnet'` is NOT an opt-in -
3556
1884
  * the mainnet pin is its own deny-by-default anchor. */
3557
1885
  allowUnpinnedInterpreter: z.ZodOptional<z.ZodBoolean>;
3558
- /** Opt-in to installing when a signer of this rule can already reach the
3559
- * same calls through a context rule that has NO policy attached. OZ lets
3560
- * the signer choose which rule authorises a call and enforces only that
3561
- * rule's policies, so an unpoliced rule covering the same calls makes
3562
- * this policy decorative. Default-deny, because the caller almost
3563
- * certainly believes they are restricting something. */
3564
- allowAuthorityOverlap: z.ZodOptional<z.ZodBoolean>;
3565
- /** Skip the cross-rule authority scan entirely. The scan costs one RPC
3566
- * read per rule on the account; skipping it means the response carries
3567
- * no statement about what the signers can already do. */
3568
- skipAuthorityScan: z.ZodOptional<z.ZodBoolean>;
3569
1886
  /** Base fee in stroops; defaults to BASE_FEE (100). */
3570
1887
  baseFee: z.ZodOptional<z.ZodNumber>;
3571
1888
  }, "strip", z.ZodTypeAny, {
3572
- installNonce: number;
3573
1889
  smartAccount: string;
3574
1890
  sourceAccount: string;
1891
+ installNonce: number;
3575
1892
  rule: {
3576
- contextRuleType: {
3577
- kind: "default";
3578
- } | {
3579
- contract: string;
3580
- kind: "call_contract";
3581
- } | {
3582
- kind: "create_contract";
3583
- wasmHash: string;
3584
- };
3585
- validUntilLedger: number | null;
3586
1893
  signers: ({
3587
1894
  address: string;
3588
1895
  kind: "delegated";
@@ -3591,18 +1898,21 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3591
1898
  verifier: string;
3592
1899
  keyBytes: string;
3593
1900
  })[];
3594
- policies: ({
1901
+ validUntilLedger: number | null;
1902
+ contextRuleType: {
1903
+ kind: "default";
1904
+ } | {
1905
+ kind: "call_contract";
1906
+ contract: string;
1907
+ } | {
1908
+ kind: "create_contract";
1909
+ wasmHash: string;
1910
+ };
1911
+ policies: {
3595
1912
  kind: "interpreter";
3596
1913
  interpreterAddress: string;
3597
1914
  predicateBlobBase64: string;
3598
- } | {
3599
- instanceAddress: string;
3600
- primitive: {
3601
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3602
- params: Record<string, unknown>;
3603
- };
3604
- kind: "oz_builtin";
3605
- })[];
1915
+ }[];
3606
1916
  name: string;
3607
1917
  } & {
3608
1918
  [k: string]: unknown;
@@ -3611,24 +1921,12 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3611
1921
  rpcUrl?: string | undefined;
3612
1922
  allowUnpinnedRpcUrl?: boolean | undefined;
3613
1923
  allowUnpinnedInterpreter?: boolean | undefined;
3614
- allowAuthorityOverlap?: boolean | undefined;
3615
- skipAuthorityScan?: boolean | undefined;
3616
1924
  baseFee?: number | undefined;
3617
1925
  }, {
3618
- installNonce: number;
3619
1926
  smartAccount: string;
3620
1927
  sourceAccount: string;
1928
+ installNonce: number;
3621
1929
  rule: {
3622
- contextRuleType: {
3623
- kind: "default";
3624
- } | {
3625
- contract: string;
3626
- kind: "call_contract";
3627
- } | {
3628
- kind: "create_contract";
3629
- wasmHash: string;
3630
- };
3631
- validUntilLedger: number | null;
3632
1930
  signers: ({
3633
1931
  address: string;
3634
1932
  kind: "delegated";
@@ -3637,18 +1935,21 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3637
1935
  verifier: string;
3638
1936
  keyBytes: string;
3639
1937
  })[];
3640
- policies: ({
1938
+ validUntilLedger: number | null;
1939
+ contextRuleType: {
1940
+ kind: "default";
1941
+ } | {
1942
+ kind: "call_contract";
1943
+ contract: string;
1944
+ } | {
1945
+ kind: "create_contract";
1946
+ wasmHash: string;
1947
+ };
1948
+ policies: {
3641
1949
  kind: "interpreter";
3642
1950
  interpreterAddress: string;
3643
1951
  predicateBlobBase64: string;
3644
- } | {
3645
- instanceAddress: string;
3646
- primitive: {
3647
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3648
- params: Record<string, unknown>;
3649
- };
3650
- kind: "oz_builtin";
3651
- })[];
1952
+ }[];
3652
1953
  name: string;
3653
1954
  } & {
3654
1955
  [k: string]: unknown;
@@ -3657,24 +1958,12 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3657
1958
  rpcUrl?: string | undefined;
3658
1959
  allowUnpinnedRpcUrl?: boolean | undefined;
3659
1960
  allowUnpinnedInterpreter?: boolean | undefined;
3660
- allowAuthorityOverlap?: boolean | undefined;
3661
- skipAuthorityScan?: boolean | undefined;
3662
1961
  baseFee?: number | undefined;
3663
1962
  }>, {
3664
- installNonce: number;
3665
1963
  smartAccount: string;
3666
1964
  sourceAccount: string;
1965
+ installNonce: number;
3667
1966
  rule: {
3668
- contextRuleType: {
3669
- kind: "default";
3670
- } | {
3671
- contract: string;
3672
- kind: "call_contract";
3673
- } | {
3674
- kind: "create_contract";
3675
- wasmHash: string;
3676
- };
3677
- validUntilLedger: number | null;
3678
1967
  signers: ({
3679
1968
  address: string;
3680
1969
  kind: "delegated";
@@ -3683,18 +1972,21 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3683
1972
  verifier: string;
3684
1973
  keyBytes: string;
3685
1974
  })[];
3686
- policies: ({
1975
+ validUntilLedger: number | null;
1976
+ contextRuleType: {
1977
+ kind: "default";
1978
+ } | {
1979
+ kind: "call_contract";
1980
+ contract: string;
1981
+ } | {
1982
+ kind: "create_contract";
1983
+ wasmHash: string;
1984
+ };
1985
+ policies: {
3687
1986
  kind: "interpreter";
3688
1987
  interpreterAddress: string;
3689
1988
  predicateBlobBase64: string;
3690
- } | {
3691
- instanceAddress: string;
3692
- primitive: {
3693
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3694
- params: Record<string, unknown>;
3695
- };
3696
- kind: "oz_builtin";
3697
- })[];
1989
+ }[];
3698
1990
  name: string;
3699
1991
  } & {
3700
1992
  [k: string]: unknown;
@@ -3703,24 +1995,12 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3703
1995
  rpcUrl?: string | undefined;
3704
1996
  allowUnpinnedRpcUrl?: boolean | undefined;
3705
1997
  allowUnpinnedInterpreter?: boolean | undefined;
3706
- allowAuthorityOverlap?: boolean | undefined;
3707
- skipAuthorityScan?: boolean | undefined;
3708
1998
  baseFee?: number | undefined;
3709
1999
  }, {
3710
- installNonce: number;
3711
2000
  smartAccount: string;
3712
2001
  sourceAccount: string;
2002
+ installNonce: number;
3713
2003
  rule: {
3714
- contextRuleType: {
3715
- kind: "default";
3716
- } | {
3717
- contract: string;
3718
- kind: "call_contract";
3719
- } | {
3720
- kind: "create_contract";
3721
- wasmHash: string;
3722
- };
3723
- validUntilLedger: number | null;
3724
2004
  signers: ({
3725
2005
  address: string;
3726
2006
  kind: "delegated";
@@ -3729,18 +2009,21 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3729
2009
  verifier: string;
3730
2010
  keyBytes: string;
3731
2011
  })[];
3732
- policies: ({
2012
+ validUntilLedger: number | null;
2013
+ contextRuleType: {
2014
+ kind: "default";
2015
+ } | {
2016
+ kind: "call_contract";
2017
+ contract: string;
2018
+ } | {
2019
+ kind: "create_contract";
2020
+ wasmHash: string;
2021
+ };
2022
+ policies: {
3733
2023
  kind: "interpreter";
3734
2024
  interpreterAddress: string;
3735
2025
  predicateBlobBase64: string;
3736
- } | {
3737
- instanceAddress: string;
3738
- primitive: {
3739
- primitive: "spending_limit" | "simple_threshold" | "weighted_threshold";
3740
- params: Record<string, unknown>;
3741
- };
3742
- kind: "oz_builtin";
3743
- })[];
2026
+ }[];
3744
2027
  name: string;
3745
2028
  } & {
3746
2029
  [k: string]: unknown;
@@ -3749,53 +2032,9 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
3749
2032
  rpcUrl?: string | undefined;
3750
2033
  allowUnpinnedRpcUrl?: boolean | undefined;
3751
2034
  allowUnpinnedInterpreter?: boolean | undefined;
3752
- allowAuthorityOverlap?: boolean | undefined;
3753
- skipAuthorityScan?: boolean | undefined;
3754
2035
  baseFee?: number | undefined;
3755
2036
  }>;
3756
2037
  export type InstallPolicyInput = z.infer<typeof InstallPolicyInputSchema>;
3757
- /** `merge_policy` input.
3758
- *
3759
- * The tightening remedy for a cross-rule overlap: replace a rule's predicate
3760
- * with the conjunction of it and a new one. Two transactions, in order,
3761
- * because OZ refuses to re-attach a policy already on the rule - so the
3762
- * caller runs `detach`, waits for it to confirm, then runs `reinstall`. */
3763
- export declare const MergePolicyInputSchema: z.ZodObject<{
3764
- smartAccount: z.ZodString;
3765
- sourceAccount: z.ZodString;
3766
- /** The rule whose predicate is being tightened. */
3767
- ruleId: z.ZodNumber;
3768
- /** The predicate to conjoin, base64 canonical ScVal, as emitted by
3769
- * `synthesize_policy`. */
3770
- incomingPredicateBlobBase64: z.ZodString;
3771
- /** Which half of the remedy to build. */
3772
- step: z.ZodEnum<["detach", "reinstall"]>;
3773
- network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
3774
- rpcUrl: z.ZodOptional<z.ZodString>;
3775
- allowUnpinnedRpcUrl: z.ZodOptional<z.ZodBoolean>;
3776
- baseFee: z.ZodOptional<z.ZodNumber>;
3777
- }, "strict", z.ZodTypeAny, {
3778
- smartAccount: string;
3779
- sourceAccount: string;
3780
- step: "detach" | "reinstall";
3781
- ruleId: number;
3782
- incomingPredicateBlobBase64: string;
3783
- network?: "mainnet" | "testnet" | undefined;
3784
- rpcUrl?: string | undefined;
3785
- allowUnpinnedRpcUrl?: boolean | undefined;
3786
- baseFee?: number | undefined;
3787
- }, {
3788
- smartAccount: string;
3789
- sourceAccount: string;
3790
- step: "detach" | "reinstall";
3791
- ruleId: number;
3792
- incomingPredicateBlobBase64: string;
3793
- network?: "mainnet" | "testnet" | undefined;
3794
- rpcUrl?: string | undefined;
3795
- allowUnpinnedRpcUrl?: boolean | undefined;
3796
- baseFee?: number | undefined;
3797
- }>;
3798
- export type MergePolicyInput = z.infer<typeof MergePolicyInputSchema>;
3799
2038
  export declare const RevokePolicyInputSchema: z.ZodEffects<z.ZodObject<{
3800
2039
  /** The smart account contract address (C...). */
3801
2040
  smartAccount: z.ZodString;