@xyo-network/xl1-protocol 5.2.0 → 5.2.1

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.
@@ -106,34 +106,80 @@ var initNetworkNode = async (activeNetwork, wallet) => {
106
106
  return activeNetworkNode;
107
107
  };
108
108
 
109
+ // src/modules/network-model/staticRest/layout/admissionShadow.ts
110
+ import { zodAsFactory, zodIsFactory } from "@ariestools/sdk";
111
+ import { asSchema as asSchema2 } from "@xyo-network/sdk";
112
+ import { z } from "zod";
113
+ var AdmissionShadowReportSchema = asSchema2("network.xyo.s3.admission.shadow", true);
114
+ var AdmissionShadowAssessmentZod = z.object({
115
+ /** Whether the allow-list admits it. */
116
+ admittedByAllowList: z.boolean(),
117
+ /** The candidate's height. */
118
+ block: z.int().nonnegative(),
119
+ /** The candidate's signed identity. */
120
+ dataHash: z.string(),
121
+ /** The EVM height stake was measured at, when it could be. */
122
+ eStar: z.optional(z.int().nonnegative()),
123
+ /** Whether participation admits it, when that could be established. */
124
+ eligible: z.optional(z.boolean()),
125
+ /** The producer. */
126
+ producer: z.string(),
127
+ /** Why participation refused, when it did. */
128
+ reason: z.optional(z.string()),
129
+ /** False when the participation question could not be put at all. */
130
+ resolvable: z.boolean()
131
+ });
132
+ var AdmissionShadowReportZod = z.object({
133
+ /** Every candidate considered this round. */
134
+ assessments: z.array(AdmissionShadowAssessmentZod),
135
+ /** Only those where the two gates disagreed. */
136
+ divergent: z.array(AdmissionShadowAssessmentZod),
137
+ /** The finalized height this round was selected against. */
138
+ head: z.int().nonnegative(),
139
+ /** Height of the previous published report, so the series can be walked backwards. */
140
+ previous: z.optional(z.int().nonnegative()),
141
+ schema: z.literal(AdmissionShadowReportSchema)
142
+ });
143
+ var isAdmissionShadowReport = zodIsFactory(AdmissionShadowReportZod);
144
+ var asAdmissionShadowReport = zodAsFactory(AdmissionShadowReportZod, "asAdmissionShadowReport");
145
+ function createAdmissionShadowReport(head, assessments, divergent, previous) {
146
+ return AdmissionShadowReportZod.parse({
147
+ assessments,
148
+ divergent,
149
+ head,
150
+ previous,
151
+ schema: AdmissionShadowReportSchema
152
+ });
153
+ }
154
+
109
155
  // src/modules/network-model/staticRest/layout/chainContractManifest.ts
110
156
  import {
111
- zodAsFactory,
112
- zodIsFactory,
157
+ zodAsFactory as zodAsFactory2,
158
+ zodIsFactory as zodIsFactory2,
113
159
  zodToFactory
114
160
  } from "@ariestools/sdk";
115
- import { z } from "zod";
161
+ import { z as z2 } from "zod";
116
162
  import {
117
163
  ChainIdZod,
118
164
  NumberishZod
119
165
  } from "#protocol-lib";
120
- var ChainContractBlockNumberZod = NumberishZod.pipe(z.int().nonnegative()).transform((value) => value);
166
+ var ChainContractBlockNumberZod = NumberishZod.pipe(z2.int().nonnegative()).transform((value) => value);
121
167
  var ChainContractManifestSchema = "network.xyo.s3.chain.contract";
122
168
  var CHAIN_CONTRACT_MANIFEST_VERSION = 1;
