@lifi/compose-spec 0.11.3 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +42 -87
- package/dist/index.d.cts +171 -501
- package/dist/index.d.ts +171 -501
- package/dist/index.js +43 -83
- package/package.json +1 -1
- package/src/compile.ts +0 -23
- package/src/continuation.ts +87 -81
- package/src/descriptor.ts +20 -72
- package/src/flow.ts +0 -2
- package/src/flowSchema.ts +0 -12
- package/src/hexPatterns.ts +0 -5
- package/src/index.ts +2 -7
- package/src/materialiserMetadata.ts +6 -3
- package/src/route.ts +7 -13
- package/src/zodSchemas.ts +41 -71
package/dist/index.d.cts
CHANGED
|
@@ -29,19 +29,19 @@ export declare const ResourceSchema: Schema.transform<Schema.Union<[Schema.Struc
|
|
|
29
29
|
token: Schema.refine<string, typeof Schema.String>;
|
|
30
30
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
31
31
|
}>]>, Schema.SchemaClass<{
|
|
32
|
-
readonly kind: "native";
|
|
33
32
|
readonly chainId: number;
|
|
33
|
+
readonly kind: "native";
|
|
34
34
|
} | {
|
|
35
|
-
readonly kind: "erc20";
|
|
36
|
-
readonly chainId: number;
|
|
37
35
|
readonly token: string;
|
|
38
|
-
}, {
|
|
39
|
-
readonly kind: "native";
|
|
40
36
|
readonly chainId: number;
|
|
41
|
-
} | {
|
|
42
37
|
readonly kind: "erc20";
|
|
38
|
+
}, {
|
|
43
39
|
readonly chainId: number;
|
|
40
|
+
readonly kind: "native";
|
|
41
|
+
} | {
|
|
44
42
|
readonly token: string;
|
|
43
|
+
readonly chainId: number;
|
|
44
|
+
readonly kind: "erc20";
|
|
45
45
|
}, never>>;
|
|
46
46
|
export declare const ResourceInputSchema: Schema.Struct<{
|
|
47
47
|
name: typeof Schema.String;
|
|
@@ -53,19 +53,19 @@ export declare const ResourceInputSchema: Schema.Struct<{
|
|
|
53
53
|
token: Schema.refine<string, typeof Schema.String>;
|
|
54
54
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
55
55
|
}>]>, Schema.SchemaClass<{
|
|
56
|
-
readonly kind: "native";
|
|
57
56
|
readonly chainId: number;
|
|
57
|
+
readonly kind: "native";
|
|
58
58
|
} | {
|
|
59
|
-
readonly kind: "erc20";
|
|
60
|
-
readonly chainId: number;
|
|
61
59
|
readonly token: string;
|
|
62
|
-
}, {
|
|
63
|
-
readonly kind: "native";
|
|
64
60
|
readonly chainId: number;
|
|
65
|
-
} | {
|
|
66
61
|
readonly kind: "erc20";
|
|
62
|
+
}, {
|
|
67
63
|
readonly chainId: number;
|
|
64
|
+
readonly kind: "native";
|
|
65
|
+
} | {
|
|
68
66
|
readonly token: string;
|
|
67
|
+
readonly chainId: number;
|
|
68
|
+
readonly kind: "erc20";
|
|
69
69
|
}, never>>;
|
|
70
70
|
}>;
|
|
71
71
|
export declare const HandleInputSchema: Schema.Struct<{
|
|
@@ -82,19 +82,19 @@ export declare const FlowInputSchema: Schema.Union<[Schema.Struct<{
|
|
|
82
82
|
token: Schema.refine<string, typeof Schema.String>;
|
|
83
83
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
84
84
|
}>]>, Schema.SchemaClass<{
|
|
85
|
-
readonly kind: "native";
|
|
86
85
|
readonly chainId: number;
|
|
86
|
+
readonly kind: "native";
|
|
87
87
|
} | {
|
|
88
|
-
readonly kind: "erc20";
|
|
89
|
-
readonly chainId: number;
|
|
90
88
|
readonly token: string;
|
|
91
|
-
}, {
|
|
92
|
-
readonly kind: "native";
|
|
93
89
|
readonly chainId: number;
|
|
94
|
-
} | {
|
|
95
90
|
readonly kind: "erc20";
|
|
91
|
+
}, {
|
|
96
92
|
readonly chainId: number;
|
|
93
|
+
readonly kind: "native";
|
|
94
|
+
} | {
|
|
97
95
|
readonly token: string;
|
|
96
|
+
readonly chainId: number;
|
|
97
|
+
readonly kind: "erc20";
|
|
98
98
|
}, never>>;
|
|
99
99
|
}>, Schema.Struct<{
|
|
100
100
|
name: typeof Schema.String;
|
|
@@ -157,19 +157,19 @@ export declare const EpilogueForwardSchema: Schema.Struct<{
|
|
|
157
157
|
token: Schema.refine<string, typeof Schema.String>;
|
|
158
158
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
159
159
|
}>]>, Schema.SchemaClass<{
|
|
160
|
-
readonly kind: "native";
|
|
161
160
|
readonly chainId: number;
|
|
161
|
+
readonly kind: "native";
|
|
162
162
|
} | {
|
|
163
|
-
readonly kind: "erc20";
|
|
164
|
-
readonly chainId: number;
|
|
165
163
|
readonly token: string;
|
|
166
|
-
}, {
|
|
167
|
-
readonly kind: "native";
|
|
168
164
|
readonly chainId: number;
|
|
169
|
-
} | {
|
|
170
165
|
readonly kind: "erc20";
|
|
166
|
+
}, {
|
|
171
167
|
readonly chainId: number;
|
|
168
|
+
readonly kind: "native";
|
|
169
|
+
} | {
|
|
172
170
|
readonly token: string;
|
|
171
|
+
readonly chainId: number;
|
|
172
|
+
readonly kind: "erc20";
|
|
173
173
|
}, never>>;
|
|
174
174
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
175
175
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -185,19 +185,19 @@ export declare const EpilogueSchema: Schema.filter<Schema.Struct<{
|
|
|
185
185
|
token: Schema.refine<string, typeof Schema.String>;
|
|
186
186
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
187
187
|
}>]>, Schema.SchemaClass<{
|
|
188
|
-
readonly kind: "native";
|
|
189
188
|
readonly chainId: number;
|
|
189
|
+
readonly kind: "native";
|
|
190
190
|
} | {
|
|
191
|
-
readonly kind: "erc20";
|
|
192
|
-
readonly chainId: number;
|
|
193
191
|
readonly token: string;
|
|
194
|
-
}, {
|
|
195
|
-
readonly kind: "native";
|
|
196
192
|
readonly chainId: number;
|
|
197
|
-
} | {
|
|
198
193
|
readonly kind: "erc20";
|
|
194
|
+
}, {
|
|
199
195
|
readonly chainId: number;
|
|
196
|
+
readonly kind: "native";
|
|
197
|
+
} | {
|
|
200
198
|
readonly token: string;
|
|
199
|
+
readonly chainId: number;
|
|
200
|
+
readonly kind: "erc20";
|
|
201
201
|
}, never>>;
|
|
202
202
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
203
203
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -221,19 +221,19 @@ export declare const FlowSchema: Schema.Struct<{
|
|
|
221
221
|
token: Schema.refine<string, typeof Schema.String>;
|
|
222
222
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
223
223
|
}>]>, Schema.SchemaClass<{
|
|
224
|
-
readonly kind: "native";
|
|
225
224
|
readonly chainId: number;
|
|
225
|
+
readonly kind: "native";
|
|
226
226
|
} | {
|
|
227
|
-
readonly kind: "erc20";
|
|
228
|
-
readonly chainId: number;
|
|
229
227
|
readonly token: string;
|
|
230
|
-
}, {
|
|
231
|
-
readonly kind: "native";
|
|
232
228
|
readonly chainId: number;
|
|
233
|
-
} | {
|
|
234
229
|
readonly kind: "erc20";
|
|
230
|
+
}, {
|
|
235
231
|
readonly chainId: number;
|
|
232
|
+
readonly kind: "native";
|
|
233
|
+
} | {
|
|
236
234
|
readonly token: string;
|
|
235
|
+
readonly chainId: number;
|
|
236
|
+
readonly kind: "erc20";
|
|
237
237
|
}, never>>;
|
|
238
238
|
}>, Schema.Struct<{
|
|
239
239
|
name: typeof Schema.String;
|
|
@@ -274,19 +274,19 @@ export declare const FlowSchema: Schema.Struct<{
|
|
|
274
274
|
token: Schema.refine<string, typeof Schema.String>;
|
|
275
275
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
276
276
|
}>]>, Schema.SchemaClass<{
|
|
277
|
-
readonly kind: "native";
|
|
278
277
|
readonly chainId: number;
|
|
278
|
+
readonly kind: "native";
|
|
279
279
|
} | {
|
|
280
|
-
readonly kind: "erc20";
|
|
281
|
-
readonly chainId: number;
|
|
282
280
|
readonly token: string;
|
|
283
|
-
}, {
|
|
284
|
-
readonly kind: "native";
|
|
285
281
|
readonly chainId: number;
|
|
286
|
-
} | {
|
|
287
282
|
readonly kind: "erc20";
|
|
283
|
+
}, {
|
|
288
284
|
readonly chainId: number;
|
|
285
|
+
readonly kind: "native";
|
|
286
|
+
} | {
|
|
289
287
|
readonly token: string;
|
|
288
|
+
readonly chainId: number;
|
|
289
|
+
readonly kind: "erc20";
|
|
290
290
|
}, never>>;
|
|
291
291
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
292
292
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -315,68 +315,68 @@ type Flow = typeof FlowSchema.Type;
|
|
|
315
315
|
//#region src/continuation.d.ts
|
|
316
316
|
export declare const CONTINUATION_COMMITMENT_OP_ID = "continuation.commitment";
|
|
317
317
|
export declare const ContinuationOutcomeSchema: Schema.transform<Schema.Schema<{
|
|
318
|
-
readonly chainId: number;
|
|
319
318
|
readonly token: string;
|
|
320
319
|
readonly minAmount?: string | undefined;
|
|
321
320
|
readonly destination: string;
|
|
322
|
-
}, {
|
|
323
321
|
readonly chainId: number;
|
|
322
|
+
}, {
|
|
324
323
|
readonly token: string;
|
|
325
324
|
readonly destination: string;
|
|
325
|
+
readonly chainId: number;
|
|
326
326
|
readonly minAmount?: string | undefined;
|
|
327
327
|
}, never>, Schema.SchemaClass<{
|
|
328
|
-
readonly chainId: number;
|
|
329
328
|
readonly token: string;
|
|
330
329
|
readonly minAmount?: string | undefined;
|
|
331
330
|
readonly destination: string;
|
|
332
|
-
}, {
|
|
333
331
|
readonly chainId: number;
|
|
332
|
+
}, {
|
|
334
333
|
readonly token: string;
|
|
335
334
|
readonly minAmount?: string | undefined;
|
|
336
335
|
readonly destination: string;
|
|
336
|
+
readonly chainId: number;
|
|
337
337
|
}, never>>;
|
|
338
338
|
export declare const CommittedOutcomeSchema: Schema.transform<Schema.Schema<{
|
|
339
|
-
readonly chainId: number;
|
|
340
339
|
readonly token: string;
|
|
341
340
|
readonly minAmount: string;
|
|
342
341
|
readonly destination: string;
|
|
343
|
-
}, {
|
|
344
342
|
readonly chainId: number;
|
|
343
|
+
}, {
|
|
345
344
|
readonly token: string;
|
|
346
345
|
readonly minAmount: string;
|
|
347
346
|
readonly destination: string;
|
|
348
|
-
}, never>, Schema.SchemaClass<{
|
|
349
347
|
readonly chainId: number;
|
|
348
|
+
}, never>, Schema.SchemaClass<{
|
|
350
349
|
readonly token: string;
|
|
351
350
|
readonly minAmount: string;
|
|
352
351
|
readonly destination: string;
|
|
353
|
-
}, {
|
|
354
352
|
readonly chainId: number;
|
|
353
|
+
}, {
|
|
355
354
|
readonly token: string;
|
|
356
355
|
readonly minAmount: string;
|
|
357
356
|
readonly destination: string;
|
|
357
|
+
readonly chainId: number;
|
|
358
358
|
}, never>>;
|
|
359
359
|
export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
360
360
|
outcomes: Schema.NonEmptyArray<Schema.transform<Schema.Schema<{
|
|
361
|
-
readonly chainId: number;
|
|
362
361
|
readonly token: string;
|
|
363
362
|
readonly minAmount?: string | undefined;
|
|
364
363
|
readonly destination: string;
|
|
365
|
-
}, {
|
|
366
364
|
readonly chainId: number;
|
|
365
|
+
}, {
|
|
367
366
|
readonly token: string;
|
|
368
367
|
readonly destination: string;
|
|
368
|
+
readonly chainId: number;
|
|
369
369
|
readonly minAmount?: string | undefined;
|
|
370
370
|
}, never>, Schema.SchemaClass<{
|
|
371
|
-
readonly chainId: number;
|
|
372
371
|
readonly token: string;
|
|
373
372
|
readonly minAmount?: string | undefined;
|
|
374
373
|
readonly destination: string;
|
|
375
|
-
}, {
|
|
376
374
|
readonly chainId: number;
|
|
375
|
+
}, {
|
|
377
376
|
readonly token: string;
|
|
378
377
|
readonly minAmount?: string | undefined;
|
|
379
378
|
readonly destination: string;
|
|
379
|
+
readonly chainId: number;
|
|
380
380
|
}, never>>>;
|
|
381
381
|
continuationFlow: Schema.optional<Schema.Struct<{
|
|
382
382
|
version: Schema.Literal<[1]>;
|
|
@@ -392,19 +392,19 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
392
392
|
token: Schema.refine<string, typeof Schema.String>;
|
|
393
393
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
394
394
|
}>]>, Schema.SchemaClass<{
|
|
395
|
-
readonly kind: "native";
|
|
396
395
|
readonly chainId: number;
|
|
396
|
+
readonly kind: "native";
|
|
397
397
|
} | {
|
|
398
|
-
readonly kind: "erc20";
|
|
399
|
-
readonly chainId: number;
|
|
400
398
|
readonly token: string;
|
|
401
|
-
}, {
|
|
402
|
-
readonly kind: "native";
|
|
403
399
|
readonly chainId: number;
|
|
404
|
-
} | {
|
|
405
400
|
readonly kind: "erc20";
|
|
401
|
+
}, {
|
|
406
402
|
readonly chainId: number;
|
|
403
|
+
readonly kind: "native";
|
|
404
|
+
} | {
|
|
407
405
|
readonly token: string;
|
|
406
|
+
readonly chainId: number;
|
|
407
|
+
readonly kind: "erc20";
|
|
408
408
|
}, never>>;
|
|
409
409
|
}>, Schema.Struct<{
|
|
410
410
|
name: typeof Schema.String;
|
|
@@ -445,19 +445,19 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
445
445
|
token: Schema.refine<string, typeof Schema.String>;
|
|
446
446
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
447
447
|
}>]>, Schema.SchemaClass<{
|
|
448
|
-
readonly kind: "native";
|
|
449
448
|
readonly chainId: number;
|
|
449
|
+
readonly kind: "native";
|
|
450
450
|
} | {
|
|
451
|
-
readonly kind: "erc20";
|
|
452
|
-
readonly chainId: number;
|
|
453
451
|
readonly token: string;
|
|
454
|
-
}, {
|
|
455
|
-
readonly kind: "native";
|
|
456
452
|
readonly chainId: number;
|
|
457
|
-
} | {
|
|
458
453
|
readonly kind: "erc20";
|
|
454
|
+
}, {
|
|
459
455
|
readonly chainId: number;
|
|
456
|
+
readonly kind: "native";
|
|
457
|
+
} | {
|
|
460
458
|
readonly token: string;
|
|
459
|
+
readonly chainId: number;
|
|
460
|
+
readonly kind: "erc20";
|
|
461
461
|
}, never>>;
|
|
462
462
|
to: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Struct<{
|
|
463
463
|
$ref: Schema.filter<typeof Schema.String>;
|
|
@@ -471,10 +471,10 @@ export declare const ContinuationIntentSchema: Schema.Struct<{
|
|
|
471
471
|
validity: Schema.Struct<{
|
|
472
472
|
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
473
473
|
}>;
|
|
474
|
-
perpetual: Schema.optional<typeof Schema.Boolean>;
|
|
475
474
|
provider: Schema.optional<typeof Schema.String>;
|
|
476
475
|
funding: Schema.optional<Schema.Literal<["inline", "external"]>>;
|
|
477
476
|
refund: Schema.optional<Schema.filter<Schema.refine<string, typeof Schema.String>>>;
|
|
477
|
+
exact: Schema.optional<typeof Schema.Boolean>;
|
|
478
478
|
}>;
|
|
479
479
|
export declare const HexStringSchema: Schema.filter<typeof Schema.String>;
|
|
480
480
|
export declare const Phase1ArtifactSchema: Schema.Union<[Schema.Struct<{
|
|
@@ -497,6 +497,16 @@ export declare const Phase1ArtifactSchema: Schema.Union<[Schema.Struct<{
|
|
|
497
497
|
refund: Schema.filter<typeof Schema.String>;
|
|
498
498
|
expiresAtMs: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
499
499
|
}>>;
|
|
500
|
+
binding: Schema.optional<Schema.Struct<{
|
|
501
|
+
executionTarget: Schema.filter<typeof Schema.String>;
|
|
502
|
+
payload: Schema.filter<typeof Schema.String>;
|
|
503
|
+
payloadHash: Schema.filter<typeof Schema.String>;
|
|
504
|
+
calldata: Schema.filter<typeof Schema.String>;
|
|
505
|
+
approvals: Schema.Array$<Schema.Struct<{
|
|
506
|
+
token: Schema.filter<typeof Schema.String>;
|
|
507
|
+
spender: Schema.filter<typeof Schema.String>;
|
|
508
|
+
}>>;
|
|
509
|
+
}>>;
|
|
500
510
|
}>, Schema.Struct<{
|
|
501
511
|
kind: Schema.Literal<["signables"]>;
|
|
502
512
|
typedData: Schema.Array$<typeof Schema.Unknown>;
|
|
@@ -509,90 +519,56 @@ export declare const Erc20BalanceGteSpecSchema: Schema.Struct<{
|
|
|
509
519
|
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
510
520
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
511
521
|
token: Schema.refine<string, typeof Schema.String>;
|
|
512
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
522
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
513
523
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
514
524
|
}>;
|
|
515
525
|
export declare const NativeBalanceGteSpecSchema: Schema.Struct<{
|
|
516
526
|
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
517
527
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
518
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
528
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
519
529
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
520
530
|
}>;
|
|
521
531
|
export declare const CallCheckSpecSchema: Schema.Struct<{
|
|
522
532
|
kind: Schema.Literal<["call"]>;
|
|
523
533
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
524
534
|
to: Schema.refine<string, typeof Schema.String>;
|
|
525
|
-
|
|
535
|
+
signature: typeof Schema.String;
|
|
536
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
526
537
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
527
|
-
|
|
528
|
-
}>;
|
|
529
|
-
export declare const Erc20BalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
530
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
531
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
532
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
533
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
534
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
535
|
-
}>;
|
|
536
|
-
export declare const NativeBalanceDeltaGteSpecSchema: Schema.Struct<{
|
|
537
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
538
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
539
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
540
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
538
|
+
threshold: Schema.filter<typeof Schema.String>;
|
|
541
539
|
}>;
|
|
542
540
|
export declare const AssertionSpecSchema: Schema.Union<[Schema.Struct<{
|
|
543
541
|
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
544
542
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
545
543
|
token: Schema.refine<string, typeof Schema.String>;
|
|
546
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
544
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
547
545
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
548
546
|
}>, Schema.Struct<{
|
|
549
547
|
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
550
548
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
551
|
-
owner: Schema.refine<string, typeof Schema.String>;
|
|
549
|
+
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
552
550
|
minAmount: Schema.filter<typeof Schema.String>;
|
|
553
551
|
}>, Schema.Struct<{
|
|
554
552
|
kind: Schema.Literal<["call"]>;
|
|
555
553
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
556
554
|
to: Schema.refine<string, typeof Schema.String>;
|
|
557
|
-
|
|
555
|
+
signature: typeof Schema.String;
|
|
556
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
558
557
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
559
|
-
|
|
560
|
-
}>, Schema.Struct<{
|
|
561
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
562
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
563
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
564
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
565
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
566
|
-
}>, Schema.Struct<{
|
|
567
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
568
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
569
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
570
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
558
|
+
threshold: Schema.filter<typeof Schema.String>;
|
|
571
559
|
}>]>;
|
|
572
560
|
type ContinuationOutcome = typeof ContinuationOutcomeSchema.Type;
|
|
573
561
|
type CommittedOutcome = typeof CommittedOutcomeSchema.Type;
|
|
574
562
|
type ContinuationIntent = typeof ContinuationIntentSchema.Type;
|
|
575
563
|
type Phase1Artifact = typeof Phase1ArtifactSchema.Type;
|
|
576
564
|
type AssertionSpec = typeof AssertionSpecSchema.Type;
|
|
565
|
+
type CallCheckSpec = typeof CallCheckSpecSchema.Type;
|
|
577
566
|
export declare const settledOutcome: <I extends {
|
|
578
567
|
readonly outcomes: readonly [unknown, ...unknown[]];
|
|
579
568
|
}>(intent: I) => I["outcomes"][0];
|
|
580
569
|
//#endregion
|
|
581
570
|
//#region src/descriptor.d.ts
|
|
582
571
|
export declare const Bytes32HexSchema: Schema.filter<typeof Schema.String>;
|
|
583
|
-
export declare const AssertedErc20BalanceGteSpecSchema: Schema.Struct<{
|
|
584
|
-
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
585
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
586
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
587
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
588
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
589
|
-
}>;
|
|
590
|
-
export declare const AssertedNativeBalanceGteSpecSchema: Schema.Struct<{
|
|
591
|
-
kind: Schema.Literal<["nativeBalanceGte"]>;
|
|
592
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
593
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
594
|
-
minAmount: Schema.filter<typeof Schema.String>;
|
|
595
|
-
}>;
|
|
596
572
|
export declare const AssertedPredicateSchema: Schema.transformOrFail<Schema.Union<[Schema.Struct<{
|
|
597
573
|
kind: Schema.Literal<["erc20BalanceGte"]>;
|
|
598
574
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
@@ -608,78 +584,48 @@ export declare const AssertedPredicateSchema: Schema.transformOrFail<Schema.Unio
|
|
|
608
584
|
kind: Schema.Literal<["call"]>;
|
|
609
585
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
610
586
|
to: Schema.refine<string, typeof Schema.String>;
|
|
611
|
-
|
|
587
|
+
signature: typeof Schema.String;
|
|
588
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
612
589
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
613
|
-
|
|
614
|
-
}>, Schema.Struct<{
|
|
615
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
616
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
617
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
618
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
619
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
620
|
-
}>, Schema.Struct<{
|
|
621
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
622
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
623
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
624
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
590
|
+
threshold: Schema.filter<typeof Schema.String>;
|
|
625
591
|
}>]>, Schema.SchemaClass<{
|
|
626
|
-
readonly
|
|
627
|
-
readonly kind: "call";
|
|
628
|
-
readonly chainId: number;
|
|
629
|
-
readonly to: string;
|
|
630
|
-
readonly calldata: string;
|
|
631
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
632
|
-
} | {
|
|
633
|
-
readonly kind: "erc20BalanceDeltaGte";
|
|
634
|
-
readonly chainId: number;
|
|
635
|
-
readonly token: string;
|
|
636
|
-
readonly owner: string;
|
|
637
|
-
readonly minDelta: string;
|
|
638
|
-
} | {
|
|
639
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
592
|
+
readonly minAmount: string;
|
|
640
593
|
readonly chainId: number;
|
|
594
|
+
readonly kind: "nativeBalanceGte";
|
|
641
595
|
readonly owner: string;
|
|
642
|
-
readonly minDelta: string;
|
|
643
596
|
} | {
|
|
644
|
-
readonly kind: "erc20BalanceGte";
|
|
645
|
-
readonly chainId: number;
|
|
646
597
|
readonly token: string;
|
|
647
598
|
readonly minAmount: string;
|
|
599
|
+
readonly chainId: number;
|
|
600
|
+
readonly kind: "erc20BalanceGte";
|
|
648
601
|
readonly owner: string;
|
|
649
602
|
} | {
|
|
650
|
-
readonly kind: "nativeBalanceGte";
|
|
651
603
|
readonly chainId: number;
|
|
652
|
-
readonly minAmount: string;
|
|
653
|
-
readonly owner: string;
|
|
654
|
-
}, {
|
|
655
|
-
readonly value: string;
|
|
656
604
|
readonly kind: "call";
|
|
657
|
-
readonly chainId: number;
|
|
658
605
|
readonly to: string;
|
|
659
|
-
readonly
|
|
606
|
+
readonly signature: string;
|
|
607
|
+
readonly args: readonly string[];
|
|
660
608
|
readonly comparator: "gte" | "eq" | "lte";
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
readonly
|
|
664
|
-
readonly token: string;
|
|
665
|
-
readonly owner: string;
|
|
666
|
-
readonly minDelta: string;
|
|
667
|
-
} | {
|
|
668
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
609
|
+
readonly threshold: string;
|
|
610
|
+
}, {
|
|
611
|
+
readonly minAmount: string;
|
|
669
612
|
readonly chainId: number;
|
|
613
|
+
readonly kind: "nativeBalanceGte";
|
|
670
614
|
readonly owner: string;
|
|
671
|
-
readonly minDelta: string;
|
|
672
615
|
} | {
|
|
673
|
-
readonly kind: "erc20BalanceGte";
|
|
674
|
-
readonly chainId: number;
|
|
675
616
|
readonly token: string;
|
|
676
617
|
readonly minAmount: string;
|
|
618
|
+
readonly chainId: number;
|
|
619
|
+
readonly kind: "erc20BalanceGte";
|
|
677
620
|
readonly owner: string;
|
|
678
621
|
} | {
|
|
679
|
-
readonly kind: "nativeBalanceGte";
|
|
680
622
|
readonly chainId: number;
|
|
681
|
-
readonly
|
|
682
|
-
readonly
|
|
623
|
+
readonly kind: "call";
|
|
624
|
+
readonly to: string;
|
|
625
|
+
readonly signature: string;
|
|
626
|
+
readonly args: readonly string[];
|
|
627
|
+
readonly comparator: "gte" | "eq" | "lte";
|
|
628
|
+
readonly threshold: string;
|
|
683
629
|
}, never>, never>;
|
|
684
630
|
export declare const VerificationDescriptorSchema: Schema.Struct<{
|
|
685
631
|
validationProgramHash: Schema.filter<typeof Schema.String>;
|
|
@@ -699,78 +645,48 @@ export declare const VerificationDescriptorSchema: Schema.Struct<{
|
|
|
699
645
|
kind: Schema.Literal<["call"]>;
|
|
700
646
|
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
701
647
|
to: Schema.refine<string, typeof Schema.String>;
|
|
702
|
-
|
|
648
|
+
signature: typeof Schema.String;
|
|
649
|
+
args: Schema.Array$<typeof Schema.String>;
|
|
703
650
|
comparator: Schema.Literal<["gte", "eq", "lte"]>;
|
|
704
|
-
|
|
705
|
-
}>, Schema.Struct<{
|
|
706
|
-
kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
|
|
707
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
708
|
-
token: Schema.refine<string, typeof Schema.String>;
|
|
709
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
710
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
711
|
-
}>, Schema.Struct<{
|
|
712
|
-
kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
|
|
713
|
-
chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
|
|
714
|
-
owner: Schema.Union<[Schema.refine<string, typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
|
|
715
|
-
minDelta: Schema.filter<typeof Schema.String>;
|
|
651
|
+
threshold: Schema.filter<typeof Schema.String>;
|
|
716
652
|
}>]>, Schema.SchemaClass<{
|
|
717
|
-
readonly
|
|
718
|
-
readonly kind: "call";
|
|
719
|
-
readonly chainId: number;
|
|
720
|
-
readonly to: string;
|
|
721
|
-
readonly calldata: string;
|
|
722
|
-
readonly comparator: "gte" | "eq" | "lte";
|
|
723
|
-
} | {
|
|
724
|
-
readonly kind: "erc20BalanceDeltaGte";
|
|
725
|
-
readonly chainId: number;
|
|
726
|
-
readonly token: string;
|
|
727
|
-
readonly owner: string;
|
|
728
|
-
readonly minDelta: string;
|
|
729
|
-
} | {
|
|
730
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
653
|
+
readonly minAmount: string;
|
|
731
654
|
readonly chainId: number;
|
|
655
|
+
readonly kind: "nativeBalanceGte";
|
|
732
656
|
readonly owner: string;
|
|
733
|
-
readonly minDelta: string;
|
|
734
657
|
} | {
|
|
735
|
-
readonly kind: "erc20BalanceGte";
|
|
736
|
-
readonly chainId: number;
|
|
737
658
|
readonly token: string;
|
|
738
659
|
readonly minAmount: string;
|
|
660
|
+
readonly chainId: number;
|
|
661
|
+
readonly kind: "erc20BalanceGte";
|
|
739
662
|
readonly owner: string;
|
|
740
663
|
} | {
|
|
741
|
-
readonly kind: "nativeBalanceGte";
|
|
742
664
|
readonly chainId: number;
|
|
743
|
-
readonly minAmount: string;
|
|
744
|
-
readonly owner: string;
|
|
745
|
-
}, {
|
|
746
|
-
readonly value: string;
|
|
747
665
|
readonly kind: "call";
|
|
748
|
-
readonly chainId: number;
|
|
749
666
|
readonly to: string;
|
|
750
|
-
readonly
|
|
667
|
+
readonly signature: string;
|
|
668
|
+
readonly args: readonly string[];
|
|
751
669
|
readonly comparator: "gte" | "eq" | "lte";
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
readonly
|
|
755
|
-
readonly token: string;
|
|
756
|
-
readonly owner: string;
|
|
757
|
-
readonly minDelta: string;
|
|
758
|
-
} | {
|
|
759
|
-
readonly kind: "nativeBalanceDeltaGte";
|
|
670
|
+
readonly threshold: string;
|
|
671
|
+
}, {
|
|
672
|
+
readonly minAmount: string;
|
|
760
673
|
readonly chainId: number;
|
|
674
|
+
readonly kind: "nativeBalanceGte";
|
|
761
675
|
readonly owner: string;
|
|
762
|
-
readonly minDelta: string;
|
|
763
676
|
} | {
|
|
764
|
-
readonly kind: "erc20BalanceGte";
|
|
765
|
-
readonly chainId: number;
|
|
766
677
|
readonly token: string;
|
|
767
678
|
readonly minAmount: string;
|
|
679
|
+
readonly chainId: number;
|
|
680
|
+
readonly kind: "erc20BalanceGte";
|
|
768
681
|
readonly owner: string;
|
|
769
682
|
} | {
|
|
770
|
-
readonly kind: "nativeBalanceGte";
|
|
771
683
|
readonly chainId: number;
|
|
772
|
-
readonly
|
|
773
|
-
readonly
|
|
684
|
+
readonly kind: "call";
|
|
685
|
+
readonly to: string;
|
|
686
|
+
readonly signature: string;
|
|
687
|
+
readonly args: readonly string[];
|
|
688
|
+
readonly comparator: "gte" | "eq" | "lte";
|
|
689
|
+
readonly threshold: string;
|
|
774
690
|
}, never>, never>>;
|
|
775
691
|
}>;
|
|
776
692
|
export declare const canonicalAssertedPredicate: (specs: readonly AssertionSpec[]) => string;
|
|
@@ -1446,48 +1362,17 @@ declare const SettlementEscrowZod: z.ZodObject<{
|
|
|
1446
1362
|
refund: z.ZodString;
|
|
1447
1363
|
expiresAtMs: z.ZodNumber;
|
|
1448
1364
|
}, z.core.$strip>;
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
owner: z.ZodString;
|
|
1454
|
-
minAmount: z.ZodString;
|
|
1455
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1456
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1457
|
-
chainId: z.ZodNumber;
|
|
1458
|
-
owner: z.ZodString;
|
|
1459
|
-
minAmount: z.ZodString;
|
|
1460
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1461
|
-
kind: z.ZodLiteral<"call">;
|
|
1462
|
-
chainId: z.ZodNumber;
|
|
1463
|
-
to: z.ZodString;
|
|
1365
|
+
declare const SettlementBindingZod: z.ZodObject<{
|
|
1366
|
+
executionTarget: z.ZodString;
|
|
1367
|
+
payload: z.ZodString;
|
|
1368
|
+
payloadHash: z.ZodString;
|
|
1464
1369
|
calldata: z.ZodString;
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1472
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1473
|
-
chainId: z.ZodNumber;
|
|
1474
|
-
token: z.ZodString;
|
|
1475
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1476
|
-
escrow: "escrow";
|
|
1477
|
-
delivery: "delivery";
|
|
1478
|
-
}>]>;
|
|
1479
|
-
minDelta: z.ZodString;
|
|
1480
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1481
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1482
|
-
chainId: z.ZodNumber;
|
|
1483
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1484
|
-
escrow: "escrow";
|
|
1485
|
-
delivery: "delivery";
|
|
1486
|
-
}>]>;
|
|
1487
|
-
minDelta: z.ZodString;
|
|
1488
|
-
}, z.core.$strip>], "kind">;
|
|
1489
|
-
type AssertionSpecWire = z.infer<typeof AssertionSpecZod>;
|
|
1490
|
-
export declare const AssertedPredicateZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1370
|
+
approvals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1371
|
+
token: z.ZodString;
|
|
1372
|
+
spender: z.ZodString;
|
|
1373
|
+
}, z.core.$strip>>>;
|
|
1374
|
+
}, z.core.$strip>;
|
|
1375
|
+
export declare const AssertionSpecZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1491
1376
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1492
1377
|
chainId: z.ZodNumber;
|
|
1493
1378
|
token: z.ZodString;
|
|
@@ -1505,127 +1390,23 @@ export declare const AssertedPredicateZod: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1505
1390
|
}>]>;
|
|
1506
1391
|
minAmount: z.ZodString;
|
|
1507
1392
|
}, z.core.$strip>, z.ZodObject<{
|
|
1508
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1509
|
-
chainId: z.ZodNumber;
|
|
1510
|
-
token: z.ZodString;
|
|
1511
|
-
owner: z.ZodString;
|
|
1512
|
-
minAmount: z.ZodString;
|
|
1513
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1514
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1515
|
-
chainId: z.ZodNumber;
|
|
1516
|
-
owner: z.ZodString;
|
|
1517
|
-
minAmount: z.ZodString;
|
|
1518
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1519
|
-
kind: z.ZodLiteral<"call">;
|
|
1520
|
-
chainId: z.ZodNumber;
|
|
1521
|
-
to: z.ZodString;
|
|
1522
|
-
calldata: z.ZodString;
|
|
1523
|
-
comparator: z.ZodEnum<{
|
|
1524
|
-
gte: "gte";
|
|
1525
|
-
eq: "eq";
|
|
1526
|
-
lte: "lte";
|
|
1527
|
-
}>;
|
|
1528
|
-
value: z.ZodString;
|
|
1529
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1530
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1531
|
-
chainId: z.ZodNumber;
|
|
1532
|
-
token: z.ZodString;
|
|
1533
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1534
|
-
escrow: "escrow";
|
|
1535
|
-
delivery: "delivery";
|
|
1536
|
-
}>]>;
|
|
1537
|
-
minDelta: z.ZodString;
|
|
1538
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1539
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1540
|
-
chainId: z.ZodNumber;
|
|
1541
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1542
|
-
escrow: "escrow";
|
|
1543
|
-
delivery: "delivery";
|
|
1544
|
-
}>]>;
|
|
1545
|
-
minDelta: z.ZodString;
|
|
1546
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1547
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1548
|
-
chainId: z.ZodNumber;
|
|
1549
|
-
token: z.ZodString;
|
|
1550
|
-
owner: z.ZodString;
|
|
1551
|
-
minAmount: z.ZodString;
|
|
1552
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1553
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1554
|
-
chainId: z.ZodNumber;
|
|
1555
|
-
owner: z.ZodString;
|
|
1556
|
-
minAmount: z.ZodString;
|
|
1557
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1558
1393
|
kind: z.ZodLiteral<"call">;
|
|
1559
1394
|
chainId: z.ZodNumber;
|
|
1560
1395
|
to: z.ZodString;
|
|
1561
|
-
|
|
1396
|
+
signature: z.ZodString;
|
|
1397
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1562
1398
|
comparator: z.ZodEnum<{
|
|
1563
1399
|
gte: "gte";
|
|
1564
1400
|
eq: "eq";
|
|
1565
1401
|
lte: "lte";
|
|
1566
1402
|
}>;
|
|
1567
|
-
|
|
1568
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1569
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1570
|
-
chainId: z.ZodNumber;
|
|
1571
|
-
token: z.ZodString;
|
|
1572
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1573
|
-
escrow: "escrow";
|
|
1574
|
-
delivery: "delivery";
|
|
1575
|
-
}>]>;
|
|
1576
|
-
minDelta: z.ZodString;
|
|
1577
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1578
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1579
|
-
chainId: z.ZodNumber;
|
|
1580
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1581
|
-
escrow: "escrow";
|
|
1582
|
-
delivery: "delivery";
|
|
1583
|
-
}>]>;
|
|
1584
|
-
minDelta: z.ZodString;
|
|
1585
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1586
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1587
|
-
chainId: z.ZodNumber;
|
|
1588
|
-
token: z.ZodString;
|
|
1589
|
-
owner: z.ZodString;
|
|
1590
|
-
minAmount: z.ZodString;
|
|
1591
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1592
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1593
|
-
chainId: z.ZodNumber;
|
|
1594
|
-
owner: z.ZodString;
|
|
1595
|
-
minAmount: z.ZodString;
|
|
1596
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1597
|
-
kind: z.ZodLiteral<"call">;
|
|
1598
|
-
chainId: z.ZodNumber;
|
|
1599
|
-
to: z.ZodString;
|
|
1600
|
-
calldata: z.ZodString;
|
|
1601
|
-
comparator: z.ZodEnum<{
|
|
1602
|
-
gte: "gte";
|
|
1603
|
-
eq: "eq";
|
|
1604
|
-
lte: "lte";
|
|
1605
|
-
}>;
|
|
1606
|
-
value: z.ZodString;
|
|
1607
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1608
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1609
|
-
chainId: z.ZodNumber;
|
|
1610
|
-
token: z.ZodString;
|
|
1611
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1612
|
-
escrow: "escrow";
|
|
1613
|
-
delivery: "delivery";
|
|
1614
|
-
}>]>;
|
|
1615
|
-
minDelta: z.ZodString;
|
|
1616
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1617
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1618
|
-
chainId: z.ZodNumber;
|
|
1619
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1620
|
-
escrow: "escrow";
|
|
1621
|
-
delivery: "delivery";
|
|
1622
|
-
}>]>;
|
|
1623
|
-
minDelta: z.ZodString;
|
|
1403
|
+
threshold: z.ZodString;
|
|
1624
1404
|
}, z.core.$strip>], "kind">;
|
|
1405
|
+
type AssertionSpecWire = z.infer<typeof AssertionSpecZod>;
|
|
1625
1406
|
export declare const VerificationDescriptorZod: z.ZodObject<{
|
|
1626
1407
|
validationProgramHash: z.ZodString;
|
|
1627
1408
|
paramsHash: z.ZodString;
|
|
1628
|
-
assertedPredicate: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1409
|
+
assertedPredicate: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1629
1410
|
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1630
1411
|
chainId: z.ZodNumber;
|
|
1631
1412
|
token: z.ZodString;
|
|
@@ -1643,125 +1424,19 @@ export declare const VerificationDescriptorZod: z.ZodObject<{
|
|
|
1643
1424
|
}>]>;
|
|
1644
1425
|
minAmount: z.ZodString;
|
|
1645
1426
|
}, z.core.$strip>, z.ZodObject<{
|
|
1646
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1647
|
-
chainId: z.ZodNumber;
|
|
1648
|
-
token: z.ZodString;
|
|
1649
|
-
owner: z.ZodString;
|
|
1650
|
-
minAmount: z.ZodString;
|
|
1651
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1652
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1653
|
-
chainId: z.ZodNumber;
|
|
1654
|
-
owner: z.ZodString;
|
|
1655
|
-
minAmount: z.ZodString;
|
|
1656
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1657
|
-
kind: z.ZodLiteral<"call">;
|
|
1658
|
-
chainId: z.ZodNumber;
|
|
1659
|
-
to: z.ZodString;
|
|
1660
|
-
calldata: z.ZodString;
|
|
1661
|
-
comparator: z.ZodEnum<{
|
|
1662
|
-
gte: "gte";
|
|
1663
|
-
eq: "eq";
|
|
1664
|
-
lte: "lte";
|
|
1665
|
-
}>;
|
|
1666
|
-
value: z.ZodString;
|
|
1667
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1668
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1669
|
-
chainId: z.ZodNumber;
|
|
1670
|
-
token: z.ZodString;
|
|
1671
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1672
|
-
escrow: "escrow";
|
|
1673
|
-
delivery: "delivery";
|
|
1674
|
-
}>]>;
|
|
1675
|
-
minDelta: z.ZodString;
|
|
1676
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1677
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1678
|
-
chainId: z.ZodNumber;
|
|
1679
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1680
|
-
escrow: "escrow";
|
|
1681
|
-
delivery: "delivery";
|
|
1682
|
-
}>]>;
|
|
1683
|
-
minDelta: z.ZodString;
|
|
1684
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1685
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1686
|
-
chainId: z.ZodNumber;
|
|
1687
|
-
token: z.ZodString;
|
|
1688
|
-
owner: z.ZodString;
|
|
1689
|
-
minAmount: z.ZodString;
|
|
1690
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1691
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1692
|
-
chainId: z.ZodNumber;
|
|
1693
|
-
owner: z.ZodString;
|
|
1694
|
-
minAmount: z.ZodString;
|
|
1695
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1696
|
-
kind: z.ZodLiteral<"call">;
|
|
1697
|
-
chainId: z.ZodNumber;
|
|
1698
|
-
to: z.ZodString;
|
|
1699
|
-
calldata: z.ZodString;
|
|
1700
|
-
comparator: z.ZodEnum<{
|
|
1701
|
-
gte: "gte";
|
|
1702
|
-
eq: "eq";
|
|
1703
|
-
lte: "lte";
|
|
1704
|
-
}>;
|
|
1705
|
-
value: z.ZodString;
|
|
1706
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1707
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1708
|
-
chainId: z.ZodNumber;
|
|
1709
|
-
token: z.ZodString;
|
|
1710
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1711
|
-
escrow: "escrow";
|
|
1712
|
-
delivery: "delivery";
|
|
1713
|
-
}>]>;
|
|
1714
|
-
minDelta: z.ZodString;
|
|
1715
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1716
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1717
|
-
chainId: z.ZodNumber;
|
|
1718
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1719
|
-
escrow: "escrow";
|
|
1720
|
-
delivery: "delivery";
|
|
1721
|
-
}>]>;
|
|
1722
|
-
minDelta: z.ZodString;
|
|
1723
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1724
|
-
kind: z.ZodLiteral<"erc20BalanceGte">;
|
|
1725
|
-
chainId: z.ZodNumber;
|
|
1726
|
-
token: z.ZodString;
|
|
1727
|
-
owner: z.ZodString;
|
|
1728
|
-
minAmount: z.ZodString;
|
|
1729
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1730
|
-
kind: z.ZodLiteral<"nativeBalanceGte">;
|
|
1731
|
-
chainId: z.ZodNumber;
|
|
1732
|
-
owner: z.ZodString;
|
|
1733
|
-
minAmount: z.ZodString;
|
|
1734
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1735
1427
|
kind: z.ZodLiteral<"call">;
|
|
1736
1428
|
chainId: z.ZodNumber;
|
|
1737
1429
|
to: z.ZodString;
|
|
1738
|
-
|
|
1430
|
+
signature: z.ZodString;
|
|
1431
|
+
args: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1739
1432
|
comparator: z.ZodEnum<{
|
|
1740
1433
|
gte: "gte";
|
|
1741
1434
|
eq: "eq";
|
|
1742
1435
|
lte: "lte";
|
|
1743
1436
|
}>;
|
|
1744
|
-
|
|
1745
|
-
}, z.core.$strip>
|
|
1746
|
-
kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
|
|
1747
|
-
chainId: z.ZodNumber;
|
|
1748
|
-
token: z.ZodString;
|
|
1749
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1750
|
-
escrow: "escrow";
|
|
1751
|
-
delivery: "delivery";
|
|
1752
|
-
}>]>;
|
|
1753
|
-
minDelta: z.ZodString;
|
|
1754
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
1755
|
-
kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
|
|
1756
|
-
chainId: z.ZodNumber;
|
|
1757
|
-
owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1758
|
-
escrow: "escrow";
|
|
1759
|
-
delivery: "delivery";
|
|
1760
|
-
}>]>;
|
|
1761
|
-
minDelta: z.ZodString;
|
|
1762
|
-
}, z.core.$strip>], "kind">>;
|
|
1437
|
+
threshold: z.ZodString;
|
|
1438
|
+
}, z.core.$strip>], "kind">>>;
|
|
1763
1439
|
}, z.core.$strip>;
|
|
1764
|
-
type AssertedPredicateWire = z.infer<typeof AssertedPredicateZod>;
|
|
1765
1440
|
type VerificationDescriptorWire = z.infer<typeof VerificationDescriptorZod>;
|
|
1766
1441
|
export declare const SettlementZod: z.ZodObject<{
|
|
1767
1442
|
escrow: z.ZodOptional<z.ZodObject<{
|
|
@@ -1775,6 +1450,16 @@ export declare const SettlementZod: z.ZodObject<{
|
|
|
1775
1450
|
refund: z.ZodString;
|
|
1776
1451
|
expiresAtMs: z.ZodNumber;
|
|
1777
1452
|
}, z.core.$strip>>;
|
|
1453
|
+
binding: z.ZodOptional<z.ZodObject<{
|
|
1454
|
+
executionTarget: z.ZodString;
|
|
1455
|
+
payload: z.ZodString;
|
|
1456
|
+
payloadHash: z.ZodString;
|
|
1457
|
+
calldata: z.ZodString;
|
|
1458
|
+
approvals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1459
|
+
token: z.ZodString;
|
|
1460
|
+
spender: z.ZodString;
|
|
1461
|
+
}, z.core.$strip>>>;
|
|
1462
|
+
}, z.core.$strip>>;
|
|
1778
1463
|
}, z.core.$strip>;
|
|
1779
1464
|
type ResourcePort = z.infer<typeof ResourcePortZod>;
|
|
1780
1465
|
type HandlePort = z.infer<typeof HandlePortZod>;
|
|
@@ -1792,6 +1477,7 @@ type ManifestPrecondition = z.infer<typeof ManifestPreconditionZod>;
|
|
|
1792
1477
|
type ManifestRouting = z.infer<typeof ManifestRoutingZod>;
|
|
1793
1478
|
type ComposeManifest = z.infer<typeof ComposeManifestZod>;
|
|
1794
1479
|
type SettlementEscrowWire = z.infer<typeof SettlementEscrowZod>;
|
|
1480
|
+
type SettlementBindingWire = z.infer<typeof SettlementBindingZod>;
|
|
1795
1481
|
type SettlementWire = z.infer<typeof SettlementZod>;
|
|
1796
1482
|
//#endregion
|
|
1797
1483
|
//#region src/compile.d.ts
|
|
@@ -1802,7 +1488,6 @@ interface ComposeRun {
|
|
|
1802
1488
|
readonly signer: string;
|
|
1803
1489
|
readonly assumptions?: Record<string, bigint>;
|
|
1804
1490
|
readonly referrer?: string;
|
|
1805
|
-
readonly integratorFeeBps?: number;
|
|
1806
1491
|
readonly maxPriceImpactBps?: number;
|
|
1807
1492
|
readonly sweepTo?: ForwardTo;
|
|
1808
1493
|
readonly simulationPolicy?: SimulationPolicy;
|
|
@@ -1881,14 +1566,6 @@ interface SpendEntry {
|
|
|
1881
1566
|
readonly amount: string;
|
|
1882
1567
|
readonly nodeId?: string;
|
|
1883
1568
|
}
|
|
1884
|
-
interface ComposeFee {
|
|
1885
|
-
readonly input: string;
|
|
1886
|
-
readonly token: string;
|
|
1887
|
-
readonly recipient: 'lifi' | 'integrator';
|
|
1888
|
-
readonly recipientAddress: string;
|
|
1889
|
-
readonly bps: number;
|
|
1890
|
-
readonly amount?: string;
|
|
1891
|
-
}
|
|
1892
1569
|
interface ComposeUserProgramSimulation {
|
|
1893
1570
|
readonly status: 'ok';
|
|
1894
1571
|
readonly returnData: string;
|
|
@@ -1921,7 +1598,6 @@ interface ComposeCompileSuccessData extends ComposeContinuationData {
|
|
|
1921
1598
|
readonly userProxy: string;
|
|
1922
1599
|
readonly priceImpact?: PriceImpact;
|
|
1923
1600
|
readonly approvals?: readonly ApprovalEntry[];
|
|
1924
|
-
readonly fees?: readonly ComposeFee[];
|
|
1925
1601
|
readonly userProgramSimulation?: ComposeUserProgramSimulation;
|
|
1926
1602
|
readonly fill?: ComposeFill;
|
|
1927
1603
|
readonly verificationByNode?: Record<string, VerificationDescriptor>;
|
|
@@ -1934,7 +1610,6 @@ interface ComposeCompilePartialData extends ComposeContinuationData {
|
|
|
1934
1610
|
readonly simulationRevert: SimulationRevert;
|
|
1935
1611
|
readonly approvals?: readonly ApprovalEntry[];
|
|
1936
1612
|
readonly actions?: readonly ComposeAction[];
|
|
1937
|
-
readonly fees?: readonly ComposeFee[];
|
|
1938
1613
|
readonly userProgramSimulation?: ComposeUserProgramSimulation;
|
|
1939
1614
|
readonly warnings?: readonly ComposeWarning[];
|
|
1940
1615
|
}
|
|
@@ -1964,7 +1639,7 @@ export declare const isResourcePort: (port: OpInputPort) => port is ResourcePort
|
|
|
1964
1639
|
export declare const isHandlePort: (port: OpInputPort | OpOutputPort) => port is HandlePort;
|
|
1965
1640
|
export declare const isResourceOutputPort: (port: OpInputPort | OpOutputPort) => port is ResourceOutputPort;
|
|
1966
1641
|
export declare const isFutureResourceOutput: (port: OpInputPort | OpOutputPort) => boolean;
|
|
1967
|
-
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' | '
|
|
1642
|
+
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' | 'flashloan_unauthorized' | 'delivery_error' | 'deadline_exceeded';
|
|
1968
1643
|
/**
|
|
1969
1644
|
* Errors raised by compose routes outside the compile pipeline.
|
|
1970
1645
|
*/
|
|
@@ -2389,13 +2064,13 @@ interface RouteAmountExact {
|
|
|
2389
2064
|
* {@link RouteAmountExact} for native inputs.
|
|
2390
2065
|
*
|
|
2391
2066
|
* On a route that begins with an aggregator swap the swap's input amount is
|
|
2392
|
-
* pinned to the quoted amount derived from `simAmount
|
|
2393
|
-
*
|
|
2394
|
-
*
|
|
2395
|
-
*
|
|
2396
|
-
*
|
|
2397
|
-
*
|
|
2398
|
-
*
|
|
2067
|
+
* pinned to the quoted amount derived from `simAmount`: a runtime balance below
|
|
2068
|
+
* that pinned amount reverts, and a balance above it leaves the remainder as
|
|
2069
|
+
* `unspentIn`, which may be most of the input and which `sweepTo` receives.
|
|
2070
|
+
* Under `EXACT` the deposit and the pinned quote are the same number, so the
|
|
2071
|
+
* `unspentIn` output is zero and omitted; any pre-existing dust of the sold
|
|
2072
|
+
* token in the proxy is moved to `sweepTo` by the whole-balance sweep
|
|
2073
|
+
* independently of that output.
|
|
2399
2074
|
*/
|
|
2400
2075
|
interface RouteAmountAll {
|
|
2401
2076
|
readonly type: 'ALL';
|
|
@@ -2436,12 +2111,6 @@ interface ComposeRouteRequest {
|
|
|
2436
2111
|
* `0` disables the check.
|
|
2437
2112
|
*/
|
|
2438
2113
|
readonly maxPriceImpactBps?: number;
|
|
2439
|
-
/**
|
|
2440
|
-
* Integrator fee in basis points, taken from the input amount. Range 0–9000.
|
|
2441
|
-
* Defaults to `0` server-side when omitted. A non-zero value requires an
|
|
2442
|
-
* integration-scoped API key; the server rejects it otherwise.
|
|
2443
|
-
*/
|
|
2444
|
-
readonly integratorFeeBps?: number;
|
|
2445
2114
|
/** Opaque referrer tag forwarded to the underlying quote provider. */
|
|
2446
2115
|
readonly referrer?: string;
|
|
2447
2116
|
/**
|
|
@@ -2733,6 +2402,7 @@ type MaterialiserMetadata = {
|
|
|
2733
2402
|
readonly min?: bigint;
|
|
2734
2403
|
} | {
|
|
2735
2404
|
readonly kind: 'runtime';
|
|
2405
|
+
readonly min?: bigint;
|
|
2736
2406
|
};
|
|
2737
2407
|
interface MaterialiserResolution {
|
|
2738
2408
|
readonly meta: MaterialiserMetadata;
|
|
@@ -2742,7 +2412,7 @@ export declare const foldMaterialiserMetadata: <R>(meta: MaterialiserMetadata, c
|
|
|
2742
2412
|
readonly exact: (amount: bigint) => R;
|
|
2743
2413
|
readonly exactNative: (amount: bigint) => R;
|
|
2744
2414
|
readonly capped: (amount: bigint, min: bigint | undefined) => R;
|
|
2745
|
-
readonly runtime: () => R;
|
|
2415
|
+
readonly runtime: (min: bigint | undefined) => R;
|
|
2746
2416
|
}) => R;
|
|
2747
2417
|
//#endregion
|
|
2748
|
-
export type { Amount, AppliedGuard, ApprovalEntry, AssertedPredicate,
|
|
2418
|
+
export type { Amount, AppliedGuard, ApprovalEntry, AssertedPredicate, AssertionOwner, AssertionSpec, AssertionSpecWire, Availability, BindValue, Call, CallCheckSpec, ChainCapabilities, CommittedOutcome, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeError, ComposeErrorKind, ComposeFill, ComposeManifest, ComposeRouteErrorKind, ComposeRouteRequest, ComposeRun, ComposeTransactionRequest, ComposeUserProgramSimulation, ComposeVersion, ComposeWarning, ConsumedOutput, ContextKey, ContinuationIntent, ContinuationOutcome, Delivery, DeliveryComposeError, DeliveryErrorDetails, DeliveryErrorReason, ERC20Resource, Epilogue, EpilogueForward, Erc20AllowancePrecondition, Erc20AllowanceRequirement, Erc20BalancePrecondition, Erc20BalanceRequirement, Estimate, EstimateBasis, ExecutedEpilogue, ExecutedForward, FailedPreparedOp, FlashloanMaterialiserInput, Flow, FlowInput, ForwardTo, GenericComposeError, GenericComposeErrorKind, GuardCompatibility, GuardSelector, HandleInput, HandlePort, HandleUnits, InputSpec, Lineage, LiteralBinding, ManifestGuard, ManifestMaterialiser, ManifestOperation, ManifestPrecondition, ManifestRouting, MaterialiserConfigOf, MaterialiserInput, MaterialiserInputBase, MaterialiserInputOf, MaterialiserMetadata, MaterialiserResolution, Minimum, MinimumBasis, NativeBalancePrecondition, NativeBalanceRequirement, NativeCheckPolicy, NativeErc20, NativeResource, 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, SettlementBindingWire, SettlementEscrowWire, SettlementWire, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SimulationRevertComposeError, SlotFinderRequirement, SolType, SpendEntry, StaticSolType, TerminalOutput, TrackedBalance, VerificationDescriptor, VerificationDescriptorWire, VersionCompatibility };
|