@lifi/compose-spec 0.7.1 → 0.9.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 +1 -1
- package/dist/index.cjs +1018 -1144
- package/dist/index.d.cts +1693 -1996
- package/dist/index.d.ts +1693 -1996
- package/dist/index.js +926 -1032
- package/package.json +3 -3
- package/src/chainCapabilities.ts +3 -3
- package/src/compile.ts +4 -4
- package/src/continuation.ts +24 -80
- package/src/descriptor.ts +8 -8
- package/src/flowSchema.ts +6 -6
- package/src/index.ts +0 -11
- package/src/output.ts +7 -4
- package/src/zodSchemas.ts +17 -42
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Schema } from
|
|
2
|
-
import z from
|
|
3
|
-
|
|
4
|
-
declare const SolTypeSchema: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
5
|
-
declare const EVMAddressString: Schema.refine<string, typeof Schema.String>;
|
|
6
|
-
declare const IntegerString: Schema.filter<typeof Schema.String>;
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
//#region src/flowSchema.d.ts
|
|
4
|
+
export declare const SolTypeSchema: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
5
|
+
export declare const EVMAddressString: Schema.refine<string, typeof Schema.String>;
|
|
6
|
+
export declare const IntegerString: Schema.filter<typeof Schema.String>;
|
|
7
7
|
/**
|
|
8
8
|
* THE chain-capabilities chokepoint.
|
|
9
9
|
*
|
|
@@ -21,187 +21,187 @@ declare const IntegerString: Schema.filter<typeof Schema.String>;
|
|
|
21
21
|
* the published wire format from the encoded (`from`) side, so the manifest
|
|
22
22
|
* keeps advertising the plain union with both arms.
|
|
23
23
|
*/
|
|
24
|
-
declare const ResourceSchema: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
24
|
+
export declare const ResourceSchema: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
25
|
+
kind: Schema.Literal<["native"]>;
|
|
26
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
27
|
+
}>, Schema.Struct<{
|
|
28
|
+
kind: Schema.Literal<["erc20"]>;
|
|
29
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
30
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
31
|
+
}>]>, Schema.SchemaClass<{
|
|
32
|
+
readonly kind: "native";
|
|
33
|
+
readonly chainId: number;
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: "erc20";
|
|
36
|
+
readonly chainId: number;
|
|
37
|
+
readonly token: string;
|
|
38
|
+
}, {
|
|
39
|
+
readonly kind: "native";
|
|
40
|
+
readonly chainId: number;
|
|
41
|
+
} | {
|
|
42
|
+
readonly kind: "erc20";
|
|
43
|
+
readonly chainId: number;
|
|
44
|
+
readonly token: string;
|
|
45
|
+
}, never>>;
|
|
46
|
+
export declare const ResourceInputSchema: Schema.Struct<{
|
|
47
|
+
name: typeof Schema.String;
|
|
48
|
+
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
25
49
|
kind: Schema.Literal<["native"]>;
|
|
26
50
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
27
|
-
}>, Schema.Struct<{
|
|
51
|
+
}>, Schema.Struct<{
|
|
28
52
|
kind: Schema.Literal<["erc20"]>;
|
|
29
53
|
token: Schema.refine<string, typeof Schema.String>;
|
|
30
54
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
31
|
-
}>]>, Schema.SchemaClass<{
|
|
55
|
+
}>]>, Schema.SchemaClass<{
|
|
32
56
|
readonly kind: "native";
|
|
33
57
|
readonly chainId: number;
|
|
34
|
-
} | {
|
|
58
|
+
} | {
|
|
59
|
+
readonly kind: "erc20";
|
|
60
|
+
readonly chainId: number;
|
|
35
61
|
readonly token: string;
|
|
62
|
+
}, {
|
|
63
|
+
readonly kind: "native";
|
|
64
|
+
readonly chainId: number;
|
|
65
|
+
} | {
|
|
36
66
|
readonly kind: "erc20";
|
|
37
67
|
readonly chainId: number;
|
|
38
|
-
|
|
68
|
+
readonly token: string;
|
|
69
|
+
}, never>>;
|
|
70
|
+
}>;
|
|
71
|
+
export declare const HandleInputSchema: Schema.Struct<{
|
|
72
|
+
name: typeof Schema.String;
|
|
73
|
+
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const FlowInputSchema: Schema.Union<[Schema.Struct<{
|
|
76
|
+
name: typeof Schema.String;
|
|
77
|
+
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
78
|
+
kind: Schema.Literal<["native"]>;
|
|
79
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
80
|
+
}>, Schema.Struct<{
|
|
81
|
+
kind: Schema.Literal<["erc20"]>;
|
|
82
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
83
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
84
|
+
}>]>, Schema.SchemaClass<{
|
|
39
85
|
readonly kind: "native";
|
|
40
86
|
readonly chainId: number;
|
|
41
|
-
} | {
|
|
87
|
+
} | {
|
|
88
|
+
readonly kind: "erc20";
|
|
89
|
+
readonly chainId: number;
|
|
42
90
|
readonly token: string;
|
|
91
|
+
}, {
|
|
92
|
+
readonly kind: "native";
|
|
93
|
+
readonly chainId: number;
|
|
94
|
+
} | {
|
|
43
95
|
readonly kind: "erc20";
|
|
44
96
|
readonly chainId: number;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
54
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
55
|
-
}>]>, Schema.SchemaClass<{
|
|
56
|
-
readonly kind: "native";
|
|
57
|
-
readonly chainId: number;
|
|
58
|
-
} | {
|
|
59
|
-
readonly token: string;
|
|
60
|
-
readonly kind: "erc20";
|
|
61
|
-
readonly chainId: number;
|
|
62
|
-
}, {
|
|
63
|
-
readonly kind: "native";
|
|
64
|
-
readonly chainId: number;
|
|
65
|
-
} | {
|
|
66
|
-
readonly token: string;
|
|
67
|
-
readonly kind: "erc20";
|
|
68
|
-
readonly chainId: number;
|
|
69
|
-
}, never>>;
|
|
97
|
+
readonly token: string;
|
|
98
|
+
}, never>>;
|
|
99
|
+
}>, Schema.Struct<{
|
|
100
|
+
name: typeof Schema.String;
|
|
101
|
+
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
102
|
+
}>]>;
|
|
103
|
+
export declare const RefSchema: Schema.Struct<{
|
|
104
|
+
$ref: Schema.filter<typeof Schema.String>;
|
|
70
105
|
}>;
|
|
71
|
-
declare const
|
|
72
|
-
|
|
73
|
-
|
|
106
|
+
export declare const LiteralBindingSchema: Schema.Struct<{
|
|
107
|
+
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
108
|
+
value: typeof Schema.String;
|
|
109
|
+
}>;
|
|
110
|
+
export declare const BindValueSchema: Schema.Union<[Schema.Struct<{
|
|
111
|
+
$ref: Schema.filter<typeof Schema.String>;
|
|
112
|
+
}>, Schema.Struct<{
|
|
113
|
+
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
114
|
+
value: typeof Schema.String;
|
|
115
|
+
}>]>;
|
|
116
|
+
export declare const AppliedGuardSchema: Schema.TypeLiteral<{
|
|
117
|
+
kind: typeof Schema.String;
|
|
118
|
+
}, readonly [{
|
|
119
|
+
readonly key: typeof Schema.String;
|
|
120
|
+
readonly value: typeof Schema.Unknown;
|
|
121
|
+
}]>;
|
|
122
|
+
export declare const CallSchema: Schema.Struct<{
|
|
123
|
+
id: Schema.filter<typeof Schema.String>;
|
|
124
|
+
op: typeof Schema.String;
|
|
125
|
+
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
126
|
+
$ref: Schema.filter<typeof Schema.String>;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
129
|
+
value: typeof Schema.String;
|
|
130
|
+
}>]>>, {
|
|
131
|
+
default: () => {};
|
|
132
|
+
}>;
|
|
133
|
+
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
134
|
+
default: () => {};
|
|
135
|
+
}>;
|
|
136
|
+
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
137
|
+
kind: typeof Schema.String;
|
|
138
|
+
}, readonly [{
|
|
139
|
+
readonly key: typeof Schema.String;
|
|
140
|
+
readonly value: typeof Schema.Unknown;
|
|
141
|
+
}]>>>;
|
|
142
|
+
}>;
|
|
143
|
+
export declare const UuidSchema: Schema.filter<typeof Schema.String>;
|
|
144
|
+
export declare const LineageSchema: Schema.Struct<{
|
|
145
|
+
journeyId: Schema.filter<typeof Schema.String>;
|
|
146
|
+
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
74
147
|
}>;
|
|
75
|
-
declare const
|
|
148
|
+
export declare const FlowSchema: Schema.Struct<{
|
|
149
|
+
version: Schema.Literal<[1]>;
|
|
150
|
+
id: typeof Schema.String;
|
|
151
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
152
|
+
inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
76
153
|
name: typeof Schema.String;
|
|
77
154
|
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
78
|
-
|
|
79
|
-
|
|
155
|
+
kind: Schema.Literal<["native"]>;
|
|
156
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
80
157
|
}>, Schema.Struct<{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
158
|
+
kind: Schema.Literal<["erc20"]>;
|
|
159
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
160
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
84
161
|
}>]>, Schema.SchemaClass<{
|
|
85
|
-
|
|
86
|
-
|
|
162
|
+
readonly kind: "native";
|
|
163
|
+
readonly chainId: number;
|
|
87
164
|
} | {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
165
|
+
readonly kind: "erc20";
|
|
166
|
+
readonly chainId: number;
|
|
167
|
+
readonly token: string;
|
|
91
168
|
}, {
|
|
92
|
-
|
|
93
|
-
|
|
169
|
+
readonly kind: "native";
|
|
170
|
+
readonly chainId: number;
|
|
94
171
|
} | {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
172
|
+
readonly kind: "erc20";
|
|
173
|
+
readonly chainId: number;
|
|
174
|
+
readonly token: string;
|
|
98
175
|
}, never>>;
|
|
99
|
-
}>, Schema.Struct<{
|
|
176
|
+
}>, Schema.Struct<{
|
|
100
177
|
name: typeof Schema.String;
|
|
101
178
|
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
102
|
-
}>]
|
|
103
|
-
|
|
104
|
-
$ref: Schema.filter<typeof Schema.String>;
|
|
105
|
-
}>;
|
|
106
|
-
declare const LiteralBindingSchema: Schema.Struct<{
|
|
107
|
-
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
108
|
-
value: typeof Schema.String;
|
|
109
|
-
}>;
|
|
110
|
-
declare const BindValueSchema: Schema.Union<[Schema.Struct<{
|
|
111
|
-
$ref: Schema.filter<typeof Schema.String>;
|
|
112
|
-
}>, Schema.Struct<{
|
|
113
|
-
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
114
|
-
value: typeof Schema.String;
|
|
115
|
-
}>]>;
|
|
116
|
-
declare const AppliedGuardSchema: Schema.TypeLiteral<{
|
|
117
|
-
kind: typeof Schema.String;
|
|
118
|
-
}, readonly [{
|
|
119
|
-
readonly key: typeof Schema.String;
|
|
120
|
-
readonly value: typeof Schema.Unknown;
|
|
121
|
-
}]>;
|
|
122
|
-
declare const CallSchema: Schema.Struct<{
|
|
179
|
+
}>]>>;
|
|
180
|
+
nodes: Schema.Array$<Schema.Struct<{
|
|
123
181
|
id: Schema.filter<typeof Schema.String>;
|
|
124
182
|
op: typeof Schema.String;
|
|
125
183
|
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
126
|
-
|
|
184
|
+
$ref: Schema.filter<typeof Schema.String>;
|
|
127
185
|
}>, Schema.Struct<{
|
|
128
|
-
|
|
129
|
-
|
|
186
|
+
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
187
|
+
value: typeof Schema.String;
|
|
130
188
|
}>]>>, {
|
|
131
|
-
|
|
189
|
+
default: () => {};
|
|
132
190
|
}>;
|
|
133
191
|
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
134
|
-
|
|
192
|
+
default: () => {};
|
|
135
193
|
}>;
|
|
136
194
|
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
137
|
-
|
|
195
|
+
kind: typeof Schema.String;
|
|
138
196
|
}, readonly [{
|
|
139
|
-
|
|
140
|
-
|
|
197
|
+
readonly key: typeof Schema.String;
|
|
198
|
+
readonly value: typeof Schema.Unknown;
|
|
141
199
|
}]>>>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
declare const LineageSchema: Schema.Struct<{
|
|
200
|
+
}>>;
|
|
201
|
+
lineage: Schema.optional<Schema.Struct<{
|
|
145
202
|
journeyId: Schema.filter<typeof Schema.String>;
|
|
146
203
|
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
147
|
-
}
|
|
148
|
-
declare const FlowSchema: Schema.Struct<{
|
|
149
|
-
version: Schema.Literal<[1]>;
|
|
150
|
-
id: typeof Schema.String;
|
|
151
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
152
|
-
inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
153
|
-
name: typeof Schema.String;
|
|
154
|
-
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
155
|
-
kind: Schema.Literal<["native"]>;
|
|
156
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
157
|
-
}>, Schema.Struct<{
|
|
158
|
-
kind: Schema.Literal<["erc20"]>;
|
|
159
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
160
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
161
|
-
}>]>, Schema.SchemaClass<{
|
|
162
|
-
readonly kind: "native";
|
|
163
|
-
readonly chainId: number;
|
|
164
|
-
} | {
|
|
165
|
-
readonly token: string;
|
|
166
|
-
readonly kind: "erc20";
|
|
167
|
-
readonly chainId: number;
|
|
168
|
-
}, {
|
|
169
|
-
readonly kind: "native";
|
|
170
|
-
readonly chainId: number;
|
|
171
|
-
} | {
|
|
172
|
-
readonly token: string;
|
|
173
|
-
readonly kind: "erc20";
|
|
174
|
-
readonly chainId: number;
|
|
175
|
-
}, never>>;
|
|
176
|
-
}>, Schema.Struct<{
|
|
177
|
-
name: typeof Schema.String;
|
|
178
|
-
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
179
|
-
}>]>>;
|
|
180
|
-
nodes: Schema.Array$<Schema.Struct<{
|
|
181
|
-
id: Schema.filter<typeof Schema.String>;
|
|
182
|
-
op: typeof Schema.String;
|
|
183
|
-
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
184
|
-
$ref: Schema.filter<typeof Schema.String>;
|
|
185
|
-
}>, Schema.Struct<{
|
|
186
|
-
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
187
|
-
value: typeof Schema.String;
|
|
188
|
-
}>]>>, {
|
|
189
|
-
default: () => {};
|
|
190
|
-
}>;
|
|
191
|
-
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
192
|
-
default: () => {};
|
|
193
|
-
}>;
|
|
194
|
-
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
195
|
-
kind: typeof Schema.String;
|
|
196
|
-
}, readonly [{
|
|
197
|
-
readonly key: typeof Schema.String;
|
|
198
|
-
readonly value: typeof Schema.Unknown;
|
|
199
|
-
}]>>>;
|
|
200
|
-
}>>;
|
|
201
|
-
lineage: Schema.optional<Schema.Struct<{
|
|
202
|
-
journeyId: Schema.filter<typeof Schema.String>;
|
|
203
|
-
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
204
|
-
}>>;
|
|
204
|
+
}>>;
|
|
205
205
|
}>;
|
|
206
206
|
type SolType = typeof SolTypeSchema.Type;
|
|
207
207
|
type ResourceInput = typeof ResourceInputSchema.Type;
|
|
@@ -214,1648 +214,1387 @@ type AppliedGuard = typeof AppliedGuardSchema.Type;
|
|
|
214
214
|
type Call = typeof CallSchema.Type;
|
|
215
215
|
type Lineage = typeof LineageSchema.Type;
|
|
216
216
|
type Flow = typeof FlowSchema.Type;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
declare const
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/continuation.d.ts
|
|
219
|
+
export declare const CONTINUATION_COMMITMENT_OP_ID = "continuation.commitment";
|
|
220
|
+
export declare const ContinuationOutcomeSchema: Schema.transform<Schema.Struct<{
|
|
221
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
222
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
223
|
+
destination: Schema.refine<string, typeof Schema.String>;
|
|
224
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
225
|
+
}>, Schema.SchemaClass<{
|
|
226
|
+
readonly chainId: number;
|
|
227
|
+
readonly token: string;
|
|
228
|
+
readonly minAmount: string;
|
|
229
|
+
readonly destination: string;
|
|
230
|
+
}, {
|
|
231
|
+
readonly chainId: number;
|
|
232
|
+
readonly token: string;
|
|
233
|
+
readonly minAmount: string;
|
|
234
|
+
readonly destination: string;
|
|
235
|
+
}, never>>;
|
|
236
|
+
export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
237
|
+
outcomes: Schema.NonEmptyArray<Schema.transform<Schema.Struct<{
|
|
220
238
|
token: Schema.refine<string, typeof Schema.String>;
|
|
221
239
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
222
240
|
destination: Schema.refine<string, typeof Schema.String>;
|
|
223
241
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
224
|
-
}>, Schema.SchemaClass<{
|
|
225
|
-
readonly token: string;
|
|
242
|
+
}>, Schema.SchemaClass<{
|
|
226
243
|
readonly chainId: number;
|
|
244
|
+
readonly token: string;
|
|
227
245
|
readonly minAmount: string;
|
|
228
246
|
readonly destination: string;
|
|
229
|
-
}, {
|
|
230
|
-
readonly token: string;
|
|
247
|
+
}, {
|
|
231
248
|
readonly chainId: number;
|
|
249
|
+
readonly token: string;
|
|
232
250
|
readonly minAmount: string;
|
|
233
251
|
readonly destination: string;
|
|
234
|
-
}, never
|
|
235
|
-
|
|
236
|
-
|
|
252
|
+
}, never>>>;
|
|
253
|
+
continuationFlow: Schema.optional<Schema.Struct<{
|
|
254
|
+
version: Schema.Literal<[1]>;
|
|
255
|
+
id: typeof Schema.String;
|
|
256
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
257
|
+
inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
258
|
+
name: typeof Schema.String;
|
|
259
|
+
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
260
|
+
kind: Schema.Literal<["native"]>;
|
|
261
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
262
|
+
}>, Schema.Struct<{
|
|
263
|
+
kind: Schema.Literal<["erc20"]>;
|
|
237
264
|
token: Schema.refine<string, typeof Schema.String>;
|
|
238
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
239
|
-
destination: Schema.refine<string, typeof Schema.String>;
|
|
240
265
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
241
|
-
|
|
242
|
-
readonly
|
|
266
|
+
}>]>, Schema.SchemaClass<{
|
|
267
|
+
readonly kind: "native";
|
|
268
|
+
readonly chainId: number;
|
|
269
|
+
} | {
|
|
270
|
+
readonly kind: "erc20";
|
|
243
271
|
readonly chainId: number;
|
|
244
|
-
readonly minAmount: string;
|
|
245
|
-
readonly destination: string;
|
|
246
|
-
}, {
|
|
247
272
|
readonly token: string;
|
|
273
|
+
}, {
|
|
274
|
+
readonly kind: "native";
|
|
248
275
|
readonly chainId: number;
|
|
249
|
-
|
|
250
|
-
readonly
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}>]>, Schema.SchemaClass<{
|
|
266
|
-
readonly kind: "native";
|
|
267
|
-
readonly chainId: number;
|
|
268
|
-
} | {
|
|
269
|
-
readonly token: string;
|
|
270
|
-
readonly kind: "erc20";
|
|
271
|
-
readonly chainId: number;
|
|
272
|
-
}, {
|
|
273
|
-
readonly kind: "native";
|
|
274
|
-
readonly chainId: number;
|
|
275
|
-
} | {
|
|
276
|
-
readonly token: string;
|
|
277
|
-
readonly kind: "erc20";
|
|
278
|
-
readonly chainId: number;
|
|
279
|
-
}, never>>;
|
|
280
|
-
}>, Schema.Struct<{
|
|
281
|
-
name: typeof Schema.String;
|
|
282
|
-
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
283
|
-
}>]>>;
|
|
284
|
-
nodes: Schema.Array$<Schema.Struct<{
|
|
285
|
-
id: Schema.filter<typeof Schema.String>;
|
|
286
|
-
op: typeof Schema.String;
|
|
287
|
-
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
288
|
-
$ref: Schema.filter<typeof Schema.String>;
|
|
289
|
-
}>, Schema.Struct<{
|
|
290
|
-
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
291
|
-
value: typeof Schema.String;
|
|
292
|
-
}>]>>, {
|
|
293
|
-
default: () => {};
|
|
294
|
-
}>;
|
|
295
|
-
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
296
|
-
default: () => {};
|
|
297
|
-
}>;
|
|
298
|
-
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
299
|
-
kind: typeof Schema.String;
|
|
300
|
-
}, readonly [{
|
|
301
|
-
readonly key: typeof Schema.String;
|
|
302
|
-
readonly value: typeof Schema.Unknown;
|
|
303
|
-
}]>>>;
|
|
304
|
-
}>>;
|
|
305
|
-
lineage: Schema.optional<Schema.Struct<{
|
|
306
|
-
journeyId: Schema.filter<typeof Schema.String>;
|
|
307
|
-
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
308
|
-
}>>;
|
|
309
|
-
}>>;
|
|
310
|
-
validity: Schema.Struct<{
|
|
311
|
-
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
312
|
-
}>;
|
|
313
|
-
perpetual: Schema.optional<typeof Schema.Boolean>;
|
|
314
|
-
provider: Schema.optional<typeof Schema.String>;
|
|
315
|
-
funding: Schema.optional<Schema.Literal<["inline", "external"]>>;
|
|
316
|
-
}>;
|
|
317
|
-
declare const HexStringSchema: Schema.filter<typeof Schema.String>;
|
|
318
|
-
declare const Phase1ArtifactSchema: Schema.Union<[Schema.Struct<{
|
|
319
|
-
kind: Schema.Literal<["transaction"]>;
|
|
320
|
-
funding: Schema.Literal<["inline", "external"]>;
|
|
321
|
-
transactionRequest: Schema.optional<Schema.Struct<{
|
|
322
|
-
to: typeof Schema.String;
|
|
323
|
-
data: typeof Schema.String;
|
|
276
|
+
} | {
|
|
277
|
+
readonly kind: "erc20";
|
|
278
|
+
readonly chainId: number;
|
|
279
|
+
readonly token: string;
|
|
280
|
+
}, never>>;
|
|
281
|
+
}>, Schema.Struct<{
|
|
282
|
+
name: typeof Schema.String;
|
|
283
|
+
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
284
|
+
}>]>>;
|
|
285
|
+
nodes: Schema.Array$<Schema.Struct<{
|
|
286
|
+
id: Schema.filter<typeof Schema.String>;
|
|
287
|
+
op: typeof Schema.String;
|
|
288
|
+
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
289
|
+
$ref: Schema.filter<typeof Schema.String>;
|
|
290
|
+
}>, Schema.Struct<{
|
|
291
|
+
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
324
292
|
value: typeof Schema.String;
|
|
325
|
-
|
|
293
|
+
}>]>>, {
|
|
294
|
+
default: () => {};
|
|
295
|
+
}>;
|
|
296
|
+
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
297
|
+
default: () => {};
|
|
298
|
+
}>;
|
|
299
|
+
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
300
|
+
kind: typeof Schema.String;
|
|
301
|
+
}, readonly [{
|
|
302
|
+
readonly key: typeof Schema.String;
|
|
303
|
+
readonly value: typeof Schema.Unknown;
|
|
304
|
+
}]>>>;
|
|
326
305
|
}>>;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
token: Schema.filter<typeof Schema.String>;
|
|
331
|
-
amount: typeof Schema.String;
|
|
332
|
-
cap: typeof Schema.String;
|
|
333
|
-
owner: Schema.filter<typeof Schema.String>;
|
|
334
|
-
refund: Schema.filter<typeof Schema.String>;
|
|
335
|
-
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
306
|
+
lineage: Schema.optional<Schema.Struct<{
|
|
307
|
+
journeyId: Schema.filter<typeof Schema.String>;
|
|
308
|
+
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
336
309
|
}>>;
|
|
310
|
+
}>>;
|
|
311
|
+
validity: Schema.Struct<{
|
|
312
|
+
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
313
|
+
}>;
|
|
314
|
+
perpetual: Schema.optional<typeof Schema.Boolean>;
|
|
315
|
+
provider: Schema.optional<typeof Schema.String>;
|
|
316
|
+
funding: Schema.optional<Schema.Literal<["inline", "external"]>>;
|
|
317
|
+
}>;
|
|
318
|
+
export declare const HexStringSchema: Schema.filter<typeof Schema.String>;
|
|
319
|
+
export declare const Phase1ArtifactSchema: Schema.Union<[Schema.Struct<{
|
|
320
|
+
kind: Schema.Literal<["transaction"]>;
|
|
321
|
+
funding: Schema.Literal<["inline", "external"]>;
|
|
322
|
+
transactionRequest: Schema.optional<Schema.Struct<{
|
|
323
|
+
to: typeof Schema.String;
|
|
324
|
+
data: typeof Schema.String;
|
|
325
|
+
value: typeof Schema.String;
|
|
326
|
+
chainId: typeof Schema.Number;
|
|
327
|
+
}>>;
|
|
328
|
+
escrow: Schema.optional<Schema.Struct<{
|
|
329
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
330
|
+
address: Schema.filter<typeof Schema.String>;
|
|
331
|
+
token: Schema.filter<typeof Schema.String>;
|
|
332
|
+
amount: typeof Schema.String;
|
|
333
|
+
cap: typeof Schema.String;
|
|
334
|
+
owner: Schema.filter<typeof Schema.String>;
|
|
335
|
+
refund: Schema.filter<typeof Schema.String>;
|
|
336
|
+
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
337
|
+
}>>;
|
|
337
338
|
}>, Schema.Struct<{
|
|
338
|
-
|
|
339
|
-
|
|
339
|
+
kind: Schema.Literal<["signables"]>;
|
|
340
|
+
typedData: Schema.Array$<typeof Schema.Unknown>;
|
|
340
341
|
}>, Schema.Struct<{
|
|
341
|
-
|
|
342
|
+
kind: Schema.Literal<["none"]>;
|
|
342
343
|
}>]>;
|
|
343
|
-
declare const AssertionOwnerSchema: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
344
|
+
export declare const AssertionOwnerSchema: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
344
345
|
type AssertionOwner = typeof AssertionOwnerSchema.Type;
|
|
345
|
-
declare const Erc20BalanceGteSpecSchema: Schema.Struct<{
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
346
|
+
export declare const Erc20BalanceGteSpecSchema: Schema.Struct<{
|
|
347
|
+
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
348
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
349
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
350
|
+
owner: Schema.refine<string, typeof Schema.String>;
|
|
351
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
351
352
|
}>;
|
|
352
|
-
declare const NativeBalanceGteSpecSchema: Schema.Struct<{
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
export declare const NativeBalanceGteSpecSchema: Schema.Struct<{
|
|
354
|
+
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
355
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
356
|
+
owner: Schema.refine<string, typeof Schema.String>;
|
|
357
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
357
358
|
}>;
|
|
358
|
-
declare const CallCheckSpecSchema: Schema.Struct<{
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
export declare const CallCheckSpecSchema: Schema.Struct<{
|
|
360
|
+
kind: Schema.Literal<["call"]>;
|
|
361
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
362
|
+
to: Schema.refine<string, typeof Schema.String>;
|
|
363
|
+
calldata: Schema.refine<string, typeof Schema.String>;
|
|
364
|
+
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
365
|
+
value: Schema.filter<typeof Schema.String>;
|
|
366
|
+
}>;
|
|
367
|
+
export declare const Erc20BalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
368
|
+
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
369
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
370
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
371
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
372
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
373
|
+
}>;
|
|
374
|
+
export declare const NativeBalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
375
|
+
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
376
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
377
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
378
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
379
|
+
}>;
|
|
380
|
+
export declare const AssertionSpecSchema: Schema.Union<[Schema.Struct<{
|
|
381
|
+
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
382
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
383
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
384
|
+
owner: Schema.refine<string, typeof Schema.String>;
|
|
385
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
386
|
+
}>, Schema.Struct<{
|
|
387
|
+
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
388
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
389
|
+
owner: Schema.refine<string, typeof Schema.String>;
|
|
390
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
391
|
+
}>, Schema.Struct<{
|
|
392
|
+
kind: Schema.Literal<["call"]>;
|
|
393
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
394
|
+
to: Schema.refine<string, typeof Schema.String>;
|
|
395
|
+
calldata: Schema.refine<string, typeof Schema.String>;
|
|
396
|
+
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
397
|
+
value: Schema.filter<typeof Schema.String>;
|
|
398
|
+
}>, Schema.Struct<{
|
|
399
|
+
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
400
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
401
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
402
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
403
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
404
|
+
}>, Schema.Struct<{
|
|
405
|
+
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
406
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
407
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
408
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
409
|
+
}>]>;
|
|
410
|
+
type ContinuationOutcome = typeof ContinuationOutcomeSchema.Type;
|
|
411
|
+
type ContinuationIntent = typeof ContinuationIntentSchema.Type;
|
|
412
|
+
type Phase1Artifact = typeof Phase1ArtifactSchema.Type;
|
|
413
|
+
type AssertionSpec = typeof AssertionSpecSchema.Type;
|
|
414
|
+
export declare const settledOutcome: (intent: ContinuationIntent) => ContinuationOutcome;
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region src/descriptor.d.ts
|
|
417
|
+
export declare const Bytes32HexSchema: Schema.filter<typeof Schema.String>;
|
|
418
|
+
export declare const AssertedErc20BalanceGteSpecSchema: Schema.Struct<{
|
|
419
|
+
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
420
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
421
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
422
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
423
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
365
424
|
}>;
|
|
366
|
-
declare const
|
|
425
|
+
export declare const AssertedNativeBalanceGteSpecSchema: Schema.Struct<{
|
|
426
|
+
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
427
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
428
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
429
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
430
|
+
}>;
|
|
431
|
+
export declare const AssertedPredicateSchema: Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
432
|
+
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
433
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
434
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
435
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
436
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
437
|
+
}>, Schema.Struct<{
|
|
438
|
+
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
439
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
440
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
441
|
+
minAmount: Schema.filter<typeof Schema.String>;
|
|
442
|
+
}>, Schema.Struct<{
|
|
443
|
+
kind: Schema.Literal<["call"]>;
|
|
444
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
445
|
+
to: Schema.refine<string, typeof Schema.String>;
|
|
446
|
+
calldata: Schema.refine<string, typeof Schema.String>;
|
|
447
|
+
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
448
|
+
value: Schema.filter<typeof Schema.String>;
|
|
449
|
+
}>, Schema.Struct<{
|
|
450
|
+
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
451
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
452
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
453
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
454
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
455
|
+
}>, Schema.Struct<{
|
|
456
|
+
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
457
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
458
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
459
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
460
|
+
}>]>, Schema.SchemaClass<{
|
|
461
|
+
readonly value: string;
|
|
462
|
+
readonly kind: "call";
|
|
463
|
+
readonly chainId: number;
|
|
464
|
+
readonly to: string;
|
|
465
|
+
readonly calldata: string;
|
|
466
|
+
readonly comparator: "gte" | "eq" | "lte";
|
|
467
|
+
} | {
|
|
468
|
+
readonly kind: "erc20BalanceDeltaGte";
|
|
469
|
+
readonly chainId: number;
|
|
470
|
+
readonly token: string;
|
|
471
|
+
readonly owner: string;
|
|
472
|
+
readonly minDelta: string;
|
|
473
|
+
} | {
|
|
474
|
+
readonly kind: "nativeBalanceDeltaGte";
|
|
475
|
+
readonly chainId: number;
|
|
476
|
+
readonly owner: string;
|
|
477
|
+
readonly minDelta: string;
|
|
478
|
+
} | {
|
|
479
|
+
readonly kind: "erc20BalanceGte";
|
|
480
|
+
readonly chainId: number;
|
|
481
|
+
readonly token: string;
|
|
482
|
+
readonly owner: string;
|
|
483
|
+
readonly minAmount: string;
|
|
484
|
+
} | {
|
|
485
|
+
readonly kind: "nativeBalanceGte";
|
|
486
|
+
readonly chainId: number;
|
|
487
|
+
readonly owner: string;
|
|
488
|
+
readonly minAmount: string;
|
|
489
|
+
}, {
|
|
490
|
+
readonly value: string;
|
|
491
|
+
readonly kind: "call";
|
|
492
|
+
readonly chainId: number;
|
|
493
|
+
readonly to: string;
|
|
494
|
+
readonly calldata: string;
|
|
495
|
+
readonly comparator: "gte" | "eq" | "lte";
|
|
496
|
+
} | {
|
|
497
|
+
readonly kind: "erc20BalanceDeltaGte";
|
|
498
|
+
readonly chainId: number;
|
|
499
|
+
readonly token: string;
|
|
500
|
+
readonly owner: string;
|
|
501
|
+
readonly minDelta: string;
|
|
502
|
+
} | {
|
|
503
|
+
readonly kind: "nativeBalanceDeltaGte";
|
|
504
|
+
readonly chainId: number;
|
|
505
|
+
readonly owner: string;
|
|
506
|
+
readonly minDelta: string;
|
|
507
|
+
} | {
|
|
508
|
+
readonly kind: "erc20BalanceGte";
|
|
509
|
+
readonly chainId: number;
|
|
510
|
+
readonly token: string;
|
|
511
|
+
readonly owner: string;
|
|
512
|
+
readonly minAmount: string;
|
|
513
|
+
} | {
|
|
514
|
+
readonly kind: "nativeBalanceGte";
|
|
515
|
+
readonly chainId: number;
|
|
516
|
+
readonly owner: string;
|
|
517
|
+
readonly minAmount: string;
|
|
518
|
+
}, never>, never>;
|
|
519
|
+
export declare const VerificationDescriptorSchema: Schema.Struct<{
|
|
520
|
+
validationProgramHash: Schema.filter<typeof Schema.String>;
|
|
521
|
+
paramsHash: Schema.filter<typeof Schema.String>;
|
|
522
|
+
assertedPredicate: Schema.Array$<Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
367
523
|
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
368
524
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
369
525
|
token: Schema.refine<string, typeof Schema.String>;
|
|
370
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
526
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
371
527
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
372
|
-
}>, Schema.Struct<{
|
|
528
|
+
}>, Schema.Struct<{
|
|
373
529
|
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
374
530
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
375
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
531
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
376
532
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
377
|
-
}>, Schema.Struct<{
|
|
533
|
+
}>, Schema.Struct<{
|
|
378
534
|
kind: Schema.Literal<["call"]>;
|
|
379
535
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
380
536
|
to: Schema.refine<string, typeof Schema.String>;
|
|
381
537
|
calldata: Schema.refine<string, typeof Schema.String>;
|
|
382
538
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
383
539
|
value: Schema.filter<typeof Schema.String>;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
540
|
+
}>, Schema.Struct<{
|
|
541
|
+
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
542
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
543
|
+
token: Schema.refine<string, typeof Schema.String>;
|
|
544
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
545
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
546
|
+
}>, Schema.Struct<{
|
|
547
|
+
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
548
|
+
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
549
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
550
|
+
minDelta: Schema.filter<typeof Schema.String>;
|
|
551
|
+
}>]>, Schema.SchemaClass<{
|
|
552
|
+
readonly value: string;
|
|
396
553
|
readonly kind: "call";
|
|
397
554
|
readonly chainId: number;
|
|
398
|
-
readonly value: string;
|
|
399
555
|
readonly to: string;
|
|
400
556
|
readonly calldata: string;
|
|
401
557
|
readonly comparator: "gte" | "eq" | "lte";
|
|
402
|
-
}
|
|
558
|
+
} | {
|
|
559
|
+
readonly kind: "erc20BalanceDeltaGte";
|
|
560
|
+
readonly chainId: number;
|
|
403
561
|
readonly token: string;
|
|
562
|
+
readonly owner: string;
|
|
563
|
+
readonly minDelta: string;
|
|
564
|
+
} | {
|
|
565
|
+
readonly kind: "nativeBalanceDeltaGte";
|
|
566
|
+
readonly chainId: number;
|
|
567
|
+
readonly owner: string;
|
|
568
|
+
readonly minDelta: string;
|
|
569
|
+
} | {
|
|
404
570
|
readonly kind: "erc20BalanceGte";
|
|
405
571
|
readonly chainId: number;
|
|
406
|
-
readonly
|
|
572
|
+
readonly token: string;
|
|
407
573
|
readonly owner: string;
|
|
408
|
-
|
|
574
|
+
readonly minAmount: string;
|
|
575
|
+
} | {
|
|
409
576
|
readonly kind: "nativeBalanceGte";
|
|
410
577
|
readonly chainId: number;
|
|
411
|
-
readonly minAmount: string;
|
|
412
578
|
readonly owner: string;
|
|
413
|
-
|
|
579
|
+
readonly minAmount: string;
|
|
580
|
+
}, {
|
|
581
|
+
readonly value: string;
|
|
414
582
|
readonly kind: "call";
|
|
415
583
|
readonly chainId: number;
|
|
416
|
-
readonly value: string;
|
|
417
584
|
readonly to: string;
|
|
418
585
|
readonly calldata: string;
|
|
419
586
|
readonly comparator: "gte" | "eq" | "lte";
|
|
420
|
-
}
|
|
421
|
-
declare const Erc20BalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
422
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
423
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
424
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
425
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
426
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
427
|
-
}>;
|
|
428
|
-
declare const NativeBalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
429
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
430
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
431
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
432
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
433
|
-
}>;
|
|
434
|
-
declare const AssertionSpecSchema: Schema.Union<[Schema.Struct<{
|
|
435
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
436
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
437
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
438
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
439
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
440
|
-
}>, Schema.Struct<{
|
|
441
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
442
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
443
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
444
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
445
|
-
}>, Schema.Struct<{
|
|
446
|
-
kind: Schema.Literal<["call"]>;
|
|
447
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
448
|
-
to: Schema.refine<string, typeof Schema.String>;
|
|
449
|
-
calldata: Schema.refine<string, typeof Schema.String>;
|
|
450
|
-
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
451
|
-
value: Schema.filter<typeof Schema.String>;
|
|
452
|
-
}>, Schema.Struct<{
|
|
453
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
454
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
455
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
456
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
457
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
458
|
-
}>, Schema.Struct<{
|
|
459
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
460
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
461
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
462
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
463
|
-
}>]>;
|
|
464
|
-
declare const ContinuationPlanSchema: Schema.Struct<{
|
|
465
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
466
|
-
nextFlow: Schema.Struct<{
|
|
467
|
-
version: Schema.Literal<[1]>;
|
|
468
|
-
id: typeof Schema.String;
|
|
469
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
470
|
-
inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
471
|
-
name: typeof Schema.String;
|
|
472
|
-
resource: Schema.transform<Schema.Union<[Schema.Struct<{
|
|
473
|
-
kind: Schema.Literal<["native"]>;
|
|
474
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
475
|
-
}>, Schema.Struct<{
|
|
476
|
-
kind: Schema.Literal<["erc20"]>;
|
|
477
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
478
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
479
|
-
}>]>, Schema.SchemaClass<{
|
|
480
|
-
readonly kind: "native";
|
|
481
|
-
readonly chainId: number;
|
|
482
|
-
} | {
|
|
483
|
-
readonly token: string;
|
|
484
|
-
readonly kind: "erc20";
|
|
485
|
-
readonly chainId: number;
|
|
486
|
-
}, {
|
|
487
|
-
readonly kind: "native";
|
|
488
|
-
readonly chainId: number;
|
|
489
|
-
} | {
|
|
490
|
-
readonly token: string;
|
|
491
|
-
readonly kind: "erc20";
|
|
492
|
-
readonly chainId: number;
|
|
493
|
-
}, never>>;
|
|
494
|
-
}>, Schema.Struct<{
|
|
495
|
-
name: typeof Schema.String;
|
|
496
|
-
type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
497
|
-
}>]>>;
|
|
498
|
-
nodes: Schema.Array$<Schema.Struct<{
|
|
499
|
-
id: Schema.filter<typeof Schema.String>;
|
|
500
|
-
op: typeof Schema.String;
|
|
501
|
-
bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
|
|
502
|
-
$ref: Schema.filter<typeof Schema.String>;
|
|
503
|
-
}>, Schema.Struct<{
|
|
504
|
-
kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
|
|
505
|
-
value: typeof Schema.String;
|
|
506
|
-
}>]>>, {
|
|
507
|
-
default: () => {};
|
|
508
|
-
}>;
|
|
509
|
-
config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
|
|
510
|
-
default: () => {};
|
|
511
|
-
}>;
|
|
512
|
-
guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
|
|
513
|
-
kind: typeof Schema.String;
|
|
514
|
-
}, readonly [{
|
|
515
|
-
readonly key: typeof Schema.String;
|
|
516
|
-
readonly value: typeof Schema.Unknown;
|
|
517
|
-
}]>>>;
|
|
518
|
-
}>>;
|
|
519
|
-
lineage: Schema.optional<Schema.Struct<{
|
|
520
|
-
journeyId: Schema.filter<typeof Schema.String>;
|
|
521
|
-
parentRequestId: Schema.filter<typeof Schema.String>;
|
|
522
|
-
}>>;
|
|
523
|
-
}>;
|
|
524
|
-
check: Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
525
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
526
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
527
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
528
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
529
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
530
|
-
}>, Schema.Struct<{
|
|
531
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
532
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
533
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
534
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
535
|
-
}>, Schema.Struct<{
|
|
536
|
-
kind: Schema.Literal<["call"]>;
|
|
537
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
538
|
-
to: Schema.refine<string, typeof Schema.String>;
|
|
539
|
-
calldata: Schema.refine<string, typeof Schema.String>;
|
|
540
|
-
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
541
|
-
value: Schema.filter<typeof Schema.String>;
|
|
542
|
-
}>]>, Schema.SchemaClass<{
|
|
543
|
-
readonly token: string;
|
|
544
|
-
readonly kind: "erc20BalanceGte";
|
|
545
|
-
readonly chainId: number;
|
|
546
|
-
readonly minAmount: string;
|
|
547
|
-
readonly owner: string;
|
|
548
|
-
} | {
|
|
549
|
-
readonly kind: "nativeBalanceGte";
|
|
550
|
-
readonly chainId: number;
|
|
551
|
-
readonly minAmount: string;
|
|
552
|
-
readonly owner: string;
|
|
553
|
-
} | {
|
|
554
|
-
readonly kind: "call";
|
|
555
|
-
readonly chainId: number;
|
|
556
|
-
readonly value: string;
|
|
557
|
-
readonly to: string;
|
|
558
|
-
readonly calldata: string;
|
|
559
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
560
|
-
}, {
|
|
561
|
-
readonly token: string;
|
|
562
|
-
readonly kind: "erc20BalanceGte";
|
|
563
|
-
readonly chainId: number;
|
|
564
|
-
readonly minAmount: string;
|
|
565
|
-
readonly owner: string;
|
|
566
|
-
} | {
|
|
567
|
-
readonly kind: "nativeBalanceGte";
|
|
568
|
-
readonly chainId: number;
|
|
569
|
-
readonly minAmount: string;
|
|
570
|
-
readonly owner: string;
|
|
571
|
-
} | {
|
|
572
|
-
readonly kind: "call";
|
|
573
|
-
readonly chainId: number;
|
|
574
|
-
readonly value: string;
|
|
575
|
-
readonly to: string;
|
|
576
|
-
readonly calldata: string;
|
|
577
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
578
|
-
}, never>, never>;
|
|
579
|
-
validity: Schema.Struct<{
|
|
580
|
-
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
581
|
-
}>;
|
|
582
|
-
correlationId: Schema.optional<typeof Schema.String>;
|
|
583
|
-
}>;
|
|
584
|
-
type ContinuationOutcome = typeof ContinuationOutcomeSchema.Type;
|
|
585
|
-
type ContinuationIntent = typeof ContinuationIntentSchema.Type;
|
|
586
|
-
type Phase1Artifact = typeof Phase1ArtifactSchema.Type;
|
|
587
|
-
type Check = typeof CheckSchema.Type;
|
|
588
|
-
type AssertionSpec = typeof AssertionSpecSchema.Type;
|
|
589
|
-
type ContinuationPlan = typeof ContinuationPlanSchema.Type;
|
|
590
|
-
declare const settledOutcome: (intent: ContinuationIntent) => ContinuationOutcome;
|
|
591
|
-
type CheckComparator = 'gte' | 'eq' | 'lte';
|
|
592
|
-
declare const isGTECheck: (check: Check) => boolean;
|
|
593
|
-
declare const isLTECheck: (check: Check) => boolean;
|
|
594
|
-
declare const isEQCheck: (check: Check) => boolean;
|
|
595
|
-
|
|
596
|
-
declare const Bytes32HexSchema: Schema.filter<typeof Schema.String>;
|
|
597
|
-
declare const AssertedErc20BalanceGteSpecSchema: Schema.Struct<{
|
|
598
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
599
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
600
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
601
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
602
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
603
|
-
}>;
|
|
604
|
-
declare const AssertedNativeBalanceGteSpecSchema: Schema.Struct<{
|
|
605
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
606
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
607
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
608
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
609
|
-
}>;
|
|
610
|
-
declare const AssertedPredicateSchema: Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
611
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
612
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
613
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
614
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
615
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
616
|
-
}>, Schema.Struct<{
|
|
617
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
618
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
619
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
620
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
621
|
-
}>, Schema.Struct<{
|
|
622
|
-
kind: Schema.Literal<["call"]>;
|
|
623
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
624
|
-
to: Schema.refine<string, typeof Schema.String>;
|
|
625
|
-
calldata: Schema.refine<string, typeof Schema.String>;
|
|
626
|
-
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
627
|
-
value: Schema.filter<typeof Schema.String>;
|
|
628
|
-
}>, Schema.Struct<{
|
|
629
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
630
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
631
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
632
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
633
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
634
|
-
}>, Schema.Struct<{
|
|
635
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
636
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
637
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
638
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
639
|
-
}>]>, Schema.SchemaClass<{
|
|
640
|
-
readonly kind: "call";
|
|
641
|
-
readonly chainId: number;
|
|
642
|
-
readonly value: string;
|
|
643
|
-
readonly to: string;
|
|
644
|
-
readonly calldata: string;
|
|
645
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
646
|
-
} | {
|
|
647
|
-
readonly token: string;
|
|
587
|
+
} | {
|
|
648
588
|
readonly kind: "erc20BalanceDeltaGte";
|
|
649
589
|
readonly chainId: number;
|
|
590
|
+
readonly token: string;
|
|
650
591
|
readonly owner: string;
|
|
651
592
|
readonly minDelta: string;
|
|
652
|
-
} | {
|
|
593
|
+
} | {
|
|
653
594
|
readonly kind: "nativeBalanceDeltaGte";
|
|
654
595
|
readonly chainId: number;
|
|
655
596
|
readonly owner: string;
|
|
656
597
|
readonly minDelta: string;
|
|
657
|
-
} | {
|
|
658
|
-
readonly token: string;
|
|
598
|
+
} | {
|
|
659
599
|
readonly kind: "erc20BalanceGte";
|
|
660
600
|
readonly chainId: number;
|
|
661
|
-
readonly minAmount: string;
|
|
662
|
-
readonly owner: string;
|
|
663
|
-
} | {
|
|
664
|
-
readonly kind: "nativeBalanceGte";
|
|
665
|
-
readonly chainId: number;
|
|
666
|
-
readonly minAmount: string;
|
|
667
|
-
readonly owner: string;
|
|
668
|
-
}, {
|
|
669
|
-
readonly kind: "call";
|
|
670
|
-
readonly chainId: number;
|
|
671
|
-
readonly value: string;
|
|
672
|
-
readonly to: string;
|
|
673
|
-
readonly calldata: string;
|
|
674
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
675
|
-
} | {
|
|
676
601
|
readonly token: string;
|
|
677
|
-
readonly kind: "erc20BalanceDeltaGte";
|
|
678
|
-
readonly chainId: number;
|
|
679
602
|
readonly owner: string;
|
|
680
|
-
readonly minDelta: string;
|
|
681
|
-
} | {
|
|
682
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
683
|
-
readonly chainId: number;
|
|
684
|
-
readonly owner: string;
|
|
685
|
-
readonly minDelta: string;
|
|
686
|
-
} | {
|
|
687
|
-
readonly token: string;
|
|
688
|
-
readonly kind: "erc20BalanceGte";
|
|
689
|
-
readonly chainId: number;
|
|
690
603
|
readonly minAmount: string;
|
|
691
|
-
|
|
692
|
-
} | {
|
|
604
|
+
} | {
|
|
693
605
|
readonly kind: "nativeBalanceGte";
|
|
694
606
|
readonly chainId: number;
|
|
695
|
-
readonly minAmount: string;
|
|
696
607
|
readonly owner: string;
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
validationProgramHash: Schema.filter<typeof Schema.String>;
|
|
700
|
-
paramsHash: Schema.filter<typeof Schema.String>;
|
|
701
|
-
assertedPredicate: Schema.Array$<Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
702
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
703
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
704
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
705
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
706
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
707
|
-
}>, Schema.Struct<{
|
|
708
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
709
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
710
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
711
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
712
|
-
}>, Schema.Struct<{
|
|
713
|
-
kind: Schema.Literal<["call"]>;
|
|
714
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
715
|
-
to: Schema.refine<string, typeof Schema.String>;
|
|
716
|
-
calldata: Schema.refine<string, typeof Schema.String>;
|
|
717
|
-
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
718
|
-
value: Schema.filter<typeof Schema.String>;
|
|
719
|
-
}>, Schema.Struct<{
|
|
720
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
721
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
722
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
723
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
724
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
725
|
-
}>, Schema.Struct<{
|
|
726
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
727
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
728
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
729
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
730
|
-
}>]>, Schema.SchemaClass<{
|
|
731
|
-
readonly kind: "call";
|
|
732
|
-
readonly chainId: number;
|
|
733
|
-
readonly value: string;
|
|
734
|
-
readonly to: string;
|
|
735
|
-
readonly calldata: string;
|
|
736
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
737
|
-
} | {
|
|
738
|
-
readonly token: string;
|
|
739
|
-
readonly kind: "erc20BalanceDeltaGte";
|
|
740
|
-
readonly chainId: number;
|
|
741
|
-
readonly owner: string;
|
|
742
|
-
readonly minDelta: string;
|
|
743
|
-
} | {
|
|
744
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
745
|
-
readonly chainId: number;
|
|
746
|
-
readonly owner: string;
|
|
747
|
-
readonly minDelta: string;
|
|
748
|
-
} | {
|
|
749
|
-
readonly token: string;
|
|
750
|
-
readonly kind: "erc20BalanceGte";
|
|
751
|
-
readonly chainId: number;
|
|
752
|
-
readonly minAmount: string;
|
|
753
|
-
readonly owner: string;
|
|
754
|
-
} | {
|
|
755
|
-
readonly kind: "nativeBalanceGte";
|
|
756
|
-
readonly chainId: number;
|
|
757
|
-
readonly minAmount: string;
|
|
758
|
-
readonly owner: string;
|
|
759
|
-
}, {
|
|
760
|
-
readonly kind: "call";
|
|
761
|
-
readonly chainId: number;
|
|
762
|
-
readonly value: string;
|
|
763
|
-
readonly to: string;
|
|
764
|
-
readonly calldata: string;
|
|
765
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
766
|
-
} | {
|
|
767
|
-
readonly token: string;
|
|
768
|
-
readonly kind: "erc20BalanceDeltaGte";
|
|
769
|
-
readonly chainId: number;
|
|
770
|
-
readonly owner: string;
|
|
771
|
-
readonly minDelta: string;
|
|
772
|
-
} | {
|
|
773
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
774
|
-
readonly chainId: number;
|
|
775
|
-
readonly owner: string;
|
|
776
|
-
readonly minDelta: string;
|
|
777
|
-
} | {
|
|
778
|
-
readonly token: string;
|
|
779
|
-
readonly kind: "erc20BalanceGte";
|
|
780
|
-
readonly chainId: number;
|
|
781
|
-
readonly minAmount: string;
|
|
782
|
-
readonly owner: string;
|
|
783
|
-
} | {
|
|
784
|
-
readonly kind: "nativeBalanceGte";
|
|
785
|
-
readonly chainId: number;
|
|
786
|
-
readonly minAmount: string;
|
|
787
|
-
readonly owner: string;
|
|
788
|
-
}, never>, never>>;
|
|
608
|
+
readonly minAmount: string;
|
|
609
|
+
}, never>, never>>;
|
|
789
610
|
}>;
|
|
790
|
-
declare const canonicalAssertedPredicate: (specs: readonly AssertionSpec[]) => string;
|
|
611
|
+
export declare const canonicalAssertedPredicate: (specs: readonly AssertionSpec[]) => string;
|
|
791
612
|
type VerificationDescriptor = typeof VerificationDescriptorSchema.Type;
|
|
792
613
|
type AssertedPredicate = AssertionSpec;
|
|
793
|
-
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region src/resource.d.ts
|
|
794
616
|
type Availability = 'now' | 'future';
|
|
795
617
|
interface OutputAmount {
|
|
796
|
-
|
|
797
|
-
|
|
618
|
+
readonly expected: bigint;
|
|
619
|
+
readonly min?: bigint;
|
|
798
620
|
}
|
|
799
621
|
type Resource = {
|
|
800
|
-
|
|
801
|
-
|
|
622
|
+
readonly kind: 'native';
|
|
623
|
+
readonly chainId: number;
|
|
802
624
|
} | {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
625
|
+
readonly kind: 'erc20';
|
|
626
|
+
readonly token: string;
|
|
627
|
+
readonly chainId: number;
|
|
806
628
|
};
|
|
807
|
-
declare const erc20Resource: (token: string, chainId: number) => Resource;
|
|
808
|
-
declare const nativeResource: (chainId: number) => Resource;
|
|
809
|
-
declare const isERC20Resource: (r: Resource) => r is Extract<Resource, {
|
|
810
|
-
|
|
629
|
+
export declare const erc20Resource: (token: string, chainId: number) => Resource;
|
|
630
|
+
export declare const nativeResource: (chainId: number) => Resource;
|
|
631
|
+
export declare const isERC20Resource: (r: Resource) => r is Extract<Resource, {
|
|
632
|
+
kind: "erc20";
|
|
811
633
|
}>;
|
|
812
|
-
declare const isNativeResource: (r: Resource) => r is Extract<Resource, {
|
|
813
|
-
|
|
634
|
+
export declare const isNativeResource: (r: Resource) => r is Extract<Resource, {
|
|
635
|
+
kind: "native";
|
|
814
636
|
}>;
|
|
815
|
-
declare const resourcesEqual: (a: Resource, b: Resource) => boolean;
|
|
816
|
-
declare const foldResource: <R>(r: Resource, cases: {
|
|
817
|
-
|
|
818
|
-
|
|
637
|
+
export declare const resourcesEqual: (a: Resource, b: Resource) => boolean;
|
|
638
|
+
export declare const foldResource: <R>(r: Resource, cases: {
|
|
639
|
+
readonly native: (chainId: number) => R;
|
|
640
|
+
readonly erc20: (token: string, chainId: number) => R;
|
|
819
641
|
}) => R;
|
|
820
|
-
declare const resourceToken: (r: Resource) => string;
|
|
821
|
-
declare const resourceKey: (r: Resource) => string;
|
|
822
|
-
declare const erc20Token: (r: Resource) => string;
|
|
823
|
-
|
|
642
|
+
export declare const resourceToken: (r: Resource) => string;
|
|
643
|
+
export declare const resourceKey: (r: Resource) => string;
|
|
644
|
+
export declare const erc20Token: (r: Resource) => string;
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region src/output.d.ts
|
|
824
647
|
type EstimateBasis = 'simulated' | 'quoted';
|
|
825
648
|
type MinimumBasis = 'guard' | 'op' | 'declared';
|
|
826
649
|
interface Estimate {
|
|
827
|
-
|
|
828
|
-
|
|
650
|
+
readonly basis: EstimateBasis;
|
|
651
|
+
readonly value: bigint;
|
|
829
652
|
}
|
|
830
653
|
interface Minimum {
|
|
831
|
-
|
|
832
|
-
|
|
654
|
+
readonly basis: MinimumBasis;
|
|
655
|
+
readonly value: bigint;
|
|
833
656
|
}
|
|
834
657
|
interface Amount {
|
|
835
|
-
|
|
836
|
-
|
|
658
|
+
readonly estimate?: Estimate;
|
|
659
|
+
readonly minimum?: Minimum;
|
|
837
660
|
}
|
|
838
661
|
type Delivery = {
|
|
839
|
-
|
|
662
|
+
readonly when: 'now';
|
|
840
663
|
} | {
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
664
|
+
readonly when: 'future';
|
|
665
|
+
readonly etaSeconds?: number;
|
|
666
|
+
readonly provider?: string;
|
|
844
667
|
};
|
|
845
668
|
interface OutputBase {
|
|
846
|
-
|
|
847
|
-
|
|
669
|
+
readonly resource: Resource;
|
|
670
|
+
readonly amount: Amount;
|
|
848
671
|
}
|
|
849
672
|
interface ConsumedOutput extends OutputBase {
|
|
850
|
-
|
|
851
|
-
|
|
673
|
+
readonly role: 'consumed';
|
|
674
|
+
readonly consumedBy: string;
|
|
852
675
|
}
|
|
853
676
|
interface TerminalOutput extends OutputBase {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
677
|
+
readonly role: 'terminal';
|
|
678
|
+
readonly owner: string;
|
|
679
|
+
readonly delivery: Delivery;
|
|
857
680
|
}
|
|
858
681
|
type Output = ConsumedOutput | TerminalOutput;
|
|
859
682
|
type Outputs = Record<string, Output>;
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
683
|
+
//#endregion
|
|
684
|
+
//#region src/zodSchemas.d.ts
|
|
685
|
+
export declare const ResourcePortZod: z.ZodObject<{
|
|
686
|
+
kind: z.ZodLiteral<"resource">;
|
|
687
|
+
name: z.ZodString;
|
|
688
|
+
accepts: z.ZodEnum<{
|
|
689
|
+
erc20: "erc20";
|
|
690
|
+
native: "native";
|
|
691
|
+
any: "any";
|
|
692
|
+
}>;
|
|
693
|
+
mode: z.ZodEnum<{
|
|
694
|
+
linear: "linear";
|
|
695
|
+
copy: "copy";
|
|
696
|
+
}>;
|
|
697
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
874
698
|
}, z.core.$strip>;
|
|
875
|
-
declare const HANDLE_UNITS: readonly ["raw", "wad", "ray", "bps", "token-decimals"];
|
|
876
|
-
declare const STATIC_SOL_TYPES: readonly ["uint256", "uint128", "uint64", "uint32", "uint16", "uint8", "address", "bool", "bytes32"];
|
|
877
|
-
declare const HandleUnitsZod: z.ZodEnum<{
|
|
699
|
+
export declare const HANDLE_UNITS: readonly ["raw", "wad", "ray", "bps", "token-decimals"];
|
|
700
|
+
export declare const STATIC_SOL_TYPES: readonly ["uint256", "uint128", "uint64", "uint32", "uint16", "uint8", "address", "bool", "bytes32"];
|
|
701
|
+
export declare const HandleUnitsZod: z.ZodEnum<{
|
|
702
|
+
raw: "raw";
|
|
703
|
+
wad: "wad";
|
|
704
|
+
ray: "ray";
|
|
705
|
+
bps: "bps";
|
|
706
|
+
"token-decimals": "token-decimals";
|
|
707
|
+
}>;
|
|
708
|
+
export declare const StaticSolTypeZod: z.ZodEnum<{
|
|
709
|
+
uint32: "uint32";
|
|
710
|
+
uint256: "uint256";
|
|
711
|
+
uint128: "uint128";
|
|
712
|
+
uint64: "uint64";
|
|
713
|
+
uint16: "uint16";
|
|
714
|
+
uint8: "uint8";
|
|
715
|
+
address: "address";
|
|
716
|
+
bool: "bool";
|
|
717
|
+
bytes32: "bytes32";
|
|
718
|
+
}>;
|
|
719
|
+
export declare const isStaticSolType: (value: string) => value is StaticSolType;
|
|
720
|
+
export declare const HandlePortZod: z.ZodObject<{
|
|
721
|
+
kind: z.ZodLiteral<"handle">;
|
|
722
|
+
name: z.ZodString;
|
|
723
|
+
type: z.ZodEnum<{
|
|
724
|
+
string: "string";
|
|
725
|
+
uint32: "uint32";
|
|
726
|
+
uint256: "uint256";
|
|
727
|
+
uint128: "uint128";
|
|
728
|
+
uint64: "uint64";
|
|
729
|
+
uint16: "uint16";
|
|
730
|
+
uint8: "uint8";
|
|
731
|
+
address: "address";
|
|
732
|
+
bool: "bool";
|
|
733
|
+
bytes32: "bytes32";
|
|
734
|
+
int128: "int128";
|
|
735
|
+
int256: "int256";
|
|
736
|
+
bytes: "bytes";
|
|
737
|
+
bytes4: "bytes4";
|
|
738
|
+
}>;
|
|
739
|
+
mode: z.ZodEnum<{
|
|
740
|
+
linear: "linear";
|
|
741
|
+
copy: "copy";
|
|
742
|
+
}>;
|
|
743
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
744
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
878
745
|
raw: "raw";
|
|
879
746
|
wad: "wad";
|
|
880
747
|
ray: "ray";
|
|
881
748
|
bps: "bps";
|
|
882
749
|
"token-decimals": "token-decimals";
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
750
|
+
}>>;
|
|
751
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
752
|
+
}, z.core.$strip>;
|
|
753
|
+
export declare const InputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
754
|
+
kind: z.ZodLiteral<"resource">;
|
|
755
|
+
name: z.ZodString;
|
|
756
|
+
accepts: z.ZodEnum<{
|
|
757
|
+
erc20: "erc20";
|
|
758
|
+
native: "native";
|
|
759
|
+
any: "any";
|
|
760
|
+
}>;
|
|
761
|
+
mode: z.ZodEnum<{
|
|
762
|
+
linear: "linear";
|
|
763
|
+
copy: "copy";
|
|
764
|
+
}>;
|
|
765
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
766
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
767
|
+
kind: z.ZodLiteral<"handle">;
|
|
768
|
+
name: z.ZodString;
|
|
769
|
+
type: z.ZodEnum<{
|
|
770
|
+
string: "string";
|
|
887
771
|
uint32: "uint32";
|
|
888
|
-
|
|
772
|
+
uint256: "uint256";
|
|
889
773
|
uint128: "uint128";
|
|
774
|
+
uint64: "uint64";
|
|
775
|
+
uint16: "uint16";
|
|
776
|
+
uint8: "uint8";
|
|
777
|
+
address: "address";
|
|
778
|
+
bool: "bool";
|
|
779
|
+
bytes32: "bytes32";
|
|
780
|
+
int128: "int128";
|
|
781
|
+
int256: "int256";
|
|
782
|
+
bytes: "bytes";
|
|
783
|
+
bytes4: "bytes4";
|
|
784
|
+
}>;
|
|
785
|
+
mode: z.ZodEnum<{
|
|
786
|
+
linear: "linear";
|
|
787
|
+
copy: "copy";
|
|
788
|
+
}>;
|
|
789
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
790
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
791
|
+
raw: "raw";
|
|
792
|
+
wad: "wad";
|
|
793
|
+
ray: "ray";
|
|
794
|
+
bps: "bps";
|
|
795
|
+
"token-decimals": "token-decimals";
|
|
796
|
+
}>>;
|
|
797
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
798
|
+
}, z.core.$strip>], "kind">;
|
|
799
|
+
export declare const ResourceOutputPortZod: z.ZodObject<{
|
|
800
|
+
kind: z.ZodLiteral<"resource_output">;
|
|
801
|
+
name: z.ZodString;
|
|
802
|
+
mode: z.ZodEnum<{
|
|
803
|
+
linear: "linear";
|
|
804
|
+
copy: "copy";
|
|
805
|
+
}>;
|
|
806
|
+
availability: z.ZodOptional<z.ZodEnum<{
|
|
807
|
+
now: "now";
|
|
808
|
+
future: "future";
|
|
809
|
+
}>>;
|
|
810
|
+
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
811
|
+
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
812
|
+
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
813
|
+
countFrom: z.ZodOptional<z.ZodString>;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
export declare const OutputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
816
|
+
kind: z.ZodLiteral<"resource_output">;
|
|
817
|
+
name: z.ZodString;
|
|
818
|
+
mode: z.ZodEnum<{
|
|
819
|
+
linear: "linear";
|
|
820
|
+
copy: "copy";
|
|
821
|
+
}>;
|
|
822
|
+
availability: z.ZodOptional<z.ZodEnum<{
|
|
823
|
+
now: "now";
|
|
824
|
+
future: "future";
|
|
825
|
+
}>>;
|
|
826
|
+
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
827
|
+
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
828
|
+
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
829
|
+
countFrom: z.ZodOptional<z.ZodString>;
|
|
830
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
831
|
+
kind: z.ZodLiteral<"handle">;
|
|
832
|
+
name: z.ZodString;
|
|
833
|
+
type: z.ZodEnum<{
|
|
834
|
+
string: "string";
|
|
835
|
+
uint32: "uint32";
|
|
890
836
|
uint256: "uint256";
|
|
837
|
+
uint128: "uint128";
|
|
838
|
+
uint64: "uint64";
|
|
839
|
+
uint16: "uint16";
|
|
840
|
+
uint8: "uint8";
|
|
891
841
|
address: "address";
|
|
892
842
|
bool: "bool";
|
|
893
843
|
bytes32: "bytes32";
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
844
|
+
int128: "int128";
|
|
845
|
+
int256: "int256";
|
|
846
|
+
bytes: "bytes";
|
|
847
|
+
bytes4: "bytes4";
|
|
848
|
+
}>;
|
|
849
|
+
mode: z.ZodEnum<{
|
|
850
|
+
linear: "linear";
|
|
851
|
+
copy: "copy";
|
|
852
|
+
}>;
|
|
853
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
854
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
855
|
+
raw: "raw";
|
|
856
|
+
wad: "wad";
|
|
857
|
+
ray: "ray";
|
|
858
|
+
bps: "bps";
|
|
859
|
+
"token-decimals": "token-decimals";
|
|
860
|
+
}>>;
|
|
861
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
862
|
+
}, z.core.$strip>], "kind">;
|
|
863
|
+
export declare const ManifestOperationZod: z.ZodObject<{
|
|
864
|
+
id: z.ZodString;
|
|
865
|
+
description: z.ZodOptional<z.ZodString>;
|
|
866
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
867
|
+
kind: z.ZodLiteral<"resource">;
|
|
868
|
+
name: z.ZodString;
|
|
869
|
+
accepts: z.ZodEnum<{
|
|
870
|
+
erc20: "erc20";
|
|
871
|
+
native: "native";
|
|
872
|
+
any: "any";
|
|
873
|
+
}>;
|
|
874
|
+
mode: z.ZodEnum<{
|
|
875
|
+
linear: "linear";
|
|
876
|
+
copy: "copy";
|
|
877
|
+
}>;
|
|
878
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
879
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
897
880
|
kind: z.ZodLiteral<"handle">;
|
|
898
881
|
name: z.ZodString;
|
|
899
882
|
type: z.ZodEnum<{
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
883
|
+
string: "string";
|
|
884
|
+
uint32: "uint32";
|
|
885
|
+
uint256: "uint256";
|
|
886
|
+
uint128: "uint128";
|
|
887
|
+
uint64: "uint64";
|
|
888
|
+
uint16: "uint16";
|
|
889
|
+
uint8: "uint8";
|
|
890
|
+
address: "address";
|
|
891
|
+
bool: "bool";
|
|
892
|
+
bytes32: "bytes32";
|
|
893
|
+
int128: "int128";
|
|
894
|
+
int256: "int256";
|
|
895
|
+
bytes: "bytes";
|
|
896
|
+
bytes4: "bytes4";
|
|
914
897
|
}>;
|
|
915
898
|
mode: z.ZodEnum<{
|
|
916
|
-
|
|
917
|
-
|
|
899
|
+
linear: "linear";
|
|
900
|
+
copy: "copy";
|
|
918
901
|
}>;
|
|
919
902
|
expose: z.ZodOptional<z.ZodBoolean>;
|
|
920
903
|
units: z.ZodOptional<z.ZodEnum<{
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
904
|
+
raw: "raw";
|
|
905
|
+
wad: "wad";
|
|
906
|
+
ray: "ray";
|
|
907
|
+
bps: "bps";
|
|
908
|
+
"token-decimals": "token-decimals";
|
|
926
909
|
}>>;
|
|
927
910
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
928
|
-
}, z.core.$strip
|
|
929
|
-
|
|
930
|
-
kind: z.ZodLiteral<"
|
|
911
|
+
}, z.core.$strip>], "kind">>;
|
|
912
|
+
outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
913
|
+
kind: z.ZodLiteral<"resource_output">;
|
|
931
914
|
name: z.ZodString;
|
|
932
|
-
accepts: z.ZodEnum<{
|
|
933
|
-
native: "native";
|
|
934
|
-
erc20: "erc20";
|
|
935
|
-
any: "any";
|
|
936
|
-
}>;
|
|
937
915
|
mode: z.ZodEnum<{
|
|
938
|
-
|
|
939
|
-
|
|
916
|
+
linear: "linear";
|
|
917
|
+
copy: "copy";
|
|
940
918
|
}>;
|
|
941
|
-
|
|
942
|
-
|
|
919
|
+
availability: z.ZodOptional<z.ZodEnum<{
|
|
920
|
+
now: "now";
|
|
921
|
+
future: "future";
|
|
922
|
+
}>>;
|
|
923
|
+
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
924
|
+
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
925
|
+
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
926
|
+
countFrom: z.ZodOptional<z.ZodString>;
|
|
927
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
943
928
|
kind: z.ZodLiteral<"handle">;
|
|
944
929
|
name: z.ZodString;
|
|
945
930
|
type: z.ZodEnum<{
|
|
931
|
+
string: "string";
|
|
932
|
+
uint32: "uint32";
|
|
933
|
+
uint256: "uint256";
|
|
934
|
+
uint128: "uint128";
|
|
935
|
+
uint64: "uint64";
|
|
936
|
+
uint16: "uint16";
|
|
937
|
+
uint8: "uint8";
|
|
938
|
+
address: "address";
|
|
939
|
+
bool: "bool";
|
|
940
|
+
bytes32: "bytes32";
|
|
941
|
+
int128: "int128";
|
|
942
|
+
int256: "int256";
|
|
943
|
+
bytes: "bytes";
|
|
944
|
+
bytes4: "bytes4";
|
|
945
|
+
}>;
|
|
946
|
+
mode: z.ZodEnum<{
|
|
947
|
+
linear: "linear";
|
|
948
|
+
copy: "copy";
|
|
949
|
+
}>;
|
|
950
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
951
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
952
|
+
raw: "raw";
|
|
953
|
+
wad: "wad";
|
|
954
|
+
ray: "ray";
|
|
955
|
+
bps: "bps";
|
|
956
|
+
"token-decimals": "token-decimals";
|
|
957
|
+
}>>;
|
|
958
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
959
|
+
}, z.core.$strip>], "kind">>;
|
|
960
|
+
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
961
|
+
}, z.core.$strip>;
|
|
962
|
+
export declare const GuardSelectorZod: z.ZodObject<{
|
|
963
|
+
binding: z.ZodString;
|
|
964
|
+
source: z.ZodEnum<{
|
|
965
|
+
inputs: "inputs";
|
|
966
|
+
outputs: "outputs";
|
|
967
|
+
}>;
|
|
968
|
+
match: z.ZodObject<{
|
|
969
|
+
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
970
|
+
resource: "resource";
|
|
971
|
+
handle: "handle";
|
|
972
|
+
resource_output: "resource_output";
|
|
973
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
974
|
+
resource: "resource";
|
|
975
|
+
handle: "handle";
|
|
976
|
+
resource_output: "resource_output";
|
|
977
|
+
}>>]>;
|
|
978
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
979
|
+
linear: "linear";
|
|
980
|
+
copy: "copy";
|
|
981
|
+
}>>;
|
|
982
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
983
|
+
erc20: "erc20";
|
|
984
|
+
native: "native";
|
|
985
|
+
any: "any";
|
|
986
|
+
}>>;
|
|
987
|
+
}, z.core.$strip>;
|
|
988
|
+
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
989
|
+
kind: z.ZodLiteral<"config">;
|
|
990
|
+
configKey: z.ZodString;
|
|
991
|
+
cardinality: z.ZodEnum<{
|
|
992
|
+
one: "one";
|
|
993
|
+
many: "many";
|
|
994
|
+
}>;
|
|
995
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
996
|
+
kind: z.ZodLiteral<"all_matching">;
|
|
997
|
+
}, z.core.$strip>], "kind">;
|
|
998
|
+
}, z.core.$strip>;
|
|
999
|
+
export declare const GuardCompatibilityZod: z.ZodObject<{
|
|
1000
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
1001
|
+
binding: z.ZodString;
|
|
1002
|
+
source: z.ZodEnum<{
|
|
1003
|
+
inputs: "inputs";
|
|
1004
|
+
outputs: "outputs";
|
|
1005
|
+
}>;
|
|
1006
|
+
match: z.ZodObject<{
|
|
1007
|
+
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1008
|
+
resource: "resource";
|
|
1009
|
+
handle: "handle";
|
|
1010
|
+
resource_output: "resource_output";
|
|
1011
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
1012
|
+
resource: "resource";
|
|
1013
|
+
handle: "handle";
|
|
1014
|
+
resource_output: "resource_output";
|
|
1015
|
+
}>>]>;
|
|
1016
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
1017
|
+
linear: "linear";
|
|
1018
|
+
copy: "copy";
|
|
1019
|
+
}>>;
|
|
1020
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1021
|
+
erc20: "erc20";
|
|
1022
|
+
native: "native";
|
|
1023
|
+
any: "any";
|
|
1024
|
+
}>>;
|
|
1025
|
+
}, z.core.$strip>;
|
|
1026
|
+
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1027
|
+
kind: z.ZodLiteral<"config">;
|
|
1028
|
+
configKey: z.ZodString;
|
|
1029
|
+
cardinality: z.ZodEnum<{
|
|
1030
|
+
one: "one";
|
|
1031
|
+
many: "many";
|
|
1032
|
+
}>;
|
|
1033
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1034
|
+
kind: z.ZodLiteral<"all_matching">;
|
|
1035
|
+
}, z.core.$strip>], "kind">;
|
|
1036
|
+
}, z.core.$strip>>;
|
|
1037
|
+
}, z.core.$strip>;
|
|
1038
|
+
export declare const ManifestGuardZod: z.ZodObject<{
|
|
1039
|
+
kind: z.ZodString;
|
|
1040
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1042
|
+
compatibility: z.ZodOptional<z.ZodObject<{
|
|
1043
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
1044
|
+
binding: z.ZodString;
|
|
1045
|
+
source: z.ZodEnum<{
|
|
1046
|
+
inputs: "inputs";
|
|
1047
|
+
outputs: "outputs";
|
|
1048
|
+
}>;
|
|
1049
|
+
match: z.ZodObject<{
|
|
1050
|
+
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1051
|
+
resource: "resource";
|
|
1052
|
+
handle: "handle";
|
|
1053
|
+
resource_output: "resource_output";
|
|
1054
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
1055
|
+
resource: "resource";
|
|
1056
|
+
handle: "handle";
|
|
1057
|
+
resource_output: "resource_output";
|
|
1058
|
+
}>>]>;
|
|
1059
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
1060
|
+
linear: "linear";
|
|
1061
|
+
copy: "copy";
|
|
1062
|
+
}>>;
|
|
1063
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1064
|
+
erc20: "erc20";
|
|
1065
|
+
native: "native";
|
|
1066
|
+
any: "any";
|
|
1067
|
+
}>>;
|
|
1068
|
+
}, z.core.$strip>;
|
|
1069
|
+
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1070
|
+
kind: z.ZodLiteral<"config">;
|
|
1071
|
+
configKey: z.ZodString;
|
|
1072
|
+
cardinality: z.ZodEnum<{
|
|
1073
|
+
one: "one";
|
|
1074
|
+
many: "many";
|
|
1075
|
+
}>;
|
|
1076
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1077
|
+
kind: z.ZodLiteral<"all_matching">;
|
|
1078
|
+
}, z.core.$strip>], "kind">;
|
|
1079
|
+
}, z.core.$strip>>;
|
|
1080
|
+
}, z.core.$strip>>;
|
|
1081
|
+
}, z.core.$strip>;
|
|
1082
|
+
export declare const ManifestMaterialiserZod: z.ZodObject<{
|
|
1083
|
+
kind: z.ZodString;
|
|
1084
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
accepts: z.ZodEnum<{
|
|
1086
|
+
resource: "resource";
|
|
1087
|
+
any: "any";
|
|
1088
|
+
handle: "handle";
|
|
1089
|
+
}>;
|
|
1090
|
+
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1091
|
+
}, z.core.$strip>;
|
|
1092
|
+
export declare const ManifestPreconditionZod: z.ZodObject<{
|
|
1093
|
+
type: z.ZodString;
|
|
1094
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1095
|
+
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1096
|
+
}, z.core.$strip>;
|
|
1097
|
+
export declare const ComposeManifestZod: z.ZodObject<{
|
|
1098
|
+
manifestVersion: z.ZodNumber;
|
|
1099
|
+
manifestHash: z.ZodString;
|
|
1100
|
+
flowSchema: z.ZodObject<{}, z.core.$loose>;
|
|
1101
|
+
operations: z.ZodArray<z.ZodObject<{
|
|
1102
|
+
id: z.ZodString;
|
|
1103
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1104
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1105
|
+
kind: z.ZodLiteral<"resource">;
|
|
1106
|
+
name: z.ZodString;
|
|
1107
|
+
accepts: z.ZodEnum<{
|
|
1108
|
+
erc20: "erc20";
|
|
1109
|
+
native: "native";
|
|
1110
|
+
any: "any";
|
|
1111
|
+
}>;
|
|
1112
|
+
mode: z.ZodEnum<{
|
|
1113
|
+
linear: "linear";
|
|
1114
|
+
copy: "copy";
|
|
1115
|
+
}>;
|
|
1116
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1118
|
+
kind: z.ZodLiteral<"handle">;
|
|
1119
|
+
name: z.ZodString;
|
|
1120
|
+
type: z.ZodEnum<{
|
|
946
1121
|
string: "string";
|
|
947
|
-
uint8: "uint8";
|
|
948
|
-
uint16: "uint16";
|
|
949
1122
|
uint32: "uint32";
|
|
950
|
-
uint64: "uint64";
|
|
951
|
-
uint128: "uint128";
|
|
952
1123
|
uint256: "uint256";
|
|
953
|
-
|
|
954
|
-
|
|
1124
|
+
uint128: "uint128";
|
|
1125
|
+
uint64: "uint64";
|
|
1126
|
+
uint16: "uint16";
|
|
1127
|
+
uint8: "uint8";
|
|
955
1128
|
address: "address";
|
|
956
1129
|
bool: "bool";
|
|
1130
|
+
bytes32: "bytes32";
|
|
1131
|
+
int128: "int128";
|
|
1132
|
+
int256: "int256";
|
|
957
1133
|
bytes: "bytes";
|
|
958
1134
|
bytes4: "bytes4";
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
mode: z.ZodEnum<{
|
|
1135
|
+
}>;
|
|
1136
|
+
mode: z.ZodEnum<{
|
|
962
1137
|
linear: "linear";
|
|
963
1138
|
copy: "copy";
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1139
|
+
}>;
|
|
1140
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1141
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
967
1142
|
raw: "raw";
|
|
968
1143
|
wad: "wad";
|
|
969
1144
|
ray: "ray";
|
|
970
1145
|
bps: "bps";
|
|
971
1146
|
"token-decimals": "token-decimals";
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}, z.core.$strip>], "kind"
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
linear: "linear";
|
|
980
|
-
copy: "copy";
|
|
981
|
-
}>;
|
|
982
|
-
availability: z.ZodOptional<z.ZodEnum<{
|
|
983
|
-
now: "now";
|
|
984
|
-
future: "future";
|
|
985
|
-
}>>;
|
|
986
|
-
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
987
|
-
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
988
|
-
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
989
|
-
countFrom: z.ZodOptional<z.ZodString>;
|
|
990
|
-
}, z.core.$strip>;
|
|
991
|
-
declare const OutputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
992
|
-
kind: z.ZodLiteral<"resource_output">;
|
|
993
|
-
name: z.ZodString;
|
|
994
|
-
mode: z.ZodEnum<{
|
|
1147
|
+
}>>;
|
|
1148
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1149
|
+
}, z.core.$strip>], "kind">>;
|
|
1150
|
+
outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1151
|
+
kind: z.ZodLiteral<"resource_output">;
|
|
1152
|
+
name: z.ZodString;
|
|
1153
|
+
mode: z.ZodEnum<{
|
|
995
1154
|
linear: "linear";
|
|
996
1155
|
copy: "copy";
|
|
997
|
-
|
|
998
|
-
|
|
1156
|
+
}>;
|
|
1157
|
+
availability: z.ZodOptional<z.ZodEnum<{
|
|
999
1158
|
now: "now";
|
|
1000
1159
|
future: "future";
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1160
|
+
}>>;
|
|
1161
|
+
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
1162
|
+
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
1163
|
+
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
countFrom: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1166
|
+
kind: z.ZodLiteral<"handle">;
|
|
1167
|
+
name: z.ZodString;
|
|
1168
|
+
type: z.ZodEnum<{
|
|
1010
1169
|
string: "string";
|
|
1011
|
-
uint8: "uint8";
|
|
1012
|
-
uint16: "uint16";
|
|
1013
1170
|
uint32: "uint32";
|
|
1014
|
-
uint64: "uint64";
|
|
1015
|
-
uint128: "uint128";
|
|
1016
1171
|
uint256: "uint256";
|
|
1017
|
-
|
|
1018
|
-
|
|
1172
|
+
uint128: "uint128";
|
|
1173
|
+
uint64: "uint64";
|
|
1174
|
+
uint16: "uint16";
|
|
1175
|
+
uint8: "uint8";
|
|
1019
1176
|
address: "address";
|
|
1020
1177
|
bool: "bool";
|
|
1178
|
+
bytes32: "bytes32";
|
|
1179
|
+
int128: "int128";
|
|
1180
|
+
int256: "int256";
|
|
1021
1181
|
bytes: "bytes";
|
|
1022
1182
|
bytes4: "bytes4";
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
mode: z.ZodEnum<{
|
|
1183
|
+
}>;
|
|
1184
|
+
mode: z.ZodEnum<{
|
|
1026
1185
|
linear: "linear";
|
|
1027
1186
|
copy: "copy";
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1187
|
+
}>;
|
|
1188
|
+
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1189
|
+
units: z.ZodOptional<z.ZodEnum<{
|
|
1031
1190
|
raw: "raw";
|
|
1032
1191
|
wad: "wad";
|
|
1033
1192
|
ray: "ray";
|
|
1034
1193
|
bps: "bps";
|
|
1035
1194
|
"token-decimals": "token-decimals";
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
}, z.core.$strip>], "kind">;
|
|
1039
|
-
declare const ManifestOperationZod: z.ZodObject<{
|
|
1040
|
-
id: z.ZodString;
|
|
1041
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1042
|
-
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1043
|
-
kind: z.ZodLiteral<"resource">;
|
|
1044
|
-
name: z.ZodString;
|
|
1045
|
-
accepts: z.ZodEnum<{
|
|
1046
|
-
native: "native";
|
|
1047
|
-
erc20: "erc20";
|
|
1048
|
-
any: "any";
|
|
1049
|
-
}>;
|
|
1050
|
-
mode: z.ZodEnum<{
|
|
1051
|
-
linear: "linear";
|
|
1052
|
-
copy: "copy";
|
|
1053
|
-
}>;
|
|
1054
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1055
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1056
|
-
kind: z.ZodLiteral<"handle">;
|
|
1057
|
-
name: z.ZodString;
|
|
1058
|
-
type: z.ZodEnum<{
|
|
1059
|
-
string: "string";
|
|
1060
|
-
uint8: "uint8";
|
|
1061
|
-
uint16: "uint16";
|
|
1062
|
-
uint32: "uint32";
|
|
1063
|
-
uint64: "uint64";
|
|
1064
|
-
uint128: "uint128";
|
|
1065
|
-
uint256: "uint256";
|
|
1066
|
-
int128: "int128";
|
|
1067
|
-
int256: "int256";
|
|
1068
|
-
address: "address";
|
|
1069
|
-
bool: "bool";
|
|
1070
|
-
bytes: "bytes";
|
|
1071
|
-
bytes4: "bytes4";
|
|
1072
|
-
bytes32: "bytes32";
|
|
1073
|
-
}>;
|
|
1074
|
-
mode: z.ZodEnum<{
|
|
1075
|
-
linear: "linear";
|
|
1076
|
-
copy: "copy";
|
|
1077
|
-
}>;
|
|
1078
|
-
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1079
|
-
units: z.ZodOptional<z.ZodEnum<{
|
|
1080
|
-
raw: "raw";
|
|
1081
|
-
wad: "wad";
|
|
1082
|
-
ray: "ray";
|
|
1083
|
-
bps: "bps";
|
|
1084
|
-
"token-decimals": "token-decimals";
|
|
1085
|
-
}>>;
|
|
1086
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1087
|
-
}, z.core.$strip>], "kind">>;
|
|
1088
|
-
outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1089
|
-
kind: z.ZodLiteral<"resource_output">;
|
|
1090
|
-
name: z.ZodString;
|
|
1091
|
-
mode: z.ZodEnum<{
|
|
1092
|
-
linear: "linear";
|
|
1093
|
-
copy: "copy";
|
|
1094
|
-
}>;
|
|
1095
|
-
availability: z.ZodOptional<z.ZodEnum<{
|
|
1096
|
-
now: "now";
|
|
1097
|
-
future: "future";
|
|
1098
|
-
}>>;
|
|
1099
|
-
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
1100
|
-
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
1101
|
-
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
1102
|
-
countFrom: z.ZodOptional<z.ZodString>;
|
|
1103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1104
|
-
kind: z.ZodLiteral<"handle">;
|
|
1105
|
-
name: z.ZodString;
|
|
1106
|
-
type: z.ZodEnum<{
|
|
1107
|
-
string: "string";
|
|
1108
|
-
uint8: "uint8";
|
|
1109
|
-
uint16: "uint16";
|
|
1110
|
-
uint32: "uint32";
|
|
1111
|
-
uint64: "uint64";
|
|
1112
|
-
uint128: "uint128";
|
|
1113
|
-
uint256: "uint256";
|
|
1114
|
-
int128: "int128";
|
|
1115
|
-
int256: "int256";
|
|
1116
|
-
address: "address";
|
|
1117
|
-
bool: "bool";
|
|
1118
|
-
bytes: "bytes";
|
|
1119
|
-
bytes4: "bytes4";
|
|
1120
|
-
bytes32: "bytes32";
|
|
1121
|
-
}>;
|
|
1122
|
-
mode: z.ZodEnum<{
|
|
1123
|
-
linear: "linear";
|
|
1124
|
-
copy: "copy";
|
|
1125
|
-
}>;
|
|
1126
|
-
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1127
|
-
units: z.ZodOptional<z.ZodEnum<{
|
|
1128
|
-
raw: "raw";
|
|
1129
|
-
wad: "wad";
|
|
1130
|
-
ray: "ray";
|
|
1131
|
-
bps: "bps";
|
|
1132
|
-
"token-decimals": "token-decimals";
|
|
1133
|
-
}>>;
|
|
1134
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1195
|
+
}>>;
|
|
1196
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1135
1197
|
}, z.core.$strip>], "kind">>;
|
|
1136
1198
|
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1137
|
-
}, z.core.$strip
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1199
|
+
}, z.core.$strip>>;
|
|
1200
|
+
guards: z.ZodArray<z.ZodObject<{
|
|
1201
|
+
kind: z.ZodString;
|
|
1202
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1203
|
+
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1204
|
+
compatibility: z.ZodOptional<z.ZodObject<{
|
|
1205
|
+
selectors: z.ZodArray<z.ZodObject<{
|
|
1206
|
+
binding: z.ZodString;
|
|
1207
|
+
source: z.ZodEnum<{
|
|
1208
|
+
inputs: "inputs";
|
|
1209
|
+
outputs: "outputs";
|
|
1210
|
+
}>;
|
|
1211
|
+
match: z.ZodObject<{
|
|
1212
|
+
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1146
1213
|
resource: "resource";
|
|
1147
1214
|
handle: "handle";
|
|
1148
1215
|
resource_output: "resource_output";
|
|
1149
|
-
|
|
1216
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
1150
1217
|
resource: "resource";
|
|
1151
1218
|
handle: "handle";
|
|
1152
1219
|
resource_output: "resource_output";
|
|
1153
|
-
|
|
1154
|
-
|
|
1220
|
+
}>>]>;
|
|
1221
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
1155
1222
|
linear: "linear";
|
|
1156
1223
|
copy: "copy";
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
native: "native";
|
|
1224
|
+
}>>;
|
|
1225
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1160
1226
|
erc20: "erc20";
|
|
1227
|
+
native: "native";
|
|
1161
1228
|
any: "any";
|
|
1162
|
-
|
|
1163
|
-
}, z.core.$strip>;
|
|
1164
|
-
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1165
|
-
kind: z.ZodLiteral<"config">;
|
|
1166
|
-
configKey: z.ZodString;
|
|
1167
|
-
cardinality: z.ZodEnum<{
|
|
1168
|
-
one: "one";
|
|
1169
|
-
many: "many";
|
|
1170
|
-
}>;
|
|
1171
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1172
|
-
kind: z.ZodLiteral<"all_matching">;
|
|
1173
|
-
}, z.core.$strip>], "kind">;
|
|
1174
|
-
}, z.core.$strip>;
|
|
1175
|
-
declare const GuardCompatibilityZod: z.ZodObject<{
|
|
1176
|
-
selectors: z.ZodArray<z.ZodObject<{
|
|
1177
|
-
binding: z.ZodString;
|
|
1178
|
-
source: z.ZodEnum<{
|
|
1179
|
-
inputs: "inputs";
|
|
1180
|
-
outputs: "outputs";
|
|
1181
|
-
}>;
|
|
1182
|
-
match: z.ZodObject<{
|
|
1183
|
-
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1184
|
-
resource: "resource";
|
|
1185
|
-
handle: "handle";
|
|
1186
|
-
resource_output: "resource_output";
|
|
1187
|
-
}>, z.ZodArray<z.ZodEnum<{
|
|
1188
|
-
resource: "resource";
|
|
1189
|
-
handle: "handle";
|
|
1190
|
-
resource_output: "resource_output";
|
|
1191
|
-
}>>]>;
|
|
1192
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
1193
|
-
linear: "linear";
|
|
1194
|
-
copy: "copy";
|
|
1195
|
-
}>>;
|
|
1196
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
1197
|
-
native: "native";
|
|
1198
|
-
erc20: "erc20";
|
|
1199
|
-
any: "any";
|
|
1200
|
-
}>>;
|
|
1229
|
+
}>>;
|
|
1201
1230
|
}, z.core.$strip>;
|
|
1202
1231
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1232
|
+
kind: z.ZodLiteral<"config">;
|
|
1233
|
+
configKey: z.ZodString;
|
|
1234
|
+
cardinality: z.ZodEnum<{
|
|
1235
|
+
one: "one";
|
|
1236
|
+
many: "many";
|
|
1237
|
+
}>;
|
|
1209
1238
|
}, z.core.$strip>, z.ZodObject<{
|
|
1210
|
-
|
|
1239
|
+
kind: z.ZodLiteral<"all_matching">;
|
|
1211
1240
|
}, z.core.$strip>], "kind">;
|
|
1241
|
+
}, z.core.$strip>>;
|
|
1212
1242
|
}, z.core.$strip>>;
|
|
1213
|
-
}, z.core.$strip
|
|
1214
|
-
|
|
1215
|
-
kind: z.ZodString;
|
|
1216
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1217
|
-
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1218
|
-
compatibility: z.ZodOptional<z.ZodObject<{
|
|
1219
|
-
selectors: z.ZodArray<z.ZodObject<{
|
|
1220
|
-
binding: z.ZodString;
|
|
1221
|
-
source: z.ZodEnum<{
|
|
1222
|
-
inputs: "inputs";
|
|
1223
|
-
outputs: "outputs";
|
|
1224
|
-
}>;
|
|
1225
|
-
match: z.ZodObject<{
|
|
1226
|
-
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1227
|
-
resource: "resource";
|
|
1228
|
-
handle: "handle";
|
|
1229
|
-
resource_output: "resource_output";
|
|
1230
|
-
}>, z.ZodArray<z.ZodEnum<{
|
|
1231
|
-
resource: "resource";
|
|
1232
|
-
handle: "handle";
|
|
1233
|
-
resource_output: "resource_output";
|
|
1234
|
-
}>>]>;
|
|
1235
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
1236
|
-
linear: "linear";
|
|
1237
|
-
copy: "copy";
|
|
1238
|
-
}>>;
|
|
1239
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
1240
|
-
native: "native";
|
|
1241
|
-
erc20: "erc20";
|
|
1242
|
-
any: "any";
|
|
1243
|
-
}>>;
|
|
1244
|
-
}, z.core.$strip>;
|
|
1245
|
-
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1246
|
-
kind: z.ZodLiteral<"config">;
|
|
1247
|
-
configKey: z.ZodString;
|
|
1248
|
-
cardinality: z.ZodEnum<{
|
|
1249
|
-
one: "one";
|
|
1250
|
-
many: "many";
|
|
1251
|
-
}>;
|
|
1252
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1253
|
-
kind: z.ZodLiteral<"all_matching">;
|
|
1254
|
-
}, z.core.$strip>], "kind">;
|
|
1255
|
-
}, z.core.$strip>>;
|
|
1256
|
-
}, z.core.$strip>>;
|
|
1257
|
-
}, z.core.$strip>;
|
|
1258
|
-
declare const ManifestMaterialiserZod: z.ZodObject<{
|
|
1243
|
+
}, z.core.$strip>>;
|
|
1244
|
+
materialisers: z.ZodArray<z.ZodObject<{
|
|
1259
1245
|
kind: z.ZodString;
|
|
1260
1246
|
description: z.ZodOptional<z.ZodString>;
|
|
1261
1247
|
accepts: z.ZodEnum<{
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1248
|
+
resource: "resource";
|
|
1249
|
+
any: "any";
|
|
1250
|
+
handle: "handle";
|
|
1265
1251
|
}>;
|
|
1266
1252
|
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1267
|
-
}, z.core.$strip
|
|
1268
|
-
|
|
1253
|
+
}, z.core.$strip>>;
|
|
1254
|
+
preconditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1269
1255
|
type: z.ZodString;
|
|
1270
1256
|
description: z.ZodOptional<z.ZodString>;
|
|
1271
1257
|
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1272
|
-
}, z.core.$strip
|
|
1273
|
-
declare const ComposeManifestZod: z.ZodObject<{
|
|
1274
|
-
manifestVersion: z.ZodNumber;
|
|
1275
|
-
manifestHash: z.ZodString;
|
|
1276
|
-
flowSchema: z.ZodObject<{}, z.core.$loose>;
|
|
1277
|
-
operations: z.ZodArray<z.ZodObject<{
|
|
1278
|
-
id: z.ZodString;
|
|
1279
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1280
|
-
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1281
|
-
kind: z.ZodLiteral<"resource">;
|
|
1282
|
-
name: z.ZodString;
|
|
1283
|
-
accepts: z.ZodEnum<{
|
|
1284
|
-
native: "native";
|
|
1285
|
-
erc20: "erc20";
|
|
1286
|
-
any: "any";
|
|
1287
|
-
}>;
|
|
1288
|
-
mode: z.ZodEnum<{
|
|
1289
|
-
linear: "linear";
|
|
1290
|
-
copy: "copy";
|
|
1291
|
-
}>;
|
|
1292
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1293
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1294
|
-
kind: z.ZodLiteral<"handle">;
|
|
1295
|
-
name: z.ZodString;
|
|
1296
|
-
type: z.ZodEnum<{
|
|
1297
|
-
string: "string";
|
|
1298
|
-
uint8: "uint8";
|
|
1299
|
-
uint16: "uint16";
|
|
1300
|
-
uint32: "uint32";
|
|
1301
|
-
uint64: "uint64";
|
|
1302
|
-
uint128: "uint128";
|
|
1303
|
-
uint256: "uint256";
|
|
1304
|
-
int128: "int128";
|
|
1305
|
-
int256: "int256";
|
|
1306
|
-
address: "address";
|
|
1307
|
-
bool: "bool";
|
|
1308
|
-
bytes: "bytes";
|
|
1309
|
-
bytes4: "bytes4";
|
|
1310
|
-
bytes32: "bytes32";
|
|
1311
|
-
}>;
|
|
1312
|
-
mode: z.ZodEnum<{
|
|
1313
|
-
linear: "linear";
|
|
1314
|
-
copy: "copy";
|
|
1315
|
-
}>;
|
|
1316
|
-
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1317
|
-
units: z.ZodOptional<z.ZodEnum<{
|
|
1318
|
-
raw: "raw";
|
|
1319
|
-
wad: "wad";
|
|
1320
|
-
ray: "ray";
|
|
1321
|
-
bps: "bps";
|
|
1322
|
-
"token-decimals": "token-decimals";
|
|
1323
|
-
}>>;
|
|
1324
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1325
|
-
}, z.core.$strip>], "kind">>;
|
|
1326
|
-
outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1327
|
-
kind: z.ZodLiteral<"resource_output">;
|
|
1328
|
-
name: z.ZodString;
|
|
1329
|
-
mode: z.ZodEnum<{
|
|
1330
|
-
linear: "linear";
|
|
1331
|
-
copy: "copy";
|
|
1332
|
-
}>;
|
|
1333
|
-
availability: z.ZodOptional<z.ZodEnum<{
|
|
1334
|
-
now: "now";
|
|
1335
|
-
future: "future";
|
|
1336
|
-
}>>;
|
|
1337
|
-
providesMinimum: z.ZodOptional<z.ZodBoolean>;
|
|
1338
|
-
omitIfZero: z.ZodOptional<z.ZodBoolean>;
|
|
1339
|
-
deliveryAddressInput: z.ZodOptional<z.ZodString>;
|
|
1340
|
-
countFrom: z.ZodOptional<z.ZodString>;
|
|
1341
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1342
|
-
kind: z.ZodLiteral<"handle">;
|
|
1343
|
-
name: z.ZodString;
|
|
1344
|
-
type: z.ZodEnum<{
|
|
1345
|
-
string: "string";
|
|
1346
|
-
uint8: "uint8";
|
|
1347
|
-
uint16: "uint16";
|
|
1348
|
-
uint32: "uint32";
|
|
1349
|
-
uint64: "uint64";
|
|
1350
|
-
uint128: "uint128";
|
|
1351
|
-
uint256: "uint256";
|
|
1352
|
-
int128: "int128";
|
|
1353
|
-
int256: "int256";
|
|
1354
|
-
address: "address";
|
|
1355
|
-
bool: "bool";
|
|
1356
|
-
bytes: "bytes";
|
|
1357
|
-
bytes4: "bytes4";
|
|
1358
|
-
bytes32: "bytes32";
|
|
1359
|
-
}>;
|
|
1360
|
-
mode: z.ZodEnum<{
|
|
1361
|
-
linear: "linear";
|
|
1362
|
-
copy: "copy";
|
|
1363
|
-
}>;
|
|
1364
|
-
expose: z.ZodOptional<z.ZodBoolean>;
|
|
1365
|
-
units: z.ZodOptional<z.ZodEnum<{
|
|
1366
|
-
raw: "raw";
|
|
1367
|
-
wad: "wad";
|
|
1368
|
-
ray: "ray";
|
|
1369
|
-
bps: "bps";
|
|
1370
|
-
"token-decimals": "token-decimals";
|
|
1371
|
-
}>>;
|
|
1372
|
-
optional: z.ZodOptional<z.ZodBoolean>;
|
|
1373
|
-
}, z.core.$strip>], "kind">>;
|
|
1374
|
-
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1375
|
-
}, z.core.$strip>>;
|
|
1376
|
-
guards: z.ZodArray<z.ZodObject<{
|
|
1377
|
-
kind: z.ZodString;
|
|
1378
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1379
|
-
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1380
|
-
compatibility: z.ZodOptional<z.ZodObject<{
|
|
1381
|
-
selectors: z.ZodArray<z.ZodObject<{
|
|
1382
|
-
binding: z.ZodString;
|
|
1383
|
-
source: z.ZodEnum<{
|
|
1384
|
-
inputs: "inputs";
|
|
1385
|
-
outputs: "outputs";
|
|
1386
|
-
}>;
|
|
1387
|
-
match: z.ZodObject<{
|
|
1388
|
-
kind: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1389
|
-
resource: "resource";
|
|
1390
|
-
handle: "handle";
|
|
1391
|
-
resource_output: "resource_output";
|
|
1392
|
-
}>, z.ZodArray<z.ZodEnum<{
|
|
1393
|
-
resource: "resource";
|
|
1394
|
-
handle: "handle";
|
|
1395
|
-
resource_output: "resource_output";
|
|
1396
|
-
}>>]>;
|
|
1397
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
1398
|
-
linear: "linear";
|
|
1399
|
-
copy: "copy";
|
|
1400
|
-
}>>;
|
|
1401
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
1402
|
-
native: "native";
|
|
1403
|
-
erc20: "erc20";
|
|
1404
|
-
any: "any";
|
|
1405
|
-
}>>;
|
|
1406
|
-
}, z.core.$strip>;
|
|
1407
|
-
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1408
|
-
kind: z.ZodLiteral<"config">;
|
|
1409
|
-
configKey: z.ZodString;
|
|
1410
|
-
cardinality: z.ZodEnum<{
|
|
1411
|
-
one: "one";
|
|
1412
|
-
many: "many";
|
|
1413
|
-
}>;
|
|
1414
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1415
|
-
kind: z.ZodLiteral<"all_matching">;
|
|
1416
|
-
}, z.core.$strip>], "kind">;
|
|
1417
|
-
}, z.core.$strip>>;
|
|
1418
|
-
}, z.core.$strip>>;
|
|
1419
|
-
}, z.core.$strip>>;
|
|
1420
|
-
materialisers: z.ZodArray<z.ZodObject<{
|
|
1421
|
-
kind: z.ZodString;
|
|
1422
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1423
|
-
accepts: z.ZodEnum<{
|
|
1424
|
-
resource: "resource";
|
|
1425
|
-
any: "any";
|
|
1426
|
-
handle: "handle";
|
|
1427
|
-
}>;
|
|
1428
|
-
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1429
|
-
}, z.core.$strip>>;
|
|
1430
|
-
preconditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1431
|
-
type: z.ZodString;
|
|
1432
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1433
|
-
configSchema: z.ZodOptional<z.ZodUnknown>;
|
|
1434
|
-
}, z.core.$strip>>>;
|
|
1258
|
+
}, z.core.$strip>>>;
|
|
1435
1259
|
}, z.core.$strip>;
|
|
1436
1260
|
declare const SettlementEscrowZod: z.ZodObject<{
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1261
|
+
chainId: z.ZodNumber;
|
|
1262
|
+
address: z.ZodString;
|
|
1263
|
+
token: z.ZodString;
|
|
1264
|
+
amount: z.ZodString;
|
|
1265
|
+
cap: z.ZodString;
|
|
1266
|
+
owner: z.ZodString;
|
|
1267
|
+
refund: z.ZodString;
|
|
1268
|
+
expiresAtMs: z.ZodNumber;
|
|
1445
1269
|
}, z.core.$strip>;
|
|
1446
|
-
declare const
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1270
|
+
export declare const AssertionSpecZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1271
|
+
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1272
|
+
chainId: z.ZodNumber;
|
|
1273
|
+
token: z.ZodString;
|
|
1274
|
+
owner: z.ZodString;
|
|
1275
|
+
minAmount: z.ZodString;
|
|
1452
1276
|
}, z.core.$strip>, z.ZodObject<{
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1277
|
+
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1278
|
+
chainId: z.ZodNumber;
|
|
1279
|
+
owner: z.ZodString;
|
|
1280
|
+
minAmount: z.ZodString;
|
|
1457
1281
|
}, z.core.$strip>, z.ZodObject<{
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1282
|
+
kind: z.ZodLiteral<"call">;
|
|
1283
|
+
chainId: z.ZodNumber;
|
|
1284
|
+
to: z.ZodString;
|
|
1285
|
+
calldata: z.ZodString;
|
|
1286
|
+
comparator: z.ZodEnum<{
|
|
1287
|
+
gte: "gte";
|
|
1288
|
+
eq: "eq";
|
|
1289
|
+
lte: "lte";
|
|
1290
|
+
}>;
|
|
1291
|
+
value: z.ZodString;
|
|
1292
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1293
|
+
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1294
|
+
chainId: z.ZodNumber;
|
|
1295
|
+
token: z.ZodString;
|
|
1296
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1297
|
+
escrow: "escrow";
|
|
1298
|
+
delivery: "delivery";
|
|
1299
|
+
}>]>;
|
|
1300
|
+
minDelta: z.ZodString;
|
|
1301
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1302
|
+
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1303
|
+
chainId: z.ZodNumber;
|
|
1304
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1305
|
+
escrow: "escrow";
|
|
1306
|
+
delivery: "delivery";
|
|
1307
|
+
}>]>;
|
|
1308
|
+
minDelta: z.ZodString;
|
|
1468
1309
|
}, z.core.$strip>], "kind">;
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1310
|
+
type AssertionSpecWire = z.infer<typeof AssertionSpecZod>;
|
|
1311
|
+
export declare const AssertedPredicateZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1312
|
+
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1313
|
+
chainId: z.ZodNumber;
|
|
1314
|
+
token: z.ZodString;
|
|
1315
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1316
|
+
escrow: "escrow";
|
|
1317
|
+
delivery: "delivery";
|
|
1318
|
+
}>]>;
|
|
1319
|
+
minAmount: z.ZodString;
|
|
1475
1320
|
}, z.core.$strip>, z.ZodObject<{
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1321
|
+
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1322
|
+
chainId: z.ZodNumber;
|
|
1323
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1324
|
+
escrow: "escrow";
|
|
1325
|
+
delivery: "delivery";
|
|
1326
|
+
}>]>;
|
|
1327
|
+
minAmount: z.ZodString;
|
|
1480
1328
|
}, z.core.$strip>, z.ZodObject<{
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1329
|
+
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1330
|
+
chainId: z.ZodNumber;
|
|
1331
|
+
token: z.ZodString;
|
|
1332
|
+
owner: z.ZodString;
|
|
1333
|
+
minAmount: z.ZodString;
|
|
1334
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1335
|
+
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1336
|
+
chainId: z.ZodNumber;
|
|
1337
|
+
owner: z.ZodString;
|
|
1338
|
+
minAmount: z.ZodString;
|
|
1339
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1340
|
+
kind: z.ZodLiteral<"call">;
|
|
1341
|
+
chainId: z.ZodNumber;
|
|
1342
|
+
to: z.ZodString;
|
|
1343
|
+
calldata: z.ZodString;
|
|
1344
|
+
comparator: z.ZodEnum<{
|
|
1345
|
+
gte: "gte";
|
|
1346
|
+
eq: "eq";
|
|
1347
|
+
lte: "lte";
|
|
1348
|
+
}>;
|
|
1349
|
+
value: z.ZodString;
|
|
1350
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1351
|
+
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1352
|
+
chainId: z.ZodNumber;
|
|
1353
|
+
token: z.ZodString;
|
|
1354
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1355
|
+
escrow: "escrow";
|
|
1356
|
+
delivery: "delivery";
|
|
1357
|
+
}>]>;
|
|
1358
|
+
minDelta: z.ZodString;
|
|
1359
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1360
|
+
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1361
|
+
chainId: z.ZodNumber;
|
|
1362
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1363
|
+
escrow: "escrow";
|
|
1364
|
+
delivery: "delivery";
|
|
1365
|
+
}>]>;
|
|
1366
|
+
minDelta: z.ZodString;
|
|
1491
1367
|
}, z.core.$strip>, z.ZodObject<{
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1368
|
+
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1369
|
+
chainId: z.ZodNumber;
|
|
1370
|
+
token: z.ZodString;
|
|
1371
|
+
owner: z.ZodString;
|
|
1372
|
+
minAmount: z.ZodString;
|
|
1373
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1374
|
+
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1375
|
+
chainId: z.ZodNumber;
|
|
1376
|
+
owner: z.ZodString;
|
|
1377
|
+
minAmount: z.ZodString;
|
|
1378
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1379
|
+
kind: z.ZodLiteral<"call">;
|
|
1380
|
+
chainId: z.ZodNumber;
|
|
1381
|
+
to: z.ZodString;
|
|
1382
|
+
calldata: z.ZodString;
|
|
1383
|
+
comparator: z.ZodEnum<{
|
|
1384
|
+
gte: "gte";
|
|
1385
|
+
eq: "eq";
|
|
1386
|
+
lte: "lte";
|
|
1387
|
+
}>;
|
|
1388
|
+
value: z.ZodString;
|
|
1389
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1390
|
+
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1391
|
+
chainId: z.ZodNumber;
|
|
1392
|
+
token: z.ZodString;
|
|
1393
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1394
|
+
escrow: "escrow";
|
|
1395
|
+
delivery: "delivery";
|
|
1396
|
+
}>]>;
|
|
1397
|
+
minDelta: z.ZodString;
|
|
1398
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1399
|
+
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1400
|
+
chainId: z.ZodNumber;
|
|
1401
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1402
|
+
escrow: "escrow";
|
|
1403
|
+
delivery: "delivery";
|
|
1404
|
+
}>]>;
|
|
1405
|
+
minDelta: z.ZodString;
|
|
1500
1406
|
}, z.core.$strip>, z.ZodObject<{
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1407
|
+
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1408
|
+
chainId: z.ZodNumber;
|
|
1409
|
+
token: z.ZodString;
|
|
1410
|
+
owner: z.ZodString;
|
|
1411
|
+
minAmount: z.ZodString;
|
|
1412
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1413
|
+
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1414
|
+
chainId: z.ZodNumber;
|
|
1415
|
+
owner: z.ZodString;
|
|
1416
|
+
minAmount: z.ZodString;
|
|
1417
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1418
|
+
kind: z.ZodLiteral<"call">;
|
|
1419
|
+
chainId: z.ZodNumber;
|
|
1420
|
+
to: z.ZodString;
|
|
1421
|
+
calldata: z.ZodString;
|
|
1422
|
+
comparator: z.ZodEnum<{
|
|
1423
|
+
gte: "gte";
|
|
1424
|
+
eq: "eq";
|
|
1425
|
+
lte: "lte";
|
|
1426
|
+
}>;
|
|
1427
|
+
value: z.ZodString;
|
|
1428
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1429
|
+
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1430
|
+
chainId: z.ZodNumber;
|
|
1431
|
+
token: z.ZodString;
|
|
1432
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1433
|
+
escrow: "escrow";
|
|
1434
|
+
delivery: "delivery";
|
|
1435
|
+
}>]>;
|
|
1436
|
+
minDelta: z.ZodString;
|
|
1437
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1438
|
+
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1439
|
+
chainId: z.ZodNumber;
|
|
1440
|
+
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1441
|
+
escrow: "escrow";
|
|
1442
|
+
delivery: "delivery";
|
|
1443
|
+
}>]>;
|
|
1444
|
+
minDelta: z.ZodString;
|
|
1508
1445
|
}, z.core.$strip>], "kind">;
|
|
1509
|
-
|
|
1510
|
-
|
|
1446
|
+
export declare const VerificationDescriptorZod: z.ZodObject<{
|
|
1447
|
+
validationProgramHash: z.ZodString;
|
|
1448
|
+
paramsHash: z.ZodString;
|
|
1449
|
+
assertedPredicate: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1511
1450
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1512
1451
|
chainId: z.ZodNumber;
|
|
1513
1452
|
token: z.ZodString;
|
|
1514
1453
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1515
|
-
|
|
1516
|
-
|
|
1454
|
+
escrow: "escrow";
|
|
1455
|
+
delivery: "delivery";
|
|
1517
1456
|
}>]>;
|
|
1518
1457
|
minAmount: z.ZodString;
|
|
1519
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1458
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1520
1459
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1521
1460
|
chainId: z.ZodNumber;
|
|
1522
1461
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1523
|
-
|
|
1524
|
-
|
|
1462
|
+
escrow: "escrow";
|
|
1463
|
+
delivery: "delivery";
|
|
1525
1464
|
}>]>;
|
|
1526
1465
|
minAmount: z.ZodString;
|
|
1527
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1466
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1528
1467
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1529
1468
|
chainId: z.ZodNumber;
|
|
1530
1469
|
token: z.ZodString;
|
|
1531
1470
|
owner: z.ZodString;
|
|
1532
1471
|
minAmount: z.ZodString;
|
|
1533
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1472
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1534
1473
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1535
1474
|
chainId: z.ZodNumber;
|
|
1536
1475
|
owner: z.ZodString;
|
|
1537
1476
|
minAmount: z.ZodString;
|
|
1538
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1477
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1539
1478
|
kind: z.ZodLiteral<"call">;
|
|
1540
1479
|
chainId: z.ZodNumber;
|
|
1541
1480
|
to: z.ZodString;
|
|
1542
1481
|
calldata: z.ZodString;
|
|
1543
1482
|
comparator: z.ZodEnum<{
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1483
|
+
gte: "gte";
|
|
1484
|
+
eq: "eq";
|
|
1485
|
+
lte: "lte";
|
|
1547
1486
|
}>;
|
|
1548
1487
|
value: z.ZodString;
|
|
1549
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1488
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1550
1489
|
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1551
1490
|
chainId: z.ZodNumber;
|
|
1552
1491
|
token: z.ZodString;
|
|
1553
1492
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1554
|
-
|
|
1555
|
-
|
|
1493
|
+
escrow: "escrow";
|
|
1494
|
+
delivery: "delivery";
|
|
1556
1495
|
}>]>;
|
|
1557
1496
|
minDelta: z.ZodString;
|
|
1558
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1497
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1559
1498
|
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1560
1499
|
chainId: z.ZodNumber;
|
|
1561
1500
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1562
|
-
|
|
1563
|
-
|
|
1501
|
+
escrow: "escrow";
|
|
1502
|
+
delivery: "delivery";
|
|
1564
1503
|
}>]>;
|
|
1565
1504
|
minDelta: z.ZodString;
|
|
1566
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1505
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1567
1506
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1568
1507
|
chainId: z.ZodNumber;
|
|
1569
1508
|
token: z.ZodString;
|
|
1570
1509
|
owner: z.ZodString;
|
|
1571
1510
|
minAmount: z.ZodString;
|
|
1572
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1511
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1573
1512
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1574
1513
|
chainId: z.ZodNumber;
|
|
1575
1514
|
owner: z.ZodString;
|
|
1576
1515
|
minAmount: z.ZodString;
|
|
1577
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1516
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1578
1517
|
kind: z.ZodLiteral<"call">;
|
|
1579
1518
|
chainId: z.ZodNumber;
|
|
1580
1519
|
to: z.ZodString;
|
|
1581
1520
|
calldata: z.ZodString;
|
|
1582
1521
|
comparator: z.ZodEnum<{
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1522
|
+
gte: "gte";
|
|
1523
|
+
eq: "eq";
|
|
1524
|
+
lte: "lte";
|
|
1586
1525
|
}>;
|
|
1587
1526
|
value: z.ZodString;
|
|
1588
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1527
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1589
1528
|
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1590
1529
|
chainId: z.ZodNumber;
|
|
1591
1530
|
token: z.ZodString;
|
|
1592
1531
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1593
|
-
|
|
1594
|
-
|
|
1532
|
+
escrow: "escrow";
|
|
1533
|
+
delivery: "delivery";
|
|
1595
1534
|
}>]>;
|
|
1596
1535
|
minDelta: z.ZodString;
|
|
1597
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1536
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1598
1537
|
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1599
1538
|
chainId: z.ZodNumber;
|
|
1600
1539
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1601
|
-
|
|
1602
|
-
|
|
1540
|
+
escrow: "escrow";
|
|
1541
|
+
delivery: "delivery";
|
|
1603
1542
|
}>]>;
|
|
1604
1543
|
minDelta: z.ZodString;
|
|
1605
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1544
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1606
1545
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1607
1546
|
chainId: z.ZodNumber;
|
|
1608
1547
|
token: z.ZodString;
|
|
1609
1548
|
owner: z.ZodString;
|
|
1610
1549
|
minAmount: z.ZodString;
|
|
1611
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1550
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1612
1551
|
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1613
1552
|
chainId: z.ZodNumber;
|
|
1614
1553
|
owner: z.ZodString;
|
|
1615
1554
|
minAmount: z.ZodString;
|
|
1616
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1555
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1617
1556
|
kind: z.ZodLiteral<"call">;
|
|
1618
1557
|
chainId: z.ZodNumber;
|
|
1619
1558
|
to: z.ZodString;
|
|
1620
1559
|
calldata: z.ZodString;
|
|
1621
1560
|
comparator: z.ZodEnum<{
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1561
|
+
gte: "gte";
|
|
1562
|
+
eq: "eq";
|
|
1563
|
+
lte: "lte";
|
|
1625
1564
|
}>;
|
|
1626
1565
|
value: z.ZodString;
|
|
1627
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1566
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1628
1567
|
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1629
1568
|
chainId: z.ZodNumber;
|
|
1630
1569
|
token: z.ZodString;
|
|
1631
1570
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1632
|
-
|
|
1633
|
-
|
|
1571
|
+
escrow: "escrow";
|
|
1572
|
+
delivery: "delivery";
|
|
1634
1573
|
}>]>;
|
|
1635
1574
|
minDelta: z.ZodString;
|
|
1636
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1575
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1637
1576
|
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1638
1577
|
chainId: z.ZodNumber;
|
|
1639
1578
|
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1640
|
-
|
|
1641
|
-
|
|
1579
|
+
escrow: "escrow";
|
|
1580
|
+
delivery: "delivery";
|
|
1642
1581
|
}>]>;
|
|
1643
1582
|
minDelta: z.ZodString;
|
|
1644
|
-
}, z.core.$strip>], "kind"
|
|
1645
|
-
declare const VerificationDescriptorZod: z.ZodObject<{
|
|
1646
|
-
validationProgramHash: z.ZodString;
|
|
1647
|
-
paramsHash: z.ZodString;
|
|
1648
|
-
assertedPredicate: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1649
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1650
|
-
chainId: z.ZodNumber;
|
|
1651
|
-
token: z.ZodString;
|
|
1652
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1653
|
-
escrow: "escrow";
|
|
1654
|
-
delivery: "delivery";
|
|
1655
|
-
}>]>;
|
|
1656
|
-
minAmount: z.ZodString;
|
|
1657
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1658
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1659
|
-
chainId: z.ZodNumber;
|
|
1660
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1661
|
-
escrow: "escrow";
|
|
1662
|
-
delivery: "delivery";
|
|
1663
|
-
}>]>;
|
|
1664
|
-
minAmount: z.ZodString;
|
|
1665
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1666
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1667
|
-
chainId: z.ZodNumber;
|
|
1668
|
-
token: z.ZodString;
|
|
1669
|
-
owner: z.ZodString;
|
|
1670
|
-
minAmount: z.ZodString;
|
|
1671
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1672
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1673
|
-
chainId: z.ZodNumber;
|
|
1674
|
-
owner: z.ZodString;
|
|
1675
|
-
minAmount: z.ZodString;
|
|
1676
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1677
|
-
kind: z.ZodLiteral<"call">;
|
|
1678
|
-
chainId: z.ZodNumber;
|
|
1679
|
-
to: z.ZodString;
|
|
1680
|
-
calldata: z.ZodString;
|
|
1681
|
-
comparator: z.ZodEnum<{
|
|
1682
|
-
gte: "gte";
|
|
1683
|
-
eq: "eq";
|
|
1684
|
-
lte: "lte";
|
|
1685
|
-
}>;
|
|
1686
|
-
value: z.ZodString;
|
|
1687
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1688
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1689
|
-
chainId: z.ZodNumber;
|
|
1690
|
-
token: z.ZodString;
|
|
1691
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1692
|
-
escrow: "escrow";
|
|
1693
|
-
delivery: "delivery";
|
|
1694
|
-
}>]>;
|
|
1695
|
-
minDelta: z.ZodString;
|
|
1696
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1697
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1698
|
-
chainId: z.ZodNumber;
|
|
1699
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1700
|
-
escrow: "escrow";
|
|
1701
|
-
delivery: "delivery";
|
|
1702
|
-
}>]>;
|
|
1703
|
-
minDelta: z.ZodString;
|
|
1704
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1705
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1706
|
-
chainId: z.ZodNumber;
|
|
1707
|
-
token: z.ZodString;
|
|
1708
|
-
owner: z.ZodString;
|
|
1709
|
-
minAmount: z.ZodString;
|
|
1710
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1711
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1712
|
-
chainId: z.ZodNumber;
|
|
1713
|
-
owner: z.ZodString;
|
|
1714
|
-
minAmount: z.ZodString;
|
|
1715
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1716
|
-
kind: z.ZodLiteral<"call">;
|
|
1717
|
-
chainId: z.ZodNumber;
|
|
1718
|
-
to: z.ZodString;
|
|
1719
|
-
calldata: z.ZodString;
|
|
1720
|
-
comparator: z.ZodEnum<{
|
|
1721
|
-
gte: "gte";
|
|
1722
|
-
eq: "eq";
|
|
1723
|
-
lte: "lte";
|
|
1724
|
-
}>;
|
|
1725
|
-
value: z.ZodString;
|
|
1726
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1727
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1728
|
-
chainId: z.ZodNumber;
|
|
1729
|
-
token: z.ZodString;
|
|
1730
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1731
|
-
escrow: "escrow";
|
|
1732
|
-
delivery: "delivery";
|
|
1733
|
-
}>]>;
|
|
1734
|
-
minDelta: z.ZodString;
|
|
1735
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1736
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1737
|
-
chainId: z.ZodNumber;
|
|
1738
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1739
|
-
escrow: "escrow";
|
|
1740
|
-
delivery: "delivery";
|
|
1741
|
-
}>]>;
|
|
1742
|
-
minDelta: z.ZodString;
|
|
1743
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1744
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1745
|
-
chainId: z.ZodNumber;
|
|
1746
|
-
token: z.ZodString;
|
|
1747
|
-
owner: z.ZodString;
|
|
1748
|
-
minAmount: z.ZodString;
|
|
1749
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1750
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1751
|
-
chainId: z.ZodNumber;
|
|
1752
|
-
owner: z.ZodString;
|
|
1753
|
-
minAmount: z.ZodString;
|
|
1754
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1755
|
-
kind: z.ZodLiteral<"call">;
|
|
1756
|
-
chainId: z.ZodNumber;
|
|
1757
|
-
to: z.ZodString;
|
|
1758
|
-
calldata: z.ZodString;
|
|
1759
|
-
comparator: z.ZodEnum<{
|
|
1760
|
-
gte: "gte";
|
|
1761
|
-
eq: "eq";
|
|
1762
|
-
lte: "lte";
|
|
1763
|
-
}>;
|
|
1764
|
-
value: z.ZodString;
|
|
1765
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1766
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1767
|
-
chainId: z.ZodNumber;
|
|
1768
|
-
token: z.ZodString;
|
|
1769
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1770
|
-
escrow: "escrow";
|
|
1771
|
-
delivery: "delivery";
|
|
1772
|
-
}>]>;
|
|
1773
|
-
minDelta: z.ZodString;
|
|
1774
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1775
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1776
|
-
chainId: z.ZodNumber;
|
|
1777
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1778
|
-
escrow: "escrow";
|
|
1779
|
-
delivery: "delivery";
|
|
1780
|
-
}>]>;
|
|
1781
|
-
minDelta: z.ZodString;
|
|
1782
|
-
}, z.core.$strip>], "kind">>;
|
|
1583
|
+
}, z.core.$strip>], "kind">>;
|
|
1783
1584
|
}, z.core.$strip>;
|
|
1784
1585
|
type AssertedPredicateWire = z.infer<typeof AssertedPredicateZod>;
|
|
1785
1586
|
type VerificationDescriptorWire = z.infer<typeof VerificationDescriptorZod>;
|
|
1786
|
-
declare const
|
|
1587
|
+
export declare const SettlementZod: z.ZodObject<{
|
|
1588
|
+
escrow: z.ZodOptional<z.ZodObject<{
|
|
1787
1589
|
chainId: z.ZodNumber;
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1797
|
-
chainId: z.ZodNumber;
|
|
1798
|
-
owner: z.ZodString;
|
|
1799
|
-
minAmount: z.ZodString;
|
|
1800
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1801
|
-
kind: z.ZodLiteral<"call">;
|
|
1802
|
-
chainId: z.ZodNumber;
|
|
1803
|
-
to: z.ZodString;
|
|
1804
|
-
calldata: z.ZodString;
|
|
1805
|
-
comparator: z.ZodEnum<{
|
|
1806
|
-
gte: "gte";
|
|
1807
|
-
eq: "eq";
|
|
1808
|
-
lte: "lte";
|
|
1809
|
-
}>;
|
|
1810
|
-
value: z.ZodString;
|
|
1811
|
-
}, z.core.$strip>], "kind">;
|
|
1812
|
-
validity: z.ZodObject<{
|
|
1813
|
-
expiresAtMs: z.ZodNumber;
|
|
1814
|
-
}, z.core.$strip>;
|
|
1815
|
-
correlationId: z.ZodOptional<z.ZodString>;
|
|
1816
|
-
}, z.core.$strip>;
|
|
1817
|
-
declare const SettlementZod: z.ZodObject<{
|
|
1818
|
-
escrow: z.ZodOptional<z.ZodObject<{
|
|
1819
|
-
chainId: z.ZodNumber;
|
|
1820
|
-
address: z.ZodString;
|
|
1821
|
-
token: z.ZodString;
|
|
1822
|
-
amount: z.ZodString;
|
|
1823
|
-
cap: z.ZodString;
|
|
1824
|
-
owner: z.ZodString;
|
|
1825
|
-
refund: z.ZodString;
|
|
1826
|
-
expiresAtMs: z.ZodNumber;
|
|
1827
|
-
}, z.core.$strip>>;
|
|
1828
|
-
continuation: z.ZodOptional<z.ZodObject<{
|
|
1829
|
-
chainId: z.ZodNumber;
|
|
1830
|
-
nextFlow: z.ZodUnknown;
|
|
1831
|
-
check: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1832
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1833
|
-
chainId: z.ZodNumber;
|
|
1834
|
-
token: z.ZodString;
|
|
1835
|
-
owner: z.ZodString;
|
|
1836
|
-
minAmount: z.ZodString;
|
|
1837
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1838
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1839
|
-
chainId: z.ZodNumber;
|
|
1840
|
-
owner: z.ZodString;
|
|
1841
|
-
minAmount: z.ZodString;
|
|
1842
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1843
|
-
kind: z.ZodLiteral<"call">;
|
|
1844
|
-
chainId: z.ZodNumber;
|
|
1845
|
-
to: z.ZodString;
|
|
1846
|
-
calldata: z.ZodString;
|
|
1847
|
-
comparator: z.ZodEnum<{
|
|
1848
|
-
gte: "gte";
|
|
1849
|
-
eq: "eq";
|
|
1850
|
-
lte: "lte";
|
|
1851
|
-
}>;
|
|
1852
|
-
value: z.ZodString;
|
|
1853
|
-
}, z.core.$strip>], "kind">;
|
|
1854
|
-
validity: z.ZodObject<{
|
|
1855
|
-
expiresAtMs: z.ZodNumber;
|
|
1856
|
-
}, z.core.$strip>;
|
|
1857
|
-
correlationId: z.ZodOptional<z.ZodString>;
|
|
1858
|
-
}, z.core.$strip>>;
|
|
1590
|
+
address: z.ZodString;
|
|
1591
|
+
token: z.ZodString;
|
|
1592
|
+
amount: z.ZodString;
|
|
1593
|
+
cap: z.ZodString;
|
|
1594
|
+
owner: z.ZodString;
|
|
1595
|
+
refund: z.ZodString;
|
|
1596
|
+
expiresAtMs: z.ZodNumber;
|
|
1597
|
+
}, z.core.$strip>>;
|
|
1859
1598
|
}, z.core.$strip>;
|
|
1860
1599
|
type ResourcePort = z.infer<typeof ResourcePortZod>;
|
|
1861
1600
|
type HandlePort = z.infer<typeof HandlePortZod>;
|
|
@@ -1873,8 +1612,8 @@ type ManifestPrecondition = z.infer<typeof ManifestPreconditionZod>;
|
|
|
1873
1612
|
type ComposeManifest = z.infer<typeof ComposeManifestZod>;
|
|
1874
1613
|
type SettlementEscrowWire = z.infer<typeof SettlementEscrowZod>;
|
|
1875
1614
|
type SettlementWire = z.infer<typeof SettlementZod>;
|
|
1876
|
-
|
|
1877
|
-
|
|
1615
|
+
//#endregion
|
|
1616
|
+
//#region src/compile.d.ts
|
|
1878
1617
|
type SimulationPolicy = 'strict' | 'allow-revert';
|
|
1879
1618
|
/**
|
|
1880
1619
|
* Destination for sweeping proxy-held terminal resources after execution.
|
|
@@ -1882,156 +1621,157 @@ type SimulationPolicy = 'strict' | 'allow-revert';
|
|
|
1882
1621
|
* (e.g. `{ $ref: "context.sender" }`).
|
|
1883
1622
|
*/
|
|
1884
1623
|
type SweepTo = string | {
|
|
1885
|
-
|
|
1624
|
+
readonly $ref: string;
|
|
1886
1625
|
};
|
|
1887
1626
|
interface ComposeRun {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1627
|
+
readonly inputs: Record<string, InputSpec>;
|
|
1628
|
+
readonly preconditions?: readonly Precondition[];
|
|
1629
|
+
readonly signer: string;
|
|
1630
|
+
readonly assumptions?: Record<string, bigint>;
|
|
1631
|
+
readonly referrer?: string;
|
|
1632
|
+
readonly integratorFeeBps?: number;
|
|
1633
|
+
readonly maxPriceImpactBps?: number;
|
|
1634
|
+
readonly sweepTo?: SweepTo;
|
|
1635
|
+
readonly simulationPolicy?: SimulationPolicy;
|
|
1636
|
+
/**
|
|
1637
|
+
* Also simulate the final user-facing transaction. Defaults to `false`;
|
|
1638
|
+
* reverts honour `simulationPolicy` and a success is echoed back as
|
|
1639
|
+
* `userProgramSimulation`.
|
|
1640
|
+
*/
|
|
1641
|
+
readonly simulateUserProgram?: boolean;
|
|
1642
|
+
readonly checkOnChainAllowances?: boolean;
|
|
1904
1643
|
}
|
|
1905
1644
|
interface ComposeCompileRequest {
|
|
1906
|
-
|
|
1907
|
-
|
|
1645
|
+
readonly flow: Flow;
|
|
1646
|
+
readonly run: ComposeRun;
|
|
1908
1647
|
}
|
|
1909
1648
|
interface PriceImpact {
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1649
|
+
readonly inputValueUsd: number;
|
|
1650
|
+
readonly outputValueUsd: number;
|
|
1651
|
+
readonly impactBps: number;
|
|
1652
|
+
readonly unpricedInputs: readonly string[];
|
|
1653
|
+
readonly unpricedOutputs: readonly string[];
|
|
1915
1654
|
}
|
|
1916
1655
|
interface ApprovalEntry {
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1656
|
+
readonly token: string;
|
|
1657
|
+
readonly spender: string;
|
|
1658
|
+
readonly amount: string;
|
|
1659
|
+
readonly transactionRequest: {
|
|
1660
|
+
readonly to: string;
|
|
1661
|
+
readonly data: string;
|
|
1662
|
+
readonly value: '0';
|
|
1663
|
+
};
|
|
1925
1664
|
}
|
|
1926
1665
|
interface SimulationRevert {
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1666
|
+
readonly code: number;
|
|
1667
|
+
readonly rawErrorBytes: string;
|
|
1668
|
+
readonly decodeResult?: {
|
|
1669
|
+
readonly errorCandidates?: readonly {
|
|
1670
|
+
readonly decodedErrorSignature: string;
|
|
1671
|
+
readonly decodedParams: readonly string[];
|
|
1672
|
+
}[];
|
|
1673
|
+
readonly error?: string;
|
|
1674
|
+
};
|
|
1936
1675
|
}
|
|
1937
1676
|
interface ComposeTransactionRequest {
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1677
|
+
readonly to: string;
|
|
1678
|
+
readonly chainId: number;
|
|
1679
|
+
readonly data: string;
|
|
1680
|
+
readonly value: string;
|
|
1681
|
+
readonly gasLimit?: string;
|
|
1943
1682
|
}
|
|
1944
1683
|
type ComposeAction = {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1684
|
+
readonly kind: 'transaction';
|
|
1685
|
+
readonly purpose: 'approval' | 'execute';
|
|
1686
|
+
readonly submitter: 'signer' | 'anyone';
|
|
1687
|
+
readonly transactionRequest: ComposeTransactionRequest;
|
|
1949
1688
|
} | {
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1689
|
+
readonly kind: 'transaction';
|
|
1690
|
+
readonly purpose: 'fundEscrow';
|
|
1691
|
+
readonly submitter: 'signer' | 'anyone';
|
|
1692
|
+
readonly transactionRequest: ComposeTransactionRequest;
|
|
1693
|
+
readonly nodeId: string;
|
|
1955
1694
|
} | {
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1695
|
+
readonly kind: 'typedData';
|
|
1696
|
+
readonly purpose: 'signOrder';
|
|
1697
|
+
readonly submitter: 'signer';
|
|
1698
|
+
readonly nodeId: string;
|
|
1699
|
+
readonly typedData: readonly unknown[];
|
|
1961
1700
|
};
|
|
1962
1701
|
interface ComposeContinuationData {
|
|
1963
|
-
|
|
1702
|
+
readonly settlements?: Record<string, SettlementWire>;
|
|
1964
1703
|
}
|
|
1965
1704
|
interface SpendEntry {
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1705
|
+
readonly input: string;
|
|
1706
|
+
readonly token: string;
|
|
1707
|
+
readonly chainId: number;
|
|
1708
|
+
readonly amount: string;
|
|
1709
|
+
readonly nodeId?: string;
|
|
1971
1710
|
}
|
|
1972
1711
|
interface ComposeFee {
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1712
|
+
readonly input: string;
|
|
1713
|
+
readonly token: string;
|
|
1714
|
+
readonly recipient: 'lifi' | 'integrator';
|
|
1715
|
+
readonly recipientAddress: string;
|
|
1716
|
+
readonly bps: number;
|
|
1717
|
+
readonly amount?: string;
|
|
1979
1718
|
}
|
|
1980
1719
|
interface ComposeUserProgramSimulation {
|
|
1981
|
-
|
|
1982
|
-
|
|
1720
|
+
readonly status: 'ok';
|
|
1721
|
+
readonly returnData: string;
|
|
1983
1722
|
}
|
|
1984
1723
|
interface ComposeFill {
|
|
1985
|
-
|
|
1986
|
-
|
|
1724
|
+
readonly spends: readonly SpendEntry[];
|
|
1725
|
+
readonly validUntilMs?: number;
|
|
1987
1726
|
}
|
|
1988
1727
|
interface ComposeCompileSuccessData extends ComposeContinuationData {
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1728
|
+
readonly outputs: Outputs;
|
|
1729
|
+
readonly transactionRequest?: ComposeTransactionRequest;
|
|
1730
|
+
readonly actions?: readonly ComposeAction[];
|
|
1731
|
+
readonly userProxy: string;
|
|
1732
|
+
readonly priceImpact?: PriceImpact;
|
|
1733
|
+
readonly approvals?: readonly ApprovalEntry[];
|
|
1734
|
+
readonly fees?: readonly ComposeFee[];
|
|
1735
|
+
readonly userProgramSimulation?: ComposeUserProgramSimulation;
|
|
1736
|
+
readonly fill?: ComposeFill;
|
|
1737
|
+
readonly verificationByNode?: Record<string, VerificationDescriptor>;
|
|
1999
1738
|
}
|
|
2000
1739
|
interface ComposeCompilePartialData extends ComposeContinuationData {
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1740
|
+
readonly outputs: Outputs;
|
|
1741
|
+
readonly transactionRequest: ComposeTransactionRequest;
|
|
1742
|
+
readonly userProxy: string;
|
|
1743
|
+
readonly simulationRevert: SimulationRevert;
|
|
1744
|
+
readonly approvals?: readonly ApprovalEntry[];
|
|
1745
|
+
readonly actions?: readonly ComposeAction[];
|
|
1746
|
+
readonly fees?: readonly ComposeFee[];
|
|
1747
|
+
readonly userProgramSimulation?: ComposeUserProgramSimulation;
|
|
2009
1748
|
}
|
|
2010
1749
|
type ComposeCompileResult = (ComposeCompileSuccessData & {
|
|
2011
|
-
|
|
1750
|
+
readonly status: 'success';
|
|
2012
1751
|
}) | (ComposeCompilePartialData & {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
1752
|
+
readonly status: 'partial';
|
|
1753
|
+
readonly error: {
|
|
1754
|
+
readonly kind: string;
|
|
1755
|
+
readonly message: string;
|
|
1756
|
+
};
|
|
2018
1757
|
});
|
|
2019
|
-
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region src/flow.d.ts
|
|
2020
1760
|
interface Port {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
1761
|
+
readonly name: string;
|
|
1762
|
+
readonly type: SolType;
|
|
1763
|
+
readonly mode: 'linear' | 'copy';
|
|
1764
|
+
readonly availability?: Availability;
|
|
1765
|
+
readonly resource?: Resource;
|
|
2026
1766
|
}
|
|
2027
|
-
declare const isResourceInput: (input: FlowInput) => input is ResourceInput;
|
|
2028
|
-
declare const flowInputType: (input: FlowInput) => SolType;
|
|
2029
|
-
declare const flowInputMode: (input: FlowInput) => "linear" | "copy";
|
|
2030
|
-
declare const flowInputResource: (input: FlowInput) => Resource | undefined;
|
|
2031
|
-
declare const isResourcePort: (port: OpInputPort) => port is ResourcePort;
|
|
2032
|
-
declare const isHandlePort: (port: OpInputPort | OpOutputPort) => port is HandlePort;
|
|
2033
|
-
declare const isResourceOutputPort: (port: OpInputPort | OpOutputPort) => port is ResourceOutputPort;
|
|
2034
|
-
declare const isFutureResourceOutput: (port: OpInputPort | OpOutputPort) => boolean;
|
|
1767
|
+
export declare const isResourceInput: (input: FlowInput) => input is ResourceInput;
|
|
1768
|
+
export declare const flowInputType: (input: FlowInput) => SolType;
|
|
1769
|
+
export declare const flowInputMode: (input: FlowInput) => "linear" | "copy";
|
|
1770
|
+
export declare const flowInputResource: (input: FlowInput) => Resource | undefined;
|
|
1771
|
+
export declare const isResourcePort: (port: OpInputPort) => port is ResourcePort;
|
|
1772
|
+
export declare const isHandlePort: (port: OpInputPort | OpOutputPort) => port is HandlePort;
|
|
1773
|
+
export declare const isResourceOutputPort: (port: OpInputPort | OpOutputPort) => port is ResourceOutputPort;
|
|
1774
|
+
export declare const isFutureResourceOutput: (port: OpInputPort | OpOutputPort) => boolean;
|
|
2035
1775
|
type ComposeErrorKind = 'decode_error' | 'validation_error' | 'linearity_error' | 'resolve_error' | 'preparation_error' | 'provider_error' | 'no_route_error' | 'resolution_error' | 'resolution_rejected' | 'lowering_error' | 'empty_program' | 'simulation_error' | 'simulation_setup_error' | 'simulation_insufficient_funds' | 'simulation_gas_limit' | 'simulation_rpc_error' | 'simulation_revert' | 'subgraph_simulation_revert' | 'guard_error' | 'continuation_error' | 'compilation_error' | 'verification_error' | 'price_impact_exceeded' | 'fee_resolution_error' | 'fee_resolution_unavailable' | 'flashloan_unauthorized' | 'deadline_exceeded';
|
|
2036
1776
|
/**
|
|
2037
1777
|
* Errors raised by compose routes outside the compile pipeline.
|
|
@@ -2039,155 +1779,159 @@ type ComposeErrorKind = 'decode_error' | 'validation_error' | 'linearity_error'
|
|
|
2039
1779
|
type ComposeRouteErrorKind = 'chain_validation_error' | 'unsupported_token' | 'zero_output' | 'service_unavailable' | 'verification_unavailable' | 'deployment_check_unavailable' | 'manifest_error' | 'sdk_outdated' | 'server_outdated';
|
|
2040
1780
|
type GenericComposeErrorKind = Exclude<ComposeErrorKind, 'preparation_error' | 'simulation_revert'>;
|
|
2041
1781
|
interface FailedPreparedOp {
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
1782
|
+
readonly callId: string;
|
|
1783
|
+
readonly op: string;
|
|
1784
|
+
readonly kind: GenericComposeErrorKind;
|
|
1785
|
+
readonly message: string;
|
|
1786
|
+
readonly path?: string;
|
|
1787
|
+
readonly port?: string;
|
|
1788
|
+
readonly fix?: string;
|
|
2049
1789
|
}
|
|
2050
1790
|
interface ComposeErrorBase {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
1791
|
+
readonly message: string;
|
|
1792
|
+
readonly path?: string;
|
|
1793
|
+
readonly port?: string;
|
|
1794
|
+
readonly fix?: string;
|
|
2055
1795
|
}
|
|
2056
1796
|
interface PreparationComposeError extends ComposeErrorBase {
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
1797
|
+
readonly kind: 'preparation_error';
|
|
1798
|
+
readonly failedOps: readonly FailedPreparedOp[];
|
|
1799
|
+
readonly succeededOps: readonly string[];
|
|
2060
1800
|
}
|
|
2061
1801
|
interface SimulationRevertComposeError extends ComposeErrorBase {
|
|
2062
|
-
|
|
2063
|
-
|
|
1802
|
+
readonly kind: 'simulation_revert';
|
|
1803
|
+
readonly details?: SimulationRevert;
|
|
2064
1804
|
}
|
|
2065
1805
|
interface GenericComposeError extends ComposeErrorBase {
|
|
2066
|
-
|
|
2067
|
-
|
|
1806
|
+
readonly kind: GenericComposeErrorKind;
|
|
1807
|
+
readonly [key: string]: unknown;
|
|
2068
1808
|
}
|
|
2069
1809
|
type ComposeError = PreparationComposeError | SimulationRevertComposeError | GenericComposeError;
|
|
2070
1810
|
interface MaterialiserInputBase {
|
|
2071
|
-
|
|
1811
|
+
readonly kind: string;
|
|
2072
1812
|
}
|
|
2073
1813
|
type MaterialiserInput = MaterialiserInputBase & Record<string, unknown>;
|
|
2074
1814
|
type MaterialiserInputOf<C extends object> = MaterialiserInputBase & C;
|
|
2075
1815
|
type MaterialiserConfigOf<C extends object> = C;
|
|
2076
|
-
declare const isMaterialiserInput: (s: InputSpec) => s is MaterialiserInput;
|
|
1816
|
+
export declare const isMaterialiserInput: (s: InputSpec) => s is MaterialiserInput;
|
|
2077
1817
|
type InputSpec = bigint | string | MaterialiserInput;
|
|
2078
1818
|
interface PreconditionBase {
|
|
2079
|
-
|
|
1819
|
+
readonly type: string;
|
|
2080
1820
|
}
|
|
2081
1821
|
type Precondition = PreconditionBase & Record<string, unknown>;
|
|
2082
1822
|
type PreconditionOf<C extends object> = PreconditionBase & C;
|
|
2083
1823
|
type PreconditionConfigOf<C extends object> = Omit<PreconditionBase, 'type'> & C;
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
1824
|
+
//#endregion
|
|
1825
|
+
//#region src/flashloan.d.ts
|
|
1826
|
+
export declare const PROVIDER_KIND: {
|
|
1827
|
+
readonly AAVE_V3: 0;
|
|
1828
|
+
readonly ERC3156: 1;
|
|
1829
|
+
readonly BALANCER_V2: 2;
|
|
1830
|
+
readonly MORPHO_BLUE: 3;
|
|
2090
1831
|
};
|
|
2091
|
-
declare const providerKindNames: readonly ["aave-v3", "erc3156", "balancer-v2", "morpho-blue"];
|
|
1832
|
+
export declare const providerKindNames: readonly ["aave-v3", "erc3156", "balancer-v2", "morpho-blue"];
|
|
2092
1833
|
type ProviderKindName = (typeof providerKindNames)[number];
|
|
2093
|
-
declare const providerKindByName: Record<ProviderKindName, number>;
|
|
1834
|
+
export declare const providerKindByName: Record<ProviderKindName, number>;
|
|
2094
1835
|
interface FlashloanMaterialiserInput {
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
1836
|
+
readonly kind: 'flashloan';
|
|
1837
|
+
readonly providerKind: ProviderKindName;
|
|
1838
|
+
readonly amount: string;
|
|
2098
1839
|
}
|
|
2099
|
-
|
|
1840
|
+
//#endregion
|
|
1841
|
+
//#region src/constructors.d.ts
|
|
2100
1842
|
interface OpHandleOptions<Opt extends boolean = boolean> {
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
1843
|
+
readonly expose?: boolean;
|
|
1844
|
+
readonly units?: HandleUnits;
|
|
1845
|
+
readonly optional?: Opt;
|
|
2104
1846
|
}
|
|
2105
|
-
declare const linear: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
1847
|
+
export declare const linear: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
1848
|
+
readonly name: N;
|
|
1849
|
+
readonly type: T;
|
|
1850
|
+
readonly mode: "linear";
|
|
2109
1851
|
};
|
|
2110
|
-
declare const copy: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
1852
|
+
export declare const copy: <N extends string, T extends SolType>(name: N, type: T) => Port & {
|
|
1853
|
+
readonly name: N;
|
|
1854
|
+
readonly type: T;
|
|
1855
|
+
readonly mode: "copy";
|
|
2114
1856
|
};
|
|
2115
|
-
declare const handle: <N extends string, T extends SolType>(name: N, type: T) => HandleInput & {
|
|
2116
|
-
|
|
2117
|
-
|
|
1857
|
+
export declare const handle: <N extends string, T extends SolType>(name: N, type: T) => HandleInput & {
|
|
1858
|
+
readonly name: N;
|
|
1859
|
+
readonly type: T;
|
|
2118
1860
|
};
|
|
2119
|
-
declare const native: <N extends string>(name: N, chainId: number) => ResourceInput & {
|
|
2120
|
-
|
|
1861
|
+
export declare const native: <N extends string>(name: N, chainId: number) => ResourceInput & {
|
|
1862
|
+
readonly name: N;
|
|
2121
1863
|
};
|
|
2122
|
-
declare const erc20: <N extends string>(name: N, token: string, chainId: number) => ResourceInput & {
|
|
2123
|
-
|
|
1864
|
+
export declare const erc20: <N extends string>(name: N, token: string, chainId: number) => ResourceInput & {
|
|
1865
|
+
readonly name: N;
|
|
2124
1866
|
};
|
|
2125
|
-
declare const resource: <N extends string, Opt extends boolean = false>(name: N, accepts: "erc20" | "native" | "any", options?: {
|
|
2126
|
-
|
|
1867
|
+
export declare const resource: <N extends string, Opt extends boolean = false>(name: N, accepts: "erc20" | "native" | "any", options?: {
|
|
1868
|
+
readonly optional?: Opt;
|
|
2127
1869
|
}) => ResourcePort & {
|
|
2128
|
-
|
|
2129
|
-
|
|
1870
|
+
readonly name: N;
|
|
1871
|
+
readonly optional: NoInfer<Opt>;
|
|
2130
1872
|
};
|
|
2131
|
-
declare const readResource: <N extends string>(name: N, accepts: "erc20" | "native" | "any") => ResourcePort & {
|
|
2132
|
-
|
|
2133
|
-
|
|
1873
|
+
export declare const readResource: <N extends string>(name: N, accepts: "erc20" | "native" | "any") => ResourcePort & {
|
|
1874
|
+
readonly name: N;
|
|
1875
|
+
readonly mode: "copy";
|
|
2134
1876
|
};
|
|
2135
|
-
declare const opHandle: <N extends string, T extends SolType, Opt extends boolean = false>(name: N, type: T, options?: OpHandleOptions<Opt>) => HandlePort & {
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
1877
|
+
export declare const opHandle: <N extends string, T extends SolType, Opt extends boolean = false>(name: N, type: T, options?: OpHandleOptions<Opt>) => HandlePort & {
|
|
1878
|
+
readonly name: N;
|
|
1879
|
+
readonly type: T;
|
|
1880
|
+
readonly optional: NoInfer<Opt>;
|
|
2139
1881
|
};
|
|
2140
1882
|
type ResourceOutputOptions = Availability | {
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
1883
|
+
readonly availability?: Availability;
|
|
1884
|
+
readonly providesMinimum?: boolean;
|
|
1885
|
+
readonly omitIfZero?: boolean;
|
|
1886
|
+
readonly deliveryAddressInput?: string;
|
|
1887
|
+
readonly countFrom?: string;
|
|
2146
1888
|
};
|
|
2147
1889
|
type OutputCountFrom<O> = O extends {
|
|
2148
|
-
|
|
1890
|
+
readonly countFrom: infer K extends string;
|
|
2149
1891
|
} ? {
|
|
2150
|
-
|
|
1892
|
+
readonly countFrom: K;
|
|
2151
1893
|
} : unknown;
|
|
2152
1894
|
type OutputAvailability<O> = [O] extends ['future'] ? 'future' : [O] extends ['now'] ? 'now' : [O] extends [string] ? Availability : O extends {
|
|
2153
|
-
|
|
1895
|
+
readonly availability: infer A;
|
|
2154
1896
|
} ? [A] extends ['future'] ? 'future' : [A] extends ['now'] ? 'now' : Availability : 'now';
|
|
2155
|
-
declare const resourceOutput: <N extends string, const O extends ResourceOutputOptions = "now">(name: N, options?: O) => ResourceOutputPort & {
|
|
2156
|
-
|
|
2157
|
-
|
|
1897
|
+
export declare const resourceOutput: <N extends string, const O extends ResourceOutputOptions = "now">(name: N, options?: O) => ResourceOutputPort & {
|
|
1898
|
+
readonly name: N;
|
|
1899
|
+
readonly availability: OutputAvailability<O>;
|
|
2158
1900
|
} & OutputCountFrom<O>;
|
|
2159
|
-
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region src/outputFamilies.d.ts
|
|
2160
1903
|
type OutputFamilyPort = ResourceOutputPort & {
|
|
2161
|
-
|
|
1904
|
+
readonly countFrom: string;
|
|
2162
1905
|
};
|
|
2163
|
-
declare const isOutputFamily: (port: OpOutputPort) => port is OutputFamilyPort;
|
|
2164
|
-
declare const instancePortName: (family: string, index: number) => string;
|
|
2165
|
-
declare const familySize: (family: Pick<OutputFamilyPort, "name" | "countFrom">, config: Call["config"]) => number;
|
|
2166
|
-
declare const expandOutputPorts: (declared: readonly OpOutputPort[], config: Call["config"]) => readonly OpOutputPort[];
|
|
2167
|
-
|
|
1906
|
+
export declare const isOutputFamily: (port: OpOutputPort) => port is OutputFamilyPort;
|
|
1907
|
+
export declare const instancePortName: (family: string, index: number) => string;
|
|
1908
|
+
export declare const familySize: (family: Pick<OutputFamilyPort, "name" | "countFrom">, config: Call["config"]) => number;
|
|
1909
|
+
export declare const expandOutputPorts: (declared: readonly OpOutputPort[], config: Call["config"]) => readonly OpOutputPort[];
|
|
1910
|
+
//#endregion
|
|
1911
|
+
//#region src/ref.d.ts
|
|
2168
1912
|
type ParsedRef = {
|
|
2169
|
-
|
|
2170
|
-
|
|
1913
|
+
readonly scope: 'input';
|
|
1914
|
+
readonly port: string;
|
|
2171
1915
|
} | {
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
1916
|
+
readonly scope: 'output';
|
|
1917
|
+
readonly node: string;
|
|
1918
|
+
readonly port: string;
|
|
2175
1919
|
} | {
|
|
2176
|
-
|
|
2177
|
-
|
|
1920
|
+
readonly scope: 'context';
|
|
1921
|
+
readonly key: ContextKey;
|
|
2178
1922
|
};
|
|
2179
1923
|
type RefScope = ParsedRef['scope'];
|
|
2180
1924
|
type ContextKey = 'sender' | 'executionAddress';
|
|
2181
|
-
declare const isContextKey: (key: string) => key is ContextKey;
|
|
1925
|
+
export declare const isContextKey: (key: string) => key is ContextKey;
|
|
2182
1926
|
/**
|
|
2183
1927
|
* Ref prefixes that parseRef intercepts before the fallback `output` scope.
|
|
2184
1928
|
* A node whose id matches one of these would produce ambiguous refs
|
|
2185
1929
|
* (e.g. `context.sender` could be a context ref or node-output ref).
|
|
2186
1930
|
* Validation must reject these as node ids.
|
|
2187
1931
|
*/
|
|
2188
|
-
declare const RESERVED_REF_SCOPES: ReadonlySet<string>;
|
|
2189
|
-
declare const isRef: (v: unknown) => v is Ref;
|
|
2190
|
-
declare const parseRef: (ref: Ref) => ParsedRef;
|
|
1932
|
+
export declare const RESERVED_REF_SCOPES: ReadonlySet<string>;
|
|
1933
|
+
export declare const isRef: (v: unknown) => v is Ref;
|
|
1934
|
+
export declare const parseRef: (ref: Ref) => ParsedRef;
|
|
2191
1935
|
/** A ref path: a dotpath such as `input.amount` or `nodeId.port`. */
|
|
2192
1936
|
type RefPath = `${string}.${string}`;
|
|
2193
1937
|
/**
|
|
@@ -2197,20 +1941,19 @@ type RefPath = `${string}.${string}`;
|
|
|
2197
1941
|
* so a misspelled `input.`/`context.` silently becomes an output ref.
|
|
2198
1942
|
*/
|
|
2199
1943
|
interface RefBuilder {
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
readonly [K in ContextKey]: Ref;
|
|
2204
|
-
};
|
|
1944
|
+
(path: RefPath): Ref;
|
|
1945
|
+
input(port: string): Ref;
|
|
1946
|
+
readonly context: { readonly [K in ContextKey]: Ref; };
|
|
2205
1947
|
}
|
|
2206
|
-
declare const ref: RefBuilder;
|
|
2207
|
-
declare const foldRef: <R>(ref: ParsedRef, cases: {
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
1948
|
+
export declare const ref: RefBuilder;
|
|
1949
|
+
export declare const foldRef: <R>(ref: ParsedRef, cases: {
|
|
1950
|
+
readonly input: (port: string) => R;
|
|
1951
|
+
readonly context: (key: ContextKey) => R;
|
|
1952
|
+
readonly output: (node: string, port: string) => R;
|
|
2211
1953
|
}) => R;
|
|
2212
|
-
declare const refKey: (ref: Ref) => string;
|
|
2213
|
-
|
|
1954
|
+
export declare const refKey: (ref: Ref) => string;
|
|
1955
|
+
//#endregion
|
|
1956
|
+
//#region src/chainCapabilities.d.ts
|
|
2214
1957
|
/**
|
|
2215
1958
|
* Per-chain native-asset semantics.
|
|
2216
1959
|
*
|
|
@@ -2242,23 +1985,23 @@ declare const refKey: (ref: Ref) => string;
|
|
|
2242
1985
|
* rewritten. No such chain exists yet, so the arm is not defined here.
|
|
2243
1986
|
*/
|
|
2244
1987
|
type ChainCapabilities = {
|
|
2245
|
-
|
|
2246
|
-
|
|
1988
|
+
readonly kind: 'evm-native';
|
|
1989
|
+
readonly chainId: number;
|
|
2247
1990
|
} | {
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
1991
|
+
readonly kind: 'as-erc20';
|
|
1992
|
+
readonly chainId: number;
|
|
1993
|
+
readonly nativeErc20: NativeErc20;
|
|
2251
1994
|
} | {
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
1995
|
+
readonly kind: 'native-mirrored-erc20';
|
|
1996
|
+
readonly chainId: number;
|
|
1997
|
+
readonly nativeErc20: NativeErc20;
|
|
1998
|
+
/** Native wei per 1 unit of the facade ERC-20 (1e12 on Arc: 18-dec native, 6-dec USDC). */
|
|
1999
|
+
readonly nativeScale: bigint;
|
|
2257
2000
|
};
|
|
2258
2001
|
interface NativeErc20 {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2002
|
+
readonly token: `0x${string}`;
|
|
2003
|
+
readonly symbol: string;
|
|
2004
|
+
readonly decimals: number;
|
|
2262
2005
|
}
|
|
2263
2006
|
/**
|
|
2264
2007
|
* The zero-address sentinel that represents the native gas coin on
|
|
@@ -2269,10 +2012,10 @@ interface NativeErc20 {
|
|
|
2269
2012
|
* is the wire-format leaf package and carries no `@lifi/*` dependencies
|
|
2270
2013
|
* (enforced by `scripts/check-compose-boundaries.mjs`).
|
|
2271
2014
|
*/
|
|
2272
|
-
declare const EVM_NATIVE_SENTINEL: `0x${string}`;
|
|
2273
|
-
declare const TEMPO_CHAIN_ID = 4217;
|
|
2274
|
-
declare const TEMPO_NATIVE_ERC20: NativeErc20;
|
|
2275
|
-
declare const ARC_CHAIN_ID = 5042;
|
|
2015
|
+
export declare const EVM_NATIVE_SENTINEL: `0x${string}`;
|
|
2016
|
+
export declare const TEMPO_CHAIN_ID = 4217;
|
|
2017
|
+
export declare const TEMPO_NATIVE_ERC20: NativeErc20;
|
|
2018
|
+
export declare const ARC_CHAIN_ID = 5042;
|
|
2276
2019
|
/**
|
|
2277
2020
|
* Arc's native gas coin is USDC (18-decimal wei at the EVM level). The USDC
|
|
2278
2021
|
* ERC-20 at this address is a view over native balances: `balanceOf` returns
|
|
@@ -2280,9 +2023,9 @@ declare const ARC_CHAIN_ID = 5042;
|
|
|
2280
2023
|
* regular storage. The composer interacts with USDC exclusively through this
|
|
2281
2024
|
* facade, never via `msg.value`.
|
|
2282
2025
|
*/
|
|
2283
|
-
declare const ARC_NATIVE_ERC20: NativeErc20;
|
|
2284
|
-
declare const ARC_NATIVE_SCALE: bigint;
|
|
2285
|
-
declare const getChainCapabilities: (chainId: number) => ChainCapabilities;
|
|
2026
|
+
export declare const ARC_NATIVE_ERC20: NativeErc20;
|
|
2027
|
+
export declare const ARC_NATIVE_SCALE: bigint;
|
|
2028
|
+
export declare const getChainCapabilities: (chainId: number) => ChainCapabilities;
|
|
2286
2029
|
/**
|
|
2287
2030
|
* Structural fold over the `ChainCapabilities` union — the capabilities
|
|
2288
2031
|
* counterpart of `foldResource`/`foldRef`. Dispatches on `kind` and hands each
|
|
@@ -2292,10 +2035,10 @@ declare const getChainCapabilities: (chainId: number) => ChainCapabilities;
|
|
|
2292
2035
|
* the union above turns every `foldChainCapabilities` call into a type error
|
|
2293
2036
|
* until it handles the new case.
|
|
2294
2037
|
*/
|
|
2295
|
-
declare const foldChainCapabilities: <R>(caps: ChainCapabilities, cases: {
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2038
|
+
export declare const foldChainCapabilities: <R>(caps: ChainCapabilities, cases: {
|
|
2039
|
+
readonly evmNative: (chainId: number) => R;
|
|
2040
|
+
readonly asErc20: (nativeErc20: NativeErc20, chainId: number) => R;
|
|
2041
|
+
readonly nativeMirroredErc20: (nativeErc20: NativeErc20, nativeScale: bigint, chainId: number) => R;
|
|
2299
2042
|
}) => R;
|
|
2300
2043
|
/**
|
|
2301
2044
|
* What a wire-level native-balance check (`nativeBalanceGte`) must become on
|
|
@@ -2312,20 +2055,20 @@ declare const foldChainCapabilities: <R>(caps: ChainCapabilities, cases: {
|
|
|
2312
2055
|
* check pass 1e12 too easily. The check must be authored as
|
|
2313
2056
|
* `erc20BalanceGte` of the facade; `reason` says so.
|
|
2314
2057
|
*
|
|
2315
|
-
* Consumers (the `
|
|
2316
|
-
*
|
|
2317
|
-
*
|
|
2058
|
+
* Consumers (the `AssertedPredicateSchema` decode and compose-core's derive
|
|
2059
|
+
* backstop) are adapters over this result, so the unit rule lives in one place
|
|
2060
|
+
* and the fold's exhaustiveness reaches every site.
|
|
2318
2061
|
*/
|
|
2319
2062
|
type NativeCheckPolicy = {
|
|
2320
|
-
|
|
2063
|
+
readonly kind: 'keep';
|
|
2321
2064
|
} | {
|
|
2322
|
-
|
|
2323
|
-
|
|
2065
|
+
readonly kind: 'rewrite';
|
|
2066
|
+
readonly token: `0x${string}`;
|
|
2324
2067
|
} | {
|
|
2325
|
-
|
|
2326
|
-
|
|
2068
|
+
readonly kind: 'reject';
|
|
2069
|
+
readonly reason: string;
|
|
2327
2070
|
};
|
|
2328
|
-
declare const nativeCheckPolicy: (chainId: number) => NativeCheckPolicy;
|
|
2071
|
+
export declare const nativeCheckPolicy: (chainId: number) => NativeCheckPolicy;
|
|
2329
2072
|
/**
|
|
2330
2073
|
* Exact-kind check for `as-erc20` (currently Tempo only) — the rare case that
|
|
2331
2074
|
* genuinely means "no `msg.value` coin exists on this chain". Most consumers
|
|
@@ -2335,7 +2078,7 @@ declare const nativeCheckPolicy: (chainId: number) => NativeCheckPolicy;
|
|
|
2335
2078
|
* ERC-20-native kinds differently goes through `foldChainCapabilities` or
|
|
2336
2079
|
* `nativeCheckPolicy`, never a second exact-kind predicate.
|
|
2337
2080
|
*/
|
|
2338
|
-
declare const isAsErc20Chain: (chainId: number) => boolean;
|
|
2081
|
+
export declare const isAsErc20Chain: (chainId: number) => boolean;
|
|
2339
2082
|
/**
|
|
2340
2083
|
* Whether the chain's canonical native asset is an ERC-20 — true for both
|
|
2341
2084
|
* `as-erc20` chains (Tempo: no `msg.value` coin exists) and
|
|
@@ -2344,7 +2087,7 @@ declare const isAsErc20Chain: (chainId: number) => boolean;
|
|
|
2344
2087
|
* resources are rewritten to the ERC-20, native routing edges are dropped, and
|
|
2345
2088
|
* a surviving native resource is a compile error.
|
|
2346
2089
|
*/
|
|
2347
|
-
declare const hasErc20CanonicalNative: (chainId: number) => boolean;
|
|
2090
|
+
export declare const hasErc20CanonicalNative: (chainId: number) => boolean;
|
|
2348
2091
|
/**
|
|
2349
2092
|
* The address that represents the chain's native asset.
|
|
2350
2093
|
*
|
|
@@ -2352,7 +2095,7 @@ declare const hasErc20CanonicalNative: (chainId: number) => boolean;
|
|
|
2352
2095
|
* whose canonical native asset is an ERC-20 it is the chain's stand-in token
|
|
2353
2096
|
* (PathUSD on Tempo, the USDC facade on Arc).
|
|
2354
2097
|
*/
|
|
2355
|
-
declare const canonicalNativeAddress: (chainId: number) => `0x${string}`;
|
|
2098
|
+
export declare const canonicalNativeAddress: (chainId: number) => `0x${string}`;
|
|
2356
2099
|
/**
|
|
2357
2100
|
* Whether `address` represents the native asset of `chainId`.
|
|
2358
2101
|
*
|
|
@@ -2360,7 +2103,7 @@ declare const canonicalNativeAddress: (chainId: number) => `0x${string}`;
|
|
|
2360
2103
|
* chains whose canonical native asset is an ERC-20, the literal zero address
|
|
2361
2104
|
* returns `false` — only the chain's stand-in ERC-20 address matches.
|
|
2362
2105
|
*/
|
|
2363
|
-
declare const isNativeAddressForChain: (chainId: number, address: string) => boolean;
|
|
2106
|
+
export declare const isNativeAddressForChain: (chainId: number, address: string) => boolean;
|
|
2364
2107
|
/**
|
|
2365
2108
|
* Whether `address` on `chainId` is the genuine `msg.value`-style native coin:
|
|
2366
2109
|
* an `evm-native` chain's zero-address sentinel.
|
|
@@ -2377,7 +2120,7 @@ declare const isNativeAddressForChain: (chainId: number, address: string) => boo
|
|
|
2377
2120
|
* `isNativeAddressForChain`, which returns `true` for the stand-in ERC-20
|
|
2378
2121
|
* (PathUSD on Tempo) and would wrongly route it to `msg.value`.
|
|
2379
2122
|
*/
|
|
2380
|
-
declare const isMsgValueNative: (chainId: number, address: string) => boolean;
|
|
2123
|
+
export declare const isMsgValueNative: (chainId: number, address: string) => boolean;
|
|
2381
2124
|
/**
|
|
2382
2125
|
* Rewrite a single `Resource` according to its chain's capabilities.
|
|
2383
2126
|
*
|
|
@@ -2397,49 +2140,16 @@ declare const isMsgValueNative: (chainId: number, address: string) => boolean;
|
|
|
2397
2140
|
* input `r` unchanged on evm-native chains and for ERC-20 resources) and is
|
|
2398
2141
|
* idempotent: running it on an already-rewritten resource is a no-op.
|
|
2399
2142
|
*/
|
|
2400
|
-
declare const normalizeResource: (r: Resource) => Resource;
|
|
2143
|
+
export declare const normalizeResource: (r: Resource) => Resource;
|
|
2401
2144
|
/**
|
|
2402
2145
|
* Address-level counterpart of `normalizeResource` for wire fields that carry a
|
|
2403
2146
|
* native asset as a bare token string (a continuation outcome's `token`). On
|
|
2404
2147
|
* chains whose canonical native asset is an ERC-20, the native sentinel is
|
|
2405
2148
|
* rewritten to the chain's stand-in ERC-20; every other address passes through.
|
|
2406
2149
|
*/
|
|
2407
|
-
declare const normalizeNativeTokenAddress: (token: string, chainId: number) => string;
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
* Canonical request types for the `POST /compose/route` convenience endpoint.
|
|
2411
|
-
* Amounts accept `bigint | string` for authoring convenience; the JSON wire
|
|
2412
|
-
* format is always a decimal string, which the SDK serialises for you.
|
|
2413
|
-
*
|
|
2414
|
-
* `/compose/route` trades authoring power for brevity. Instead of a full flow
|
|
2415
|
-
* document it takes a single from/to token pair; the server plans a route for
|
|
2416
|
-
* that pair, builds the flow with a `directDeposit` input on the caller's
|
|
2417
|
-
* behalf, and runs it through the same compile pipeline as `POST /compose`.
|
|
2418
|
-
* The route is the shortest admissible chain of routing-catalog edges up to an
|
|
2419
|
-
* operator-set hop ceiling, and may begin with an aggregator swap when the
|
|
2420
|
-
* catalog alone cannot connect the pair. Terminal hops route through
|
|
2421
|
-
* `lifi.zap`, or `lifi.zapAsync` when the pair is reachable only
|
|
2422
|
-
* asynchronously and the request set `allowAsyncRoutes`. The route itself is
|
|
2423
|
-
* not disclosed: node ids are `hop0`, `hop1`, … with the terminal always
|
|
2424
|
-
* `zap`, so `outputs['zap.amountOut']` is the terminal output at every route
|
|
2425
|
-
* length and intermediate outputs carry `role: 'consumed'`. Its response body
|
|
2426
|
-
* is byte-identical to that of `POST /compose` — the enveloped
|
|
2427
|
-
* `ComposeCompileSuccessData` on HTTP 200 and `ComposeCompilePartialData` on
|
|
2428
|
-
* HTTP 206 — so this file declares only the request shape and reuses
|
|
2429
|
-
* `ComposeCompileResult` from `./compile.js` for the result.
|
|
2430
|
-
*
|
|
2431
|
-
* These are the single source of truth for the request shape, hand-authored
|
|
2432
|
-
* here for the same reason as `./compile.ts` and `./simulate.ts` rather than
|
|
2433
|
-
* derived from the validating schema: that schema is the Zod one in
|
|
2434
|
-
* `@lifi/api-schemas` (`src/routes/composeRoute.ts`), a package that depends on
|
|
2435
|
-
* this one, so importing its inferred types here would invert the dependency —
|
|
2436
|
-
* and the public SDK ships this package as its only peer dependency, never the
|
|
2437
|
-
* server's schema package. The two definitions are held in lockstep by a
|
|
2438
|
-
* compile-time conformance assertion
|
|
2439
|
-
* (`api-schemas/src/routes/composeRoute.typecheck.ts`), which fails the build
|
|
2440
|
-
* if either side drifts.
|
|
2441
|
-
*/
|
|
2442
|
-
|
|
2150
|
+
export declare const normalizeNativeTokenAddress: (token: string, chainId: number) => string;
|
|
2151
|
+
//#endregion
|
|
2152
|
+
//#region src/route.d.ts
|
|
2443
2153
|
/**
|
|
2444
2154
|
* Spend an exact amount of `fromToken`.
|
|
2445
2155
|
*
|
|
@@ -2447,8 +2157,8 @@ declare const normalizeNativeTokenAddress: (token: string, chainId: number) => s
|
|
|
2447
2157
|
* format is a non-negative decimal string.
|
|
2448
2158
|
*/
|
|
2449
2159
|
interface RouteAmountExact {
|
|
2450
|
-
|
|
2451
|
-
|
|
2160
|
+
readonly type: 'EXACT';
|
|
2161
|
+
readonly amount: bigint | string;
|
|
2452
2162
|
}
|
|
2453
2163
|
/**
|
|
2454
2164
|
* Spend the signer's entire `fromToken` balance, whatever it is at execution
|
|
@@ -2476,8 +2186,8 @@ interface RouteAmountExact {
|
|
|
2476
2186
|
* moved to `sweepTo` by the whole-balance sweep independently of that output.
|
|
2477
2187
|
*/
|
|
2478
2188
|
interface RouteAmountAll {
|
|
2479
|
-
|
|
2480
|
-
|
|
2189
|
+
readonly type: 'ALL';
|
|
2190
|
+
readonly simAmount: bigint | string;
|
|
2481
2191
|
}
|
|
2482
2192
|
/**
|
|
2483
2193
|
* How much of `fromToken` a route spends. Two variants, discriminated by
|
|
@@ -2486,92 +2196,93 @@ interface RouteAmountAll {
|
|
|
2486
2196
|
type RouteAmount = RouteAmountExact | RouteAmountAll;
|
|
2487
2197
|
/** Request body for `POST /compose/route`. */
|
|
2488
2198
|
interface ComposeRouteRequest {
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2199
|
+
/** EVM chain id. Both tokens must live on this chain — routes are same-chain. */
|
|
2200
|
+
readonly chainId: number;
|
|
2201
|
+
/**
|
|
2202
|
+
* Token to spend. Use the chain's native sentinel address for the gas coin
|
|
2203
|
+
* (the zero address on EVM-native chains).
|
|
2204
|
+
*/
|
|
2205
|
+
readonly fromToken: string;
|
|
2206
|
+
/** Token to receive. */
|
|
2207
|
+
readonly toToken: string;
|
|
2208
|
+
/** How much of `fromToken` to spend — an exact amount or the whole balance. */
|
|
2209
|
+
readonly amount: RouteAmount;
|
|
2210
|
+
/** Address that funds the route and, by default, owns its output. */
|
|
2211
|
+
readonly signer: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Slippage tolerance in basis points. Range 0–10000. Defaults to `100` (1%)
|
|
2214
|
+
* server-side when omitted. It is an end-to-end tolerance: the floor is the
|
|
2215
|
+
* simulated final output of the whole route, so a multi-hop route is not
|
|
2216
|
+
* bounded hop by hop. When the route begins with an aggregator swap the same
|
|
2217
|
+
* value is also the swap's own tolerance, which nests inside the end-to-end
|
|
2218
|
+
* floor rather than compounding with it.
|
|
2219
|
+
*/
|
|
2220
|
+
readonly slippageBps?: number;
|
|
2221
|
+
/**
|
|
2222
|
+
* Reject the route when its quoted price impact exceeds this many basis
|
|
2223
|
+
* points. Range 0–10000. Omitted ⇒ the server's default of 500 bps applies;
|
|
2224
|
+
* `0` disables the check.
|
|
2225
|
+
*/
|
|
2226
|
+
readonly maxPriceImpactBps?: number;
|
|
2227
|
+
/**
|
|
2228
|
+
* Integrator fee in basis points, taken from the input amount. Range 0–9000.
|
|
2229
|
+
* Defaults to `0` server-side when omitted. A non-zero value requires an
|
|
2230
|
+
* integration-scoped API key; the server rejects it otherwise.
|
|
2231
|
+
*/
|
|
2232
|
+
readonly integratorFeeBps?: number;
|
|
2233
|
+
/** Opaque referrer tag forwarded to the underlying quote provider. */
|
|
2234
|
+
readonly referrer?: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Owner of every asset the route leaves behind; defaults to `signer` on a
|
|
2237
|
+
* route with no aggregator swap. Routes whose protocol mints to a named
|
|
2238
|
+
* receiver (surfaced as `recipient: 'required'` by `GET /compose/zap-packs`)
|
|
2239
|
+
* and asynchronous routes bind this address at mint time rather than
|
|
2240
|
+
* transferring afterwards; otherwise the proxy's whole balance of each
|
|
2241
|
+
* asset the route leaves is transferred here.
|
|
2242
|
+
*
|
|
2243
|
+
* **Required when the route includes an aggregator swap.** Such a route can
|
|
2244
|
+
* leave an asset the caller did not plan for — the swap's unspent input —
|
|
2245
|
+
* and this address receives it alongside the terminal output, so it must be
|
|
2246
|
+
* named explicitly; omitting it fails with `validation_error`.
|
|
2247
|
+
*
|
|
2248
|
+
* Accepts an address or `{ $ref: 'context.sender' }` (which counts as
|
|
2249
|
+
* explicit); `{ $ref: 'context.executionAddress' }` is rejected.
|
|
2250
|
+
*/
|
|
2251
|
+
readonly sweepTo?: SweepTo;
|
|
2252
|
+
/**
|
|
2253
|
+
* `'strict'` (the default) fails the request when simulation detects a
|
|
2254
|
+
* revert; `'allow-revert'` returns a partial result with revert diagnostics
|
|
2255
|
+
* instead.
|
|
2256
|
+
*/
|
|
2257
|
+
readonly simulationPolicy?: SimulationPolicy;
|
|
2258
|
+
/**
|
|
2259
|
+
* Also simulate the final user-facing transaction after the structured
|
|
2260
|
+
* simulation succeeds. Reverts honour `simulationPolicy`. Defaults to `false`.
|
|
2261
|
+
*/
|
|
2262
|
+
readonly simulateUserProgram?: boolean;
|
|
2263
|
+
/**
|
|
2264
|
+
* Filter the returned `approvals` against current on-chain allowances,
|
|
2265
|
+
* omitting approvals that are already sufficient. Defaults to `false`.
|
|
2266
|
+
*/
|
|
2267
|
+
readonly checkOnChainAllowances?: boolean;
|
|
2268
|
+
/**
|
|
2269
|
+
* Accept a route whose output is delivered only after the initiating
|
|
2270
|
+
* transaction settles (`delivery.when: 'future'` on the terminal output).
|
|
2271
|
+
* Such a route obliges you to track settlement rather than treat the
|
|
2272
|
+
* transaction as completing the job, and carries no slippage floor, so it is
|
|
2273
|
+
* opt-in. Defaults to `false` server-side, which leaves a pair reachable
|
|
2274
|
+
* only asynchronously rejected with `no_route_error` and guarantees every
|
|
2275
|
+
* terminal output is `delivery.when: 'now'`.
|
|
2276
|
+
*
|
|
2277
|
+
* It widens reach, it is not a preference: a synchronous route wins at any
|
|
2278
|
+
* length, so a pair with both a one-hop asynchronous edge and a longer
|
|
2279
|
+
* synchronous route is served synchronously. Opting in never costs you a
|
|
2280
|
+
* synchronous route.
|
|
2281
|
+
*/
|
|
2282
|
+
readonly allowAsyncRoutes?: boolean;
|
|
2573
2283
|
}
|
|
2574
|
-
|
|
2284
|
+
//#endregion
|
|
2285
|
+
//#region src/preconditions.d.ts
|
|
2575
2286
|
/**
|
|
2576
2287
|
* The three concrete precondition shapes the stack exchanges today. One
|
|
2577
2288
|
* definition serves every producer and consumer: op/materialiser declarations,
|
|
@@ -2582,48 +2293,31 @@ interface ComposeRouteRequest {
|
|
|
2582
2293
|
* string; the string side covers values already stringified.
|
|
2583
2294
|
*/
|
|
2584
2295
|
type Erc20BalancePrecondition = {
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2296
|
+
readonly type: 'Erc20Balance';
|
|
2297
|
+
readonly wallet: string;
|
|
2298
|
+
readonly token: string;
|
|
2299
|
+
readonly balance: bigint | string;
|
|
2589
2300
|
};
|
|
2590
2301
|
type NativeBalancePrecondition = {
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2302
|
+
readonly type: 'NativeBalance';
|
|
2303
|
+
readonly wallet: string;
|
|
2304
|
+
readonly balance: bigint | string;
|
|
2594
2305
|
};
|
|
2595
2306
|
type Erc20AllowancePrecondition = {
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2307
|
+
readonly type: 'Erc20Allowance';
|
|
2308
|
+
readonly owner: string;
|
|
2309
|
+
readonly spender: string;
|
|
2310
|
+
readonly token: string;
|
|
2311
|
+
readonly allowance: bigint | string;
|
|
2601
2312
|
};
|
|
2602
|
-
declare const erc20Balance: (config: Omit<Erc20BalancePrecondition, "type">) => Erc20BalancePrecondition;
|
|
2603
|
-
declare const nativeBalance: (config: Omit<NativeBalancePrecondition, "type">) => NativeBalancePrecondition;
|
|
2604
|
-
declare const erc20Allowance: (config: Omit<Erc20AllowancePrecondition, "type">) => Erc20AllowancePrecondition;
|
|
2605
|
-
declare const isErc20BalancePrecondition: (p: Precondition) => p is Erc20BalancePrecondition;
|
|
2606
|
-
declare const isErc20AllowancePrecondition: (p: Precondition) => p is Erc20AllowancePrecondition;
|
|
2607
|
-
declare const isNativeBalancePrecondition: (p: Precondition) => p is NativeBalancePrecondition;
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
* Canonical wire-format types for the standalone `POST /simulate` endpoint.
|
|
2611
|
-
*
|
|
2612
|
-
* `/simulate` takes a raw, pre-encoded transaction (a `to` address, hex `data`,
|
|
2613
|
-
* optional native `value`), funds a sender, runs it in one `eth_call`, and
|
|
2614
|
-
* reports the watched balances before and after, their signed deltas, and the
|
|
2615
|
-
* inner-call gas. Unlike `POST /compose`, its response body is **un-enveloped**:
|
|
2616
|
-
* `{ status, block, timestamp, ... }` lives at the top level (no `{ data }`
|
|
2617
|
-
* wrapper).
|
|
2618
|
-
*
|
|
2619
|
-
* These are the single source of truth for the request/response shapes. The
|
|
2620
|
-
* server-side Zod schemas in `@lifi/api-schemas` (`src/routes/simulate.ts`)
|
|
2621
|
-
* validate the same contract and are kept in lockstep by a compile-time
|
|
2622
|
-
* conformance assertion (`src/routes/simulate.typecheck.ts`).
|
|
2623
|
-
*
|
|
2624
|
-
* Mirrors the hand-authored style of `src/compile.ts`.
|
|
2625
|
-
*/
|
|
2626
|
-
|
|
2313
|
+
export declare const erc20Balance: (config: Omit<Erc20BalancePrecondition, "type">) => Erc20BalancePrecondition;
|
|
2314
|
+
export declare const nativeBalance: (config: Omit<NativeBalancePrecondition, "type">) => NativeBalancePrecondition;
|
|
2315
|
+
export declare const erc20Allowance: (config: Omit<Erc20AllowancePrecondition, "type">) => Erc20AllowancePrecondition;
|
|
2316
|
+
export declare const isErc20BalancePrecondition: (p: Precondition) => p is Erc20BalancePrecondition;
|
|
2317
|
+
export declare const isErc20AllowancePrecondition: (p: Precondition) => p is Erc20AllowancePrecondition;
|
|
2318
|
+
export declare const isNativeBalancePrecondition: (p: Precondition) => p is NativeBalancePrecondition;
|
|
2319
|
+
//#endregion
|
|
2320
|
+
//#region src/simulate.d.ts
|
|
2627
2321
|
/**
|
|
2628
2322
|
* Maximum number of watched `(token, owner)` pairs accepted by `POST /simulate`.
|
|
2629
2323
|
*
|
|
@@ -2635,7 +2329,7 @@ declare const isNativeBalancePrecondition: (p: Precondition) => p is NativeBalan
|
|
|
2635
2329
|
* merges identical-valued literals into one register. The cap leaves headroom
|
|
2636
2330
|
* for the inner-call / gas-measurement / abi-encode scaffolding.
|
|
2637
2331
|
*/
|
|
2638
|
-
declare const SIMULATE_MAX_TRACKED_BALANCES = 40;
|
|
2332
|
+
export declare const SIMULATE_MAX_TRACKED_BALANCES = 40;
|
|
2639
2333
|
/**
|
|
2640
2334
|
* Maximum number of funding `requirements` accepted by `POST /simulate`.
|
|
2641
2335
|
*
|
|
@@ -2644,13 +2338,13 @@ declare const SIMULATE_MAX_TRACKED_BALANCES = 40;
|
|
|
2644
2338
|
* single request amplify into arbitrary upstream RPC work. Bounded here at the
|
|
2645
2339
|
* trust boundary and re-enforced server-side in `rawSimulation.ts`.
|
|
2646
2340
|
*/
|
|
2647
|
-
declare const SIMULATE_MAX_REQUIREMENTS = 40;
|
|
2341
|
+
export declare const SIMULATE_MAX_REQUIREMENTS = 40;
|
|
2648
2342
|
/** A `(token, owner)` pair whose balance is watched across the simulation. */
|
|
2649
2343
|
interface TrackedBalance {
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2344
|
+
/** Token to watch (use the zero address for native balance). */
|
|
2345
|
+
readonly token: string;
|
|
2346
|
+
/** Account whose balance of `token` is watched. */
|
|
2347
|
+
readonly owner: string;
|
|
2654
2348
|
}
|
|
2655
2349
|
/** Funding instruction: seed an ERC-20 balance on a wallet before simulation. */
|
|
2656
2350
|
type Erc20BalanceRequirement = Erc20BalancePrecondition;
|
|
@@ -2665,40 +2359,40 @@ type Erc20AllowanceRequirement = Erc20AllowancePrecondition;
|
|
|
2665
2359
|
type SlotFinderRequirement = Erc20BalanceRequirement | NativeBalanceRequirement | Erc20AllowanceRequirement;
|
|
2666
2360
|
/** Request body for `POST /simulate`. */
|
|
2667
2361
|
interface SimulateRequest {
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2362
|
+
/** EVM chain id. */
|
|
2363
|
+
readonly chainId: number;
|
|
2364
|
+
/**
|
|
2365
|
+
* Sender of the simulated transaction. The VM bytecode is injected here so
|
|
2366
|
+
* the inner call carries `msg.sender == from`.
|
|
2367
|
+
*/
|
|
2368
|
+
readonly from: string;
|
|
2369
|
+
/** Target contract of the raw transaction. */
|
|
2370
|
+
readonly to: string;
|
|
2371
|
+
/** Pre-encoded transaction calldata (`0x`-prefixed hex). */
|
|
2372
|
+
readonly data: string;
|
|
2373
|
+
/**
|
|
2374
|
+
* Native value (wei) sent with the inner call. Accepts `bigint | string`;
|
|
2375
|
+
* defaults to `"0"` server-side when omitted.
|
|
2376
|
+
*/
|
|
2377
|
+
readonly value?: bigint | string;
|
|
2378
|
+
/**
|
|
2379
|
+
* Block number to simulate against. Omitted ⇒ the chain head. Named tags
|
|
2380
|
+
* (e.g. "latest") are rejected with HTTP 400.
|
|
2381
|
+
*/
|
|
2382
|
+
readonly block?: number;
|
|
2383
|
+
/** Funding instructions applied before simulation (max 40). */
|
|
2384
|
+
readonly requirements?: readonly SlotFinderRequirement[];
|
|
2385
|
+
/** Balances to read before and after the transaction (1–40 pairs). */
|
|
2386
|
+
readonly trackedBalances: readonly TrackedBalance[];
|
|
2693
2387
|
}
|
|
2694
2388
|
/**
|
|
2695
2389
|
* One watched balance in a simulation response. `amount` is a decimal string;
|
|
2696
2390
|
* for `deltas` it is signed (`after - before`).
|
|
2697
2391
|
*/
|
|
2698
2392
|
interface SimulateBalanceEntry {
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2393
|
+
readonly token: string;
|
|
2394
|
+
readonly owner: string;
|
|
2395
|
+
readonly amount: string;
|
|
2702
2396
|
}
|
|
2703
2397
|
/**
|
|
2704
2398
|
* HTTP 200, `status: "ok"`: the simulation ran successfully. Balance arrays are
|
|
@@ -2711,49 +2405,50 @@ interface SimulateBalanceEntry {
|
|
|
2711
2405
|
* bidirectional conformance assertion in `@lifi/api-schemas` relies on this.
|
|
2712
2406
|
*/
|
|
2713
2407
|
interface SimulateOkResult {
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2408
|
+
readonly status: 'ok';
|
|
2409
|
+
readonly block: number;
|
|
2410
|
+
readonly timestamp: number;
|
|
2411
|
+
readonly balancesBefore: SimulateBalanceEntry[];
|
|
2412
|
+
readonly balancesAfter: SimulateBalanceEntry[];
|
|
2413
|
+
readonly deltas: SimulateBalanceEntry[];
|
|
2414
|
+
readonly gasUsed: string;
|
|
2721
2415
|
}
|
|
2722
2416
|
/** Decoded revert diagnostics, when slot-finder can parse the revert reason. */
|
|
2723
2417
|
interface SimulateRevertDecodeResult {
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2418
|
+
readonly errorCandidates?: {
|
|
2419
|
+
readonly decodedErrorSignature: string;
|
|
2420
|
+
readonly decodedParams: string[];
|
|
2421
|
+
}[];
|
|
2422
|
+
readonly error?: string;
|
|
2729
2423
|
}
|
|
2730
2424
|
/**
|
|
2731
2425
|
* HTTP 200, `status: "revert"`: the simulation ran but the transaction reverted
|
|
2732
2426
|
* on-chain. A revert is a *successful simulation*, not a transport error.
|
|
2733
2427
|
*/
|
|
2734
2428
|
interface SimulateRevertResult {
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2429
|
+
readonly status: 'revert';
|
|
2430
|
+
readonly block: number;
|
|
2431
|
+
readonly timestamp: number;
|
|
2432
|
+
readonly revertReason?: string;
|
|
2433
|
+
readonly code?: number;
|
|
2434
|
+
readonly rawErrorBytes?: string;
|
|
2435
|
+
readonly decodeResult?: SimulateRevertDecodeResult;
|
|
2742
2436
|
}
|
|
2743
2437
|
/**
|
|
2744
2438
|
* HTTP 422, `status: "error"`: the request was well-formed but the simulation
|
|
2745
2439
|
* could not be set up or run. `message` is intentionally generic.
|
|
2746
2440
|
*/
|
|
2747
2441
|
interface SimulateSetupErrorResult {
|
|
2748
|
-
|
|
2749
|
-
|
|
2442
|
+
readonly status: 'error';
|
|
2443
|
+
readonly message: string;
|
|
2750
2444
|
}
|
|
2751
2445
|
/**
|
|
2752
2446
|
* Discriminated result of `POST /simulate`. `switch (result.status)` narrows to
|
|
2753
2447
|
* one member: `ok` and `revert` come back with HTTP 200, `error` with HTTP 422.
|
|
2754
2448
|
*/
|
|
2755
2449
|
type SimulateResult = SimulateOkResult | SimulateRevertResult | SimulateSetupErrorResult;
|
|
2756
|
-
|
|
2450
|
+
//#endregion
|
|
2451
|
+
//#region src/headers.d.ts
|
|
2757
2452
|
/**
|
|
2758
2453
|
* HTTP header names on the compose wire.
|
|
2759
2454
|
*
|
|
@@ -2762,10 +2457,11 @@ type SimulateResult = SimulateOkResult | SimulateRevertResult | SimulateSetupErr
|
|
|
2762
2457
|
* names belong to the wire format rather than to either side of it.
|
|
2763
2458
|
*/
|
|
2764
2459
|
/** Compose contract version the client was built against. Sent on every request. */
|
|
2765
|
-
declare const COMPOSER_SDK_VERSION_HEADER = "x-lifi-composer-sdk";
|
|
2460
|
+
export declare const COMPOSER_SDK_VERSION_HEADER = "x-lifi-composer-sdk";
|
|
2766
2461
|
/** Compose contract version the backend serves. Returned on every compose response. */
|
|
2767
|
-
declare const COMPOSE_VERSION_HEADER = "x-lifi-composer-version";
|
|
2768
|
-
|
|
2462
|
+
export declare const COMPOSE_VERSION_HEADER = "x-lifi-composer-version";
|
|
2463
|
+
//#endregion
|
|
2464
|
+
//#region src/version.d.ts
|
|
2769
2465
|
/**
|
|
2770
2466
|
* Compose contract version compatibility.
|
|
2771
2467
|
*
|
|
@@ -2778,9 +2474,9 @@ declare const COMPOSE_VERSION_HEADER = "x-lifi-composer-version";
|
|
|
2778
2474
|
* so the rule lives in exactly one place.
|
|
2779
2475
|
*/
|
|
2780
2476
|
interface ComposeVersion {
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2477
|
+
readonly major: number;
|
|
2478
|
+
readonly minor: number;
|
|
2479
|
+
readonly patch: number;
|
|
2784
2480
|
}
|
|
2785
2481
|
type VersionCompatibility = 'compatible' | 'sdk_outdated' | 'server_outdated';
|
|
2786
2482
|
/**
|
|
@@ -2789,7 +2485,7 @@ type VersionCompatibility = 'compatible' | 'sdk_outdated' | 'server_outdated';
|
|
|
2789
2485
|
* Returns `undefined` for anything that is not a complete semver string,
|
|
2790
2486
|
* including the `dev` sentinel the SDK sends when it runs unbundled.
|
|
2791
2487
|
*/
|
|
2792
|
-
declare const parseVersion: (version: string) => ComposeVersion | undefined;
|
|
2488
|
+
export declare const parseVersion: (version: string) => ComposeVersion | undefined;
|
|
2793
2489
|
/**
|
|
2794
2490
|
* Decides whether a client built against `client` may talk to a server that
|
|
2795
2491
|
* serves `server` and accepts clients down to `minimum`.
|
|
@@ -2810,29 +2506,30 @@ declare const parseVersion: (version: string) => ComposeVersion | undefined;
|
|
|
2810
2506
|
* bump can ship with the previous line still accepted; the SDK passes no floor
|
|
2811
2507
|
* because the server, not the client, decides how far back it serves.
|
|
2812
2508
|
*/
|
|
2813
|
-
declare const checkCompatibility: (client: ComposeVersion, server: ComposeVersion, minimum?: ComposeVersion) => VersionCompatibility;
|
|
2814
|
-
|
|
2509
|
+
export declare const checkCompatibility: (client: ComposeVersion, server: ComposeVersion, minimum?: ComposeVersion) => VersionCompatibility;
|
|
2510
|
+
//#endregion
|
|
2511
|
+
//#region src/materialiserMetadata.d.ts
|
|
2815
2512
|
type MaterialiserMetadata = {
|
|
2816
|
-
|
|
2817
|
-
|
|
2513
|
+
readonly kind: 'exact';
|
|
2514
|
+
readonly amount: bigint;
|
|
2818
2515
|
} | {
|
|
2819
|
-
|
|
2820
|
-
|
|
2516
|
+
readonly kind: 'exact-native';
|
|
2517
|
+
readonly amount: bigint;
|
|
2821
2518
|
} | {
|
|
2822
|
-
|
|
2823
|
-
|
|
2519
|
+
readonly kind: 'capped';
|
|
2520
|
+
readonly amount: bigint;
|
|
2824
2521
|
} | {
|
|
2825
|
-
|
|
2522
|
+
readonly kind: 'runtime';
|
|
2826
2523
|
};
|
|
2827
2524
|
interface MaterialiserResolution {
|
|
2828
|
-
|
|
2829
|
-
|
|
2525
|
+
readonly meta: MaterialiserMetadata;
|
|
2526
|
+
readonly preconditions: readonly Precondition[];
|
|
2830
2527
|
}
|
|
2831
|
-
declare const foldMaterialiserMetadata: <R>(meta: MaterialiserMetadata, cases: {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2528
|
+
export declare const foldMaterialiserMetadata: <R>(meta: MaterialiserMetadata, cases: {
|
|
2529
|
+
readonly exact: (amount: bigint) => R;
|
|
2530
|
+
readonly exactNative: (amount: bigint) => R;
|
|
2531
|
+
readonly capped: (amount: bigint) => R;
|
|
2532
|
+
readonly runtime: () => R;
|
|
2836
2533
|
}) => R;
|
|
2837
|
-
|
|
2838
|
-
export {
|
|
2534
|
+
//#endregion
|
|
2535
|
+
export type { Amount, AppliedGuard, ApprovalEntry, AssertedPredicate, AssertedPredicateWire, AssertionOwner, AssertionSpec, AssertionSpecWire, Availability, BindValue, Call, ChainCapabilities, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeError, ComposeErrorKind, ComposeFee, ComposeFill, ComposeManifest, ComposeRouteErrorKind, ComposeRouteRequest, ComposeRun, ComposeTransactionRequest, ComposeUserProgramSimulation, ComposeVersion, ConsumedOutput, ContextKey, ContinuationIntent, ContinuationOutcome, Delivery, Erc20AllowancePrecondition, Erc20AllowanceRequirement, Erc20BalancePrecondition, Erc20BalanceRequirement, Estimate, EstimateBasis, FailedPreparedOp, FlashloanMaterialiserInput, Flow, FlowInput, GenericComposeError, GenericComposeErrorKind, GuardCompatibility, GuardSelector, HandleInput, HandlePort, HandleUnits, InputSpec, Lineage, LiteralBinding, ManifestGuard, ManifestMaterialiser, ManifestOperation, ManifestPrecondition, MaterialiserConfigOf, MaterialiserInput, MaterialiserInputBase, MaterialiserInputOf, MaterialiserMetadata, MaterialiserResolution, Minimum, MinimumBasis, NativeBalancePrecondition, NativeBalanceRequirement, NativeCheckPolicy, NativeErc20, OpInputPort, OpOutputPort, Output, OutputAmount, OutputFamilyPort, Outputs, ParsedRef, Phase1Artifact, Port, Precondition, PreconditionBase, PreconditionConfigOf, PreconditionOf, PreparationComposeError, PriceImpact, ProviderKindName, Ref, RefBuilder, RefPath, RefScope, Resource, ResourceInput, ResourceOutputPort, ResourcePort, RouteAmount, RouteAmountAll, RouteAmountExact, SettlementEscrowWire, SettlementWire, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SimulationRevertComposeError, SlotFinderRequirement, SolType, SpendEntry, StaticSolType, SweepTo, TerminalOutput, TrackedBalance, VerificationDescriptor, VerificationDescriptorWire, VersionCompatibility };
|