@lifi/compose-spec 0.6.3 → 0.7.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 CHANGED
@@ -55,6 +55,7 @@ __export(index_exports, {
55
55
  ContinuationOutcomeSchema: () => ContinuationOutcomeSchema,
56
56
  ContinuationPlanSchema: () => ContinuationPlanSchema,
57
57
  ContinuationPlanZod: () => ContinuationPlanZod,
58
+ EVMAddressString: () => EVMAddressString,
58
59
  EVM_NATIVE_SENTINEL: () => EVM_NATIVE_SENTINEL,
59
60
  Erc20BalanceDeltaGteSpecSchema: () => Erc20BalanceDeltaGteSpecSchema,
60
61
  Erc20BalanceGteSpecSchema: () => Erc20BalanceGteSpecSchema,
@@ -68,6 +69,8 @@ __export(index_exports, {
68
69
  HandleUnitsZod: () => HandleUnitsZod,
69
70
  HexStringSchema: () => HexStringSchema,
70
71
  InputPortZod: () => InputPortZod,
72
+ IntegerString: () => IntegerString,
73
+ LineageSchema: () => LineageSchema,
71
74
  LiteralBindingSchema: () => LiteralBindingSchema,
72
75
  ManifestGuardZod: () => ManifestGuardZod,
73
76
  ManifestMaterialiserZod: () => ManifestMaterialiserZod,
@@ -78,7 +81,6 @@ __export(index_exports, {
78
81
  OutputPortZod: () => OutputPortZod,
79
82
  PROVIDER_KIND: () => PROVIDER_KIND,
80
83
  Phase1ArtifactSchema: () => Phase1ArtifactSchema,
81
- Phase1ArtifactZod: () => Phase1ArtifactZod,
82
84
  RESERVED_REF_SCOPES: () => RESERVED_REF_SCOPES,
83
85
  RefSchema: () => RefSchema,
84
86
  ResourceInputSchema: () => ResourceInputSchema,
@@ -88,10 +90,12 @@ __export(index_exports, {
88
90
  SIMULATE_MAX_REQUIREMENTS: () => SIMULATE_MAX_REQUIREMENTS,
89
91
  SIMULATE_MAX_TRACKED_BALANCES: () => SIMULATE_MAX_TRACKED_BALANCES,
90
92
  STATIC_SOL_TYPES: () => STATIC_SOL_TYPES,
93
+ SettlementZod: () => SettlementZod,
91
94
  SolTypeSchema: () => SolTypeSchema,
92
95
  StaticSolTypeZod: () => StaticSolTypeZod,
93
96
  TEMPO_CHAIN_ID: () => TEMPO_CHAIN_ID,
94
97
  TEMPO_NATIVE_ERC20: () => TEMPO_NATIVE_ERC20,
98
+ UuidSchema: () => UuidSchema,
95
99
  VerificationDescriptorSchema: () => VerificationDescriptorSchema,
96
100
  VerificationDescriptorZod: () => VerificationDescriptorZod,
97
101
  canonicalAssertedPredicate: () => canonicalAssertedPredicate,
@@ -103,6 +107,8 @@ __export(index_exports, {
103
107
  erc20Balance: () => erc20Balance,
104
108
  erc20Resource: () => erc20Resource,
105
109
  erc20Token: () => erc20Token,
110
+ expandOutputPorts: () => expandOutputPorts,
111
+ familySize: () => familySize,
106
112
  flowInputMode: () => flowInputMode,
107
113
  flowInputResource: () => flowInputResource,
108
114
  flowInputType: () => flowInputType,
@@ -113,6 +119,7 @@ __export(index_exports, {
113
119
  getChainCapabilities: () => getChainCapabilities,
114
120
  handle: () => handle,
115
121
  hasErc20CanonicalNative: () => hasErc20CanonicalNative,
122
+ instancePortName: () => instancePortName,
116
123
  isAsErc20Chain: () => isAsErc20Chain,
117
124
  isContextKey: () => isContextKey,
118
125
  isEQCheck: () => isEQCheck,
@@ -128,6 +135,7 @@ __export(index_exports, {
128
135
  isNativeAddressForChain: () => isNativeAddressForChain,
129
136
  isNativeBalancePrecondition: () => isNativeBalancePrecondition,
130
137
  isNativeResource: () => isNativeResource,
138
+ isOutputFamily: () => isOutputFamily,
131
139
  isRef: () => isRef,
132
140
  isResourceInput: () => isResourceInput,
133
141
  isResourceOutputPort: () => isResourceOutputPort,
@@ -242,6 +250,14 @@ var normalizeResource = (r) => {
242
250
  };
243
251
  var normalizeNativeTokenAddress = (token, chainId) => hasErc20CanonicalNative(chainId) && isNativeSentinel(token) ? canonicalNativeAddress(chainId) : token;
244
252
 
253
+ // src/hexPatterns.ts
254
+ var BYTES32_LOWER_HEX = /^0x[0-9a-f]{64}$/;
255
+ var EVM_ADDRESS_HEX = /^0x[0-9a-fA-F]{40}$/;
256
+ var HEX_BYTES = /^0x(?:[0-9a-fA-F]{2})*$/;
257
+ var DECIMAL_UINT = /^[0-9]+$/;
258
+ var MAX_UINT256 = 2n ** 256n - 1n;
259
+ var MAX_DATE_MS = 864e13;
260
+
245
261
  // src/flowSchema.ts
246
262
  var SolTypeSchema = import_effect.Schema.Literal(
247
263
  "uint8",
@@ -263,11 +279,43 @@ var ChainIdSchema = import_effect.Schema.Number.pipe(
263
279
  import_effect.Schema.int(),
264
280
  import_effect.Schema.positive()
265
281
  );
282
+ var EVMAddressString = import_effect.Schema.String.pipe(
283
+ import_effect.Schema.pattern(EVM_ADDRESS_HEX, {
284
+ message: () => "expected a 0x-prefixed 20-byte EVM address"
285
+ })
286
+ ).annotations({
287
+ description: "EVM address: 0x followed by 40 hex characters"
288
+ });
289
+ var HexBytesString = import_effect.Schema.String.pipe(
290
+ import_effect.Schema.pattern(HEX_BYTES, {
291
+ message: () => "expected 0x-prefixed hex of whole bytes"
292
+ })
293
+ ).annotations({
294
+ description: "Hex bytes: 0x followed by an even number of hex characters"
295
+ });
296
+ var EpochMsSchema = import_effect.Schema.Number.pipe(
297
+ import_effect.Schema.int(),
298
+ import_effect.Schema.between(-MAX_DATE_MS, MAX_DATE_MS)
299
+ );
300
+ var IntegerString = import_effect.Schema.String.pipe(
301
+ // Both checks live in one filter so the uint256-bound test only ever runs
302
+ // `BigInt` on a string the digit check already accepted — order-independent
303
+ // and never throws on malformed input.
304
+ import_effect.Schema.filter((value) => {
305
+ if (!DECIMAL_UINT.test(value)) {
306
+ return "amount must be a decimal integer string";
307
+ }
308
+ if (BigInt(value) > MAX_UINT256) {
309
+ return "amount must not exceed uint256 max";
310
+ }
311
+ return void 0;
312
+ })
313
+ );
266
314
  var RawResourceSchema = import_effect.Schema.Union(
267
315
  import_effect.Schema.Struct({ kind: import_effect.Schema.Literal("native"), chainId: ChainIdSchema }),
268
316
  import_effect.Schema.Struct({
269
317
  kind: import_effect.Schema.Literal("erc20"),
270
- token: import_effect.Schema.String,
318
+ token: EVMAddressString,
271
319
  chainId: ChainIdSchema
272
320
  })
273
321
  );
@@ -308,8 +356,13 @@ var AppliedGuardSchema = import_effect.Schema.Struct(
308
356
  { kind: import_effect.Schema.String },
309
357
  { key: import_effect.Schema.String, value: import_effect.Schema.Unknown }
310
358
  );
359
+ var NodeIdSchema = import_effect.Schema.String.pipe(
360
+ import_effect.Schema.filter((id) => id !== "__proto__", {
361
+ message: () => 'node id "__proto__" is reserved; choose another node id'
362
+ })
363
+ );
311
364
  var CallSchema = import_effect.Schema.Struct({
312
- id: import_effect.Schema.String,
365
+ id: NodeIdSchema,
313
366
  op: import_effect.Schema.String,
314
367
  bind: import_effect.Schema.optionalWith(
315
368
  import_effect.Schema.Record({ key: import_effect.Schema.String, value: BindValueSchema }),
@@ -321,21 +374,29 @@ var CallSchema = import_effect.Schema.Struct({
321
374
  ),
322
375
  guards: import_effect.Schema.optional(import_effect.Schema.Array(AppliedGuardSchema))
323
376
  });
377
+ var UuidSchema = import_effect.Schema.String.pipe(
378
+ import_effect.Schema.pattern(/^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/)
379
+ );
380
+ var LineageSchema = import_effect.Schema.Struct({
381
+ journeyId: UuidSchema,
382
+ parentRequestId: UuidSchema
383
+ });
324
384
  var FlowSchema = import_effect.Schema.Struct({
325
385
  version: import_effect.Schema.Literal(1),
326
386
  id: import_effect.Schema.String,
327
387
  chainId: ChainIdSchema,
328
388
  inputs: import_effect.Schema.Array(FlowInputSchema),
329
- nodes: import_effect.Schema.Array(CallSchema)
389
+ nodes: import_effect.Schema.Array(CallSchema),
390
+ lineage: import_effect.Schema.optional(LineageSchema)
330
391
  });
331
392
 
332
393
  // src/continuation.ts
333
394
  var import_effect2 = require("effect");
334
395
  var CONTINUATION_COMMITMENT_OP_ID = "continuation.commitment";
335
396
  var RawContinuationOutcomeSchema = import_effect2.Schema.Struct({
336
- token: import_effect2.Schema.String,
337
- minAmount: import_effect2.Schema.String,
338
- destination: import_effect2.Schema.String,
397
+ token: EVMAddressString,
398
+ minAmount: IntegerString,
399
+ destination: EVMAddressString,
339
400
  chainId: ChainIdSchema
340
401
  });
341
402
  var ContinuationOutcomeSchema = import_effect2.Schema.transform(
@@ -354,13 +415,24 @@ var ContinuationIntentSchema = import_effect2.Schema.Struct({
354
415
  // `NonEmptyArray` enforces ≥1 outcome at the parse boundary, so downstream needs no guard.
355
416
  outcomes: import_effect2.Schema.NonEmptyArray(ContinuationOutcomeSchema),
356
417
  continuationFlow: import_effect2.Schema.optional(FlowSchema),
357
- validity: import_effect2.Schema.Struct({ expiresAtMs: import_effect2.Schema.Number }),
418
+ validity: import_effect2.Schema.Struct({ expiresAtMs: EpochMsSchema }),
358
419
  perpetual: import_effect2.Schema.optional(import_effect2.Schema.Boolean),
359
420
  provider: import_effect2.Schema.optional(import_effect2.Schema.String),
360
421
  // Funding-path mode. The HTTP wire contract is documented by
361
422
  // `ComposeActionsSchema` in `@lifi/api-schemas`.
362
423
  funding: import_effect2.Schema.optional(import_effect2.Schema.Literal("inline", "external"))
363
424
  });
425
+ var HexStringSchema = import_effect2.Schema.String.pipe(import_effect2.Schema.startsWith("0x"));
426
+ var Phase1EscrowSchema = import_effect2.Schema.Struct({
427
+ chainId: ChainIdSchema,
428
+ address: HexStringSchema,
429
+ token: HexStringSchema,
430
+ amount: import_effect2.Schema.String,
431
+ cap: import_effect2.Schema.String,
432
+ owner: HexStringSchema,
433
+ refund: HexStringSchema,
434
+ expiresAtMs: import_effect2.Schema.Number.pipe(import_effect2.Schema.int(), import_effect2.Schema.positive())
435
+ });
364
436
  var Phase1ArtifactSchema = import_effect2.Schema.Union(
365
437
  import_effect2.Schema.Struct({
366
438
  kind: import_effect2.Schema.Literal("transaction"),
@@ -372,7 +444,8 @@ var Phase1ArtifactSchema = import_effect2.Schema.Union(
372
444
  value: import_effect2.Schema.String,
373
445
  chainId: import_effect2.Schema.Number
374
446
  })
375
- )
447
+ ),
448
+ escrow: import_effect2.Schema.optional(Phase1EscrowSchema)
376
449
  }),
377
450
  import_effect2.Schema.Struct({
378
451
  kind: import_effect2.Schema.Literal("signables"),
@@ -380,31 +453,30 @@ var Phase1ArtifactSchema = import_effect2.Schema.Union(
380
453
  }),
381
454
  import_effect2.Schema.Struct({ kind: import_effect2.Schema.Literal("none") })
382
455
  );
383
- var HexStringSchema = import_effect2.Schema.String.pipe(import_effect2.Schema.startsWith("0x"));
384
456
  var AssertionOwnerSchema = import_effect2.Schema.Union(
385
- HexStringSchema,
457
+ EVMAddressString,
386
458
  import_effect2.Schema.Literal("escrow", "delivery")
387
459
  );
388
460
  var Erc20BalanceGteSpecSchema = import_effect2.Schema.Struct({
389
461
  kind: import_effect2.Schema.Literal("erc20BalanceGte"),
390
462
  chainId: ChainIdSchema,
391
- token: HexStringSchema,
392
- owner: HexStringSchema,
393
- minAmount: import_effect2.Schema.String
463
+ token: EVMAddressString,
464
+ owner: EVMAddressString,
465
+ minAmount: IntegerString
394
466
  });
395
467
  var NativeBalanceGteSpecSchema = import_effect2.Schema.Struct({
396
468
  kind: import_effect2.Schema.Literal("nativeBalanceGte"),
397
469
  chainId: ChainIdSchema,
398
- owner: HexStringSchema,
399
- minAmount: import_effect2.Schema.String
470
+ owner: EVMAddressString,
471
+ minAmount: IntegerString
400
472
  });
401
473
  var CallCheckSpecSchema = import_effect2.Schema.Struct({
402
474
  kind: import_effect2.Schema.Literal("call"),
403
475
  chainId: ChainIdSchema,
404
- to: HexStringSchema,
405
- calldata: HexStringSchema,
476
+ to: EVMAddressString,
477
+ calldata: HexBytesString,
406
478
  comparator: import_effect2.Schema.Literal("gte", "eq", "lte"),
407
- value: import_effect2.Schema.String
479
+ value: IntegerString
408
480
  });
409
481
  var asErc20BalanceGteCheck = (check, token) => ({
410
482
  kind: "erc20BalanceGte",
@@ -441,15 +513,15 @@ var CheckSchema = import_effect2.Schema.transformOrFail(
441
513
  var Erc20BalanceDeltaGteSpecSchema = import_effect2.Schema.Struct({
442
514
  kind: import_effect2.Schema.Literal("erc20BalanceDeltaGte"),
443
515
  chainId: ChainIdSchema,
444
- token: HexStringSchema,
516
+ token: EVMAddressString,
445
517
  owner: AssertionOwnerSchema,
446
- minDelta: import_effect2.Schema.String
518
+ minDelta: IntegerString
447
519
  });
448
520
  var NativeBalanceDeltaGteSpecSchema = import_effect2.Schema.Struct({
449
521
  kind: import_effect2.Schema.Literal("nativeBalanceDeltaGte"),
450
522
  chainId: ChainIdSchema,
451
523
  owner: AssertionOwnerSchema,
452
- minDelta: import_effect2.Schema.String
524
+ minDelta: IntegerString
453
525
  });
454
526
  var AssertionSpecSchema = import_effect2.Schema.Union(
455
527
  Erc20BalanceGteSpecSchema,
@@ -462,7 +534,7 @@ var ContinuationPlanSchema = import_effect2.Schema.Struct({
462
534
  chainId: ChainIdSchema,
463
535
  nextFlow: FlowSchema,
464
536
  check: CheckSchema,
465
- validity: import_effect2.Schema.Struct({ expiresAtMs: import_effect2.Schema.Number }),
537
+ validity: import_effect2.Schema.Struct({ expiresAtMs: EpochMsSchema }),
466
538
  correlationId: import_effect2.Schema.optional(import_effect2.Schema.String)
467
539
  });
468
540
  var settledOutcome = (intent) => intent.outcomes[0];
@@ -472,26 +544,21 @@ var isEQCheck = (check) => check.kind === "call" && check.comparator === "eq";
472
544
 
473
545
  // src/descriptor.ts
474
546
  var import_effect3 = require("effect");
475
-
476
- // src/hexPatterns.ts
477
- var BYTES32_LOWER_HEX = /^0x[0-9a-f]{64}$/;
478
-
479
- // src/descriptor.ts
480
547
  var Bytes32HexSchema = import_effect3.Schema.String.pipe(
481
548
  import_effect3.Schema.pattern(BYTES32_LOWER_HEX)
482
549
  );
483
550
  var AssertedErc20BalanceGteSpecSchema = import_effect3.Schema.Struct({
484
551
  kind: import_effect3.Schema.Literal("erc20BalanceGte"),
485
552
  chainId: ChainIdSchema,
486
- token: HexStringSchema,
553
+ token: EVMAddressString,
487
554
  owner: AssertionOwnerSchema,
488
- minAmount: import_effect3.Schema.String
555
+ minAmount: IntegerString
489
556
  });
490
557
  var AssertedNativeBalanceGteSpecSchema = import_effect3.Schema.Struct({
491
558
  kind: import_effect3.Schema.Literal("nativeBalanceGte"),
492
559
  chainId: ChainIdSchema,
493
560
  owner: AssertionOwnerSchema,
494
- minAmount: import_effect3.Schema.String
561
+ minAmount: IntegerString
495
562
  });
496
563
  var RawAssertedPredicateSchema = import_effect3.Schema.Union(
497
564
  AssertedErc20BalanceGteSpecSchema,
@@ -656,10 +723,35 @@ var resourceOutput = (name, options) => {
656
723
  ...optionalProp("availability", opts?.availability),
657
724
  ...optionalProp("providesMinimum", opts?.providesMinimum),
658
725
  ...optionalProp("omitIfZero", opts?.omitIfZero),
659
- ...optionalProp("deliveryAddressInput", opts?.deliveryAddressInput)
726
+ ...optionalProp("deliveryAddressInput", opts?.deliveryAddressInput),
727
+ ...optionalProp("countFrom", opts?.countFrom)
660
728
  };
661
729
  };
662
730
 
731
+ // src/outputFamilies.ts
732
+ var isOutputFamily = (port) => port.kind === "resource_output" && port.countFrom !== void 0;
733
+ var instancePortName = (family, index) => `${family}.${index}`;
734
+ var familySize = (family, config) => {
735
+ const source = config[family.countFrom];
736
+ if (Array.isArray(source)) return source.length;
737
+ if (Number.isSafeInteger(source) && source >= 0) {
738
+ return source;
739
+ }
740
+ throw new Error(
741
+ `Output family '${family.name}' counts from config '${family.countFrom}', which is neither an array nor a non-negative integer`
742
+ );
743
+ };
744
+ var expandFamily = (port, config) => {
745
+ const { countFrom: _countFrom, ...instance } = port;
746
+ return Array.from({ length: familySize(port, config) }, (_, index) => ({
747
+ ...instance,
748
+ name: instancePortName(port.name, index)
749
+ }));
750
+ };
751
+ var expandOutputPorts = (declared, config) => declared.some(isOutputFamily) ? declared.flatMap(
752
+ (port) => isOutputFamily(port) ? expandFamily(port, config) : [port]
753
+ ) : declared;
754
+
663
755
  // src/ref.ts
664
756
  var isContextKey = (key) => key === "sender" || key === "executionAddress";
665
757
  var RESERVED_REF_SCOPES = /* @__PURE__ */ new Set([
@@ -758,6 +850,12 @@ var foldMaterialiserMetadata = (meta, cases) => {
758
850
  // src/zodSchemas.ts
759
851
  var import_zod = __toESM(require("zod"), 1);
760
852
  var chainIdZod = import_zod.default.number().int().positive();
853
+ var evmAddressZod = import_zod.default.string().regex(EVM_ADDRESS_HEX);
854
+ var hexBytesZod = import_zod.default.string().regex(HEX_BYTES);
855
+ var uintStringZod = import_zod.default.string().refine((value) => DECIMAL_UINT.test(value) && BigInt(value) <= MAX_UINT256, {
856
+ message: "expected a uint256 decimal integer string"
857
+ });
858
+ var epochMsZod = import_zod.default.number().int().min(-MAX_DATE_MS).max(MAX_DATE_MS);
761
859
  var SolTypeZod = import_zod.default.enum([
762
860
  "uint8",
763
861
  "uint16",
@@ -823,7 +921,13 @@ var ResourceOutputPortZod = import_zod.default.object({
823
921
  availability: import_zod.default.enum(["now", "future"]).optional(),
824
922
  providesMinimum: import_zod.default.boolean().optional(),
825
923
  omitIfZero: import_zod.default.boolean().optional(),
826
- deliveryAddressInput: import_zod.default.string().optional()
924
+ deliveryAddressInput: import_zod.default.string().optional(),
925
+ // Declares an output *family*: the port expands, when a call's config is
926
+ // bound, into one instance per element of the config array named here, or
927
+ // into as many instances as the non-negative integer named here. Instances
928
+ // are ordinary ports named `<name>.<index>`; see
929
+ // `outputFamilies.ts:expandOutputPorts`.
930
+ countFrom: import_zod.default.string().optional()
827
931
  });
828
932
  var OutputPortZod = import_zod.default.discriminatedUnion("kind", [
829
933
  ResourceOutputPortZod,
@@ -889,45 +993,42 @@ var ComposeManifestZod = import_zod.default.object({
889
993
  materialisers: import_zod.default.array(ManifestMaterialiserZod),
890
994
  preconditions: import_zod.default.array(ManifestPreconditionZod).optional()
891
995
  });
892
- var Phase1ArtifactZod = import_zod.default.discriminatedUnion("kind", [
893
- import_zod.default.object({
894
- kind: import_zod.default.literal("transaction"),
895
- funding: import_zod.default.enum(["inline", "external"])
896
- }),
897
- import_zod.default.object({
898
- kind: import_zod.default.literal("signables"),
899
- typedData: import_zod.default.array(import_zod.default.unknown())
900
- }),
901
- import_zod.default.object({
902
- kind: import_zod.default.literal("none")
903
- })
904
- ]);
905
996
  var hexStringZod = import_zod.default.string().startsWith("0x");
997
+ var SettlementEscrowZod = import_zod.default.object({
998
+ chainId: chainIdZod,
999
+ address: hexStringZod,
1000
+ token: hexStringZod,
1001
+ amount: import_zod.default.string(),
1002
+ cap: import_zod.default.string(),
1003
+ owner: hexStringZod,
1004
+ refund: hexStringZod,
1005
+ expiresAtMs: import_zod.default.number().int().positive()
1006
+ });
906
1007
  var assertionOwnerZod = import_zod.default.union([
907
- hexStringZod,
1008
+ evmAddressZod,
908
1009
  import_zod.default.enum(["escrow", "delivery"])
909
1010
  ]);
910
1011
  var CheckZod = import_zod.default.discriminatedUnion("kind", [
911
1012
  import_zod.default.object({
912
1013
  kind: import_zod.default.literal("erc20BalanceGte"),
913
1014
  chainId: chainIdZod,
914
- token: hexStringZod,
915
- owner: hexStringZod,
916
- minAmount: import_zod.default.string()
1015
+ token: evmAddressZod,
1016
+ owner: evmAddressZod,
1017
+ minAmount: uintStringZod
917
1018
  }),
918
1019
  import_zod.default.object({
919
1020
  kind: import_zod.default.literal("nativeBalanceGte"),
920
1021
  chainId: chainIdZod,
921
- owner: hexStringZod,
922
- minAmount: import_zod.default.string()
1022
+ owner: evmAddressZod,
1023
+ minAmount: uintStringZod
923
1024
  }),
924
1025
  import_zod.default.object({
925
1026
  kind: import_zod.default.literal("call"),
926
1027
  chainId: chainIdZod,
927
- to: hexStringZod,
928
- calldata: hexStringZod,
1028
+ to: evmAddressZod,
1029
+ calldata: hexBytesZod,
929
1030
  comparator: import_zod.default.enum(["gte", "eq", "lte"]),
930
- value: import_zod.default.string()
1031
+ value: uintStringZod
931
1032
  })
932
1033
  ]);
933
1034
  var AssertionSpecZod = import_zod.default.discriminatedUnion("kind", [
@@ -935,15 +1036,15 @@ var AssertionSpecZod = import_zod.default.discriminatedUnion("kind", [
935
1036
  import_zod.default.object({
936
1037
  kind: import_zod.default.literal("erc20BalanceDeltaGte"),
937
1038
  chainId: import_zod.default.number().int().positive(),
938
- token: hexStringZod,
1039
+ token: evmAddressZod,
939
1040
  owner: assertionOwnerZod,
940
- minDelta: import_zod.default.string()
1041
+ minDelta: uintStringZod
941
1042
  }),
942
1043
  import_zod.default.object({
943
1044
  kind: import_zod.default.literal("nativeBalanceDeltaGte"),
944
1045
  chainId: import_zod.default.number().int().positive(),
945
1046
  owner: assertionOwnerZod,
946
- minDelta: import_zod.default.string()
1047
+ minDelta: uintStringZod
947
1048
  })
948
1049
  ]);
949
1050
  var assertionSpecOptionByKind = (kind) => {
@@ -959,15 +1060,15 @@ var AssertedPredicateZod = import_zod.default.discriminatedUnion("kind", [
959
1060
  import_zod.default.object({
960
1061
  kind: import_zod.default.literal("erc20BalanceGte"),
961
1062
  chainId: import_zod.default.number().int().positive(),
962
- token: hexStringZod,
1063
+ token: evmAddressZod,
963
1064
  owner: assertionOwnerZod,
964
- minAmount: import_zod.default.string()
1065
+ minAmount: uintStringZod
965
1066
  }),
966
1067
  import_zod.default.object({
967
1068
  kind: import_zod.default.literal("nativeBalanceGte"),
968
1069
  chainId: import_zod.default.number().int().positive(),
969
1070
  owner: assertionOwnerZod,
970
- minAmount: import_zod.default.string()
1071
+ minAmount: uintStringZod
971
1072
  }),
972
1073
  assertionSpecOptionByKind("call"),
973
1074
  assertionSpecOptionByKind("erc20BalanceDeltaGte"),
@@ -985,9 +1086,13 @@ var ContinuationPlanZod = import_zod.default.object({
985
1086
  chainId: chainIdZod,
986
1087
  nextFlow: import_zod.default.unknown(),
987
1088
  check: CheckZod,
988
- validity: import_zod.default.object({ expiresAtMs: import_zod.default.number() }),
1089
+ validity: import_zod.default.object({ expiresAtMs: epochMsZod }),
989
1090
  correlationId: import_zod.default.string().optional()
990
1091
  });
1092
+ var SettlementZod = import_zod.default.object({
1093
+ escrow: SettlementEscrowZod.optional(),
1094
+ continuation: ContinuationPlanZod.optional()
1095
+ });
991
1096
  // Annotate the CommonJS export names for ESM import in node:
992
1097
  0 && (module.exports = {
993
1098
  ARC_CHAIN_ID,
@@ -1015,6 +1120,7 @@ var ContinuationPlanZod = import_zod.default.object({
1015
1120
  ContinuationOutcomeSchema,
1016
1121
  ContinuationPlanSchema,
1017
1122
  ContinuationPlanZod,
1123
+ EVMAddressString,
1018
1124
  EVM_NATIVE_SENTINEL,
1019
1125
  Erc20BalanceDeltaGteSpecSchema,
1020
1126
  Erc20BalanceGteSpecSchema,
@@ -1028,6 +1134,8 @@ var ContinuationPlanZod = import_zod.default.object({
1028
1134
  HandleUnitsZod,
1029
1135
  HexStringSchema,
1030
1136
  InputPortZod,
1137
+ IntegerString,
1138
+ LineageSchema,
1031
1139
  LiteralBindingSchema,
1032
1140
  ManifestGuardZod,
1033
1141
  ManifestMaterialiserZod,
@@ -1038,7 +1146,6 @@ var ContinuationPlanZod = import_zod.default.object({
1038
1146
  OutputPortZod,
1039
1147
  PROVIDER_KIND,
1040
1148
  Phase1ArtifactSchema,
1041
- Phase1ArtifactZod,
1042
1149
  RESERVED_REF_SCOPES,
1043
1150
  RefSchema,
1044
1151
  ResourceInputSchema,
@@ -1048,10 +1155,12 @@ var ContinuationPlanZod = import_zod.default.object({
1048
1155
  SIMULATE_MAX_REQUIREMENTS,
1049
1156
  SIMULATE_MAX_TRACKED_BALANCES,
1050
1157
  STATIC_SOL_TYPES,
1158
+ SettlementZod,
1051
1159
  SolTypeSchema,
1052
1160
  StaticSolTypeZod,
1053
1161
  TEMPO_CHAIN_ID,
1054
1162
  TEMPO_NATIVE_ERC20,
1163
+ UuidSchema,
1055
1164
  VerificationDescriptorSchema,
1056
1165
  VerificationDescriptorZod,
1057
1166
  canonicalAssertedPredicate,
@@ -1063,6 +1172,8 @@ var ContinuationPlanZod = import_zod.default.object({
1063
1172
  erc20Balance,
1064
1173
  erc20Resource,
1065
1174
  erc20Token,
1175
+ expandOutputPorts,
1176
+ familySize,
1066
1177
  flowInputMode,
1067
1178
  flowInputResource,
1068
1179
  flowInputType,
@@ -1073,6 +1184,7 @@ var ContinuationPlanZod = import_zod.default.object({
1073
1184
  getChainCapabilities,
1074
1185
  handle,
1075
1186
  hasErc20CanonicalNative,
1187
+ instancePortName,
1076
1188
  isAsErc20Chain,
1077
1189
  isContextKey,
1078
1190
  isEQCheck,
@@ -1088,6 +1200,7 @@ var ContinuationPlanZod = import_zod.default.object({
1088
1200
  isNativeAddressForChain,
1089
1201
  isNativeBalancePrecondition,
1090
1202
  isNativeResource,
1203
+ isOutputFamily,
1091
1204
  isRef,
1092
1205
  isResourceInput,
1093
1206
  isResourceOutputPort,