123
- var ChainContractManifestZod = z.object({
169
+ var ChainContractManifestZod = z2.object({
124
170
  /** Self-identifying chain id (matches the path key). Optional for older fixtures. */
125
- chainId: z.optional(ChainIdZod),
171
+ chainId: z2.optional(ChainIdZod),
126
172
  forkedAtBlockNumber: ChainContractBlockNumberZod.nullable().optional(),
127
- forkedAtHash: z.string().nullable().optional(),
128
- forkedChainId: z.nullable(ChainIdZod).optional(),
129
- minWithdrawalBlocks: NumberishZod.pipe(z.int().nonnegative()),
130
- rewardsContract: z.string(),
131
- schema: z.literal(ChainContractManifestSchema),
132
- stakingTokenAddress: z.string(),
133
- version: z.int().positive()
173
+ forkedAtHash: z2.string().nullable().optional(),
174
+ forkedChainId: z2.nullable(ChainIdZod).optional(),
175
+ minWithdrawalBlocks: NumberishZod.pipe(z2.int().nonnegative()),
176
+ rewardsContract: z2.string(),
177
+ schema: z2.literal(ChainContractManifestSchema),
178
+ stakingTokenAddress: z2.string(),
179
+ version: z2.int().positive()
134
180
  });
135
- var isChainContractManifest = zodIsFactory(ChainContractManifestZod);
136
- var asChainContractManifest = zodAsFactory(ChainContractManifestZod, "asChainContractManifest");
181
+ var isChainContractManifest = zodIsFactory2(ChainContractManifestZod);
182
+ var asChainContractManifest = zodAsFactory2(ChainContractManifestZod, "asChainContractManifest");
137
183
  var toChainContractManifest = zodToFactory(ChainContractManifestZod, "toChainContractManifest");
138
184
  function createChainContractManifest(config) {
139
185
  return ChainContractManifestZod.parse({
@@ -145,11 +191,11 @@ function createChainContractManifest(config) {
145
191
 
146
192
  // src/modules/network-model/staticRest/layout/chainManifest.ts
147
193
  import {
148
- zodAsFactory as zodAsFactory2,
149
- zodIsFactory as zodIsFactory2,
194
+ zodAsFactory as zodAsFactory3,
195
+ zodIsFactory as zodIsFactory3,
150
196
  zodToFactory as zodToFactory2
151
197
  } from "@ariestools/sdk";
152
- import { z as z2 } from "zod";
198
+ import { z as z3 } from "zod";
153
199
 
154
200
  // src/modules/network-model/staticRest/templates.ts
155
201
  import { asHash } from "@ariestools/sdk";
@@ -234,23 +280,23 @@ function transactionInclusionPathTemplate() {
234
280
  // src/modules/network-model/staticRest/layout/chainManifest.ts
235
281
  var CHAIN_LAYOUT_VERSION = 1;
236
282
  var ChainManifestSchema = "network.xyo.s3.chain.manifest";
237
- var ChainManifestPathsZod = z2.object({
238
- blockByHash: z2.string(),
239
- blockByNumber: z2.string(),
240
- head: z2.string(),
241
- payload: z2.string()
283
+ var ChainManifestPathsZod = z3.object({
284
+ blockByHash: z3.string(),
285
+ blockByNumber: z3.string(),
286
+ head: z3.string(),
287
+ payload: z3.string()
242
288
  });
243
- var ChainManifestZod = z2.object({
289
+ var ChainManifestZod = z3.object({
244
290
  /** Lowest block number available in the bucket (genesis until pruning exists). */
245
- earliestBlock: z2.int().nonnegative(),
291
+ earliestBlock: z3.int().nonnegative(),
246
292
  /** Storage/wire encoding of the published files (also on each object's Content-Encoding). */
247
- encoding: z2.string(),
293
+ encoding: z3.string(),
248
294
  paths: ChainManifestPathsZod,
249
- schema: z2.literal(ChainManifestSchema),
250
- version: z2.int().positive()
295
+ schema: z3.literal(ChainManifestSchema),
296
+ version: z3.int().positive()
251
297
  });
252
- var isChainManifest = zodIsFactory2(ChainManifestZod);
253
- var asChainManifest = zodAsFactory2(ChainManifestZod, "asChainManifest");
298
+ var isChainManifest = zodIsFactory3(ChainManifestZod);
299
+ var asChainManifest = zodAsFactory3(ChainManifestZod, "asChainManifest");
254
300
  var toChainManifest = zodToFactory2(ChainManifestZod, "toChainManifest");
255
301
  function createChainManifest(encoding, earliestBlock = 0) {
256
302
  return asChainManifest({
@@ -264,98 +310,98 @@ function createChainManifest(encoding, earliestBlock = 0) {
264
310
 
265
311
  // src/modules/network-model/staticRest/layout/chainParams.ts
266
312
  import {
267
- zodAsFactory as zodAsFactory3,
268
- zodIsFactory as zodIsFactory3,
313
+ zodAsFactory as zodAsFactory4,
314
+ zodIsFactory as zodIsFactory4,
269
315
  zodToFactory as zodToFactory3
270
316
  } from "@ariestools/sdk";
271
- import { asSchema as asSchema2 } from "@xyo-network/sdk";
272
- import { z as z3 } from "zod";
317
+ import { asSchema as asSchema3 } from "@xyo-network/sdk";
318
+ import { z as z4 } from "zod";
273
319
  import { ChainIdZod as ChainIdZod2, NumberishZod as NumberishZod2 } from "#protocol-lib";
274
320
  import { OffenseCodes, RuleIds } from "#protocol-model";
275
- var ChainParamsSchema = asSchema2("network.xyo.s3.chain.params", true);
321
+ var ChainParamsSchema = asSchema3("network.xyo.s3.chain.params", true);
276
322
  var CHAIN_PARAMS_VERSION = 1;
277
- var offenseCodeZod = z3.enum(OffenseCodes);
278
- var RuleIdZod = z3.enum(RuleIds);
279
- var HeightZod = NumberishZod2.pipe(z3.int().nonnegative());
280
- var HexAmountZod = z3.string();
281
- var ChainParamsZod = z3.object({
323
+ var offenseCodeZod = z4.enum(OffenseCodes);
324
+ var RuleIdZod = z4.enum(RuleIds);
325
+ var HeightZod = NumberishZod2.pipe(z4.int().nonnegative());
326
+ var HexAmountZod = z4.string();
327
+ var ChainParamsZod = z4.object({
282
328
  /** Rule id to the height it takes effect. */
283
- activations: z3.partialRecord(RuleIdZod, HeightZod),
329
+ activations: z4.partialRecord(RuleIdZod, HeightZod),
284
330
  /** Address whose adjudication records are honored. */
285
- arbiter: z3.string(),
331
+ arbiter: z4.string(),
286
332
  /** Share of a step's reward pool paid to attestors, in basis points. */
287
- attestationRewardBps: z3.int().nonnegative(),
333
+ attestationRewardBps: z4.int().nonnegative(),
288
334
  /** Absolute ceiling on any single bounty, in the smallest unit. */
289
335
  bountyCapAtto: HexAmountZod,
290
336
  /** Share of a slash offered as a bounty, in basis points. */
291
- bountyShareBps: z3.int().nonnegative(),
337
+ bountyShareBps: z4.int().nonnegative(),
292
338
  /** Minimum share of every slash that must be burned, in basis points. */
293
- burnFloorBps: z3.int().positive(),
339
+ burnFloorBps: z4.int().positive(),
294
340
  /** Version of the offense catalog these parameters describe. */
295
- catalogVersion: z3.int().positive(),
341
+ catalogVersion: z4.int().positive(),
296
342
  /** Chain these parameters govern. */
297
343
  chainId: ChainIdZod2,
298
344
  /** Window during which counter-evidence may be filed, in EVM blocks. */
299
- challengeWindowEvmBlocks: z3.int().positive(),
345
+ challengeWindowEvmBlocks: z4.int().positive(),
300
346
  /** Rule id to the height it stops taking effect; re-activation needs a later version. */
301
- deactivations: z3.optional(z3.partialRecord(RuleIdZod, HeightZod)),
347
+ deactivations: z4.optional(z4.partialRecord(RuleIdZod, HeightZod)),
302
348
  /** Maximum age of an offense at report time, in EVM blocks. */
303
- evidenceFreshnessEvmBlocks: z3.int().positive(),
349
+ evidenceFreshnessEvmBlocks: z4.int().positive(),
304
350
  /** Operational floor on how long evidence is kept, in XL1 blocks. */
305
- evidenceRetentionXl1Blocks: z3.int().positive(),
351
+ evidenceRetentionXl1Blocks: z4.int().positive(),
306
352
  /** Delay between a certificate being queued and executable, in EVM blocks. */
307
- executionDelayEvmBlocks: z3.int().positive(),
353
+ executionDelayEvmBlocks: z4.int().positive(),
308
354
  /** How far behind its own anchor a block's stake measurement may sit, in EVM blocks. */
309
- freshnessBandEvmBlocks: z3.int().positive(),
355
+ freshnessBandEvmBlocks: z4.int().positive(),
310
356
  /** Blocks after an activation during which the rule is observed but not enforced. */
311
- graceBandXl1Blocks: z3.int().nonnegative(),
357
+ graceBandXl1Blocks: z4.int().nonnegative(),
312
358
  /** Confirmation depth an anchor must sit behind the EVM head, in EVM blocks. */
313
- maturityEvmBlocks: z3.int().positive(),
359
+ maturityEvmBlocks: z4.int().positive(),
314
360
  /** Minimum stake a producer must place on itself, in the smallest unit. */
315
361
  minProducerSelfBondAtto: HexAmountZod,
316
362
  /** Minimum stake on a producer address, in the smallest unit. */
317
363
  minProducerStakeAtto: HexAmountZod,
318
364
  /** Minimum age stake must reach before it counts toward participation, in EVM blocks. */
319
- minStakeAgeEvmBlocks: z3.int().nonnegative(),
365
+ minStakeAgeEvmBlocks: z4.int().nonnegative(),
320
366
  /** Minimum stake a validator must hold, in the smallest unit. */
321
367
  minValidatorStakeAtto: HexAmountZod,
322
368
  /** Slack the timing budget carries for operations and stalls, in EVM blocks. */
323
- opsAllowanceEvmBlocks: z3.int().positive(),
369
+ opsAllowanceEvmBlocks: z4.int().positive(),
324
370
  /** Lowest protocol version a block may declare. */
325
- protocolMin: z3.int().positive(),
371
+ protocolMin: z4.int().positive(),
326
372
  /** Refundable deposit a report must escrow, in the smallest unit. */
327
373
  reporterDepositAtto: HexAmountZod,
328
374
  /** Blocks a reveal must wait after its commitment. */
329
- revealDelayEvmBlocks: z3.int().positive(),
375
+ revealDelayEvmBlocks: z4.int().positive(),
330
376
  /** Blocks a reveal must wait after its commitment, on the XL1 clock. */
331
- revealDelayXl1Blocks: z3.int().positive(),
377
+ revealDelayXl1Blocks: z4.int().positive(),
332
378
  /** Blocks after which an unrevealed commitment expires. */
333
- revealWindowEvmBlocks: z3.int().positive(),
379
+ revealWindowEvmBlocks: z4.int().positive(),
334
380
  /** Blocks after which an unrevealed commitment expires, on the XL1 clock. */
335
- revealWindowXl1Blocks: z3.int().positive(),
381
+ revealWindowXl1Blocks: z4.int().positive(),
336
382
  /** Where the allowed block reward comes from. */
337
- rewardSource: z3.enum(["schedule", "contract"]),
338
- schema: z3.literal(ChainParamsSchema),
383
+ rewardSource: z4.enum(["schedule", "contract"]),
384
+ schema: z4.literal(ChainParamsSchema),
339
385
  /** Offense code to the share of at-risk stake it slashes, in basis points. */
340
- slashFractionsBps: z3.partialRecord(offenseCodeZod, z3.int().nonnegative()),
386
+ slashFractionsBps: z4.partialRecord(offenseCodeZod, z4.int().nonnegative()),
341
387
  /** Distinct validator signatures a slash certificate needs. */
342
- slashQuorumCount: z3.int().positive(),
388
+ slashQuorumCount: z4.int().positive(),
343
389
  /** Version of this register document. */
344
- version: z3.int().positive()
390
+ version: z4.int().positive()
345
391
  });
346
- var isChainParams = zodIsFactory3(ChainParamsZod);
347
- var asChainParams = zodAsFactory3(ChainParamsZod, "asChainParams");
392
+ var isChainParams = zodIsFactory4(ChainParamsZod);
393
+ var asChainParams = zodAsFactory4(ChainParamsZod, "asChainParams");
348
394
  var toChainParams = zodToFactory3(ChainParamsZod, "toChainParams");
349
- var ChainParamsHeadSchema = asSchema2("network.xyo.s3.chain.params.head", true);
350
- var ChainParamsHeadZod = z3.object({
395
+ var ChainParamsHeadSchema = asSchema3("network.xyo.s3.chain.params.head", true);
396
+ var ChainParamsHeadZod = z4.object({
351
397
  /** Hash of the version document, so a reader can tell it got the one the head meant. */
352
- hash: z3.string(),
353
- schema: z3.literal(ChainParamsHeadSchema),
398
+ hash: z4.string(),
399
+ schema: z4.literal(ChainParamsHeadSchema),
354
400
  /** Version number the pointer names. */
355
- version: z3.int().positive()
401
+ version: z4.int().positive()
356
402
  });
357
- var isChainParamsHead = zodIsFactory3(ChainParamsHeadZod);
358
- var asChainParamsHead = zodAsFactory3(ChainParamsHeadZod, "asChainParamsHead");
403
+ var isChainParamsHead = zodIsFactory4(ChainParamsHeadZod);
404
+ var asChainParamsHead = zodAsFactory4(ChainParamsHeadZod, "asChainParamsHead");
359
405
  function createChainParams(config) {
360
406
  return ChainParamsZod.parse({ ...config, schema: ChainParamsSchema });
361
407
  }
@@ -410,93 +456,93 @@ function chainParamsSuccessionErrors(previous, next, finalizedHeight) {
410
456
  import {
411
457
  EthAddressZod,
412
458
  HexRegExMinMaxMixedCaseWithPrefix,
413
- zodAsFactory as zodAsFactory4
459
+ zodAsFactory as zodAsFactory5
414
460
  } from "@ariestools/sdk";
415
- import { z as z4 } from "zod/mini";
416
- var EvmHashZod = z4.string().check(z4.regex(HexRegExMinMaxMixedCaseWithPrefix(32, 32)));
417
- var EvmDataZod = z4.string().check(z4.regex(/^0x[\dA-Fa-f]*$/));
418
- var EvmEventIndexLogZod = z4.object({
461
+ import { z as z5 } from "zod/mini";
462
+ var EvmHashZod = z5.string().check(z5.regex(HexRegExMinMaxMixedCaseWithPrefix(32, 32)));
463
+ var EvmDataZod = z5.string().check(z5.regex(/^0x[\dA-Fa-f]*$/));
464
+ var EvmEventIndexLogZod = z5.object({
419
465
  address: EthAddressZod,
420
466
  blockHash: EvmHashZod,
421
- blockNumber: z4.number(),
467
+ blockNumber: z5.number(),
422
468
  data: EvmDataZod,
423
- index: z4.number(),
424
- topics: z4.array(EvmHashZod),
469
+ index: z5.number(),
470
+ topics: z5.array(EvmHashZod),
425
471
  transactionHash: EvmHashZod,
426
- transactionIndex: z4.number()
472
+ transactionIndex: z5.number()
427
473
  });
428
- var EvmEventIndexFrameZod = z4.object({
429
- fromBlock: z4.number(),
430
- logs: z4.array(EvmEventIndexLogZod),
431
- toBlock: z4.number()
474
+ var EvmEventIndexFrameZod = z5.object({
475
+ fromBlock: z5.number(),
476
+ logs: z5.array(EvmEventIndexLogZod),
477
+ toBlock: z5.number()
432
478
  });
433
- var EvmEventIndexManifestZod = z4.object({
479
+ var EvmEventIndexManifestZod = z5.object({
434
480
  address: EthAddressZod,
435
- chainId: z4.string(),
436
- deploymentBlock: z4.number(),
437
- frameSize: z4.number(),
438
- layout: z4.literal("evm-contract-events-v1")
481
+ chainId: z5.string(),
482
+ deploymentBlock: z5.number(),
483
+ frameSize: z5.number(),
484
+ layout: z5.literal("evm-contract-events-v1")
439
485
  });
440
- var EvmEventIndexHeadZod = z4.object({
486
+ var EvmEventIndexHeadZod = z5.object({
441
487
  address: EthAddressZod,
442
- block: z4.number(),
443
- chainId: z4.string(),
488
+ block: z5.number(),
489
+ chainId: z5.string(),
444
490
  hash: EvmHashZod
445
491
  });
446
- var asEvmEventIndexFrame = zodAsFactory4(EvmEventIndexFrameZod, "asEvmEventIndexFrame");
447
- var asEvmEventIndexHead = zodAsFactory4(EvmEventIndexHeadZod, "asEvmEventIndexHead");
448
- var asEvmEventIndexManifest = zodAsFactory4(EvmEventIndexManifestZod, "asEvmEventIndexManifest");
492
+ var asEvmEventIndexFrame = zodAsFactory5(EvmEventIndexFrameZod, "asEvmEventIndexFrame");
493
+ var asEvmEventIndexHead = zodAsFactory5(EvmEventIndexHeadZod, "asEvmEventIndexHead");
494
+ var asEvmEventIndexManifest = zodAsFactory5(EvmEventIndexManifestZod, "asEvmEventIndexManifest");
449
495
 
450
496
  // src/modules/network-model/staticRest/layout/indexManifest.ts
451
497
  import {
452
- zodAsFactory as zodAsFactory5,
453
- zodIsFactory as zodIsFactory4,
498
+ zodAsFactory as zodAsFactory6,
499
+ zodIsFactory as zodIsFactory5,
454
500
  zodToFactory as zodToFactory4
455
501
  } from "@ariestools/sdk";
456
- import { z as z5 } from "zod";
502
+ import { z as z6 } from "zod";
457
503
  var INDEX_LAYOUT_VERSION = 1;
458
504
  var IndexManifestSchema = "network.xyo.s3.index.manifest";
459
505
  var IndexHeadSchema = "network.xyo.s3.index.head";
460
- var IndexManifestFamilyZod = z5.object({
506
+ var IndexManifestFamilyZod = z6.object({
461
507
  /** Highest step level published for this family. */
462
- maxStep: z5.int().nonnegative(),
508
+ maxStep: z6.int().nonnegative(),
463
509
  /** Path template for the family's frames, e.g. `blocks/{level}/{index}.json`. */
464
- path: z5.string()
510
+ path: z6.string()
465
511
  });
466
- var indexFamiliesZod = z5.object({
512
+ var indexFamiliesZod = z6.object({
467
513
  balances: IndexManifestFamilyZod,
468
514
  blocks: IndexManifestFamilyZod,
469
515
  schemas: IndexManifestFamilyZod,
470
516
  transfers: IndexManifestFamilyZod
471
517
  });
472
- var IndexManifestZod = z5.object({
518
+ var IndexManifestZod = z6.object({
473
519
  families: indexFamiliesZod,
474
- schema: z5.literal(IndexManifestSchema),
475
- version: z5.int().positive()
520
+ schema: z6.literal(IndexManifestSchema),
521
+ version: z6.int().positive()
476
522
  });
477
- var isIndexManifest = zodIsFactory4(IndexManifestZod);
478
- var asIndexManifest = zodAsFactory5(IndexManifestZod, "asIndexManifest");
523
+ var isIndexManifest = zodIsFactory5(IndexManifestZod);
524
+ var asIndexManifest = zodAsFactory6(IndexManifestZod, "asIndexManifest");
479
525
  var toIndexManifest = zodToFactory4(IndexManifestZod, "toIndexManifest");
480
- var IndexHeadFamiliesZod = z5.object({
481
- balances: z5.int().nonnegative(),
482
- blocks: z5.int().nonnegative(),
483
- schemas: z5.int().nonnegative(),
484
- transfers: z5.int().nonnegative()
526
+ var IndexHeadFamiliesZod = z6.object({
527
+ balances: z6.int().nonnegative(),
528
+ blocks: z6.int().nonnegative(),
529
+ schemas: z6.int().nonnegative(),
530
+ transfers: z6.int().nonnegative()
485
531
  });
486
- var IndexHeadZod = z5.object({
532
+ var IndexHeadZod = z6.object({
487
533
  /** Highest block the index is complete through. */
488
- block: z5.int().nonnegative(),
534
+ block: z6.int().nonnegative(),
489
535
  /** Completed frame counts per family. */
490
536
  families: IndexHeadFamiliesZod,
491
537
  /** Hash of that block. */
492
- hash: z5.string(),
493
- schema: z5.literal(IndexHeadSchema),
538
+ hash: z6.string(),
539
+ schema: z6.literal(IndexHeadSchema),
494
540
  /** ISO-8601 timestamp of the last update. */
495
- updatedAt: z5.string(),
496
- version: z5.int().positive()
541
+ updatedAt: z6.string(),
542
+ version: z6.int().positive()
497
543
  });
498
- var isIndexHead = zodIsFactory4(IndexHeadZod);
499
- var asIndexHead = zodAsFactory5(IndexHeadZod, "asIndexHead");
544
+ var isIndexHead = zodIsFactory5(IndexHeadZod);
545
+ var asIndexHead = zodAsFactory6(IndexHeadZod, "asIndexHead");
500
546
  var toIndexHead = zodToFactory4(IndexHeadZod, "toIndexHead");
501
547
  function createIndexManifestFamilies(maxSteps) {
502
548
  return {
@@ -529,107 +575,162 @@ function createIndexHead(watermark, updatedAt) {
529
575
  // src/modules/network-model/staticRest/layout/networkStakeRewardsIndex.ts
530
576
  import {
531
577
  HashZod,
532
- zodAsFactory as zodAsFactory6,
533
- zodIsFactory as zodIsFactory5
578
+ zodAsFactory as zodAsFactory7,
579
+ zodIsFactory as zodIsFactory6
534
580
  } from "@ariestools/sdk";
535
- import { asSchema as asSchema3 } from "@xyo-network/sdk";
536
- import { z as z6 } from "zod";
581
+ import { asSchema as asSchema4 } from "@xyo-network/sdk";
582
+ import { z as z7 } from "zod";
537
583
  var NETWORK_STAKE_REWARDS_INDEX_LAYOUT = "network-stake-rewards-v1";
538
584
  var NETWORK_STAKE_REWARDS_UNMULTIPLIED_POLICY = "unmultiplied-v1";
539
585
  var NETWORK_STAKE_REWARDS_BASE_POLICY = NETWORK_STAKE_REWARDS_UNMULTIPLIED_POLICY;
540
- var NetworkStakeRewardsIndexSnapshotSchema = asSchema3("network.xyo.chain.stake.rewards.snapshot", true);
541
- var DecimalBigIntZod = z6.string().regex(/^(?:0|[1-9]\d*)$/);
542
- var NetworkStakeRewardsPolicyIdZod = z6.string().regex(/^[a-z0-9][a-z0-9._-]*$/);
543
- var PositionRewardsZod = z6.record(z6.string().regex(/^(?:0|[1-9]\d*)$/), DecimalBigIntZod);
544
- var BlockRangeZod = z6.tuple([z6.number().int().nonnegative(), z6.number().int().nonnegative()]);
545
- var StepIdentityJsonZod = z6.object({
546
- block: z6.number().int().nonnegative(),
547
- step: z6.number().int().nonnegative()
586
+ var NetworkStakeRewardsIndexSnapshotSchema = asSchema4("network.xyo.chain.stake.rewards.snapshot", true);
587
+ var DecimalBigIntZod = z7.string().regex(/^(?:0|[1-9]\d*)$/);
588
+ var NetworkStakeRewardsPolicyIdZod = z7.string().regex(/^[a-z0-9][a-z0-9._-]*$/);
589
+ var PositionRewardsZod = z7.record(z7.string().regex(/^(?:0|[1-9]\d*)$/), DecimalBigIntZod);
590
+ var BlockRangeZod = z7.tuple([z7.number().int().nonnegative(), z7.number().int().nonnegative()]);
591
+ var StepIdentityJsonZod = z7.object({
592
+ block: z7.number().int().nonnegative(),
593
+ step: z7.number().int().nonnegative()
548
594
  });
549
- var NetworkStakeRewardsIndexManifestZod = z6.object({
550
- evmAddress: z6.string(),
551
- evmChainId: z6.string(),
552
- layout: z6.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
595
+ var NetworkStakeRewardsIndexManifestZod = z7.object({
596
+ evmAddress: z7.string(),
597
+ evmChainId: z7.string(),
598
+ layout: z7.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
553
599
  policyId: NetworkStakeRewardsPolicyIdZod,
554
- stepLevels: z6.array(z6.number().int().nonnegative()),
555
- timeAnchor: z6.object({
556
- externalGenesisTime: z6.number().optional(),
557
- maxScanBlocks: z6.number().optional()
600
+ stepLevels: z7.array(z7.number().int().nonnegative()),
601
+ timeAnchor: z7.object({
602
+ externalGenesisTime: z7.number().optional(),
603
+ maxScanBlocks: z7.number().optional()
558
604
  }).optional()
559
605
  });
560
- var NetworkStakeRewardsIndexStepZod = z6.object({
606
+ var NetworkStakeRewardsIndexStepZod = z7.object({
561
607
  denominator: DecimalBigIntZod,
562
608
  externalRange: BlockRangeZod,
563
- layout: z6.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
609
+ layout: z7.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
564
610
  policyId: NetworkStakeRewardsPolicyIdZod,
565
611
  positionRewards: PositionRewardsZod,
566
612
  step: StepIdentityJsonZod,
567
613
  totalReward: DecimalBigIntZod,
568
614
  xl1Range: BlockRangeZod
569
615
  });
570
- var NetworkStakeRewardsIndexSnapshotZod = z6.object({
571
- layout: z6.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
616
+ var NetworkStakeRewardsIndexSnapshotZod = z7.object({
617
+ layout: z7.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
572
618
  policyId: NetworkStakeRewardsPolicyIdZod,
573
619
  positionRewards: PositionRewardsZod,
574
- schema: z6.literal(NetworkStakeRewardsIndexSnapshotSchema),
575
- stepCount: z6.number().int().nonnegative(),
620
+ schema: z7.literal(NetworkStakeRewardsIndexSnapshotSchema),
621
+ stepCount: z7.number().int().nonnegative(),
576
622
  totalReward: DecimalBigIntZod
577
623
  });
578
- var NetworkStakeRewardsIndexHeadZod = z6.object({
579
- layout: z6.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
624
+ var NetworkStakeRewardsIndexHeadZod = z7.object({
625
+ layout: z7.literal(NETWORK_STAKE_REWARDS_INDEX_LAYOUT),
580
626
  policyId: NetworkStakeRewardsPolicyIdZod,
581
- positionCount: z6.number().int().nonnegative(),
582
- processedThroughBlock: z6.number().int().nonnegative(),
627
+ positionCount: z7.number().int().nonnegative(),
628
+ processedThroughBlock: z7.number().int().nonnegative(),
583
629
  snapshotHash: HashZod,
584
- source: z6.object({
585
- evm: z6.object({
586
- block: z6.number().int().nonnegative(),
587
- hash: z6.string()
630
+ source: z7.object({
631
+ evm: z7.object({
632
+ block: z7.number().int().nonnegative(),
633
+ hash: z7.string()
588
634
  }),
589
- xl1: z6.object({
590
- block: z6.number().int().nonnegative(),
591
- hash: z6.string()
635
+ xl1: z7.object({
636
+ block: z7.number().int().nonnegative(),
637
+ hash: z7.string()
592
638
  })
593
639
  }),
594
- stepCount: z6.number().int().nonnegative()
640
+ stepCount: z7.number().int().nonnegative()
595
641
  });
596
- var isNetworkStakeRewardsIndexManifest = zodIsFactory5(NetworkStakeRewardsIndexManifestZod);
597
- var asNetworkStakeRewardsIndexManifest = zodAsFactory6(
642
+ var isNetworkStakeRewardsIndexManifest = zodIsFactory6(NetworkStakeRewardsIndexManifestZod);
643
+ var asNetworkStakeRewardsIndexManifest = zodAsFactory7(
598
644
  NetworkStakeRewardsIndexManifestZod,
599
645
  "asNetworkStakeRewardsIndexManifest"
600
646
  );
601
- var asNetworkStakeRewardsIndexStep = zodAsFactory6(
647
+ var asNetworkStakeRewardsIndexStep = zodAsFactory7(
602
648
  NetworkStakeRewardsIndexStepZod,
603
649
  "asNetworkStakeRewardsIndexStep"
604
650
  );
605
- var asNetworkStakeRewardsIndexSnapshot = zodAsFactory6(
651
+ var asNetworkStakeRewardsIndexSnapshot = zodAsFactory7(
606
652
  NetworkStakeRewardsIndexSnapshotZod,
607
653
  "asNetworkStakeRewardsIndexSnapshot"
608
654
  );
609
- var asNetworkStakeRewardsIndexHead = zodAsFactory6(
655
+ var asNetworkStakeRewardsIndexHead = zodAsFactory7(
610
656
  NetworkStakeRewardsIndexHeadZod,
611
657
  "asNetworkStakeRewardsIndexHead"
612
658
  );
613
659
 
660
+ // src/modules/network-model/staticRest/layout/slashIndex.ts
661
+ import {
662
+ zodAsFactory as zodAsFactory8,
663
+ zodIsFactory as zodIsFactory7,
664
+ zodToFactory as zodToFactory5
665
+ } from "@ariestools/sdk";
666
+ import { asSchema as asSchema5 } from "@xyo-network/sdk";
667
+ import { z as z8 } from "zod";
668
+ import { OffenseCodes as OffenseCodes2 } from "#protocol-model";
669
+ var SlashIndexHeadSchema = asSchema5("network.xyo.s3.slash.index.head", true);
670
+ var SLASH_INDEX_VERSION = 1;
671
+ var offenseCodeZod2 = z8.enum(OffenseCodes2);
672
+ var SlashIndexHeadZod = z8.object({
673
+ /** Highest finalized height the index has folded in. */
674
+ height: z8.int().nonnegative(),
675
+ /** Layout version of the objects this head points at. */
676
+ indexVersion: z8.int().positive(),
677
+ schema: z8.literal(SlashIndexHeadSchema),
678
+ /** When the pass that wrote this ran, on the EVM clock, when it was known. */
679
+ anchor: z8.optional(z8.int().nonnegative())
680
+ });
681
+ var isSlashIndexHead = zodIsFactory7(SlashIndexHeadZod);
682
+ var asSlashIndexHead = zodAsFactory8(SlashIndexHeadZod, "asSlashIndexHead");
683
+ var toSlashIndexHead = zodToFactory5(SlashIndexHeadZod, "toSlashIndexHead");
684
+ var SlashIndexKeyRecordSchema = asSchema5("network.xyo.s3.slash.index.key", true);
685
+ var SlashIndexKeyRecordZod = z8.object({
686
+ /** Who is accused. */
687
+ accused: z8.string(),
688
+ /** Hash of the adjudication that closed it, when one has. */
689
+ adjudication: z8.optional(z8.string()),
690
+ /** The canonical height the offense is located at. */
691
+ block: z8.int().nonnegative(),
692
+ /** Hashes of challenges filed against reports of it. */
693
+ challenges: z8.array(z8.string()),
694
+ /** The chain it happened on. */
695
+ chain: z8.string(),
696
+ /** How it was resolved, when it has been. */
697
+ outcome: z8.optional(z8.enum(["confirmed", "refuted", "indeterminate", "invalid"])),
698
+ /** Which offense class. */
699
+ offense: offenseCodeZod2,
700
+ /** Hashes of every report filed for it, earliest first. */
701
+ requests: z8.array(z8.string()),
702
+ schema: z8.literal(SlashIndexKeyRecordSchema)
703
+ });
704
+ var isSlashIndexKeyRecord = zodIsFactory7(SlashIndexKeyRecordZod);
705
+ var asSlashIndexKeyRecord = zodAsFactory8(SlashIndexKeyRecordZod, "asSlashIndexKeyRecord");
706
+ function createSlashIndexHead(height, anchor) {
707
+ return SlashIndexHeadZod.parse({
708
+ anchor,
709
+ height,
710
+ indexVersion: SLASH_INDEX_VERSION,
711
+ schema: SlashIndexHeadSchema
712
+ });
713
+ }
714
+
614
715
  // src/modules/network-model/staticRest/layout/transactionInclusionIndex.ts
615
716
  import {
616
717
  HashZod as HashZod2,
617
- zodAsFactory as zodAsFactory7,
618
- zodIsFactory as zodIsFactory6,
619
- zodToFactory as zodToFactory5
718
+ zodAsFactory as zodAsFactory9,
719
+ zodIsFactory as zodIsFactory8,
720
+ zodToFactory as zodToFactory6
620
721
  } from "@ariestools/sdk";
621
- import { z as z7 } from "zod";
722
+ import { z as z9 } from "zod";
622
723
  import { ChainIdZod as ChainIdZod3, XL1BlockNumberZod } from "#protocol-model";
623
724
  var TRANSACTION_INCLUSION_INDEX_LAYOUT = "transaction-inclusions-v1";
624
- var TransactionInclusionManifestZod = z7.object({
725
+ var TransactionInclusionManifestZod = z9.object({
625
726
  /** XL1 chain whose finalized transactions are indexed. */
626
727
  chain: ChainIdZod3,
627
728
  /** Versioned layout identifier. */
628
- layout: z7.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT),
729
+ layout: z9.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT),
629
730
  /** Hash-addressed path template, for example `transactions/by-hash/{hash}.json`. */
630
- path: z7.string()
731
+ path: z9.string()
631
732
  });
632
- var TransactionInclusionHeadZod = z7.object({
733
+ var TransactionInclusionHeadZod = z9.object({
633
734
  /** Highest finalized block fully represented by the lookup. */
634
735
  block: XL1BlockNumberZod,
635
736
  /** Hash of the highest finalized block fully represented by the lookup. */
@@ -637,25 +738,25 @@ var TransactionInclusionHeadZod = z7.object({
637
738
  /** XL1 chain whose finalized transactions are indexed. */
638
739
  chain: ChainIdZod3,
639
740
  /** Number of transaction-inclusion records represented through `block`. */
640
- entries: z7.int().nonnegative(),
741
+ entries: z9.int().nonnegative(),
641
742
  /** Versioned layout identifier. */
642
- layout: z7.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT)
743
+ layout: z9.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT)
643
744
  });
644
- var isTransactionInclusionManifest = zodIsFactory6(TransactionInclusionManifestZod);
645
- var asTransactionInclusionManifest = zodAsFactory7(
745
+ var isTransactionInclusionManifest = zodIsFactory8(TransactionInclusionManifestZod);
746
+ var asTransactionInclusionManifest = zodAsFactory9(
646
747
  TransactionInclusionManifestZod,
647
748
  "asTransactionInclusionManifest"
648
749
  );
649
- var toTransactionInclusionManifest = zodToFactory5(
750
+ var toTransactionInclusionManifest = zodToFactory6(
650
751
  TransactionInclusionManifestZod,
651
752
  "toTransactionInclusionManifest"
652
753
  );
653
- var isTransactionInclusionHead = zodIsFactory6(TransactionInclusionHeadZod);
654
- var asTransactionInclusionHead = zodAsFactory7(
754
+ var isTransactionInclusionHead = zodIsFactory8(TransactionInclusionHeadZod);
755
+ var asTransactionInclusionHead = zodAsFactory9(
655
756
  TransactionInclusionHeadZod,
656
757
  "asTransactionInclusionHead"
657
758
  );
658
- var toTransactionInclusionHead = zodToFactory5(
759
+ var toTransactionInclusionHead = zodToFactory6(
659
760
  TransactionInclusionHeadZod,
660
761
  "toTransactionInclusionHead"
661
762
  );
@@ -754,6 +855,42 @@ function networkStakeRewardsIndexStepPath(policyId, step) {
754
855
  return `${root2(policyId)}/steps/${step.step}/${step.block}.json`;
755
856
  }
756
857
 
858
+ // src/modules/network-model/staticRest/paths/slashIndex.ts
859
+ var ROOT = "slash/v1";
860
+ function slashIndexHeadPath() {
861
+ return `${ROOT}/head.json`;
862
+ }
863
+ function slashIndexManifestPath() {
864
+ return `${ROOT}/manifest.json`;
865
+ }
866
+ function slashIndexRequestPath(hash) {
867
+ return `${ROOT}/requests/by-hash/${hash}.json`;
868
+ }
869
+ function slashIndexCommitPath(hash) {
870
+ return `${ROOT}/commits/by-hash/${hash}.json`;
871
+ }
872
+ function slashIndexChallengePath(hash) {
873
+ return `${ROOT}/challenges/by-hash/${hash}.json`;
874
+ }
875
+ function slashIndexAdjudicationPath(hash) {
876
+ return `${ROOT}/adjudications/by-hash/${hash}.json`;
877
+ }
878
+ function slashIndexKeyPath(accused, offense, block) {
879
+ return `${ROOT}/keys/${accused.toLowerCase()}/${offense}/${block}.json`;
880
+ }
881
+ function slashIndexAccusedPath(address) {
882
+ return `${ROOT}/accused/${address.toLowerCase()}.json`;
883
+ }
884
+ function slashIndexClaimantPath(address) {
885
+ return `${ROOT}/claimants/${address.toLowerCase()}.json`;
886
+ }
887
+ function admissionShadowPath(height) {
888
+ return `admission/shadow/${height}.json`;
889
+ }
890
+ function admissionShadowHeadPath() {
891
+ return "admission/shadow/head.json";
892
+ }
893
+
757
894
  // src/modules/network-model/utils/ExplorerLinks.ts
758
895
  var ExplorerLinks = class {
759
896
  /** Explorer origin with trailing slashes removed. */
@@ -814,6 +951,9 @@ var ExplorerLinks = class {
814
951
  }
815
952
  };
816
953
  export {
954
+ AdmissionShadowAssessmentZod,
955
+ AdmissionShadowReportSchema,
956
+ AdmissionShadowReportZod,
817
957
  CHAIN_CONTRACT_MANIFEST_VERSION,
818
958
  CHAIN_LAYOUT_VERSION,
819
959
  CHAIN_PARAMS_VERSION,
@@ -856,11 +996,19 @@ export {
856
996
  NetworkStakeRewardsIndexStepZod,
857
997
  NetworkStakeRewardsPolicyIdZod,
858
998
  RuleIdZod,
999
+ SLASH_INDEX_VERSION,
859
1000
  SequenceNetwork,
860
1001
  testnet_default as SequenceNetworkIconString,
1002
+ SlashIndexHeadSchema,
1003
+ SlashIndexHeadZod,
1004
+ SlashIndexKeyRecordSchema,
1005
+ SlashIndexKeyRecordZod,
861
1006
  TRANSACTION_INCLUSION_INDEX_LAYOUT,
862
1007
  TransactionInclusionHeadZod,
863
1008
  TransactionInclusionManifestZod,
1009
+ admissionShadowHeadPath,
1010
+ admissionShadowPath,
1011
+ asAdmissionShadowReport,
864
1012
  asChainContractManifest,
865
1013
  asChainManifest,
866
1014
  asChainParams,
@@ -875,6 +1023,8 @@ export {
875
1023
  asNetworkStakeRewardsIndexSnapshot,
876
1024
  asNetworkStakeRewardsIndexStep,
877
1025
  asOptionalNetwork,
1026
+ asSlashIndexHead,
1027
+ asSlashIndexKeyRecord,
878
1028
  asTransactionInclusionHead,
879
1029
  asTransactionInclusionManifest,
880
1030
  blockHashPath,
@@ -886,6 +1036,7 @@ export {
886
1036
  chainParamsHeadPath,
887
1037
  chainParamsSuccessionErrors,
888
1038
  chainParamsVersionPath,
1039
+ createAdmissionShadowReport,
889
1040
  createChainContractManifest,
890
1041
  createChainManifest,
891
1042
  createChainParams,
@@ -893,6 +1044,7 @@ export {
893
1044
  createIndexHead,
894
1045
  createIndexManifest,
895
1046
  createIndexManifestFamilies,
1047
+ createSlashIndexHead,
896
1048
  createTransactionInclusionHead,
897
1049
  createTransactionInclusionManifest,
898
1050
  createTrustedPostureParams,
@@ -909,6 +1061,7 @@ export {
909
1061
  indexSummaryPathTemplate,
910
1062
  initNetworkNode,
911
1063
  interpolatePathTemplate,
1064
+ isAdmissionShadowReport,
912
1065
  isChainContractManifest,
913
1066
  isChainManifest,
914
1067
  isChainParams,
@@ -918,6 +1071,8 @@ export {
918
1071
  isNetworkBootstrap,
919
1072
  isNetworkStakeRewardsIndexManifest,
920
1073
  isOffenseReportableAt,
1074
+ isSlashIndexHead,
1075
+ isSlashIndexKeyRecord,
921
1076
  isTransactionInclusionHead,
922
1077
  isTransactionInclusionManifest,
923
1078
  manifestPath,
@@ -929,12 +1084,22 @@ export {
929
1084
  payloadPath,
930
1085
  payloadPathTemplate,
931
1086
  protocolMinAt,
1087
+ slashIndexAccusedPath,
1088
+ slashIndexAdjudicationPath,
1089
+ slashIndexChallengePath,
1090
+ slashIndexClaimantPath,
1091
+ slashIndexCommitPath,
1092
+ slashIndexHeadPath,
1093
+ slashIndexKeyPath,
1094
+ slashIndexManifestPath,
1095
+ slashIndexRequestPath,
932
1096
  toChainContractManifest,
933
1097
  toChainManifest,
934
1098
  toChainParams,
935
1099
  toIndexHead,
936
1100
  toIndexManifest,
937
1101
  toPathTemplate,
1102
+ toSlashIndexHead,
938
1103
  toTransactionInclusionHead,
939
1104
  toTransactionInclusionManifest,
940
1105
  transactionInclusionHeadPath,