@xyo-network/xl1-protocol-sdk 1.26.43 → 1.26.46

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.
Files changed (39) hide show
  1. package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts +1 -1
  2. package/dist/neutral/block/hydrate/BoundWitnessHydrator.d.ts +57 -0
  3. package/dist/neutral/block/hydrate/BoundWitnessHydrator.d.ts.map +1 -0
  4. package/dist/neutral/block/hydrate/createBlockHydrator.d.ts +6 -0
  5. package/dist/neutral/block/hydrate/createBlockHydrator.d.ts.map +1 -0
  6. package/dist/neutral/block/hydrate/createBoundWitnessHydrator.d.ts +169 -0
  7. package/dist/neutral/block/hydrate/createBoundWitnessHydrator.d.ts.map +1 -0
  8. package/dist/neutral/block/hydrate/createTransactionHydrator.d.ts +6 -0
  9. package/dist/neutral/block/hydrate/createTransactionHydrator.d.ts.map +1 -0
  10. package/dist/neutral/block/hydrate/index.d.ts +4 -0
  11. package/dist/neutral/block/hydrate/index.d.ts.map +1 -1
  12. package/dist/neutral/config/Actor.d.ts +6 -6
  13. package/dist/neutral/config/Actor.d.ts.map +1 -1
  14. package/dist/neutral/config/Actors.d.ts +1 -1
  15. package/dist/neutral/config/Base.d.ts +1 -1
  16. package/dist/neutral/config/Config.d.ts +50 -48
  17. package/dist/neutral/config/Config.d.ts.map +1 -1
  18. package/dist/neutral/config/HostActor.d.ts +6 -6
  19. package/dist/neutral/config/Log.d.ts +1 -1
  20. package/dist/neutral/context/Actor.d.ts +6 -6
  21. package/dist/neutral/context/HostActor.d.ts +6 -6
  22. package/dist/neutral/getFileConfig.d.ts +3 -2
  23. package/dist/neutral/getFileConfig.d.ts.map +1 -1
  24. package/dist/neutral/getFileConfig.mjs +16 -3
  25. package/dist/neutral/getFileConfig.mjs.map +1 -1
  26. package/dist/neutral/index.d.ts +0 -1
  27. package/dist/neutral/index.d.ts.map +1 -1
  28. package/dist/neutral/index.mjs +456 -321
  29. package/dist/neutral/index.mjs.map +1 -1
  30. package/dist/neutral/model/CreatableProviderContext.zod.d.ts +6 -6
  31. package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts +3 -1
  32. package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts.map +1 -1
  33. package/dist/neutral/test/index.mjs +20 -7
  34. package/dist/neutral/test/index.mjs.map +1 -1
  35. package/package.json +7 -7
  36. package/dist/neutral/actor/ActorV3.d.ts +0 -55
  37. package/dist/neutral/actor/ActorV3.d.ts.map +0 -1
  38. package/dist/neutral/actor/index.d.ts +0 -2
  39. package/dist/neutral/actor/index.d.ts.map +0 -1
@@ -44,9 +44,9 @@ export declare const BaseConfigContextZod: z.ZodObject<{
44
44
  }, z.core.$strip>>;
