@lifi/compose-spec 0.15.1 → 0.16.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/dist/index.cjs +25 -14
- package/dist/index.d.cts +265 -253
- package/dist/index.d.ts +265 -253
- package/dist/index.js +21 -13
- package/package.json +11 -15
- package/src/flashloan.ts +61 -29
- package/src/index.ts +5 -2
- package/src/resource.ts +7 -0
package/dist/index.d.cts
CHANGED
|
@@ -29,19 +29,19 @@ export declare const ResourceSchema: Schema.transform<Schema.Union<[Schema.Struc
|
|
|
29
29
|
token: Schema.refine<string, typeof Schema.String>;
|
|
30
30
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
31
31
|
}>]>, Schema.SchemaClass<{
|
|
32
|
-
readonly chainId: number;
|
|
33
32
|
readonly kind: "native";
|
|
33
|
+
readonly chainId: number;
|
|
34
34
|
} | {
|
|
35
|
+
readonly kind: "erc20";
|
|
35
36
|
readonly token: string;
|
|
36
37
|
readonly chainId: number;
|
|
37
|
-
readonly kind: "erc20";
|
|
38
38
|
}, {
|
|
39
|
-
readonly chainId: number;
|
|
40
39
|
readonly kind: "native";
|
|
40
|
+
readonly chainId: number;
|
|
41
41
|
} | {
|
|
42
|
+
readonly kind: "erc20";
|
|
42
43
|
readonly token: string;
|
|
43
44
|
readonly chainId: number;
|
|
44
|
-
readonly kind: "erc20";
|
|
45
45
|
}, never>>;
|
|
46
46
|
export declare const ResourceInputSchema: Schema.Struct<{
|
|
47
47
|
name: typeof Schema.String;
|
|
@@ -53,19 +53,19 @@ export declare const ResourceInputSchema: Schema.Struct<{
|
|
|
53
53
|
token: Schema.refine<string, typeof Schema.String>;
|
|
54
54
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
55
55
|
}>]>, Schema.SchemaClass<{
|
|
56
|
-
readonly chainId: number;
|
|
57
56
|
readonly kind: "native";
|
|
57
|
+
readonly chainId: number;
|
|
58
58
|
} | {
|
|
59
|
+
readonly kind: "erc20";
|
|
59
60
|
readonly token: string;
|
|
60
61
|
readonly chainId: number;
|
|
61
|
-
readonly kind: "erc20";
|
|
62
62
|
}, {
|
|
63
|
-
readonly chainId: number;
|
|
64
63
|
readonly kind: "native";
|
|
64
|
+
readonly chainId: number;
|
|
65
65
|
} | {
|
|
66
|
+
readonly kind: "erc20";
|
|
66
67
|
readonly token: string;
|
|
67
68
|
readonly chainId: number;
|
|
68
|
-
readonly kind: "erc20";
|
|
69
69
|
}, never>>;
|
|
70
70
|
}>;
|
|
71
71
|
export declare const HandleInputSchema: Schema.Struct<{
|
|
@@ -82,19 +82,19 @@ export declare const FlowInputSchema: Schema.Union<[Schema.Struct<{
|
|
|
82
82
|
token: Schema.refine<string, typeof Schema.String>;
|
|
83
83
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
84
84
|
}>]>, Schema.SchemaClass<{
|
|
85
|
-
readonly chainId: number;
|
|
86
85
|
readonly kind: "native";
|
|
86
|
+
readonly chainId: number;
|
|
87
87
|
} | {
|
|
88
|
+
readonly kind: "erc20";
|
|
88
89
|
readonly token: string;
|
|
89
90
|
readonly chainId: number;
|
|
90
|
-
readonly kind: "erc20";
|
|
91
91
|
}, {
|
|
92
|
-
readonly chainId: number;
|
|
93
92
|
readonly kind: "native";
|
|
93
|
+
readonly chainId: number;
|
|
94
94
|
} | {
|
|
95
|
+
readonly kind: "erc20";
|
|
95
96
|
readonly token: string;
|
|
96
97
|
readonly chainId: number;
|
|
97
|
-
readonly kind: "erc20";
|
|
98
98
|
}, never>>;
|
|
99
99
|
}>, Schema.Struct<{
|
|
100
100
|
name: typeof Schema.String;
|
|
@@ -157,19 +157,19 @@ export declare const EpilogueForwardSchema: Schema.Struct<{
|
|
|
157
157
|
token: Schema.refine<string, typeof Schema.String>;
|
|
158
158
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
159
159
|
}>]>, Schema.SchemaClass<{
|
|
160
|
-
readonly chainId: number;
|
|
161
160
|
readonly kind: "native";
|
|
161
|
+
readonly chainId: number;
|
|
162
162
|
} | {
|
|
163
|
+
readonly kind: "erc20";
|
|
163
164
|
readonly token: string;
|
|
164
165
|
readonly chainId: number;
|
|
165
|
-
readonly kind: "erc20";
|
|
166
166
|
}, {
|
|
167
|
-
readonly chainId: number;
|
|
168
167
|
readonly kind: "native";
|
|
168
|
+
readonly chainId: number;
|
|
169
169
|
} | {
|
|
170
|
+
readonly kind: "erc20";
|
|
170
171
|
readonly token: string;
|
|
171
172
|
readonly chainId: number;
|
|
172
|
-
readonly kind: "erc20";
|
|
173
173
|
}, never>>;
|
|
174
174
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
175
175
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -185,19 +185,19 @@ export declare const EpilogueSchema: Schema.filter<Schema.Struct<{
|
|
|
185
185
|
token: Schema.refine<string, typeof Schema.String>;
|
|
186
186
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
187
187
|
}>]>, Schema.SchemaClass<{
|
|
188
|
-
readonly chainId: number;
|
|
189
188
|
readonly kind: "native";
|
|
189
|
+
readonly chainId: number;
|
|
190
190
|
} | {
|
|
191
|
+
readonly kind: "erc20";
|
|
191
192
|
readonly token: string;
|
|
192
193
|
readonly chainId: number;
|
|
193
|
-
readonly kind: "erc20";
|
|
194
194
|
}, {
|
|
195
|
-
readonly chainId: number;
|
|
196
195
|
readonly kind: "native";
|
|
196
|
+
readonly chainId: number;
|
|
197
197
|
} | {
|
|
198
|
+
readonly kind: "erc20";
|
|
198
199
|
readonly token: string;
|
|
199
200
|
readonly chainId: number;
|
|
200
|
-
readonly kind: "erc20";
|
|
201
201
|
}, never>>;
|
|
202
202
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
203
203
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -221,19 +221,19 @@ export declare const FlowSchema: Schema.Struct<{
|
|
|
221
221
|
token: Schema.refine<string, typeof Schema.String>;
|
|
222
222
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
223
223
|
}>]>, Schema.SchemaClass<{
|
|
224
|
-
readonly chainId: number;
|
|
225
224
|
readonly kind: "native";
|
|
225
|
+
readonly chainId: number;
|
|
226
226
|
} | {
|
|
227
|
+
readonly kind: "erc20";
|
|
227
228
|
readonly token: string;
|
|
228
229
|
readonly chainId: number;
|
|
229
|
-
readonly kind: "erc20";
|
|
230
230
|
}, {
|
|
231
|
-
readonly chainId: number;
|
|
232
231
|
readonly kind: "native";
|
|
232
|
+
readonly chainId: number;
|
|
233
233
|
} | {
|
|
234
|
+
readonly kind: "erc20";
|
|
234
235
|
readonly token: string;
|
|
235
236
|
readonly chainId: number;
|
|
236
|
-
readonly kind: "erc20";
|
|
237
237
|
}, never>>;
|
|
238
238
|
}>, Schema.Struct<{
|
|
239
239
|
name: typeof Schema.String;
|
|
@@ -274,19 +274,19 @@ export declare const FlowSchema: Schema.Struct<{
|
|
|
274
274
|
token: Schema.refine<string, typeof Schema.String>;
|
|
275
275
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
276
276
|
}>]>, Schema.SchemaClass<{
|
|
277
|
-
readonly chainId: number;
|
|
278
277
|
readonly kind: "native";
|
|
278
|
+
readonly chainId: number;
|
|
279
279
|
} | {
|
|
280
|
+
readonly kind: "erc20";
|
|
280
281
|
readonly token: string;
|
|
281
282
|
readonly chainId: number;
|
|
282
|
-
readonly kind: "erc20";
|
|
283
283
|
}, {
|
|
284
|
-
readonly chainId: number;
|
|
285
284
|
readonly kind: "native";
|
|
285
|
+
readonly chainId: number;
|
|
286
286
|
} | {
|
|
287
|
+
readonly kind: "erc20";
|
|
287
288
|
readonly token: string;
|
|
288
289
|
readonly chainId: number;
|
|
289
|
-
readonly kind: "erc20";
|
|
290
290
|
}, never>>;
|
|
291
291
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
292
292
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -320,10 +320,10 @@ export declare const ContinuationOutcomeSchema: Schema.transform<Schema.Schema<{
|
|
|
320
320
|
readonly destination: string;
|
|
321
321
|
readonly chainId: number;
|
|
322
322
|
}, {
|
|
323
|
-
readonly token: string;
|
|
324
|
-
readonly destination: string;
|
|
325
323
|
readonly chainId: number;
|
|
324
|
+
readonly destination: string;
|
|
326
325
|
readonly minAmount?: string | undefined;
|
|
326
|
+
readonly token: string;
|
|
327
327
|
}, never>, Schema.SchemaClass<{
|
|
328
328
|
readonly token: string;
|
|
329
329
|
readonly minAmount?: string | undefined;
|
|
@@ -341,10 +341,10 @@ export declare const CommittedOutcomeSchema: Schema.transform<Schema.Schema<{
|
|
|
341
341
|
readonly destination: string;
|
|
342
342
|
readonly chainId: number;
|
|
343
343
|
}, {
|
|
344
|
-
readonly token: string;
|
|
345
|
-
readonly minAmount: string;
|
|
346
|
-
readonly destination: string;
|
|
347
344
|
readonly chainId: number;
|
|
345
|
+
readonly destination: string;
|
|
346
|
+
readonly minAmount: string;
|
|
347
|
+
readonly token: string;
|
|
348
348
|
}, never>, Schema.SchemaClass<{
|
|
349
349
|
readonly token: string;
|
|
350
350
|
readonly minAmount: string;
|
|
@@ -363,10 +363,10 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
363
363
|
readonly destination: string;
|
|
364
364
|
readonly chainId: number;
|
|
365
365
|
}, {
|
|
366
|
-
readonly token: string;
|
|
367
|
-
readonly destination: string;
|
|
368
366
|
readonly chainId: number;
|
|
367
|
+
readonly destination: string;
|
|
369
368
|
readonly minAmount?: string | undefined;
|
|
369
|
+
readonly token: string;
|
|
370
370
|
}, never>, Schema.SchemaClass<{
|
|
371
371
|
readonly token: string;
|
|
372
372
|
readonly minAmount?: string | undefined;
|
|
@@ -392,19 +392,19 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
392
392
|
token: Schema.refine<string, typeof Schema.String>;
|
|
393
393
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
394
394
|
}>]>, Schema.SchemaClass<{
|
|
395
|
-
readonly chainId: number;
|
|
396
395
|
readonly kind: "native";
|
|
396
|
+
readonly chainId: number;
|
|
397
397
|
} | {
|
|
398
|
+
readonly kind: "erc20";
|
|
398
399
|
readonly token: string;
|
|
399
400
|
readonly chainId: number;
|
|
400
|
-
readonly kind: "erc20";
|
|
401
401
|
}, {
|
|
402
|
-
readonly chainId: number;
|
|
403
402
|
readonly kind: "native";
|
|
403
|
+
readonly chainId: number;
|
|
404
404
|
} | {
|
|
405
|
+
readonly kind: "erc20";
|
|
405
406
|
readonly token: string;
|
|
406
407
|
readonly chainId: number;
|
|
407
|
-
readonly kind: "erc20";
|
|
408
408
|
}, never>>;
|
|
409
409
|
}>, Schema.Struct<{
|
|
410
410
|
name: typeof Schema.String;
|
|
@@ -445,19 +445,19 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
445
445
|
token: Schema.refine<string, typeof Schema.String>;
|
|
446
446
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
447
447
|
}>]>, Schema.SchemaClass<{
|
|
448
|
-
readonly chainId: number;
|
|
449
448
|
readonly kind: "native";
|
|
449
|
+
readonly chainId: number;
|
|
450
450
|
} | {
|
|
451
|
+
readonly kind: "erc20";
|
|
451
452
|
readonly token: string;
|
|
452
453
|
readonly chainId: number;
|
|
453
|
-
readonly kind: "erc20";
|
|
454
454
|
}, {
|
|
455
|
-
readonly chainId: number;
|
|
456
455
|
readonly kind: "native";
|
|
456
|
+
readonly chainId: number;
|
|
457
457
|
} | {
|
|
458
|
+
readonly kind: "erc20";
|
|
458
459
|
readonly token: string;
|
|
459
460
|
readonly chainId: number;
|
|
460
|
-
readonly kind: "erc20";
|
|
461
461
|
}, never>>;
|
|
462
462
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
463
463
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -565,7 +565,7 @@ type AssertionSpec = typeof AssertionSpecSchema.Type;
|
|
|
565
565
|
type CallCheckSpec = typeof CallCheckSpecSchema.Type;
|
|
566
566
|
export declare const settledOutcome: <I extends {
|
|
567
567
|
readonly outcomes: readonly unknown[];
|
|
568
|
-
}>(intent: I) => I[
|
|
568
|
+
}>(intent: I) => I['outcomes'][number] | undefined;
|
|
569
569
|
//#endregion
|
|
570
570
|
//#region src/descriptor.d.ts
|
|
571
571
|
export declare const Bytes32HexSchema: Schema.filter<typeof Schema.String>;
|
|
@@ -589,42 +589,42 @@ export declare const AssertedPredicateSchema: Schema.transformOrFail<Schema.Unio
|
|
|
589
589
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
590
590
|
threshold: Schema.filter<typeof Schema.String>;
|
|
591
591
|
}>]>, Schema.SchemaClass<{
|
|
592
|
-
readonly
|
|
592
|
+
readonly kind: "erc20BalanceGte";
|
|
593
593
|
readonly chainId: number;
|
|
594
|
-
readonly kind: "nativeBalanceGte";
|
|
595
|
-
readonly owner: string;
|
|
596
|
-
} | {
|
|
597
594
|
readonly token: string;
|
|
595
|
+
readonly owner: string;
|
|
598
596
|
readonly minAmount: string;
|
|
597
|
+
} | {
|
|
598
|
+
readonly kind: "nativeBalanceGte";
|
|
599
599
|
readonly chainId: number;
|
|
600
|
-
readonly kind: "erc20BalanceGte";
|
|
601
600
|
readonly owner: string;
|
|
601
|
+
readonly minAmount: string;
|
|
602
602
|
} | {
|
|
603
|
-
readonly chainId: number;
|
|
604
603
|
readonly kind: "call";
|
|
604
|
+
readonly chainId: number;
|
|
605
605
|
readonly to: string;
|
|
606
606
|
readonly signature: string;
|
|
607
607
|
readonly args: readonly string[];
|
|
608
|
-
readonly comparator: "
|
|
608
|
+
readonly comparator: "eq" | "gte" | "lte";
|
|
609
609
|
readonly threshold: string;
|
|
610
610
|
}, {
|
|
611
|
-
readonly
|
|
611
|
+
readonly kind: "erc20BalanceGte";
|
|
612
612
|
readonly chainId: number;
|
|
613
|
-
readonly kind: "nativeBalanceGte";
|
|
614
|
-
readonly owner: string;
|
|
615
|
-
} | {
|
|
616
613
|
readonly token: string;
|
|
614
|
+
readonly owner: string;
|
|
617
615
|
readonly minAmount: string;
|
|
616
|
+
} | {
|
|
617
|
+
readonly kind: "nativeBalanceGte";
|
|
618
618
|
readonly chainId: number;
|
|
619
|
-
readonly kind: "erc20BalanceGte";
|
|
620
619
|
readonly owner: string;
|
|
620
|
+
readonly minAmount: string;
|
|
621
621
|
} | {
|
|
622
|
-
readonly chainId: number;
|
|
623
622
|
readonly kind: "call";
|
|
623
|
+
readonly chainId: number;
|
|
624
624
|
readonly to: string;
|
|
625
625
|
readonly signature: string;
|
|
626
626
|
readonly args: readonly string[];
|
|
627
|
-
readonly comparator: "
|
|
627
|
+
readonly comparator: "eq" | "gte" | "lte";
|
|
628
628
|
readonly threshold: string;
|
|
629
629
|
}, never>, never>;
|
|
630
630
|
export declare const VerificationDescriptorSchema: Schema.Struct<{
|
|
@@ -650,42 +650,42 @@ export declare const VerificationDescriptorSchema: Schema.Struct<{
|
|
|
650
650
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
651
651
|
threshold: Schema.filter<typeof Schema.String>;
|
|
652
652
|
}>]>, Schema.SchemaClass<{
|
|
653
|
-
readonly
|
|
653
|
+
readonly kind: "erc20BalanceGte";
|
|
654
654
|
readonly chainId: number;
|
|
655
|
-
readonly kind: "nativeBalanceGte";
|
|
656
|
-
readonly owner: string;
|
|
657
|
-
} | {
|
|
658
655
|
readonly token: string;
|
|
656
|
+
readonly owner: string;
|
|
659
657
|
readonly minAmount: string;
|
|
658
|
+
} | {
|
|
659
|
+
readonly kind: "nativeBalanceGte";
|
|
660
660
|
readonly chainId: number;
|
|
661
|
-
readonly kind: "erc20BalanceGte";
|
|
662
661
|
readonly owner: string;
|
|
662
|
+
readonly minAmount: string;
|
|
663
663
|
} | {
|
|
664
|
-
readonly chainId: number;
|
|
665
664
|
readonly kind: "call";
|
|
665
|
+
readonly chainId: number;
|
|
666
666
|
readonly to: string;
|
|
667
667
|
readonly signature: string;
|
|
668
668
|
readonly args: readonly string[];
|
|
669
|
-
readonly comparator: "
|
|
669
|
+
readonly comparator: "eq" | "gte" | "lte";
|
|
670
670
|
readonly threshold: string;
|
|
671
671
|
}, {
|
|
672
|
-
readonly
|
|
672
|
+
readonly kind: "erc20BalanceGte";
|
|
673
673
|
readonly chainId: number;
|
|
674
|
-
readonly kind: "nativeBalanceGte";
|
|
675
|
-
readonly owner: string;
|
|
676
|
-
} | {
|
|
677
674
|
readonly token: string;
|
|
675
|
+
readonly owner: string;
|
|
678
676
|
readonly minAmount: string;
|
|
677
|
+
} | {
|
|
678
|
+
readonly kind: "nativeBalanceGte";
|
|
679
679
|
readonly chainId: number;
|
|
680
|
-
readonly kind: "erc20BalanceGte";
|
|
681
680
|
readonly owner: string;
|
|
681
|
+
readonly minAmount: string;
|
|
682
682
|
} | {
|
|
683
|
-
readonly chainId: number;
|
|
684
683
|
readonly kind: "call";
|
|
684
|
+
readonly chainId: number;
|
|
685
685
|
readonly to: string;
|
|
686
686
|
readonly signature: string;
|
|
687
687
|
readonly args: readonly string[];
|
|
688
|
-
readonly comparator: "
|
|
688
|
+
readonly comparator: "eq" | "gte" | "lte";
|
|
689
689
|
readonly threshold: string;
|
|
690
690
|
}, never>, never>>;
|
|
691
691
|
}>;
|
|
@@ -720,6 +720,7 @@ export declare const foldResource: <R>(r: Resource, cases: {
|
|
|
720
720
|
}) => R;
|
|
721
721
|
export declare const resourceToken: (r: Resource) => string;
|
|
722
722
|
export declare const resourceKey: (r: Resource) => string;
|
|
723
|
+
export declare const describeResource: (r: Resource) => string;
|
|
723
724
|
export declare const erc20Token: (r: Resource) => string;
|
|
724
725
|
//#endregion
|
|
725
726
|
//#region src/output.d.ts
|
|
@@ -766,67 +767,67 @@ export declare const ResourcePortZod: z.ZodObject<{
|
|
|
766
767
|
kind: z.ZodLiteral<"resource">;
|
|
767
768
|
name: z.ZodString;
|
|
768
769
|
accepts: z.ZodEnum<{
|
|
769
|
-
native: "native";
|
|
770
|
-
erc20: "erc20";
|
|
771
770
|
any: "any";
|
|
771
|
+
erc20: "erc20";
|
|
772
|
+
native: "native";
|
|
772
773
|
}>;
|
|
773
774
|
mode: z.ZodEnum<{
|
|
774
|
-
linear: "linear";
|
|
775
775
|
copy: "copy";
|
|
776
|
+
linear: "linear";
|
|
776
777
|
}>;
|
|
777
778
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
778
779
|
}, z.core.$strip>;
|
|
779
|
-
export declare const HANDLE_UNITS: readonly [
|
|
780
|
-
export declare const STATIC_SOL_TYPES: readonly [
|
|
780
|
+
export declare const HANDLE_UNITS: readonly ['raw', 'wad', 'ray', 'bps', 'token-decimals'];
|
|
781
|
+
export declare const STATIC_SOL_TYPES: readonly ['uint256', 'uint128', 'uint64', 'uint32', 'uint16', 'uint8', 'address', 'bool', 'bytes32'];
|
|
781
782
|
export declare const HandleUnitsZod: z.ZodEnum<{
|
|
783
|
+
bps: "bps";
|
|
782
784
|
raw: "raw";
|
|
783
|
-
wad: "wad";
|
|
784
785
|
ray: "ray";
|
|
785
|
-
bps: "bps";
|
|
786
786
|
"token-decimals": "token-decimals";
|
|
787
|
+
wad: "wad";
|
|
787
788
|
}>;
|
|
788
789
|
export declare const StaticSolTypeZod: z.ZodEnum<{
|
|
789
|
-
uint8: "uint8";
|
|
790
|
-
uint16: "uint16";
|
|
791
|
-
uint32: "uint32";
|
|
792
|
-
uint64: "uint64";
|
|
793
|
-
uint128: "uint128";
|
|
794
|
-
uint256: "uint256";
|
|
795
790
|
address: "address";
|
|
796
791
|
bool: "bool";
|
|
797
792
|
bytes32: "bytes32";
|
|
793
|
+
uint128: "uint128";
|
|
794
|
+
uint16: "uint16";
|
|
795
|
+
uint256: "uint256";
|
|
796
|
+
uint32: "uint32";
|
|
797
|
+
uint64: "uint64";
|
|
798
|
+
uint8: "uint8";
|
|
798
799
|
}>;
|
|
799
800
|
export declare const isStaticSolType: (value: string) => value is StaticSolType;
|
|
800
801
|
export declare const HandlePortZod: z.ZodObject<{
|
|
801
802
|
kind: z.ZodLiteral<"handle">;
|
|
802
803
|
name: z.ZodString;
|
|
803
804
|
type: z.ZodEnum<{
|
|
804
|
-
string: "string";
|
|
805
|
-
uint8: "uint8";
|
|
806
|
-
uint16: "uint16";
|
|
807
|
-
uint32: "uint32";
|
|
808
|
-
uint64: "uint64";
|
|
809
|
-
uint128: "uint128";
|
|
810
|
-
uint256: "uint256";
|
|
811
|
-
int128: "int128";
|
|
812
|
-
int256: "int256";
|
|
813
805
|
address: "address";
|
|
814
806
|
bool: "bool";
|
|
815
807
|
bytes: "bytes";
|
|
816
|
-
bytes4: "bytes4";
|
|
817
808
|
bytes32: "bytes32";
|
|
809
|
+
bytes4: "bytes4";
|
|
810
|
+
int128: "int128";
|
|
811
|
+
int256: "int256";
|
|
812
|
+
string: "string";
|
|
813
|
+
uint128: "uint128";
|
|
814
|
+
uint16: "uint16";
|
|
815
|
+
uint256: "uint256";
|
|
816
|
+
uint32: "uint32";
|
|
817
|
+
uint64: "uint64";
|
|
818
|
+
uint8: "uint8";
|
|
818
819
|
}>;
|
|
819
820
|
mode: z.ZodEnum<{
|
|
820
|
-
linear: "linear";
|
|
821
821
|
copy: "copy";
|
|
822
|
+
linear: "linear";
|
|
822
823
|
}>;
|
|
823
824
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
824
825
|
units: z.ZodOptional<z.ZodEnum<{
|
|
826
|
+
bps: "bps";
|
|
825
827
|
raw: "raw";
|
|
826
|
-
wad: "wad";
|
|
827
828
|
ray: "ray";
|
|
828
|
-
bps: "bps";
|
|
829
829
|
"token-decimals": "token-decimals";
|
|
830
|
+
wad: "wad";
|
|
830
831
|
}>>;
|
|
831
832
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
832
833
|
}, z.core.$strip>;
|
|
@@ -834,45 +835,45 @@ export declare const InputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
834
835
|
kind: z.ZodLiteral<"resource">;
|
|
835
836
|
name: z.ZodString;
|
|
836
837
|
accepts: z.ZodEnum<{
|
|
837
|
-
native: "native";
|
|
838
|
-
erc20: "erc20";
|
|
839
838
|
any: "any";
|
|
839
|
+
erc20: "erc20";
|
|
840
|
+
native: "native";
|
|
840
841
|
}>;
|
|
841
842
|
mode: z.ZodEnum<{
|
|
842
|
-
linear: "linear";
|
|
843
843
|
copy: "copy";
|
|
844
|
+
linear: "linear";
|
|
844
845
|
}>;
|
|
845
846
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
846
847
|
}, z.core.$strip>, z.ZodObject<{
|
|
847
848
|
kind: z.ZodLiteral<"handle">;
|
|
848
849
|
name: z.ZodString;
|
|
849
850
|
type: z.ZodEnum<{
|
|
850
|
-
string: "string";
|
|
851
|
-
uint8: "uint8";
|
|
852
|
-
uint16: "uint16";
|
|
853
|
-
uint32: "uint32";
|
|
854
|
-
uint64: "uint64";
|
|
855
|
-
uint128: "uint128";
|
|
856
|
-
uint256: "uint256";
|
|
857
|
-
int128: "int128";
|
|
858
|
-
int256: "int256";
|
|
859
851
|
address: "address";
|
|
860
852
|
bool: "bool";
|
|
861
853
|
bytes: "bytes";
|
|
862
|
-
bytes4: "bytes4";
|
|
863
854
|
bytes32: "bytes32";
|
|
855
|
+
bytes4: "bytes4";
|
|
856
|
+
int128: "int128";
|
|
857
|
+
int256: "int256";
|
|
858
|
+
string: "string";
|
|
859
|
+
uint128: "uint128";
|
|
860
|
+
uint16: "uint16";
|
|
861
|
+
uint256: "uint256";
|
|
862
|
+
uint32: "uint32";
|
|
863
|
+
uint64: "uint64";
|
|
864
|
+
uint8: "uint8";
|
|
864
865
|
}>;
|
|
865
866
|
mode: z.ZodEnum<{
|
|
866
|
-
linear: "linear";
|
|
867
867
|
copy: "copy";
|
|
868
|
+
linear: "linear";
|
|
868
869
|
}>;
|
|
869
870
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
870
871
|
units: z.ZodOptional<z.ZodEnum<{
|
|
872
|
+
bps: "bps";
|
|
871
873
|
raw: "raw";
|
|
872
|
-
wad: "wad";
|
|
873
874
|
ray: "ray";
|
|
874
|
-
bps: "bps";
|
|
875
875
|
"token-decimals": "token-decimals";
|
|
876
|
+
wad: "wad";
|
|
876
877
|
}>>;
|
|
877
878
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
878
879
|
}, z.core.$strip>], "kind">;
|
|
@@ -880,12 +881,12 @@ export declare const ResourceOutputPortZod: z.ZodObject<{
|
|
|
880
881
|
kind: z.ZodLiteral<"resource_output">;
|
|
881
882
|
name: z.ZodString;
|
|
882
883
|
mode: z.ZodEnum<{
|
|
883
|
-
linear: "linear";
|
|
884
884
|
copy: "copy";
|
|
885
|
+
linear: "linear";
|
|
885
886
|
}>;
|
|
886
887
|
availability: z.ZodOptional<z.ZodEnum<{
|
|
887
|
-
now: "now";
|
|
888
888
|
future: "future";
|
|
889
|
+
now: "now";
|
|
889
890
|
}>>;
|
|
890
891
|
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
891
892
|
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -896,12 +897,12 @@ export declare const OutputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
896
897
|
kind: z.ZodLiteral<"resource_output">;
|
|
897
898
|
name: z.ZodString;
|
|
898
899
|
mode: z.ZodEnum<{
|
|
899
|
-
linear: "linear";
|
|
900
900
|
copy: "copy";
|
|
901
|
+
linear: "linear";
|
|
901
902
|
}>;
|
|
902
903
|
availability: z.ZodOptional<z.ZodEnum<{
|
|
903
|
-
now: "now";
|
|
904
904
|
future: "future";
|
|
905
|
+
now: "now";
|
|
905
906
|
}>>;
|
|
906
907
|
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
907
908
|
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -911,32 +912,32 @@ export declare const OutputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
911
912
|
kind: z.ZodLiteral<"handle">;
|
|
912
913
|
name: z.ZodString;
|
|
913
914
|
type: z.ZodEnum<{
|
|
914
|
-
string: "string";
|
|
915
|
-
uint8: "uint8";
|
|
916
|
-
uint16: "uint16";
|
|
917
|
-
uint32: "uint32";
|
|
918
|
-
uint64: "uint64";
|
|
919
|
-
uint128: "uint128";
|
|
920
|
-
uint256: "uint256";
|
|
921
|
-
int128: "int128";
|
|
922
|
-
int256: "int256";
|
|
923
915
|
address: "address";
|
|
924
916
|
bool: "bool";
|
|
925
917
|
bytes: "bytes";
|
|
926
|
-
bytes4: "bytes4";
|
|
927
918
|
bytes32: "bytes32";
|
|
919
|
+
bytes4: "bytes4";
|
|
920
|
+
int128: "int128";
|
|
921
|
+
int256: "int256";
|
|
922
|
+
string: "string";
|
|
923
|
+
uint128: "uint128";
|
|
924
|
+
uint16: "uint16";
|
|
925
|
+
uint256: "uint256";
|
|
926
|
+
uint32: "uint32";
|
|
927
|
+
uint64: "uint64";
|
|
928
|
+
uint8: "uint8";
|
|
928
929
|
}>;
|
|
929
930
|
mode: z.ZodEnum<{
|
|
930
|
-
linear: "linear";
|
|
931
931
|
copy: "copy";
|
|
932
|
+
linear: "linear";
|
|
932
933
|
}>;
|
|
933
934
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
934
935
|
units: z.ZodOptional<z.ZodEnum<{
|
|
936
|
+
bps: "bps";
|
|
935
937
|
raw: "raw";
|
|
936
|
-
wad: "wad";
|
|
937
938
|
ray: "ray";
|
|
938
|
-
bps: "bps";
|
|
939
939
|
"token-decimals": "token-decimals";
|
|
940
|
+
wad: "wad";
|
|
940
941
|
}>>;
|
|
941
942
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
942
943
|
}, z.core.$strip>], "kind">;
|
|
@@ -947,45 +948,45 @@ export declare const ManifestOperationZod: z.ZodObject<{
|
|
|
947
948
|
kind: z.ZodLiteral<"resource">;
|
|
948
949
|
name: z.ZodString;
|
|
949
950
|
accepts: z.ZodEnum<{
|
|
950
|
-
native: "native";
|
|
951
|
-
erc20: "erc20";
|
|
952
951
|
any: "any";
|
|
952
|
+
erc20: "erc20";
|
|
953
|
+
native: "native";
|
|
953
954
|
}>;
|
|
954
955
|
mode: z.ZodEnum<{
|
|
955
|
-
linear: "linear";
|
|
956
956
|
copy: "copy";
|
|
957
|
+
linear: "linear";
|
|
957
958
|
}>;
|
|
958
959
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
959
960
|
}, z.core.$strip>, z.ZodObject<{
|
|
960
961
|
kind: z.ZodLiteral<"handle">;
|
|
961
962
|
name: z.ZodString;
|
|
962
963
|
type: z.ZodEnum<{
|
|
963
|
-
string: "string";
|
|
964
|
-
uint8: "uint8";
|
|
965
|
-
uint16: "uint16";
|
|
966
|
-
uint32: "uint32";
|
|
967
|
-
uint64: "uint64";
|
|
968
|
-
uint128: "uint128";
|
|
969
|
-
uint256: "uint256";
|
|
970
|
-
int128: "int128";
|
|
971
|
-
int256: "int256";
|
|
972
964
|
address: "address";
|
|
973
965
|
bool: "bool";
|
|
974
966
|
bytes: "bytes";
|
|
975
|
-
bytes4: "bytes4";
|
|
976
967
|
bytes32: "bytes32";
|
|
968
|
+
bytes4: "bytes4";
|
|
969
|
+
int128: "int128";
|
|
970
|
+
int256: "int256";
|
|
971
|
+
string: "string";
|
|
972
|
+
uint128: "uint128";
|
|
973
|
+
uint16: "uint16";
|
|
974
|
+
uint256: "uint256";
|
|
975
|
+
uint32: "uint32";
|
|
976
|
+
uint64: "uint64";
|
|
977
|
+
uint8: "uint8";
|
|
977
978
|
}>;
|
|
978
979
|
mode: z.ZodEnum<{
|
|
979
|
-
linear: "linear";
|
|
980
980
|
copy: "copy";
|
|
981
|
+
linear: "linear";
|
|
981
982
|
}>;
|
|
982
983
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
983
984
|
units: z.ZodOptional<z.ZodEnum<{
|
|
985
|
+
bps: "bps";
|
|
984
986
|
raw: "raw";
|
|
985
|
-
wad: "wad";
|
|
986
987
|
ray: "ray";
|
|
987
|
-
bps: "bps";
|
|
988
988
|
"token-decimals": "token-decimals";
|
|
989
|
+
wad: "wad";
|
|
989
990
|
}>>;
|
|
990
991
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
991
992
|
}, z.core.$strip>], "kind">>;
|
|
@@ -993,12 +994,12 @@ export declare const ManifestOperationZod: z.ZodObject<{
|
|
|
993
994
|
kind: z.ZodLiteral<"resource_output">;
|
|
994
995
|
name: z.ZodString;
|
|
995
996
|
mode: z.ZodEnum<{
|
|
996
|
-
linear: "linear";
|
|
997
997
|
copy: "copy";
|
|
998
|
+
linear: "linear";
|
|
998
999
|
}>;
|
|
999
1000
|
availability: z.ZodOptional<z.ZodEnum<{
|
|
1000
|
-
now: "now";
|
|
1001
1001
|
future: "future";
|
|
1002
|
+
now: "now";
|
|
1002
1003
|
}>>;
|
|
1003
1004
|
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
1004
1005
|
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1008,32 +1009,32 @@ export declare const ManifestOperationZod: z.ZodObject<{
|
|
|
1008
1009
|
kind: z.ZodLiteral<"handle">;
|
|
1009
1010
|
name: z.ZodString;
|
|
1010
1011
|
type: z.ZodEnum<{
|
|
1011
|
-
string: "string";
|
|
1012
|
-
uint8: "uint8";
|
|
1013
|
-
uint16: "uint16";
|
|
1014
|
-
uint32: "uint32";
|
|
1015
|
-
uint64: "uint64";
|
|
1016
|
-
uint128: "uint128";
|
|
1017
|
-
uint256: "uint256";
|
|
1018
|
-
int128: "int128";
|
|
1019
|
-
int256: "int256";
|
|
1020
1012
|
address: "address";
|
|
1021
1013
|
bool: "bool";
|
|
1022
1014
|
bytes: "bytes";
|
|
1023
|
-
bytes4: "bytes4";
|
|
1024
1015
|
bytes32: "bytes32";
|
|
1016
|
+
bytes4: "bytes4";
|
|
1017
|
+
int128: "int128";
|
|
1018
|
+
int256: "int256";
|
|
1019
|
+
string: "string";
|
|
1020
|
+
uint128: "uint128";
|
|
1021
|
+
uint16: "uint16";
|
|
1022
|
+
uint256: "uint256";
|
|
1023
|
+
uint32: "uint32";
|
|
1024
|
+
uint64: "uint64";
|
|
1025
|
+
uint8: "uint8";
|
|
1025
1026
|
}>;
|
|
1026
1027
|
mode: z.ZodEnum<{
|
|
1027
|
-
linear: "linear";
|
|
1028
1028
|
copy: "copy";
|
|
1029
|
+
linear: "linear";
|
|
1029
1030
|
}>;
|
|
1030
1031
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1031
1032
|
units: z.ZodOptional<z.ZodEnum<{
|
|
1033
|
+
bps: "bps";
|
|
1032
1034
|
raw: "raw";
|
|
1033
|
-
wad: "wad";
|
|
1034
1035
|
ray: "ray";
|
|
1035
|
-
bps: "bps";
|
|
1036
1036
|
"token-decimals": "token-decimals";
|
|
1037
|
+
wad: "wad";
|
|
1037
1038
|
}>>;
|
|
1038
1039
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1039
1040
|
}, z.core.$strip>], "kind">>;
|
|
@@ -1047,30 +1048,30 @@ export declare const GuardSelectorZod: z.ZodObject<{
|
|
|
1047
1048
|
}>;
|
|
1048
1049
|
match: z.ZodObject<{
|
|
1049
1050
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1051
|
+
handle: "handle";
|
|
1050
1052
|
resource: "resource";
|
|
1051
1053
|
resource_output: "resource_output";
|
|
1052
|
-
handle: "handle";
|
|
1053
1054
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1055
|
+
handle: "handle";
|
|
1054
1056
|
resource: "resource";
|
|
1055
1057
|
resource_output: "resource_output";
|
|
1056
|
-
handle: "handle";
|
|
1057
1058
|
}>>]>;
|
|
1058
1059
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
1059
|
-
linear: "linear";
|
|
1060
1060
|
copy: "copy";
|
|
1061
|
+
linear: "linear";
|
|
1061
1062
|
}>>;
|
|
1062
1063
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1063
|
-
native: "native";
|
|
1064
|
-
erc20: "erc20";
|
|
1065
1064
|
any: "any";
|
|
1065
|
+
erc20: "erc20";
|
|
1066
|
+
native: "native";
|
|
1066
1067
|
}>>;
|
|
1067
1068
|
}, z.core.$strip>;
|
|
1068
1069
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1069
1070
|
kind: z.ZodLiteral<"config">;
|
|
1070
1071
|
configKey: z.ZodString;
|
|
1071
1072
|
cardinality: z.ZodEnum<{
|
|
1072
|
-
one: "one";
|
|
1073
1073
|
many: "many";
|
|
1074
|
+
one: "one";
|
|
1074
1075
|
}>;
|
|
1075
1076
|
}, z.core.$strip>, z.ZodObject<{
|
|
1076
1077
|
kind: z.ZodLiteral<"all_matching">;
|
|
@@ -1085,30 +1086,30 @@ export declare const GuardCompatibilityZod: z.ZodObject<{
|
|
|
1085
1086
|
}>;
|
|
1086
1087
|
match: z.ZodObject<{
|
|
1087
1088
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1089
|
+
handle: "handle";
|
|
1088
1090
|
resource: "resource";
|
|
1089
1091
|
resource_output: "resource_output";
|
|
1090
|
-
handle: "handle";
|
|
1091
1092
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1093
|
+
handle: "handle";
|
|
1092
1094
|
resource: "resource";
|
|
1093
1095
|
resource_output: "resource_output";
|
|
1094
|
-
handle: "handle";
|
|
1095
1096
|
}>>]>;
|
|
1096
1097
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
1097
|
-
linear: "linear";
|
|
1098
1098
|
copy: "copy";
|
|
1099
|
+
linear: "linear";
|
|
1099
1100
|
}>>;
|
|
1100
1101
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1101
|
-
native: "native";
|
|
1102
|
-
erc20: "erc20";
|
|
1103
1102
|
any: "any";
|
|
1103
|
+
erc20: "erc20";
|
|
1104
|
+
native: "native";
|
|
1104
1105
|
}>>;
|
|
1105
1106
|
}, z.core.$strip>;
|
|
1106
1107
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1107
1108
|
kind: z.ZodLiteral<"config">;
|
|
1108
1109
|
configKey: z.ZodString;
|
|
1109
1110
|
cardinality: z.ZodEnum<{
|
|
1110
|
-
one: "one";
|
|
1111
1111
|
many: "many";
|
|
1112
|
+
one: "one";
|
|
1112
1113
|
}>;
|
|
1113
1114
|
}, z.core.$strip>, z.ZodObject<{
|
|
1114
1115
|
kind: z.ZodLiteral<"all_matching">;
|
|
@@ -1128,30 +1129,30 @@ export declare const ManifestGuardZod: z.ZodObject<{
|
|
|
1128
1129
|
}>;
|
|
1129
1130
|
match: z.ZodObject<{
|
|
1130
1131
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1132
|
+
handle: "handle";
|
|
1131
1133
|
resource: "resource";
|
|
1132
1134
|
resource_output: "resource_output";
|
|
1133
|
-
handle: "handle";
|
|
1134
1135
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1136
|
+
handle: "handle";
|
|
1135
1137
|
resource: "resource";
|
|
1136
1138
|
resource_output: "resource_output";
|
|
1137
|
-
handle: "handle";
|
|
1138
1139
|
}>>]>;
|
|
1139
1140
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
1140
|
-
linear: "linear";
|
|
1141
1141
|
copy: "copy";
|
|
1142
|
+
linear: "linear";
|
|
1142
1143
|
}>>;
|
|
1143
1144
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1144
|
-
native: "native";
|
|
1145
|
-
erc20: "erc20";
|
|
1146
1145
|
any: "any";
|
|
1146
|
+
erc20: "erc20";
|
|
1147
|
+
native: "native";
|
|
1147
1148
|
}>>;
|
|
1148
1149
|
}, z.core.$strip>;
|
|
1149
1150
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1150
1151
|
kind: z.ZodLiteral<"config">;
|
|
1151
1152
|
configKey: z.ZodString;
|
|
1152
1153
|
cardinality: z.ZodEnum<{
|
|
1153
|
-
one: "one";
|
|
1154
1154
|
many: "many";
|
|
1155
|
+
one: "one";
|
|
1155
1156
|
}>;
|
|
1156
1157
|
}, z.core.$strip>, z.ZodObject<{
|
|
1157
1158
|
kind: z.ZodLiteral<"all_matching">;
|
|
@@ -1163,9 +1164,9 @@ export declare const ManifestMaterialiserZod: z.ZodObject<{
|
|
|
1163
1164
|
kind: z.ZodString;
|
|
1164
1165
|
description: z.ZodOptional<z.ZodString>;
|
|
1165
1166
|
accepts: z.ZodEnum<{
|
|
1166
|
-
resource: "resource";
|
|
1167
|
-
handle: "handle";
|
|
1168
1167
|
any: "any";
|
|
1168
|
+
handle: "handle";
|
|
1169
|
+
resource: "resource";
|
|
1169
1170
|
}>;
|
|
1170
1171
|
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1171
1172
|
}, z.core.$strip>;
|
|
@@ -1177,8 +1178,8 @@ export declare const ManifestPreconditionZod: z.ZodObject<{
|
|
|
1177
1178
|
export declare const ManifestRoutingZod: z.ZodObject<{
|
|
1178
1179
|
maxRouteHops: z.ZodNumber;
|
|
1179
1180
|
swapHops: z.ZodEnum<{
|
|
1180
|
-
none: "none";
|
|
1181
1181
|
head: "head";
|
|
1182
|
+
none: "none";
|
|
1182
1183
|
}>;
|
|
1183
1184
|
}, z.core.$strip>;
|
|
1184
1185
|
export declare const ComposeManifestZod: z.ZodObject<{
|
|
@@ -1192,45 +1193,45 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1192
1193
|
kind: z.ZodLiteral<"resource">;
|
|
1193
1194
|
name: z.ZodString;
|
|
1194
1195
|
accepts: z.ZodEnum<{
|
|
1195
|
-
native: "native";
|
|
1196
|
-
erc20: "erc20";
|
|
1197
1196
|
any: "any";
|
|
1197
|
+
erc20: "erc20";
|
|
1198
|
+
native: "native";
|
|
1198
1199
|
}>;
|
|
1199
1200
|
mode: z.ZodEnum<{
|
|
1200
|
-
linear: "linear";
|
|
1201
1201
|
copy: "copy";
|
|
1202
|
+
linear: "linear";
|
|
1202
1203
|
}>;
|
|
1203
1204
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1204
1205
|
}, z.core.$strip>, z.ZodObject<{
|
|
1205
1206
|
kind: z.ZodLiteral<"handle">;
|
|
1206
1207
|
name: z.ZodString;
|
|
1207
1208
|
type: z.ZodEnum<{
|
|
1208
|
-
string: "string";
|
|
1209
|
-
uint8: "uint8";
|
|
1210
|
-
uint16: "uint16";
|
|
1211
|
-
uint32: "uint32";
|
|
1212
|
-
uint64: "uint64";
|
|
1213
|
-
uint128: "uint128";
|
|
1214
|
-
uint256: "uint256";
|
|
1215
|
-
int128: "int128";
|
|
1216
|
-
int256: "int256";
|
|
1217
1209
|
address: "address";
|
|
1218
1210
|
bool: "bool";
|
|
1219
1211
|
bytes: "bytes";
|
|
1220
|
-
bytes4: "bytes4";
|
|
1221
1212
|
bytes32: "bytes32";
|
|
1213
|
+
bytes4: "bytes4";
|
|
1214
|
+
int128: "int128";
|
|
1215
|
+
int256: "int256";
|
|
1216
|
+
string: "string";
|
|
1217
|
+
uint128: "uint128";
|
|
1218
|
+
uint16: "uint16";
|
|
1219
|
+
uint256: "uint256";
|
|
1220
|
+
uint32: "uint32";
|
|
1221
|
+
uint64: "uint64";
|
|
1222
|
+
uint8: "uint8";
|
|
1222
1223
|
}>;
|
|
1223
1224
|
mode: z.ZodEnum<{
|
|
1224
|
-
linear: "linear";
|
|
1225
1225
|
copy: "copy";
|
|
1226
|
+
linear: "linear";
|
|
1226
1227
|
}>;
|
|
1227
1228
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1228
1229
|
units: z.ZodOptional<z.ZodEnum<{
|
|
1230
|
+
bps: "bps";
|
|
1229
1231
|
raw: "raw";
|
|
1230
|
-
wad: "wad";
|
|
1231
1232
|
ray: "ray";
|
|
1232
|
-
bps: "bps";
|
|
1233
1233
|
"token-decimals": "token-decimals";
|
|
1234
|
+
wad: "wad";
|
|
1234
1235
|
}>>;
|
|
1235
1236
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1236
1237
|
}, z.core.$strip>], "kind">>;
|
|
@@ -1238,12 +1239,12 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1238
1239
|
kind: z.ZodLiteral<"resource_output">;
|
|
1239
1240
|
name: z.ZodString;
|
|
1240
1241
|
mode: z.ZodEnum<{
|
|
1241
|
-
linear: "linear";
|
|
1242
1242
|
copy: "copy";
|
|
1243
|
+
linear: "linear";
|
|
1243
1244
|
}>;
|
|
1244
1245
|
availability: z.ZodOptional<z.ZodEnum<{
|
|
1245
|
-
now: "now";
|
|
1246
1246
|
future: "future";
|
|
1247
|
+
now: "now";
|
|
1247
1248
|
}>>;
|
|
1248
1249
|
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
1249
1250
|
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1253,32 +1254,32 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1253
1254
|
kind: z.ZodLiteral<"handle">;
|
|
1254
1255
|
name: z.ZodString;
|
|
1255
1256
|
type: z.ZodEnum<{
|
|
1256
|
-
string: "string";
|
|
1257
|
-
uint8: "uint8";
|
|
1258
|
-
uint16: "uint16";
|
|
1259
|
-
uint32: "uint32";
|
|
1260
|
-
uint64: "uint64";
|
|
1261
|
-
uint128: "uint128";
|
|
1262
|
-
uint256: "uint256";
|
|
1263
|
-
int128: "int128";
|
|
1264
|
-
int256: "int256";
|
|
1265
1257
|
address: "address";
|
|
1266
1258
|
bool: "bool";
|
|
1267
1259
|
bytes: "bytes";
|
|
1268
|
-
bytes4: "bytes4";
|
|
1269
1260
|
bytes32: "bytes32";
|
|
1261
|
+
bytes4: "bytes4";
|
|
1262
|
+
int128: "int128";
|
|
1263
|
+
int256: "int256";
|
|
1264
|
+
string: "string";
|
|
1265
|
+
uint128: "uint128";
|
|
1266
|
+
uint16: "uint16";
|
|
1267
|
+
uint256: "uint256";
|
|
1268
|
+
uint32: "uint32";
|
|
1269
|
+
uint64: "uint64";
|
|
1270
|
+
uint8: "uint8";
|
|
1270
1271
|
}>;
|
|
1271
1272
|
mode: z.ZodEnum<{
|
|
1272
|
-
linear: "linear";
|
|
1273
1273
|
copy: "copy";
|
|
1274
|
+
linear: "linear";
|
|
1274
1275
|
}>;
|
|
1275
1276
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1276
1277
|
units: z.ZodOptional<z.ZodEnum<{
|
|
1278
|
+
bps: "bps";
|
|
1277
1279
|
raw: "raw";
|
|
1278
|
-
wad: "wad";
|
|
1279
1280
|
ray: "ray";
|
|
1280
|
-
bps: "bps";
|
|
1281
1281
|
"token-decimals": "token-decimals";
|
|
1282
|
+
wad: "wad";
|
|
1282
1283
|
}>>;
|
|
1283
1284
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1284
1285
|
}, z.core.$strip>], "kind">>;
|
|
@@ -1297,30 +1298,30 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1297
1298
|
}>;
|
|
1298
1299
|
match: z.ZodObject<{
|
|
1299
1300
|
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1301
|
+
handle: "handle";
|
|
1300
1302
|
resource: "resource";
|
|
1301
1303
|
resource_output: "resource_output";
|
|
1302
|
-
handle: "handle";
|
|
1303
1304
|
}>, z.ZodArray<z.ZodEnum<{
|
|
1305
|
+
handle: "handle";
|
|
1304
1306
|
resource: "resource";
|
|
1305
1307
|
resource_output: "resource_output";
|
|
1306
|
-
handle: "handle";
|
|
1307
1308
|
}>>]>;
|
|
1308
1309
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
1309
|
-
linear: "linear";
|
|
1310
1310
|
copy: "copy";
|
|
1311
|
+
linear: "linear";
|
|
1311
1312
|
}>>;
|
|
1312
1313
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1313
|
-
native: "native";
|
|
1314
|
-
erc20: "erc20";
|
|
1315
1314
|
any: "any";
|
|
1315
|
+
erc20: "erc20";
|
|
1316
|
+
native: "native";
|
|
1316
1317
|
}>>;
|
|
1317
1318
|
}, z.core.$strip>;
|
|
1318
1319
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1319
1320
|
kind: z.ZodLiteral<"config">;
|
|
1320
1321
|
configKey: z.ZodString;
|
|
1321
1322
|
cardinality: z.ZodEnum<{
|
|
1322
|
-
one: "one";
|
|
1323
1323
|
many: "many";
|
|
1324
|
+
one: "one";
|
|
1324
1325
|
}>;
|
|
1325
1326
|
}, z.core.$strip>, z.ZodObject<{
|
|
1326
1327
|
kind: z.ZodLiteral<"all_matching">;
|
|
@@ -1332,9 +1333,9 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1332
1333
|
kind: z.ZodString;
|
|
1333
1334
|
description: z.ZodOptional<z.ZodString>;
|
|
1334
1335
|
accepts: z.ZodEnum<{
|
|
1335
|
-
resource: "resource";
|
|
1336
|
-
handle: "handle";
|
|
1337
1336
|
any: "any";
|
|
1337
|
+
handle: "handle";
|
|
1338
|
+
resource: "resource";
|
|
1338
1339
|
}>;
|
|
1339
1340
|
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1340
1341
|
}, z.core.$strip>>;
|
|
@@ -1346,8 +1347,8 @@ export declare const ComposeManifestZod: z.ZodObject<{
|
|
|
1346
1347
|
routing: z.ZodOptional<z.ZodObject<{
|
|
1347
1348
|
maxRouteHops: z.ZodNumber;
|
|
1348
1349
|
swapHops: z.ZodEnum<{
|
|
1349
|
-
none: "none";
|
|
1350
1350
|
head: "head";
|
|
1351
|
+
none: "none";
|
|
1351
1352
|
}>;
|
|
1352
1353
|
}, z.core.$strip>>;
|
|
1353
1354
|
}, z.core.$strip>;
|
|
@@ -1377,16 +1378,16 @@ export declare const AssertionSpecZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1377
1378
|
chainId: z.ZodNumber;
|
|
1378
1379
|
token: z.ZodString;
|
|
1379
1380
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1380
|
-
escrow: "escrow";
|
|
1381
1381
|
delivery: "delivery";
|
|
1382
|
+
escrow: "escrow";
|
|
1382
1383
|
}>]>;
|
|
1383
1384
|
minAmount: z.ZodString;
|
|
1384
1385
|
}, z.core.$strip>, z.ZodObject<{
|
|
1385
1386
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1386
1387
|
chainId: z.ZodNumber;
|
|
1387
1388
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1388
|
-
escrow: "escrow";
|
|
1389
1389
|
delivery: "delivery";
|
|
1390
|
+
escrow: "escrow";
|
|
1390
1391
|
}>]>;
|
|
1391
1392
|
minAmount: z.ZodString;
|
|
1392
1393
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1396,8 +1397,8 @@ export declare const AssertionSpecZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1396
1397
|
signature: z.ZodString;
|
|
1397
1398
|
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1398
1399
|
comparator: z.ZodEnum<{
|
|
1399
|
-
gte: "gte";
|
|
1400
1400
|
eq: "eq";
|
|
1401
|
+
gte: "gte";
|
|
1401
1402
|
lte: "lte";
|
|
1402
1403
|
}>;
|
|
1403
1404
|
threshold: z.ZodString;
|
|
@@ -1411,16 +1412,16 @@ export declare const VerificationDescriptorZod: z.ZodObject<{
|
|
|
1411
1412
|
chainId: z.ZodNumber;
|
|
1412
1413
|
token: z.ZodString;
|
|
1413
1414
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1414
|
-
escrow: "escrow";
|
|
1415
1415
|
delivery: "delivery";
|
|
1416
|
+
escrow: "escrow";
|
|
1416
1417
|
}>]>;
|
|
1417
1418
|
minAmount: z.ZodString;
|
|
1418
1419
|
}, z.core.$strip>, z.ZodObject<{
|
|
1419
1420
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1420
1421
|
chainId: z.ZodNumber;
|
|
1421
1422
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1422
|
-
escrow: "escrow";
|
|
1423
1423
|
delivery: "delivery";
|
|
1424
|
+
escrow: "escrow";
|
|
1424
1425
|
}>]>;
|
|
1425
1426
|
minAmount: z.ZodString;
|
|
1426
1427
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1430,8 +1431,8 @@ export declare const VerificationDescriptorZod: z.ZodObject<{
|
|
|
1430
1431
|
signature: z.ZodString;
|
|
1431
1432
|
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1432
1433
|
comparator: z.ZodEnum<{
|
|
1433
|
-
gte: "gte";
|
|
1434
1434
|
eq: "eq";
|
|
1435
|
+
gte: "gte";
|
|
1435
1436
|
lte: "lte";
|
|
1436
1437
|
}>;
|
|
1437
1438
|
threshold: z.ZodString;
|
|
@@ -1638,7 +1639,7 @@ interface Port {
|
|
|
1638
1639
|
}
|
|
1639
1640
|
export declare const isResourceInput: (input: FlowInput) => input is ResourceInput;
|
|
1640
1641
|
export declare const flowInputType: (input: FlowInput) => SolType;
|
|
1641
|
-
export declare const flowInputMode: (input: FlowInput) =>
|
|
1642
|
+
export declare const flowInputMode: (input: FlowInput) => 'linear' | 'copy';
|
|
1642
1643
|
export declare const flowInputResource: (input: FlowInput) => Resource | undefined;
|
|
1643
1644
|
export declare const isResourcePort: (port: OpInputPort) => port is ResourcePort;
|
|
1644
1645
|
export declare const isHandlePort: (port: OpInputPort | OpOutputPort) => port is HandlePort;
|
|
@@ -1717,20 +1718,31 @@ type PreconditionOf<C extends object> = PreconditionBase & C;
|
|
|
1717
1718
|
type PreconditionConfigOf<C extends object> = Omit<PreconditionBase, 'type'> & C;
|
|
1718
1719
|
//#endregion
|
|
1719
1720
|
//#region src/flashloan.d.ts
|
|
1720
|
-
export declare const
|
|
1721
|
-
readonly AAVE_V3: 0;
|
|
1722
|
-
readonly ERC3156: 1;
|
|
1723
|
-
readonly BALANCER_V2: 2;
|
|
1724
|
-
readonly MORPHO_BLUE: 3;
|
|
1725
|
-
};
|
|
1726
|
-
export declare const providerKindNames: readonly ["aave-v3", "erc3156", "balancer-v2", "morpho-blue"];
|
|
1721
|
+
export declare const providerKindNames: readonly ['aave-v3', 'balancer-v2', 'morpho-blue'];
|
|
1727
1722
|
type ProviderKindName = (typeof providerKindNames)[number];
|
|
1728
|
-
export declare const
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1723
|
+
export declare const FlashloanConfigSchema: Schema.Struct<{
|
|
1724
|
+
providerKind: Schema.Literal<["aave-v3", "balancer-v2", "morpho-blue"]>;
|
|
1725
|
+
amount: Schema.filter<typeof Schema.String>;
|
|
1726
|
+
maxFee: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
1727
|
+
}>;
|
|
1728
|
+
export declare const FlashloanMaterialiserInputSchema: Schema.Struct<{
|
|
1729
|
+
providerKind: Schema.Literal<["aave-v3", "balancer-v2", "morpho-blue"]>;
|
|
1730
|
+
amount: Schema.filter<typeof Schema.String>;
|
|
1731
|
+
maxFee: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
1732
|
+
kind: Schema.Literal<["flashloan"]>;
|
|
1733
|
+
}>;
|
|
1734
|
+
type FlashloanMaterialiserInput = typeof FlashloanMaterialiserInputSchema.Type;
|
|
1735
|
+
export declare const isFlashloanMaterialiserInput: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is {
|
|
1736
|
+
readonly providerKind: "aave-v3" | "balancer-v2" | "morpho-blue";
|
|
1732
1737
|
readonly amount: string;
|
|
1733
|
-
|
|
1738
|
+
readonly maxFee?: string | undefined;
|
|
1739
|
+
readonly kind: "flashloan";
|
|
1740
|
+
};
|
|
1741
|
+
export declare const flashloanMaxFee: ({ providerKind, amount, maxFee }: {
|
|
1742
|
+
readonly providerKind: ProviderKindName;
|
|
1743
|
+
readonly amount: string | bigint;
|
|
1744
|
+
readonly maxFee?: string | bigint;
|
|
1745
|
+
}) => bigint;
|
|
1734
1746
|
//#endregion
|
|
1735
1747
|
//#region src/constructors.d.ts
|
|
1736
1748
|
interface OpHandleOptions<Opt extends boolean = boolean> {
|
|
@@ -1741,12 +1753,12 @@ interface OpHandleOptions<Opt extends boolean = boolean> {
|
|
|
1741
1753
|
export declare const linear: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
1742
1754
|
readonly name: N;
|
|
1743
1755
|
readonly type: T;
|
|
1744
|
-
readonly mode:
|
|
1756
|
+
readonly mode: 'linear';
|
|
1745
1757
|
};
|
|
1746
1758
|
export declare const copy: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
1747
1759
|
readonly name: N;
|
|
1748
1760
|
readonly type: T;
|
|
1749
|
-
readonly mode:
|
|
1761
|
+
readonly mode: 'copy';
|
|
1750
1762
|
};
|
|
1751
1763
|
export declare const handle: <N extends string, T extends SolType>(name: N, type: T) => HandleInput & {
|
|
1752
1764
|
readonly name: N;
|
|
@@ -1758,15 +1770,15 @@ export declare const native: <N extends string>(name: N, chainId: number) => Res
|
|
|
1758
1770
|
export declare const erc20: <N extends string>(name: N, token: string, chainId: number) => ResourceInput & {
|
|
1759
1771
|
readonly name: N;
|
|
1760
1772
|
};
|
|
1761
|
-
export declare const resource: <N extends string, Opt extends boolean = false>(name: N, accepts:
|
|
1773
|
+
export declare const resource: <N extends string, Opt extends boolean = false>(name: N, accepts: 'erc20' | 'native' | 'any', options?: {
|
|
1762
1774
|
readonly optional?: Opt;
|
|
1763
1775
|
}) => ResourcePort & {
|
|
1764
1776
|
readonly name: N;
|
|
1765
1777
|
readonly optional: NoInfer<Opt>;
|
|
1766
1778
|
};
|
|
1767
|
-
export declare const readResource: <N extends string>(name: N, accepts:
|
|
1779
|
+
export declare const readResource: <N extends string>(name: N, accepts: 'erc20' | 'native' | 'any') => ResourcePort & {
|
|
1768
1780
|
readonly name: N;
|
|
1769
|
-
readonly mode:
|
|
1781
|
+
readonly mode: 'copy';
|
|
1770
1782
|
};
|
|
1771
1783
|
export declare const opHandle: <N extends string, T extends SolType, Opt extends boolean = false>(name: N, type: T, options?: OpHandleOptions<Opt>) => HandlePort & {
|
|
1772
1784
|
readonly name: N;
|
|
@@ -1788,7 +1800,7 @@ type OutputCountFrom<O> = O extends {
|
|
|
1788
1800
|
type OutputAvailability<O> = [O] extends ['future'] ? 'future' : [O] extends ['now'] ? 'now' : [O] extends [string] ? Availability : O extends {
|
|
1789
1801
|
readonly availability: infer A;
|
|
1790
1802
|
} ? [A] extends ['future'] ? 'future' : [A] extends ['now'] ? 'now' : Availability : 'now';
|
|
1791
|
-
export declare const resourceOutput: <N extends string, const O extends ResourceOutputOptions =
|
|
1803
|
+
export declare const resourceOutput: <N extends string, const O extends ResourceOutputOptions = 'now'>(name: N, options?: O) => ResourceOutputPort & {
|
|
1792
1804
|
readonly name: N;
|
|
1793
1805
|
readonly availability: OutputAvailability<O>;
|
|
1794
1806
|
} & OutputCountFrom<O>;
|
|
@@ -1799,8 +1811,8 @@ type OutputFamilyPort = ResourceOutputPort & {
|
|
|
1799
1811
|
};
|
|
1800
1812
|
export declare const isOutputFamily: (port: OpOutputPort) => port is OutputFamilyPort;
|
|
1801
1813
|
export declare const instancePortName: (family: string, index: number) => string;
|
|
1802
|
-
export declare const familySize: (family: Pick<OutputFamilyPort,
|
|
1803
|
-
export declare const expandOutputPorts: (declared: readonly OpOutputPort[], config: Call[
|
|
1814
|
+
export declare const familySize: (family: Pick<OutputFamilyPort, 'name' | 'countFrom'>, config: Call['config']) => number;
|
|
1815
|
+
export declare const expandOutputPorts: (declared: readonly OpOutputPort[], config: Call['config']) => readonly OpOutputPort[];
|
|
1804
1816
|
//#endregion
|
|
1805
1817
|
//#region src/ref.d.ts
|
|
1806
1818
|
type ParsedRef = {
|
|
@@ -2198,9 +2210,9 @@ type Erc20AllowancePrecondition = {
|
|
|
2198
2210
|
readonly token: string;
|
|
2199
2211
|
readonly allowance: bigint | string;
|
|
2200
2212
|
};
|
|
2201
|
-
export declare const erc20Balance: (config: Omit<Erc20BalancePrecondition,
|
|
2202
|
-
export declare const nativeBalance: (config: Omit<NativeBalancePrecondition,
|
|
2203
|
-
export declare const erc20Allowance: (config: Omit<Erc20AllowancePrecondition,
|
|
2213
|
+
export declare const erc20Balance: (config: Omit<Erc20BalancePrecondition, 'type'>) => Erc20BalancePrecondition;
|
|
2214
|
+
export declare const nativeBalance: (config: Omit<NativeBalancePrecondition, 'type'>) => NativeBalancePrecondition;
|
|
2215
|
+
export declare const erc20Allowance: (config: Omit<Erc20AllowancePrecondition, 'type'>) => Erc20AllowancePrecondition;
|
|
2204
2216
|
export declare const isErc20BalancePrecondition: (p: Precondition) => p is Erc20BalancePrecondition;
|
|
2205
2217
|
export declare const isErc20AllowancePrecondition: (p: Precondition) => p is Erc20AllowancePrecondition;
|
|
2206
2218
|
export declare const isNativeBalancePrecondition: (p: Precondition) => p is NativeBalancePrecondition;
|