@crediolabs/policy-synth 0.1.17 → 0.2.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.
- package/README.md +44 -246
- package/dist/adapters/interpreter/adapter.d.ts +6 -7
- package/dist/adapters/interpreter/adapter.js +28 -48
- package/dist/adapters/oz/adapter.js +12 -13
- package/dist/codegen/compile-gate.js +5 -0
- package/dist/codegen/template.js +17 -0
- package/dist/install/authority-overlap.d.ts +134 -0
- package/dist/install/authority-overlap.js +0 -0
- package/dist/install/build-add-context-rule.d.ts +8 -0
- package/dist/install/build-add-context-rule.js +17 -46
- package/dist/install/build-install-policy.d.ts +12 -5
- package/dist/install/build-install-policy.js +32 -23
- package/dist/install/build-merge-policy.d.ts +70 -0
- package/dist/install/build-merge-policy.js +130 -0
- package/dist/install/get-interpreter-info.js +2 -2
- package/dist/install/index.d.ts +3 -1
- package/dist/install/index.js +8 -1
- package/dist/install/oz-auth.js +5 -3
- package/dist/install/plan-merge-policy.d.ts +49 -0
- package/dist/install/plan-merge-policy.js +86 -0
- package/dist/install/read-account-rules.d.ts +100 -0
- package/dist/install/read-account-rules.js +283 -0
- package/dist/predicate/decode.js +1 -1
- package/dist/predicate/encode.js +171 -10
- package/dist/record/decode.js +5 -6
- package/dist/registry/protocols.d.ts +1 -1
- package/dist/registry/protocols.js +1 -1
- package/dist/review-card/builder.d.ts +6 -0
- package/dist/review-card/builder.js +9 -1
- package/dist/run/index.d.ts +104 -18
- package/dist/run/index.js +359 -75
- package/dist/run/schemas.d.ts +479 -18
- package/dist/run/schemas.js +132 -24
- package/dist/synth/compose-from-recording.d.ts +10 -15
- package/dist/synth/compose-from-recording.js +79 -124
- package/dist/synth/deny-cases.d.ts +5 -0
- package/dist/synth/deny-cases.js +52 -13
- package/dist/synth/evaluate.js +69 -119
- package/dist/synth/harness.d.ts +13 -1
- package/dist/synth/harness.js +22 -1
- package/dist/synth/index.d.ts +1 -1
- package/dist/synth/synthesize-from-recording.d.ts +31 -21
- package/dist/synth/synthesize-from-recording.js +129 -155
- package/dist-cjs/adapters/interpreter/adapter.d.ts +6 -7
- package/dist-cjs/adapters/interpreter/adapter.js +28 -48
- package/dist-cjs/adapters/oz/adapter.js +12 -13
- package/dist-cjs/codegen/compile-gate.js +5 -0
- package/dist-cjs/codegen/template.js +17 -0
- package/dist-cjs/install/authority-overlap.d.ts +134 -0
- package/dist-cjs/install/authority-overlap.js +0 -0
- package/dist-cjs/install/build-add-context-rule.d.ts +8 -0
- package/dist-cjs/install/build-add-context-rule.js +17 -45
- package/dist-cjs/install/build-install-policy.d.ts +12 -5
- package/dist-cjs/install/build-install-policy.js +32 -23
- package/dist-cjs/install/build-merge-policy.d.ts +70 -0
- package/dist-cjs/install/build-merge-policy.js +134 -0
- package/dist-cjs/install/get-interpreter-info.js +2 -2
- package/dist-cjs/install/index.d.ts +3 -1
- package/dist-cjs/install/index.js +24 -3
- package/dist-cjs/install/oz-auth.js +5 -3
- package/dist-cjs/install/plan-merge-policy.d.ts +49 -0
- package/dist-cjs/install/plan-merge-policy.js +90 -0
- package/dist-cjs/install/read-account-rules.d.ts +100 -0
- package/dist-cjs/install/read-account-rules.js +296 -0
- package/dist-cjs/predicate/decode.js +1 -1
- package/dist-cjs/predicate/encode.js +171 -10
- package/dist-cjs/record/decode.js +5 -6
- package/dist-cjs/registry/protocols.d.ts +1 -1
- package/dist-cjs/registry/protocols.js +1 -1
- package/dist-cjs/review-card/builder.d.ts +6 -0
- package/dist-cjs/review-card/builder.js +9 -1
- package/dist-cjs/run/index.d.ts +104 -18
- package/dist-cjs/run/index.js +360 -74
- package/dist-cjs/run/schemas.d.ts +479 -18
- package/dist-cjs/run/schemas.js +133 -25
- package/dist-cjs/synth/compose-from-recording.d.ts +10 -15
- package/dist-cjs/synth/compose-from-recording.js +79 -124
- package/dist-cjs/synth/deny-cases.d.ts +5 -0
- package/dist-cjs/synth/deny-cases.js +52 -13
- package/dist-cjs/synth/evaluate.js +69 -119
- package/dist-cjs/synth/harness.d.ts +13 -1
- package/dist-cjs/synth/harness.js +22 -1
- package/dist-cjs/synth/index.d.ts +1 -1
- package/dist-cjs/synth/synthesize-from-recording.d.ts +31 -21
- package/dist-cjs/synth/synthesize-from-recording.js +129 -153
- package/package.json +1 -1
- package/src/adapters/interpreter/adapter.ts +28 -48
- package/src/adapters/oz/adapter.ts +12 -13
- package/src/codegen/compile-gate.ts +5 -0
- package/src/codegen/template.ts +17 -0
- package/src/install/authority-overlap.ts +0 -0
- package/src/install/build-add-context-rule.ts +29 -56
- package/src/install/build-install-policy.ts +41 -23
- package/src/install/build-merge-policy.ts +219 -0
- package/src/install/get-interpreter-info.ts +2 -2
- package/src/install/index.ts +36 -2
- package/src/install/oz-auth.ts +5 -3
- package/src/install/plan-merge-policy.ts +133 -0
- package/src/install/read-account-rules.ts +376 -0
- package/src/predicate/decode.ts +1 -1
- package/src/predicate/encode.ts +176 -10
- package/src/record/decode.ts +5 -6
- package/src/registry/protocols.ts +1 -1
- package/src/review-card/builder.ts +17 -1
- package/src/run/index.ts +500 -102
- package/src/run/schemas.ts +145 -24
- package/src/synth/compose-from-recording.ts +87 -132
- package/src/synth/deny-cases.ts +59 -13
- package/src/synth/evaluate.ts +70 -118
- package/src/synth/harness.ts +29 -1
- package/src/synth/index.ts +1 -0
- package/src/synth/synthesize-from-recording.ts +209 -192
- package/src/contracts/policy-template/OZ_POLICY_TRAIT.md +0 -196
package/dist/run/schemas.d.ts
CHANGED
|
@@ -352,7 +352,7 @@ export declare const RecordedTransactionSchema: z.ZodObject<{
|
|
|
352
352
|
/** MandateSpec mirrors the core MandateSpec. The deterministic Mandate
|
|
353
353
|
* front-end needs no parseConfidence; the tool adapter injects the full
|
|
354
354
|
* confidence after synthesis so the orchestrator can compare. */
|
|
355
|
-
export declare const MandateSpecSchema: z.ZodObject<{
|
|
355
|
+
export declare const MandateSpecSchema: z.ZodEffects<z.ZodObject<{
|
|
356
356
|
chain: z.ZodLiteral<"stellar">;
|
|
357
357
|
contract: z.ZodString;
|
|
358
358
|
method: z.ZodOptional<z.ZodString>;
|
|
@@ -439,6 +439,64 @@ export declare const MandateSpecSchema: z.ZodObject<{
|
|
|
439
439
|
validUntilLedger?: number | undefined;
|
|
440
440
|
validUntilUnixSeconds?: number | undefined;
|
|
441
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
|
+
}>>;
|
|
442
500
|
}, z.ZodTypeAny, "passthrough">>;
|
|
443
501
|
/** ComposeUserResponses mirrors the core. */
|
|
444
502
|
export declare const ComposeUserResponsesSchema: z.ZodObject<{
|
|
@@ -447,18 +505,66 @@ export declare const ComposeUserResponsesSchema: z.ZodObject<{
|
|
|
447
505
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
448
506
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
449
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">>;
|
|
450
524
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
451
525
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
452
526
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
453
527
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
454
528
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
455
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">>;
|
|
456
546
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
457
547
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
458
548
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
459
549
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
460
550
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
461
551
|
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">>;
|
|
462
568
|
}, z.ZodTypeAny, "passthrough">>;
|
|
463
569
|
/** OzAdapterConfig - the per-network OZ built-in instance addresses. */
|
|
464
570
|
export declare const OzAdapterConfigSchema: z.ZodObject<{
|
|
@@ -530,7 +636,7 @@ export declare const RecordTransactionInputSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
530
636
|
export type RecordTransactionInput = z.infer<typeof RecordTransactionInputSchema>;
|
|
531
637
|
export declare const SynthesizePolicyMandateInputSchema: z.ZodObject<{
|
|
532
638
|
source: z.ZodLiteral<"mandate">;
|
|
533
|
-
mandate: z.ZodObject<{
|
|
639
|
+
mandate: z.ZodEffects<z.ZodObject<{
|
|
534
640
|
chain: z.ZodLiteral<"stellar">;
|
|
535
641
|
contract: z.ZodString;
|
|
536
642
|
method: z.ZodOptional<z.ZodString>;
|
|
@@ -617,6 +723,64 @@ export declare const SynthesizePolicyMandateInputSchema: z.ZodObject<{
|
|
|
617
723
|
validUntilLedger?: number | undefined;
|
|
618
724
|
validUntilUnixSeconds?: number | undefined;
|
|
619
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
|
+
}>>;
|
|
620
784
|
}, z.ZodTypeAny, "passthrough">>;
|
|
621
785
|
ozConfig: z.ZodOptional<z.ZodObject<{
|
|
622
786
|
network: z.ZodEnum<["mainnet", "testnet"]>;
|
|
@@ -1010,18 +1174,66 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
|
|
|
1010
1174
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1011
1175
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1012
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">>;
|
|
1013
1193
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1014
1194
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1015
1195
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
1016
1196
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1017
1197
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1018
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">>;
|
|
1019
1215
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1020
1216
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1021
1217
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
1022
1218
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1023
1219
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1024
1220
|
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">>;
|
|
1025
1237
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1026
1238
|
confidenceOverride: z.ZodOptional<z.ZodObject<{
|
|
1027
1239
|
threshold: z.ZodNumber;
|
|
@@ -1141,6 +1353,22 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
|
|
|
1141
1353
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1142
1354
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1143
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">>;
|
|
1144
1372
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1145
1373
|
confidenceOverride?: {
|
|
1146
1374
|
threshold: number;
|
|
@@ -1206,6 +1434,22 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
|
|
|
1206
1434
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1207
1435
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1208
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">>;
|
|
1209
1453
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1210
1454
|
confidenceOverride?: {
|
|
1211
1455
|
threshold: number;
|
|
@@ -1222,7 +1466,7 @@ export declare const SynthesizePolicyRecordingInputSchema: z.ZodObject<{
|
|
|
1222
1466
|
}>;
|
|
1223
1467
|
export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
|
|
1224
1468
|
source: z.ZodLiteral<"mandate">;
|
|
1225
|
-
mandate: z.ZodObject<{
|
|
1469
|
+
mandate: z.ZodEffects<z.ZodObject<{
|
|
1226
1470
|
chain: z.ZodLiteral<"stellar">;
|
|
1227
1471
|
contract: z.ZodString;
|
|
1228
1472
|
method: z.ZodOptional<z.ZodString>;
|
|
@@ -1309,6 +1553,64 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
|
|
|
1309
1553
|
validUntilLedger?: number | undefined;
|
|
1310
1554
|
validUntilUnixSeconds?: number | undefined;
|
|
1311
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
|
+
}>>;
|
|
1312
1614
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1313
1615
|
ozConfig: z.ZodOptional<z.ZodObject<{
|
|
1314
1616
|
network: z.ZodEnum<["mainnet", "testnet"]>;
|
|
@@ -1667,18 +1969,66 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
|
|
|
1667
1969
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1668
1970
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1669
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">>;
|
|
1670
1988
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1671
1989
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1672
1990
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
1673
1991
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1674
1992
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1675
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">>;
|
|
1676
2010
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1677
2011
|
windowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1678
2012
|
validUntilLedger: z.ZodOptional<z.ZodNumber>;
|
|
1679
2013
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1680
2014
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1681
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">>;
|
|
1682
2032
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1683
2033
|
confidenceOverride: z.ZodOptional<z.ZodObject<{
|
|
1684
2034
|
threshold: z.ZodNumber;
|
|
@@ -1798,6 +2148,22 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
|
|
|
1798
2148
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1799
2149
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1800
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">>;
|
|
1801
2167
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1802
2168
|
confidenceOverride?: {
|
|
1803
2169
|
threshold: number;
|
|
@@ -1863,6 +2229,22 @@ export declare const SynthesizePolicyInputSchema: z.ZodDiscriminatedUnion<"sourc
|
|
|
1863
2229
|
limitAmount: z.ZodOptional<z.ZodString>;
|
|
1864
2230
|
invocationLimit: z.ZodOptional<z.ZodNumber>;
|
|
1865
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">>;
|
|
1866
2248
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1867
2249
|
confidenceOverride?: {
|
|
1868
2250
|
threshold: number;
|
|
@@ -2641,20 +3023,28 @@ export declare const VerifyPolicyInputSchema: z.ZodObject<{
|
|
|
2641
3023
|
}> | undefined;
|
|
2642
3024
|
}>;
|
|
2643
3025
|
export type VerifyPolicyInput = z.infer<typeof VerifyPolicyInputSchema>;
|
|
2644
|
-
/** Pinned interpreter address (testnet).
|
|
3026
|
+
/** Pinned interpreter address (testnet).
|
|
2645
3027
|
* Single source for the MCP layer; do not embed elsewhere. */
|
|
2646
|
-
export declare const PINNED_INTERPRETER_TESTNET_ADDRESS = "
|
|
2647
|
-
/** Pinned interpreter address (mainnet)
|
|
2648
|
-
*
|
|
2649
|
-
* that was exercised on testnet (same wasm sha256, see
|
|
2650
|
-
* PINNED_INTERPRETER_WASM_SHA256). The address differs because instance
|
|
2651
|
-
* ids are network-scoped. UNAUDITED at the time of writing - see
|
|
2652
|
-
* DEPLOYMENTS.md:29-32 for the recorded decision and what is still pending. */
|
|
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. */
|
|
2653
3031
|
export declare const PINNED_INTERPRETER_MAINNET_ADDRESS = "CALZAMUPREIRY4TULBEXIK77AUTOEJG63XLCPUWEHHQDOVK6ZVVS7VQ2";
|
|
2654
|
-
/** Pinned interpreter wasm sha256 (hex)
|
|
3032
|
+
/** Pinned interpreter wasm sha256 (hex), mainnet.
|
|
3033
|
+
*
|
|
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. */
|
|
2655
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";
|
|
2656
3046
|
/** The grammar version the interpreter enforces (matches SELF_VERSION in
|
|
2657
|
-
*
|
|
3047
|
+
* contracts/policy-interpreter/src/version.rs). */
|
|
2658
3048
|
export declare const PINNED_INTERPRETER_GRAMMAR_VERSION = 1;
|
|
2659
3049
|
/** Default Soroban RPC for the install / revoke / info tools. The recorder
|
|
2660
3050
|
* keeps its own copy in record/rpc.ts because it hands back a fetcher rather
|
|
@@ -2666,11 +3056,12 @@ export declare const TESTNET_RPC_URL = "https://soroban-testnet.stellar.org";
|
|
|
2666
3056
|
* RPC rather than always testnet. Public mainnet endpoint, the same one
|
|
2667
3057
|
* the deploy script hit during the 2026-08-04 mainnet rollout. */
|
|
2668
3058
|
export declare const MAINNET_RPC_URL = "https://mainnet.sorobanrpc.com";
|
|
2669
|
-
/** Pin + RPC lookup for the gate enforcement.
|
|
2670
|
-
*
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
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. */
|
|
2673
3063
|
export declare const PINNED_INTERPRETER_ADDRESS_BY_NETWORK: Record<Network, string>;
|
|
3064
|
+
export declare const PINNED_INTERPRETER_WASM_SHA256_BY_NETWORK: Record<Network, string>;
|
|
2674
3065
|
export declare const RPC_URL_BY_NETWORK: Record<Network, string>;
|
|
2675
3066
|
/** Soroban `valid_until` window (ledgers) added to the latest ledger when
|
|
2676
3067
|
* building the auth entry. ~25 minutes at 5s/ledger. */
|
|
@@ -3164,6 +3555,17 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3164
3555
|
* everything. Selecting `network: 'mainnet'` is NOT an opt-in -
|
|
3165
3556
|
* the mainnet pin is its own deny-by-default anchor. */
|
|
3166
3557
|
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>;
|
|
3167
3569
|
/** Base fee in stroops; defaults to BASE_FEE (100). */
|
|
3168
3570
|
baseFee: z.ZodOptional<z.ZodNumber>;
|
|
3169
3571
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3209,6 +3611,8 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3209
3611
|
rpcUrl?: string | undefined;
|
|
3210
3612
|
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3211
3613
|
allowUnpinnedInterpreter?: boolean | undefined;
|
|
3614
|
+
allowAuthorityOverlap?: boolean | undefined;
|
|
3615
|
+
skipAuthorityScan?: boolean | undefined;
|
|
3212
3616
|
baseFee?: number | undefined;
|
|
3213
3617
|
}, {
|
|
3214
3618
|
installNonce: number;
|
|
@@ -3253,6 +3657,8 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3253
3657
|
rpcUrl?: string | undefined;
|
|
3254
3658
|
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3255
3659
|
allowUnpinnedInterpreter?: boolean | undefined;
|
|
3660
|
+
allowAuthorityOverlap?: boolean | undefined;
|
|
3661
|
+
skipAuthorityScan?: boolean | undefined;
|
|
3256
3662
|
baseFee?: number | undefined;
|
|
3257
3663
|
}>, {
|
|
3258
3664
|
installNonce: number;
|
|
@@ -3297,6 +3703,8 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3297
3703
|
rpcUrl?: string | undefined;
|
|
3298
3704
|
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3299
3705
|
allowUnpinnedInterpreter?: boolean | undefined;
|
|
3706
|
+
allowAuthorityOverlap?: boolean | undefined;
|
|
3707
|
+
skipAuthorityScan?: boolean | undefined;
|
|
3300
3708
|
baseFee?: number | undefined;
|
|
3301
3709
|
}, {
|
|
3302
3710
|
installNonce: number;
|
|
@@ -3341,9 +3749,53 @@ export declare const InstallPolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3341
3749
|
rpcUrl?: string | undefined;
|
|
3342
3750
|
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3343
3751
|
allowUnpinnedInterpreter?: boolean | undefined;
|
|
3752
|
+
allowAuthorityOverlap?: boolean | undefined;
|
|
3753
|
+
skipAuthorityScan?: boolean | undefined;
|
|
3344
3754
|
baseFee?: number | undefined;
|
|
3345
3755
|
}>;
|
|
3346
3756
|
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>;
|
|
3347
3799
|
export declare const RevokePolicyInputSchema: z.ZodEffects<z.ZodObject<{
|
|
3348
3800
|
/** The smart account contract address (C...). */
|
|
3349
3801
|
smartAccount: z.ZodString;
|
|
@@ -3403,15 +3855,24 @@ export declare const GetInterpreterInfoInputSchema: z.ZodObject<{
|
|
|
3403
3855
|
/** When true, perform an optional live `grammar_version()` RPC call to
|
|
3404
3856
|
* verify the deployed contract matches the pin. */
|
|
3405
3857
|
verifyLive: z.ZodOptional<z.ZodBoolean>;
|
|
3406
|
-
/** Optional RPC URL override.
|
|
3858
|
+
/** Optional RPC URL override. When `verifyLive` is true, the URL must
|
|
3859
|
+
* equal the pinned RPC for the selected network unless
|
|
3860
|
+
* `allowUnpinnedRpcUrl: true` is also set (same opt-in shape as
|
|
3861
|
+
* install/revoke - the live grammar_version() answer binds to whichever
|
|
3862
|
+
* RPC returned it). */
|
|
3407
3863
|
rpcUrl: z.ZodOptional<z.ZodString>;
|
|
3864
|
+
/** Opt-in to using a non-pinned RPC URL when `verifyLive` is true. Same
|
|
3865
|
+
* semantics as install/revoke: the caller accepts the trust shift. */
|
|
3866
|
+
allowUnpinnedRpcUrl: z.ZodOptional<z.ZodBoolean>;
|
|
3408
3867
|
}, "strip", z.ZodTypeAny, {
|
|
3409
3868
|
network?: "mainnet" | "testnet" | undefined;
|
|
3410
3869
|
rpcUrl?: string | undefined;
|
|
3870
|
+
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3411
3871
|
verifyLive?: boolean | undefined;
|
|
3412
3872
|
}, {
|
|
3413
3873
|
network?: "mainnet" | "testnet" | undefined;
|
|
3414
3874
|
rpcUrl?: string | undefined;
|
|
3875
|
+
allowUnpinnedRpcUrl?: boolean | undefined;
|
|
3415
3876
|
verifyLive?: boolean | undefined;
|
|
3416
3877
|
}>;
|
|
3417
3878
|
export type GetInterpreterInfoInput = z.infer<typeof GetInterpreterInfoInputSchema>;
|