@xyo-network/xl1-protocol-sdk 1.26.34 → 1.26.36

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.
@@ -699,36 +699,15 @@ import {
699
699
  zodIsFactory as zodIsFactory2,
700
700
  zodToFactory as zodToFactory2
701
701
  } from "@xylabs/sdk-js";
702
- import { globalRegistry as globalRegistry12, z as z18 } from "zod";
703
-
704
- // src/validation/lib/isLocalhost.ts
705
- var isLocalhost = (hostname) => {
706
- return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
707
- };
708
-
709
- // src/validation/lib/getUrl.ts
710
- var getUrl = (host, port) => {
711
- const scheme = isLocalhost(host) ? "http" : "https";
712
- return `${scheme}://${host}:${port}`;
713
- };
714
-
715
- // src/validation/schema/Address.ts
716
- var TODO = true;
717
-
718
- // src/validation/schema/Mnemonic.ts
719
- import { z as z2 } from "zod";
720
- var MnemonicStringZod = z2.string().transform((s) => s.trim().replaceAll(/\s+/g, " ")).refine(
721
- (s) => [12, 15, 18, 21, 24].includes(s.split(" ").length),
722
- { message: "Mnemonic must contain 12, 15, 18, 21, or 24 words." }
723
- ).describe("BIP-39 mnemonic string");
702
+ import { globalRegistry as globalRegistry12, z as z17 } from "zod";
724
703
 
725
704
  // src/config/Base.ts
726
- import { z as z17 } from "zod";
705
+ import { z as z16 } from "zod";
727
706
 
728
707
  // src/config/Chain.ts
729
708
  import { AddressZod, HexZod } from "@xylabs/sdk-js";