45
45
  log: z.ZodDefault<z.ZodObject<{
46
46
  logLevel: z.ZodDefault<z.ZodEnum<{
47
+ info: "info";
47
48
  error: "error";
48
49
  warn: "warn";
49
- info: "info";
50
50
  log: "log";
51
51
  debug: "debug";
52
52
  trace: "trace";
@@ -134,7 +134,7 @@ export declare const isBaseConfigContext: <T>(value: T) => value is T & {
134
134
  } | undefined;
135
135
  };
136
136
  log: {
137
- logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
137
+ logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
138
138
  silent: boolean;
139
139
  };
140
140
  providers: {
@@ -221,7 +221,7 @@ export declare const asBaseConfigContext: {
221
221
  } | undefined;
222
222
  };
223
223
  log: {
224
- logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
224
+ logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
225
225
  silent: boolean;
226
226
  };
227
227
  providers: {
@@ -306,7 +306,7 @@ export declare const asBaseConfigContext: {
306
306
  } | undefined;
307
307
  };
308
308
  log: {
309
- logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
309
+ logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
310
310
  silent: boolean;
311
311
  };
312
312
  providers: {
@@ -394,7 +394,7 @@ export declare const toBaseConfigContext: {
394
394
  } | undefined;
395
395
  };
396
396
  log: {
397
- logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
397
+ logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
398
398
  silent: boolean;
399
399
  };
400
400
  providers: {
@@ -479,7 +479,7 @@ export declare const toBaseConfigContext: {
479
479
  } | undefined;
480
480
  };
481
481
  log: {
482
- logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
482
+ logLevel: "info" | "error" | "warn" | "log" | "debug" | "trace";
483
483
  silent: boolean;
484
484
  };
485
485
  providers: {
@@ -1,7 +1,7 @@
1
1
  import { type Hash } from '@xylabs/sdk-js';
2
2
  import type { ArchivistInstance } from '@xyo-network/sdk-js';
3
3
  import { Payload } from '@xyo-network/sdk-js';
4
- import { BlockValidationViewer, ChainContractViewer, FinalizationViewer, MempoolPruneOptions, MempoolRunner, type MempoolViewer, type SignedHydratedBlock, type SignedHydratedTransaction, TransactionValidationViewer } from '@xyo-network/xl1-protocol-lib';
4
+ import { BlockValidationViewer, ChainContractViewer, DeadLetterQueueRunner, FinalizationViewer, MempoolPruneOptions, MempoolRunner, type MempoolViewer, type SignedHydratedBlock, type SignedHydratedTransaction, TransactionValidationViewer } from '@xyo-network/xl1-protocol-lib';
5
5
  import { AbstractCreatableProvider, CreatableProviderParams } from '../../CreatableProvider/index.ts';
6
6
  /** Parameters for SimpleMempoolRunner. */
7
7
  export interface SimpleMempoolRunnerParams extends CreatableProviderParams {
@@ -20,6 +20,7 @@ export declare class SimpleMempoolRunner extends AbstractCreatableProvider<Simpl
20
20
  moniker: "MempoolRunner";
21
21
  protected _blockValidationViewer: BlockValidationViewer;
22
22
  protected _chainContractViewer: ChainContractViewer;
23
+ protected _deadLetterQueueRunner?: DeadLetterQueueRunner;
23
24
  protected _finalizationViewer: FinalizationViewer;
24
25
  protected _transactionValidationViewer: TransactionValidationViewer;
25
26
  private _syncMutex;
@@ -42,6 +43,7 @@ export declare class SimpleMempoolRunner extends AbstractCreatableProvider<Simpl
42
43
  submitTransactions(transactions: SignedHydratedTransaction[]): Promise<Hash[]>;
43
44
  protected startHandler(): Promise<void>;
44
45
  protected stopHandler(): Promise<void>;
46
+ private routeRejectedTransaction;
45
47
  private simpleBlockValidationCheck;
46
48
  private simpleTransactionValidationCheck;
47
49
  private syncBlocksFrom;
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleMempoolRunner.d.ts","sourceRoot":"","sources":["../../../../src/simple/mempool/SimpleMempoolRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EACa,KAAK,IAAI,EAC5B,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EACY,OAAO,EAGzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,qBAAqB,EAErB,mBAAmB,EAGnB,kBAAkB,EAE0D,mBAAmB,EAAE,aAAa,EACxF,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAmC,KAAK,yBAAyB,EAEnI,2BAA2B,EAE5B,MAAM,+BAA+B,CAAA;AAItC,OAAO,EACL,yBAAyB,EAAqB,uBAAuB,EACtE,MAAM,kCAAkC,CAAA;AAUzC,0CAA0C;AAC1C,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;IACxE,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAA;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sBAAsB,EAAE,iBAAiB,CAAA;IACzC,4BAA4B,EAAE,iBAAiB,CAAA;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,0CAA0C;AAC1C,qBACa,mBAAoB,SAAQ,yBAAyB,CAAC,yBAAyB,CAAE,YAAW,aAAa;IACpH,MAAM,CAAC,QAAQ,CAAC,cAAc,kBAAuB;IACrD,MAAM,CAAC,QAAQ,CAAC,YAAY,6GAA4H;IAC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AI,OAAO,CAAC,IAAI,CAAC;cAU7B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;YAQvC,wBAAwB;YAexB,0BAA0B;YA0B1B,gCAAgC;YAsChC,cAAc;YASd,gBAAgB;YAchB,oBAAoB;CAQnC"}
@@ -1277,9 +1277,14 @@ var ActorConfigZod = BaseConfigZod.extend({
1277
1277
  title: "accountPath",
1278
1278
  type: "string"
1279
1279
  }),
1280
+ /**
1281
+ * @deprecated Use the top-level `healthCheckPort` on `ConfigZod` instead.
1282
+ * The system-wide health server covers all actors in a single process; per-actor
1283
+ * health ports will be removed in a future major release.
1284
+ */
1280
1285
  healthCheckPort: z16.coerce.number().optional().register(globalRegistry12, {
1281
- description: "Port for the Producer health checks",
1282
- title: "producer.healthCheckPort",
1286
+ description: "[DEPRECATED \u2014 use top-level healthCheckPort] Per-actor health server port.",
1287
+ title: "actor.healthCheckPort",
1283
1288
  type: "number"
1284
1289
  })
1285
1290
  });
@@ -1292,7 +1297,15 @@ import z17 from "zod";
1292
1297
  var ActorsConfigZod = z17.array(ActorConfigZod.loose()).describe("Actor-specific configurations that override the base configuration when the actor is running").default([]);
1293
1298
 
1294
1299
  // src/config/Config.ts
1295
- var ConfigZod = BaseConfigZod.extend({ actors: ActorsConfigZod }).describe("The complete configuration for the protocol, including global settings and actor-specific overrides");
1300
+ import { globalRegistry as globalRegistry13, z as z18 } from "zod";
1301
+ var ConfigZod = BaseConfigZod.extend({
1302
+ actors: ActorsConfigZod,
1303
+ healthCheckPort: z18.coerce.number().optional().register(globalRegistry13, {
1304
+ description: "Port for the system-wide health, readiness, and liveness endpoints (/healthz, /livez, /readyz). Set to 0 to disable.",
1305
+ title: "healthCheckPort",
1306
+ type: "number"
1307
+ })
1308
+ }).describe("The complete configuration for the protocol, including global settings and actor-specific overrides");
1296
1309
 
1297
1310
  // src/simple/block/SimpleBlockViewer.ts
1298
1311
  import {
@@ -1702,7 +1715,7 @@ SimpleFinalizationViewer = __decorateClass([
1702
1715
  ], SimpleFinalizationViewer);
1703
1716
 
1704
1717
  // src/test/buildRandomChain.ts
1705
- import { asAddress as asAddress3, assertEx as assertEx16 } from "@xylabs/sdk-js";
1718
+ import { asAddress as asAddress2, assertEx as assertEx16 } from "@xylabs/sdk-js";
1706
1719
  import {
1707
1720
  Account as Account3,
1708
1721
  asSchema as asSchema2,
@@ -1869,7 +1882,7 @@ async function buildNextBlock(previousBlock, txs, blockPayloads, signers, chainS
1869
1882
  }
1870
1883
 
1871
1884
  // src/test/buildRandomGenesisBlock.ts
1872
- import { asAddress as asAddress2, assertEx as assertEx15 } from "@xylabs/sdk-js";
1885
+ import { asAddress, assertEx as assertEx15 } from "@xylabs/sdk-js";
1873
1886
  import {
1874
1887
  Account as Account2,
1875
1888
  asAnyPayload as asAnyPayload4,
@@ -1896,7 +1909,7 @@ async function buildGenesisBlock(chainId, txs, blockPayloads, signers, chainStep
1896
1909
  }
1897
1910
 
1898
1911
  // src/test/buildRandomGenesisBlock.ts
1899
- var TestChainId = assertEx15(asAddress2("c5fe2e6F6841Cbab12d8C0618Be2DF8C6156cC44"));
1912
+ var TestChainId = assertEx15(asAddress("c5fe2e6F6841Cbab12d8C0618Be2DF8C6156cC44"));
1900
1913
 
1901
1914
  // src/test/createGenesisBlock.ts
1902
1915
  import { PayloadBuilder as PayloadBuilder8 } from "@xyo-network/sdk-js";
@@ -1949,7 +1962,7 @@ var createGenesisBlock = async (initialBlockProducer, nextContractAddress, genes
1949
1962
  };
1950
1963
 
1951
1964
  // src/test/buildRandomChain.ts
1952
- var TestGenesisBlockRewardAddress = assertEx16(asAddress3("fa7f0bb865a4bfff3d5e2c726d3e063297014da9"));
1965
+ var TestGenesisBlockRewardAddress = assertEx16(asAddress2("fa7f0bb865a4bfff3d5e2c726d3e063297014da9"));
1953
1966
  var buildRandomChain = async (blockProducer, count = 10, previousBlock, chainId, transactionAccount, receiverAddresses) => {
1954
1967
  const chainIdToUse = chainId ?? TestChainId;
1955
1968
  const blocks = [];