730
- import { globalRegistry, z as z3 } from "zod";
731
- var ChainConfigZod = z3.object({
709
+ import { globalRegistry, z as z2 } from "zod";
710
+ var ChainConfigZod = z2.object({
732
711
  id: HexZod.optional().register(globalRegistry, {
733
712
  description: "The unique identifier for the chain. Should be the staking contract address for contract-backed chains.",
734
713
  title: "chain.id",
@@ -742,15 +721,15 @@ var ChainConfigZod = z3.object({
742
721
  });
743
722
 
744
723
  // src/config/DataLake/DataLake.ts
745
- import { z as z7 } from "zod";
724
+ import { z as z6 } from "zod";
746
725
 
747
726
  // src/config/DataLake/RestDataLakeConfig.ts
748
- import { globalRegistry as globalRegistry3, z as z5 } from "zod";
727
+ import { globalRegistry as globalRegistry3, z as z4 } from "zod";
749
728
 
750
729
  // src/config/DataLake/DataLakeRemoteConfig.ts
751
- import { globalRegistry as globalRegistry2, z as z4 } from "zod";
752
- var DataLakeDriverConfigBaseZod = z4.object({
753
- driver: z4.string().register(globalRegistry2, {
730
+ import { globalRegistry as globalRegistry2, z as z3 } from "zod";
731
+ var DataLakeDriverConfigBaseZod = z3.object({
732
+ driver: z3.string().register(globalRegistry2, {
754
733
  description: "Driver for the data lake",
755
734
  type: "string"
756
735
  })
@@ -758,55 +737,55 @@ var DataLakeDriverConfigBaseZod = z4.object({
758
737
 
759
738
  // src/config/DataLake/RestDataLakeConfig.ts
760
739
  var RestDataLakeConfigZod = DataLakeDriverConfigBaseZod.extend({
761
- driver: z5.literal("rest").register(globalRegistry3, {
740
+ driver: z4.literal("rest").register(globalRegistry3, {
762
741
  description: "Driver for the REST data lake",
763
742
  type: "string"
764
743
  }),
765
- url: z5.string().register(globalRegistry3, {
744
+ url: z4.string().register(globalRegistry3, {
766
745
  description: "URL for the REST data lake",
767
746
  type: "string"
768
747
  })
769
748
  }).describe("Configuration for the REST data lake driver");
770
749
 
771
750
  // src/config/DataLake/RouterDataLakeConfig.ts
772
- import { globalRegistry as globalRegistry4, z as z6 } from "zod";
773
- var RouterDataLakeConfigZod = z6.object({
774
- driver: z6.literal("router").register(globalRegistry4, {
751
+ import { globalRegistry as globalRegistry4, z as z5 } from "zod";
752
+ var RouterDataLakeConfigZod = z5.object({
753
+ driver: z5.literal("router").register(globalRegistry4, {
775
754
  description: "Driver for the router data lake",
776
755
  type: "string"
777
756
  }),
778
- children: z6.array(z6.lazy(() => DataLakeConfigZod)).register(globalRegistry4, {
757
+ children: z5.array(z5.lazy(() => DataLakeConfigZod)).register(globalRegistry4, {
779
758
  description: "Child data lake drivers",
780
759
  type: "array"
781
760
  })
782
761
  }).describe("Configuration for the router data lake driver");
783
762
 
784
763
  // src/config/DataLake/DataLake.ts
785
- var DataLakeConfigZod = z7.lazy(() => z7.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
764
+ var DataLakeConfigZod = z6.lazy(() => z6.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
786
765
 
787
766
  // src/config/Evm.ts
788
- import { globalRegistry as globalRegistry5, z as z8 } from "zod";
789
- var EvmInfuraConfigZod = z8.object({
790
- projectId: z8.string().optional().register(globalRegistry5, {
767
+ import { globalRegistry as globalRegistry5, z as z7 } from "zod";
768
+ var EvmInfuraConfigZod = z7.object({
769
+ projectId: z7.string().optional().register(globalRegistry5, {
791
770
  description: "Infura project ID",
792
771
  title: "evm.infura.projectId",
793
772
  type: "string"
794
773
  }),
795
- projectSecret: z8.string().optional().register(globalRegistry5, {
774
+ projectSecret: z7.string().optional().register(globalRegistry5, {
796
775
  description: "Infura project secret",
797
776
  title: "evm.infura.projectSecret",
798
777
  type: "string"
799
778
  })
800
779
  });
801
- var EvmJsonRpcConfigZod = z8.object({
802
- url: z8.url().optional().register(globalRegistry5, {
780
+ var EvmJsonRpcConfigZod = z7.object({
781
+ url: z7.url().optional().register(globalRegistry5, {
803
782
  description: "JSON-RPC URL",
804
783
  title: "evm.jsonRpc.url",
805
784
  type: "string"
806
785
  })
807
786
  });
808
- var EvmConfigZod = z8.object({
809
- chainId: z8.string().optional().register(globalRegistry5, {
787
+ var EvmConfigZod = z7.object({
788
+ chainId: z7.string().optional().register(globalRegistry5, {
810
789
  description: "EVM chain ID",
811
790
  title: "evm.chainId",
812
791
  type: "string"
@@ -817,17 +796,17 @@ var EvmConfigZod = z8.object({
817
796
 
818
797
  // src/config/Log.ts
819
798
  import { LogLevel } from "@xylabs/sdk-js";
820
- import { globalRegistry as globalRegistry6, z as z9 } from "zod";
799
+ import { globalRegistry as globalRegistry6, z as z8 } from "zod";
821
800
  var LogLevelNames = Object.keys(LogLevel);
822
- var LogConfigZod = z9.object({
823
- logLevel: z9.enum(LogLevelNames).default("info").register(globalRegistry6, {
801
+ var LogConfigZod = z8.object({
802
+ logLevel: z8.enum(LogLevelNames).default("info").register(globalRegistry6, {
824
803
  choices: LogLevelNames,
825
804
  default: "info",
826
805
  description: "Desired process verbosity",
827
806
  title: "logLevel",
828
807
  type: "string"
829
808
  }),
830
- silent: z9.boolean().default(false).register(globalRegistry6, {
809
+ silent: z8.boolean().default(false).register(globalRegistry6, {
831
810
  default: false,
832
811
  description: "Whether to run in silent mode",
833
812
  title: "silent",
@@ -836,7 +815,7 @@ var LogConfigZod = z9.object({
836
815
  });
837
816
 
838
817
  // src/config/Providers.ts
839
- import z11 from "zod";
818
+ import z10 from "zod";
840
819
 
841
820
  // src/config/Provider.ts
842
821
  import {
@@ -844,83 +823,83 @@ import {
844
823
  zodIsFactory,
845
824
  zodToFactory
846
825
  } from "@xylabs/sdk-js";
847
- import { z as z10 } from "zod";
848
- var ProviderConfigZod = z10.object({
849
- moniker: z10.string(),
850
- labels: z10.array(z10.string()).optional()
826
+ import { z as z9 } from "zod";
827
+ var ProviderConfigZod = z9.object({
828
+ moniker: z9.string(),
829
+ labels: z9.array(z9.string()).optional()
851
830
  }).describe("Configuration for a Provider");
852
831
  var isProviderConfig = zodIsFactory(ProviderConfigZod);
853
832
  var asProviderConfig = zodAsFactory(ProviderConfigZod, "asProviderConfig");
854
833
  var toProviderConfig = zodToFactory(ProviderConfigZod, "toProviderConfig");
855
834
 
856
835
  // src/config/Providers.ts
857
- var ProvidersConfigZod = z11.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
836
+ var ProvidersConfigZod = z10.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
858
837
 
859
838
  // src/config/Remote.ts
860
- import { globalRegistry as globalRegistry7, z as z12 } from "zod";
861
- var RpcRemoteConfigBaseZod = z12.object({
862
- protocol: z12.string("http").register(globalRegistry7, {
839
+ import { globalRegistry as globalRegistry7, z as z11 } from "zod";
840
+ var RpcRemoteConfigBaseZod = z11.object({
841
+ protocol: z11.string("http").register(globalRegistry7, {
863
842
  description: "Protocol for the RPC connection",
864
843
  type: "string"
865
844
  })
866
845
  }).describe("Base configuration for the remote RPC");
867
846
  var HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
868
- protocol: z12.string("http").register(globalRegistry7, {
847
+ protocol: z11.string("http").register(globalRegistry7, {
869
848
  description: "Protocol for the RPC connection",
870
849
  type: "string"
871
850
  }).default("http"),
872
- url: z12.string().register(globalRegistry7, {
851
+ url: z11.string().register(globalRegistry7, {
873
852
  description: "URL for the Chain RPC API",
874
853
  type: "string"
875
854
  })
876
855
  }).describe("Configuration for the remote RPC using Http");
877
856
  var PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
878
- protocol: z12.string().register(globalRegistry7, {
857
+ protocol: z11.string().register(globalRegistry7, {
879
858
  description: "Protocol for the RPC connection",
880
859
  type: "string"
881
860
  }).default("postMessage"),
882
- networkId: z12.string().register(globalRegistry7, {
861
+ networkId: z11.string().register(globalRegistry7, {
883
862
  description: "Network ID to use for the postMessage RPC connection",
884
863
  type: "string"
885
864
  }),
886
- sessionId: z12.string().register(globalRegistry7, {
865
+ sessionId: z11.string().register(globalRegistry7, {
887
866
  description: "Session ID to use for the postMessage RPC connection",
888
867
  type: "string"
889
868
  })
890
869
  }).describe("Configuration for the remote RPC using postMessage");
891
- var RpcRemoteConfigZod = z12.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
892
- var RemoteConfigZod = z12.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
870
+ var RpcRemoteConfigZod = z11.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
871
+ var RemoteConfigZod = z11.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
893
872
 
894
873
  // src/config/storage/driver/Mongo.ts
895
874
  import { isDefined as isDefined4, isUndefined as isUndefined2 } from "@xylabs/sdk-js";
896
- import { globalRegistry as globalRegistry8, z as z13 } from "zod";
875
+ import { globalRegistry as globalRegistry8, z as z12 } from "zod";
897
876
  var hasMongoConfig = (config) => {
898
877
  if (isUndefined2(config)) return false;
899
878
  return isDefined4(config.connectionString) && isDefined4(config.database) && isDefined4(config.domain) && isDefined4(config.password) && isDefined4(config.username);
900
879
  };
901
- var MongoConfigZod = z13.object({
880
+ var MongoConfigZod = z12.object({
902
881
  // TODO: Create from other arguments
903
- connectionString: z13.string().nonempty().optional().register(globalRegistry8, {
882
+ connectionString: z12.string().nonempty().optional().register(globalRegistry8, {
904
883
  description: "MongoDB connection string",
905
884
  title: "storage.mongo.connectionString",
906
885
  type: "string"
907
886
  }),
908
- database: z13.string().nonempty().optional().register(globalRegistry8, {
887
+ database: z12.string().nonempty().optional().register(globalRegistry8, {
909
888
  description: "MongoDB database name",
910
889
  title: "storage.mongo.database",
911
890
  type: "string"
912
891
  }),
913
- domain: z13.string().nonempty().optional().register(globalRegistry8, {
892
+ domain: z12.string().nonempty().optional().register(globalRegistry8, {
914
893
  description: "MongoDB domain",
915
894
  title: "storage.mongo.domain",
916
895
  type: "string"
917
896
  }),
918
- password: z13.string().nonempty().optional().register(globalRegistry8, {
897
+ password: z12.string().nonempty().optional().register(globalRegistry8, {
919
898
  description: "MongoDB password",
920
899
  title: "storage.mongo.password",
921
900
  type: "string"
922
901
  }),
923
- username: z13.string().nonempty().optional().register(globalRegistry8, {
902
+ username: z12.string().nonempty().optional().register(globalRegistry8, {
924
903
  description: "MongoDB username",
925
904
  title: "storage.mongo.username",
926
905
  type: "string"
@@ -928,10 +907,10 @@ var MongoConfigZod = z13.object({
928
907
  });
929
908
 
930
909
  // src/config/storage/Storage.ts
931
- import { globalRegistry as globalRegistry9, z as z14 } from "zod";
932
- var StorageConfigZod = z14.object({
910
+ import { globalRegistry as globalRegistry9, z as z13 } from "zod";
911
+ var StorageConfigZod = z13.object({
933
912
  mongo: MongoConfigZod.optional().describe("Configuration for the MongoD storage driver"),
934
- root: z14.string().optional().register(globalRegistry9, {
913
+ root: z13.string().optional().register(globalRegistry9, {
935
914
  description: "Root directory for local storage",
936
915
  title: "storage.root",
937
916
  type: "string"
@@ -939,7 +918,7 @@ var StorageConfigZod = z14.object({
939
918
  }).describe("Storage configuration options");
940
919
 
941
920
  // src/config/Telemetry.ts
942
- import { globalRegistry as globalRegistry10, z as z15 } from "zod";
921
+ import { globalRegistry as globalRegistry10, z as z14 } from "zod";
943
922
  var DefaultMetricsScrapePorts = {
944
923
  api: 9465,
945
924
  bridge: 9468,
@@ -947,29 +926,29 @@ var DefaultMetricsScrapePorts = {
947
926
  producer: 9464,
948
927
  rewardRedemptionApi: 9467
949
928
  };
950
- var MetricsScrapeConfigZod = z15.object({
951
- path: z15.string().default("/metrics").register(globalRegistry10, {
929
+ var MetricsScrapeConfigZod = z14.object({
930
+ path: z14.string().default("/metrics").register(globalRegistry10, {
952
931
  default: "/metrics",
953
932
  description: "Path for the metrics scrape endpoint",
954
933
  title: "telemetry.metrics.scrape.path",
955
934
  type: "string"
956
935
  }),
957
- port: z15.coerce.number().int().positive().optional().register(globalRegistry10, {
936
+ port: z14.coerce.number().int().positive().optional().register(globalRegistry10, {
958
937
  description: "Port for the metrics scrape endpoint",
959
938
  title: "telemetry.metrics.scrape.port",
960
939
  type: "number"
961
940
  })
962
941
  }).describe("Metrics scrape configuration");
963
- var MetricsConfigZod = z15.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
964
- var OpenTelemetryConfigZod = z15.object({
942
+ var MetricsConfigZod = z14.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
943
+ var OpenTelemetryConfigZod = z14.object({
965
944
  // OpenTelemetry options
966
- otlpEndpoint: z15.url().optional().register(globalRegistry10, {
945
+ otlpEndpoint: z14.url().optional().register(globalRegistry10, {
967
946
  description: "OTLP endpoint for exporting telemetry data",
968
947
  title: "telemetry.otel.otlpEndpoint",
969
948
  type: "string"
970
949
  })
971
950
  });
972
- var TelemetryConfigZod = z15.object({
951
+ var TelemetryConfigZod = z14.object({
973
952
  // Metrics configuration
974
953
  metrics: MetricsConfigZod.optional().describe("Metrics configuration"),
975
954
  // OpenTelemetry configuration
@@ -978,7 +957,7 @@ var TelemetryConfigZod = z15.object({
978
957
 
979
958
  // src/config/Validation.ts
980
959
  import { AddressZod as AddressZod2, asAddress } from "@xylabs/sdk-js";
981
- import { globalRegistry as globalRegistry11, z as z16 } from "zod";
960
+ import { globalRegistry as globalRegistry11, z as z15 } from "zod";
982
961
 
983
962
  // src/primitives/block/range/blockRangeSteps.ts
984
963
  import { asXL1BlockNumber as asXL1BlockNumber2, StepSizes as StepSizes3 } from "@xyo-network/xl1-protocol-lib";
@@ -1911,34 +1890,34 @@ function findUncles(context, finalizedWindowedChain, blocks) {
1911
1890
  }
1912
1891
 
1913
1892
  // src/config/Validation.ts
1914
- var ValidationConfigZod = z16.object({
1915
- allowedRewardRedeemers: z16.preprocess((val) => {
1893
+ var ValidationConfigZod = z15.object({
1894
+ allowedRewardRedeemers: z15.preprocess((val) => {
1916
1895
  if (typeof val === "string") {
1917
1896
  return val.split(",").map((s) => asAddress(s.trim()));
1918
1897
  }
1919
1898
  return val;
1920
- }, z16.array(AddressZod2).optional().register(globalRegistry11, {
1899
+ }, z15.array(AddressZod2).optional().register(globalRegistry11, {
1921
1900
  description: "List of allowed reward redeemer addresses, if undefined anyone can participate",
1922
1901
  title: "allowedRewardRedeemers",
1923
1902
  type: "array"
1924
1903
  })),
1925
- allowedRewardEscrowAccountSigners: z16.preprocess((val) => {
1904
+ allowedRewardEscrowAccountSigners: z15.preprocess((val) => {
1926
1905
  if (typeof val === "string") {
1927
1906
  return val.split(",").map((s) => asAddress(s.trim()));
1928
1907
  }
1929
1908
  return val;
1930
- }, z16.array(AddressZod2).optional().register(globalRegistry11, {
1909
+ }, z15.array(AddressZod2).optional().register(globalRegistry11, {
1931
1910
  description: "List of allowed reward escrow account signer addresses, if undefined anyone can participate",
1932
1911
  title: "allowedRewardEscrowAccountSigners",
1933
1912
  type: "array"
1934
1913
  })),
1935
- minCandidates: z16.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry11, {
1914
+ minCandidates: z15.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry11, {
1936
1915
  default: DEFAULT_MIN_CANDIDATES,
1937
1916
  description: "Minimum number of uncle candidates before selecting the best uncle",
1938
1917
  title: "validation.minCandidates",
1939
1918
  type: "number"
1940
1919
  }),
1941
- backoffMs: z16.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry11, {
1920
+ backoffMs: z15.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry11, {
1942
1921
  default: DEFAULT_BACKOFF_MS,
1943
1922
  description: "Back-off timeout in ms. If head age exceeds this, minCandidates is ignored",
1944
1923
  title: "validation.backoffMs",
@@ -1947,7 +1926,7 @@ var ValidationConfigZod = z16.object({
1947
1926
  });
1948
1927
 
1949
1928
  // src/config/Base.ts
1950
- var BaseConfigZod = z17.object({
1929
+ var BaseConfigZod = z16.object({
1951
1930
  chain: ChainConfigZod.default(ChainConfigZod.parse({})).describe("Configuration for the chain"),
1952
1931
  dataLake: DataLakeConfigZod.optional().describe("Configuration for data lakes"),
1953
1932
  evm: EvmConfigZod.default(EvmConfigZod.parse({})).describe("Configuration for EVM-backed services"),
@@ -1960,14 +1939,18 @@ var BaseConfigZod = z17.object({
1960
1939
  });
1961
1940
 
1962
1941
  // src/config/Actor.ts
1942
+ var AccountPathZod = z17.string().regex(
1943
+ /^(m(\/\d+'?)+|\d+'?(\/\d+'?)*)$/,
1944
+ `Invalid BIP-32 derivation path. Use either an absolute path like "m/44'/60'/0'/0/0" or a relative path like "0", "0/1", or "44'/60'/0'/0/0".`
1945
+ );
1963
1946
  var ActorConfigZod = BaseConfigZod.extend({
1964
- name: z18.string(),
1965
- mnemonic: MnemonicStringZod.optional().register(globalRegistry12, {
1966
- description: "Mnemonic for the Actor wallet",
1967
- title: "mnemonic",
1947
+ name: z17.string(),
1948
+ accountPath: AccountPathZod.optional().register(globalRegistry12, {
1949
+ description: 'BIP-32 derivation path for the actor wallet. Absolute when it starts with "m/"; otherwise relative to the root wallet base path. Each actor must derive to a distinct path.',
1950
+ title: "accountPath",
1968
1951
  type: "string"
1969
1952
  }),
1970
- healthCheckPort: z18.coerce.number().optional().register(globalRegistry12, {
1953
+ healthCheckPort: z17.coerce.number().optional().register(globalRegistry12, {
1971
1954
  description: "Port for the Producer health checks",
1972
1955
  title: "producer.healthCheckPort",
1973
1956
  type: "number"
@@ -1978,8 +1961,8 @@ var asActorConfig = zodAsFactory2(ActorConfigZod, "asActorConfig");
1978
1961
  var toActorConfig = zodToFactory2(ActorConfigZod, "toActorConfig");
1979
1962
 
1980
1963
  // src/config/Actors.ts
1981
- import z19 from "zod";
1982
- var ActorsConfigZod = z19.array(ActorConfigZod.loose()).describe("Actor-specific configurations that override the base configuration when the actor is running").default([]);
1964
+ import z18 from "zod";
1965
+ var ActorsConfigZod = z18.array(ActorConfigZod.loose()).describe("Actor-specific configurations that override the base configuration when the actor is running").default([]);
1983
1966
 
1984
1967
  // src/config/Config.ts
1985
1968
  var ConfigZod = BaseConfigZod.extend({ actors: ActorsConfigZod }).describe("The complete configuration for the protocol, including global settings and actor-specific overrides");
@@ -1998,15 +1981,15 @@ import {
1998
1981
  zodIsFactory as zodIsFactory3,
1999
1982
  zodToFactory as zodToFactory3
2000
1983
  } from "@xylabs/sdk-js";
2001
- import { globalRegistry as globalRegistry13, z as z20 } from "zod";
1984
+ import { globalRegistry as globalRegistry13, z as z19 } from "zod";
2002
1985
  var HostActorConfigZod = ActorConfigZod.extend({
2003
- host: z20.string().default("localhost").register(globalRegistry13, {
1986
+ host: z19.string().default("localhost").register(globalRegistry13, {
2004
1987
  default: "localhost",
2005
1988
  description: "Host for the Actor",
2006
1989
  title: "host",
2007
1990
  type: "string"
2008
1991
  }),
2009
- port: z20.coerce.number().default(8080).register(globalRegistry13, {
1992
+ port: z19.coerce.number().default(8080).register(globalRegistry13, {
2010
1993
  default: 8080,
2011
1994
  description: "Port for the Actor",
2012
1995
  title: "port",
@@ -2018,30 +2001,30 @@ var asHostActorConfig = zodAsFactory3(HostActorConfigZod, "asHostActorConfig");
2018
2001
  var toHostActorConfig = zodToFactory3(HostActorConfigZod, "toHostActorConfig");
2019
2002
 
2020
2003
  // src/config/UsageMeta.ts
2021
- import { z as z21 } from "zod";
2022
- var DescriptionSchema = z21.string();
2023
- var TitleSchema = z21.string();
2024
- var JSONSchemaMetaSchema = z21.object({
2025
- id: z21.string().optional(),
2004
+ import { z as z20 } from "zod";
2005
+ var DescriptionSchema = z20.string();
2006
+ var TitleSchema = z20.string();
2007
+ var JSONSchemaMetaSchema = z20.object({
2008
+ id: z20.string().optional(),
2026
2009
  title: TitleSchema.optional(),
2027
2010
  description: DescriptionSchema.optional(),
2028
- deprecated: z21.boolean().optional()
2029
- }).catchall(z21.unknown());
2011
+ deprecated: z20.boolean().optional()
2012
+ }).catchall(z20.unknown());
2030
2013
  var GlobalMetaSchema = JSONSchemaMetaSchema.extend({});
2031
- var ChoicesSchema = z21.array(z21.union([z21.string(), z21.number(), z21.literal(true), z21.undefined()])).readonly();
2014
+ var ChoicesSchema = z20.array(z20.union([z20.string(), z20.number(), z20.literal(true), z20.undefined()])).readonly();
2032
2015
  var UsageMetaSchema = GlobalMetaSchema.extend({
2033
2016
  choices: ChoicesSchema.optional(),
2034
- default: z21.unknown().optional(),
2017
+ default: z20.unknown().optional(),
2035
2018
  description: DescriptionSchema,
2036
- group: z21.string().optional(),
2037
- hidden: z21.boolean().optional(),
2019
+ group: z20.string().optional(),
2020
+ hidden: z20.boolean().optional(),
2038
2021
  title: TitleSchema,
2039
- type: z21.union([
2040
- z21.literal("array"),
2041
- z21.literal("count"),
2042
- z21.literal("boolean"),
2043
- z21.literal("number"),
2044
- z21.literal("string")
2022
+ type: z20.union([
2023
+ z20.literal("array"),
2024
+ z20.literal("count"),
2025
+ z20.literal("boolean"),
2026
+ z20.literal("number"),
2027
+ z20.literal("string")
2045
2028
  ])
2046
2029
  });
2047
2030
  function isUsageMeta(v) {
@@ -2062,15 +2045,15 @@ import {
2062
2045
  zodToFactory as zodToFactory4
2063
2046
  } from "@xylabs/sdk-js";
2064
2047
  import { CachingContextZod } from "@xyo-network/xl1-protocol-lib";
2065
- import { z as z22 } from "zod";
2066
- var RuntimeStatusMonitorZod = z22.custom((val) => val && typeof val === "object");
2067
- var ProviderFactoryLocatorZod = z22.lazy(() => z22.custom((val) => val && typeof val === "object" && "context" in val && "registry" in val));
2048
+ import { z as z21 } from "zod";
2049
+ var RuntimeStatusMonitorZod = z21.custom((val) => val && typeof val === "object");
2050
+ var ProviderFactoryLocatorZod = z21.lazy(() => z21.custom((val) => val && typeof val === "object" && "context" in val && "registry" in val));
2068
2051
  var BaseConfigContextZod = CachingContextZod.extend({
2069
2052
  config: BaseConfigZod.loose(),
2070
2053
  locator: ProviderFactoryLocatorZod.optional()
2071
2054
  });
2072
- var CreatableProviderContextZod = z22.lazy(() => BaseConfigContextZod.extend({
2073
- _id: z22.string().optional(),
2055
+ var CreatableProviderContextZod = z21.lazy(() => BaseConfigContextZod.extend({
2056
+ _id: z21.string().optional(),
2074
2057
  locator: ProviderFactoryLocatorZod,
2075
2058
  statusReporter: RuntimeStatusMonitorZod.optional()
2076
2059
  }));
@@ -2942,26 +2925,26 @@ import {
2942
2925
  asSchema as asSchema2,
2943
2926
  isPayloadOfZodType
2944
2927
  } from "@xyo-network/sdk-js";
2945
- import { z as z24 } from "zod";
2928
+ import { z as z23 } from "zod";
2946
2929
 
2947
2930
  // src/eip-712/Types.ts
2948
- import { z as z23 } from "zod";
2949
- var TypedDataDomainZod = z23.object({
2950
- name: z23.string().nullable().optional(),
2951
- version: z23.string().nullable().optional(),
2952
- chainId: z23.union([z23.string(), z23.number(), z23.bigint()]).nullable().optional(),
2953
- verifyingContract: z23.string().nullable().optional(),
2954
- salt: z23.union([z23.string(), z23.instanceof(Uint8Array)]).nullable().optional()
2931
+ import { z as z22 } from "zod";
2932
+ var TypedDataDomainZod = z22.object({
2933
+ name: z22.string().nullable().optional(),
2934
+ version: z22.string().nullable().optional(),
2935
+ chainId: z22.union([z22.string(), z22.number(), z22.bigint()]).nullable().optional(),
2936
+ verifyingContract: z22.string().nullable().optional(),
2937
+ salt: z22.union([z22.string(), z22.instanceof(Uint8Array)]).nullable().optional()
2955
2938
  });
2956
- var TypedDataFieldZod = z23.object({
2957
- name: z23.string(),
2958
- type: z23.string()
2939
+ var TypedDataFieldZod = z22.object({
2940
+ name: z22.string(),
2941
+ type: z22.string()
2959
2942
  });
2960
- var TypedDataTypesZod = z23.record(z23.string(), z23.array(TypedDataFieldZod));
2961
- var TypedDataValueZod = z23.record(z23.string(), z23.any());
2943
+ var TypedDataTypesZod = z22.record(z22.string(), z22.array(TypedDataFieldZod));
2944
+ var TypedDataValueZod = z22.record(z22.string(), z22.any());
2962
2945
 
2963
2946
  // src/eip-712/Payloads/EIP712Data.ts
2964
- var EIP712DataPayloadFieldsZod = z24.object({
2947
+ var EIP712DataPayloadFieldsZod = z23.object({
2965
2948
  domain: TypedDataDomainZod,
2966
2949
  types: TypedDataTypesZod,
2967
2950
  values: TypedDataValueZod
@@ -2979,11 +2962,11 @@ import {
2979
2962
  asSchema as asSchema3,
2980
2963
  isPayloadOfZodType as isPayloadOfZodType2
2981
2964
  } from "@xyo-network/sdk-js";
2982
- import { z as z25 } from "zod";
2983
- var EIP712SignaturePayloadFieldsZod = z25.object({
2984
- address: z25.string(),
2965
+ import { z as z24 } from "zod";
2966
+ var EIP712SignaturePayloadFieldsZod = z24.object({
2967
+ address: z24.string(),
2985
2968
  hash: HashZod,
2986
- signature: z25.string()
2969
+ signature: z24.string()
2987
2970
  });
2988
2971
  var EIP712SignaturePayloadSchema = asSchema3("network.xyo.chains.ethereum.eip712.signature", true);
2989
2972
  var isEIP712SignaturePayload = isPayloadOfZodType2(
@@ -3722,12 +3705,12 @@ var HydratedCache = class {
3722
3705
  };
3723
3706
 
3724
3707
  // src/utils/isZodError.ts
3725
- import { z as z26 } from "zod";
3708
+ import { z as z25 } from "zod";
3726
3709
  var isZodError = (error) => {
3727
- return error instanceof z26.ZodError;
3710
+ return error instanceof z25.ZodError;
3728
3711
  };
3729
3712
  var prettifyZodError = (error) => {
3730
- return z26.prettifyError(error);
3713
+ return z25.prettifyError(error);
3731
3714
  };
3732
3715
 
3733
3716
  // src/simple/block/SimpleBlockViewer.ts
@@ -4181,7 +4164,7 @@ import { isAnyPayload as isAnyPayload6, PayloadZodLoose } from "@xyo-network/sdk
4181
4164
  import {
4182
4165
  DataLakeRunnerMoniker
4183
4166
  } from "@xyo-network/xl1-protocol-lib";
4184
- import z27 from "zod";
4167
+ import z26 from "zod";
4185
4168
 
4186
4169
  // src/simple/datalake/AbstractRestDataLake.ts
4187
4170
  import { axiosJsonConfig } from "@xylabs/sdk-js";
@@ -4248,7 +4231,7 @@ var RestDataLakeRunner = class extends AbstractRestDataLake {
4248
4231
  }).filter(exists6);
4249
4232
  if (allowedItems.length > 0) {
4250
4233
  const result = await this.axios.post(`${this.params.endpoint}/insert`, allowedItems);
4251
- return z27.array(PayloadZodLoose).parse(result.data);
4234
+ return z26.array(PayloadZodLoose).parse(result.data);
4252
4235
  } else {
4253
4236
  return [];
4254
4237
  }
@@ -4717,12 +4700,14 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
4717
4700
  pruned += pruneHashes.length;
4718
4701
  total += batch.length;
4719
4702
  await this.pendingBlocksArchivist.delete(pruneHashes);
4720
- cursor = batch.at(-1)?._sequence;
4721
- batch = cursor ? await this.pendingBlocksArchivist.next({
4703
+ const pruneSet = new Set(pruneHashes);
4704
+ const lastSurvivor = batch.findLast((p) => !pruneSet.has(p._hash));
4705
+ cursor = lastSurvivor?._sequence ?? cursor;
4706
+ batch = await this.pendingBlocksArchivist.next({
4722
4707
  limit: batchSize,
4723
4708
  cursor,
4724
4709
  order: "desc"
4725
- }) : [];
4710
+ });
4726
4711
  }
4727
4712
  this.logger?.debug(`prunePendingBlocks completed: pruned=${pruned}, totalChecked=${total}`);
4728
4713
  return [pruned, total];
@@ -4777,12 +4762,14 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
4777
4762
  pruned += pruneHashes.length;
4778
4763
  total += batch.length;
4779
4764
  await this.pendingTransactionsArchivist.delete(pruneHashes);
4780
- cursor = batch.at(-1)?._sequence;
4781
- batch = cursor ? await this.pendingTransactionsArchivist.next({
4765
+ const pruneSet = new Set(pruneHashes);
4766
+ const lastSurvivor = batch.findLast((p) => !pruneSet.has(p._hash));
4767
+ cursor = lastSurvivor?._sequence ?? cursor;
4768
+ batch = await this.pendingTransactionsArchivist.next({
4782
4769
  limit: batchSize,
4783
4770
  cursor,
4784
4771
  order: "desc"
4785
- }) : [];
4772
+ });
4786
4773
  }
4787
4774
  this.logger?.debug(`prunePendingTransactions completed: pruned=${pruned}, totalChecked=${total}`);
4788
4775
  return [pruned, total];
@@ -6195,6 +6182,27 @@ async function xl1BlockNumberToEthBlockNumber(context, xl1BlockNumber) {
6195
6182
  return assertEx47(timePayload.ethereum, () => "No ethereum timestamp found on block");
6196
6183
  }
6197
6184
 
6185
+ // src/validation/lib/isLocalhost.ts
6186
+ var isLocalhost = (hostname) => {
6187
+ return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
6188
+ };
6189
+
6190
+ // src/validation/lib/getUrl.ts
6191
+ var getUrl = (host, port) => {
6192
+ const scheme = isLocalhost(host) ? "http" : "https";
6193
+ return `${scheme}://${host}:${port}`;
6194
+ };
6195
+
6196
+ // src/validation/schema/Address.ts
6197
+ var TODO = true;
6198
+
6199
+ // src/validation/schema/Mnemonic.ts
6200
+ import { z as z27 } from "zod";
6201
+ var MnemonicStringZod = z27.string().transform((s) => s.trim().replaceAll(/\s+/g, " ")).refine(
6202
+ (s) => [12, 15, 18, 21, 24].includes(s.split(" ").length),
6203
+ { message: "Mnemonic must contain 12, 15, 18, 21, or 24 words." }
6204
+ ).describe("BIP-39 mnemonic string");
6205
+
6198
6206
  // src/wallet/generateXyoBaseWalletFromPhrase.ts
6199
6207
  import { HDWallet } from "@xyo-network/sdk-js";
6200
6208
 
@@ -6215,6 +6223,7 @@ export {
6215
6223
  ACCOUNT_TYPE,
6216
6224
  ADDRESS_INDEX,
6217
6225
  AbstractCreatableProvider,
6226
+ AccountPathZod,
6218
6227
  Actor,
6219
6228
  ActorConfigContext,
6220
6229
  ActorConfigZod,