@xyo-network/xl1-protocol-sdk 3.0.5 → 3.0.7

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 (71) hide show
  1. package/dist/neutral/Archivists/MemoryArchivistFactory.d.ts +5 -2
  2. package/dist/neutral/Archivists/MemoryArchivistFactory.d.ts.map +1 -1
  3. package/dist/neutral/Archivists/archivistFactoryRegistry.d.ts +9 -0
  4. package/dist/neutral/Archivists/archivistFactoryRegistry.d.ts.map +1 -0
  5. package/dist/neutral/Archivists/connectArchivist.d.ts +4 -4
  6. package/dist/neutral/Archivists/connectArchivist.d.ts.map +1 -1
  7. package/dist/neutral/Archivists/index.d.ts +1 -0
  8. package/dist/neutral/Archivists/index.d.ts.map +1 -1
  9. package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts +5 -95
  10. package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts.map +1 -1
  11. package/dist/neutral/config/Actor.d.ts +30 -573
  12. package/dist/neutral/config/Actor.d.ts.map +1 -1
  13. package/dist/neutral/config/Actors.d.ts +5 -98
  14. package/dist/neutral/config/Actors.d.ts.map +1 -1
  15. package/dist/neutral/config/Base.d.ts +5 -98
  16. package/dist/neutral/config/Base.d.ts.map +1 -1
  17. package/dist/neutral/config/Config.d.ts +20 -386
  18. package/dist/neutral/config/Config.d.ts.map +1 -1
  19. package/dist/neutral/config/HostActor.d.ts +30 -573
  20. package/dist/neutral/config/HostActor.d.ts.map +1 -1
  21. package/dist/neutral/config/index.d.ts +2 -4
  22. package/dist/neutral/config/index.d.ts.map +1 -1
  23. package/dist/neutral/config/normalizeConnectionsConfig.d.ts +2 -5
  24. package/dist/neutral/config/normalizeConnectionsConfig.d.ts.map +1 -1
  25. package/dist/neutral/config/synthesizeRpcConnectionBindings.d.ts +8 -0
  26. package/dist/neutral/config/synthesizeRpcConnectionBindings.d.ts.map +1 -0
  27. package/dist/neutral/config/transports/Mongo.d.ts +12 -0
  28. package/dist/neutral/config/transports/Mongo.d.ts.map +1 -0
  29. package/dist/neutral/config/{Remote.d.ts → transports/Rpc.d.ts} +1 -14
  30. package/dist/neutral/config/transports/Rpc.d.ts.map +1 -0
  31. package/dist/neutral/config/transports/S3.d.ts +19 -0
  32. package/dist/neutral/config/transports/S3.d.ts.map +1 -0
  33. package/dist/neutral/config/transports/Transport.d.ts +15 -6
  34. package/dist/neutral/config/transports/Transport.d.ts.map +1 -1
  35. package/dist/neutral/config/transports/index.d.ts +3 -0
  36. package/dist/neutral/config/transports/index.d.ts.map +1 -1
  37. package/dist/neutral/context/Actor.d.ts +30 -573
  38. package/dist/neutral/context/Actor.d.ts.map +1 -1
  39. package/dist/neutral/context/HostActor.d.ts +30 -573
  40. package/dist/neutral/context/HostActor.d.ts.map +1 -1
  41. package/dist/neutral/context/index.d.ts +0 -1
  42. package/dist/neutral/context/index.d.ts.map +1 -1
  43. package/dist/neutral/getFileConfig.d.ts +10 -190
  44. package/dist/neutral/getFileConfig.d.ts.map +1 -1
  45. package/dist/neutral/getFileConfig.mjs +133 -199
  46. package/dist/neutral/getFileConfig.mjs.map +4 -4
  47. package/dist/neutral/index.mjs +357 -593
  48. package/dist/neutral/index.mjs.map +4 -4
  49. package/dist/neutral/model/CreatableProviderContext.zod.d.ts +30 -573
  50. package/dist/neutral/model/CreatableProviderContext.zod.d.ts.map +1 -1
  51. package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts +1 -1
  52. package/dist/neutral/test/index.mjs +167 -226
  53. package/dist/neutral/test/index.mjs.map +4 -4
  54. package/package.json +13 -13
  55. package/dist/neutral/config/Evm.d.ts +0 -24
  56. package/dist/neutral/config/Evm.d.ts.map +0 -1
  57. package/dist/neutral/config/Remote.d.ts.map +0 -1
  58. package/dist/neutral/config/adaptLegacyConfig.d.ts +0 -8
  59. package/dist/neutral/config/adaptLegacyConfig.d.ts.map +0 -1
  60. package/dist/neutral/config/storage/Storage.d.ts +0 -45
  61. package/dist/neutral/config/storage/Storage.d.ts.map +0 -1
  62. package/dist/neutral/config/storage/driver/Mongo.d.ts +0 -25
  63. package/dist/neutral/config/storage/driver/Mongo.d.ts.map +0 -1
  64. package/dist/neutral/config/storage/driver/S3.d.ts +0 -77
  65. package/dist/neutral/config/storage/driver/S3.d.ts.map +0 -1
  66. package/dist/neutral/config/storage/driver/index.d.ts +0 -3
  67. package/dist/neutral/config/storage/driver/index.d.ts.map +0 -1
  68. package/dist/neutral/config/storage/index.d.ts +0 -3
  69. package/dist/neutral/config/storage/index.d.ts.map +0 -1
  70. package/dist/neutral/context/getEmptyProviderContext.d.ts +0 -7
  71. package/dist/neutral/context/getEmptyProviderContext.d.ts.map +0 -1
@@ -845,7 +845,7 @@ var buildProviderFactory = (provider, defaultParams, labels) => {
845
845
  };
846
846
  return factory;
847
847
  };
848
- var registerCreatableProviderFactory = (registry, factory, labels, primary = false) => {
848
+ var registerCreatableProviderFactory = (registry2, factory, labels, primary = false) => {
849
849
  const primaryMonikers = primary !== true && isTruthy(primary) ? Array.isArray(primary) ? primary : [primary] : [];
850
850
  for (const primaryMoniker of primaryMonikers) {
851
851
  if (!factory.monikers.includes(primaryMoniker)) {
@@ -869,10 +869,10 @@ var registerCreatableProviderFactory = (registry, factory, labels, primary = fal
869
869
  throw new Error(`Invalid primary value: ${String(primary)}`);
870
870
  };
871
871
  const factoryClone = buildProviderFactory(factory, factory.defaultParams, labels);
872
- registry[factoryClone.defaultMoniker] = [factoryClone, ...registry[factoryClone.defaultMoniker] ?? []];
872
+ registry2[factoryClone.defaultMoniker] = [factoryClone, ...registry2[factoryClone.defaultMoniker] ?? []];
873
873
  for (const moniker of factoryClone.monikers) {
874
874
  if (moniker === factoryClone.defaultMoniker) continue;
875
- registry[moniker] = isPrimaryForMoniker(moniker) ? [factoryClone, ...registry[moniker] ?? []] : [...registry[moniker] ?? [], factoryClone];
875
+ registry2[moniker] = isPrimaryForMoniker(moniker) ? [factoryClone, ...registry2[moniker] ?? []] : [...registry2[moniker] ?? [], factoryClone];
876
876
  }
877
877
  };
878
878
 
@@ -890,8 +890,8 @@ var ProviderFactoryLocator = class _ProviderFactoryLocator {
890
890
  _frozen = false;
891
891
  _parent;
892
892
  _validateDepsOnRegister;
893
- constructor(context, registry = {}, validateDepsOnRegister = false) {
894
- this._registry = registry;
893
+ constructor(context, registry2 = {}, validateDepsOnRegister = false) {
894
+ this._registry = registry2;
895
895
  this._context = { ...context, locator: this };
896
896
  this._parent = context.locator;
897
897
  this._validateDepsOnRegister = validateDepsOnRegister;
@@ -936,16 +936,16 @@ var ProviderFactoryLocator = class _ProviderFactoryLocator {
936
936
  );
937
937
  }
938
938
  merge(locator) {
939
- const registry = { ...this.registry };
939
+ const registry2 = { ...this.registry };
940
940
  for (const moniker in locator.registry) {
941
- const existing = registry[moniker];
941
+ const existing = registry2[moniker];
942
942
  if (existing === void 0) {
943
- registry[moniker] = locator.registry[moniker];
943
+ registry2[moniker] = locator.registry[moniker];
944
944
  } else {
945
945
  existing.push(...locator.registry[moniker] ?? []);
946
946
  }
947
947
  }
948
- return new _ProviderFactoryLocator(this.context, registry);
948
+ return new _ProviderFactoryLocator(this.context, registry2);
949
949
  }
950
950
  /**
951
951
  * Registers a single module factory (with optional tags) with the locator
@@ -1029,10 +1029,10 @@ import {
1029
1029
  zodIsFactory as zodIsFactory2,
1030
1030
  zodToFactory as zodToFactory2
1031
1031
  } from "@xylabs/sdk-js";
1032
- import { globalRegistry as globalRegistry14, z as z19 } from "zod/mini";
1032
+ import { globalRegistry as globalRegistry11, z as z16 } from "zod/mini";
1033
1033
 
1034
1034
  // src/config/Base.ts
1035
- import { z as z18 } from "zod/mini";
1035
+ import { z as z15 } from "zod/mini";
1036
1036
 
1037
1037
  // src/config/Chain.ts
1038
1038
  import { HexZod } from "@xylabs/sdk-js";
@@ -1052,148 +1052,129 @@ var ChainConfigZod = z.object({
1052
1052
  });
1053
1053
 
1054
1054
  // src/config/transports/Transport.ts
1055
- import { globalRegistry as globalRegistry4, z as z5 } from "zod";
1055
+ import { globalRegistry as globalRegistry3, z as z4 } from "zod";
1056
1056
 
1057
- // src/config/Remote.ts
1057
+ // src/config/transports/Mongo.ts
1058
1058
  import { globalRegistry as globalRegistry2, z as z2 } from "zod";
1059
- var RpcRemoteConfigBaseZod = z2.object({
1060
- protocol: z2.string("http").register(globalRegistry2, {
1061
- description: "Protocol for the RPC connection",
1062
- type: "string"
1063
- })
1064
- }).describe("Base configuration for the remote RPC");
1065
- var HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
1066
- protocol: z2.string("http").register(globalRegistry2, {
1067
- description: "Protocol for the RPC connection",
1068
- type: "string"
1069
- }).default("http"),
1070
- url: z2.string().register(globalRegistry2, {
1071
- description: "URL for the Chain RPC API",
1072
- type: "string"
1073
- })
1074
- }).describe("Configuration for the remote RPC using Http");
1075
- var PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
1076
- protocol: z2.string().register(globalRegistry2, {
1077
- description: "Protocol for the RPC connection",
1078
- type: "string"
1079
- }).default("postMessage"),
1080
- networkId: z2.string().register(globalRegistry2, {
1081
- description: "Network ID to use for the postMessage RPC connection",
1082
- type: "string"
1083
- }),
1084
- sessionId: z2.string().register(globalRegistry2, {
1085
- description: "Session ID to use for the postMessage RPC connection",
1086
- type: "string"
1087
- })
1088
- }).describe("Configuration for the remote RPC using postMessage");
1089
- var RpcRemoteConfigZod = z2.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
1090
- var RemoteConfigZod = z2.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
1091
-
1092
- // src/config/storage/driver/Mongo.ts
1093
- import { isDefined as isDefined4, isUndefined as isUndefined2 } from "@xylabs/sdk-js";
1094
- import { globalRegistry as globalRegistry3, z as z3 } from "zod";
1095
- var MongoConfigZod = z3.object({
1059
+ var MongoConfigZod = z2.object({
1096
1060
  // TODO: Create from other arguments
1097
- connectionString: z3.string().nonempty().optional().register(globalRegistry3, {
1061
+ connectionString: z2.string().nonempty().optional().register(globalRegistry2, {
1098
1062
  description: "MongoDB connection string",
1099
1063
  title: "storage.mongo.connectionString",
1100
1064
  type: "string"
1101
1065
  }),
1102
- database: z3.string().nonempty().optional().register(globalRegistry3, {
1066
+ database: z2.string().nonempty().optional().register(globalRegistry2, {
1103
1067
  description: "MongoDB database name",
1104
1068
  title: "storage.mongo.database",
1105
1069
  type: "string"
1106
1070
  }),
1107
- domain: z3.string().nonempty().optional().register(globalRegistry3, {
1071
+ domain: z2.string().nonempty().optional().register(globalRegistry2, {
1108
1072
  description: "MongoDB domain",
1109
1073
  title: "storage.mongo.domain",
1110
1074
  type: "string"
1111
1075
  }),
1112
- password: z3.string().nonempty().optional().register(globalRegistry3, {
1076
+ password: z2.string().nonempty().optional().register(globalRegistry2, {
1113
1077
  description: "MongoDB password",
1114
1078
  title: "storage.mongo.password",
1115
1079
  type: "string"
1116
1080
  }),
1117
- username: z3.string().nonempty().optional().register(globalRegistry3, {
1081
+ username: z2.string().nonempty().optional().register(globalRegistry2, {
1118
1082
  description: "MongoDB username",
1119
1083
  title: "storage.mongo.username",
1120
1084
  type: "string"
1121
1085
  })
1122
1086
  });
1123
1087
 
1124
- // src/config/storage/driver/S3.ts
1125
- import { isDefined as isDefined5 } from "@xylabs/sdk-js";
1126
- import { z as z4 } from "zod";
1127
- var S3BucketConfigZod = z4.object({
1128
- accessKeyId: z4.string().nonempty().optional().describe("S3-compatible access key id for this bucket (overrides the shared default)"),
1129
- accountId: z4.string().nonempty().optional().describe("Account id for this bucket; on Cloudflare R2 it forms the endpoint (overrides the shared default)"),
1130
- bucket: z4.string().nonempty().optional().describe("S3-compatible bucket name"),
1131
- prefix: z4.string().nonempty().optional().describe("Optional key prefix within the bucket"),
1132
- readUrl: z4.string().nonempty().optional().describe("Public HTTP/CDN base URL for anonymous reads of this bucket"),
1133
- secretAccessKey: z4.string().nonempty().optional().describe("S3-compatible secret access key for this bucket (overrides the shared default)")
1134
- });
1135
- var S3ConfigZod = z4.object({
1136
- accessKeyId: z4.string().nonempty().optional().describe("Shared S3-compatible access key id (default for all buckets)"),
1137
- accountId: z4.string().nonempty().optional().describe("Shared account id (default for all buckets; on Cloudflare R2 it forms the endpoint)"),
1138
- chainState: S3BucketConfigZod.optional().describe("Bucket for the mutable chain state (the head pointer)"),
1139
- finalized: S3BucketConfigZod.optional().describe("Bucket for the finalized files (blocks, payloads, manifest)"),
1140
- index: S3BucketConfigZod.optional().describe("Bucket for the chain index (the step-summary families)"),
1141
- prefix: z4.string().nonempty().optional().describe("Shared key prefix (default for all buckets)"),
1142
- secretAccessKey: z4.string().nonempty().optional().describe("Shared S3-compatible secret access key (default for all buckets)")
1088
+ // src/config/transports/S3.ts
1089
+ import { z as z3 } from "zod";
1090
+ var S3BucketConfigZod = z3.object({
1091
+ accessKeyId: z3.string().nonempty().optional().describe("S3-compatible access key id for this bucket (overrides the shared default)"),
1092
+ accountId: z3.string().nonempty().optional().describe("Account id for this bucket; on Cloudflare R2 it forms the endpoint (overrides the shared default)"),
1093
+ bucket: z3.string().nonempty().optional().describe("S3-compatible bucket name"),
1094
+ prefix: z3.string().nonempty().optional().describe("Optional key prefix within the bucket"),
1095
+ readUrl: z3.string().nonempty().optional().describe("Public HTTP/CDN base URL for anonymous reads of this bucket"),
1096
+ secretAccessKey: z3.string().nonempty().optional().describe("S3-compatible secret access key for this bucket (overrides the shared default)")
1143
1097
  });
1144
1098
 
1145
1099
  // src/config/transports/Transport.ts
1146
- var LmdbTransportConfigZod = z5.object({
1147
- access: z5.enum(["read", "write"]).optional().register(globalRegistry4, {
1100
+ var LmdbTransportConfigZod = z4.object({
1101
+ access: z4.enum(["read", "write"]).optional().register(globalRegistry3, {
1148
1102
  description: "Access mode for this LMDB connection (read or write)",
1149
1103
  title: "transports.lmdb.access",
1150
1104
  type: "string"
1151
1105
  }),
1152
- root: z5.string().register(globalRegistry4, {
1106
+ root: z4.string().register(globalRegistry3, {
1153
1107
  description: "Root directory for local LMDB storage",
1154
1108
  title: "transports.lmdb.root",
1155
1109
  type: "string"
1156
1110
  }),
1157
- store: z5.string().optional().register(globalRegistry4, {
1111
+ store: z4.string().optional().register(globalRegistry3, {
1158
1112
  description: "Logical store name within the LMDB root (e.g. finalized-chain, mempool)",
1159
1113
  title: "transports.lmdb.store",
1160
1114
  type: "string"
1161
1115
  }),
1162
- type: z5.literal("lmdb")
1116
+ type: z4.literal("lmdb")
1163
1117
  }).describe("LMDB local storage transport");
1164
- var MongoTransportConfigZod = z5.object({
1165
- type: z5.literal("mongo"),
1118
+ var MongoTransportConfigZod = z4.object({
1119
+ type: z4.literal("mongo"),
1166
1120
  connectionString: MongoConfigZod.shape.connectionString,
1167
1121
  database: MongoConfigZod.shape.database,
1168
1122
  domain: MongoConfigZod.shape.domain,
1169
1123
  password: MongoConfigZod.shape.password,
1170
1124
  username: MongoConfigZod.shape.username
1171
1125
  }).describe("MongoDB storage transport");
1172
- var RpcTransportConfigZod = HttpRpcRemoteConfigZod.extend({ type: z5.literal("rpc") }).describe("XL1 JSON-RPC transport");
1173
- var RestTransportConfigZod = z5.object({
1174
- type: z5.literal("rest"),
1175
- baseUrl: z5.string().register(globalRegistry4, {
1126
+ var RpcTransportConfigZod = z4.object({
1127
+ type: z4.literal("rpc"),
1128
+ protocol: z4.string().default("http").register(globalRegistry3, {
1129
+ description: "Protocol for the RPC connection (http or postMessage)",
1130
+ title: "transports.rpc.protocol",
1131
+ type: "string"
1132
+ }),
1133
+ url: z4.string().optional().register(globalRegistry3, {
1134
+ description: "URL for the Chain RPC API (http protocol)",
1135
+ title: "transports.rpc.url",
1136
+ type: "string"
1137
+ }),
1138
+ networkId: z4.string().optional().register(globalRegistry3, {
1139
+ description: "Network ID for the postMessage RPC connection",
1140
+ title: "transports.rpc.networkId",
1141
+ type: "string"
1142
+ }),
1143
+ sessionId: z4.string().optional().register(globalRegistry3, {
1144
+ description: "Session ID for the postMessage RPC connection",
1145
+ title: "transports.rpc.sessionId",
1146
+ type: "string"
1147
+ })
1148
+ }).describe("XL1 JSON-RPC transport");
1149
+ var RestTransportConfigZod = z4.object({
1150
+ type: z4.literal("rest"),
1151
+ baseUrl: z4.string().register(globalRegistry3, {
1176
1152
  description: "HTTP base URL for REST reads",
1177
1153
  title: "transports.rest.baseUrl",
1178
1154
  type: "string"
1179
1155
  })
1180
1156
  }).describe("HTTP REST read transport");
1181
1157
  var S3TransportConfigZod = S3BucketConfigZod.extend({
1182
- type: z5.literal("s3"),
1183
- accessKeyId: z5.string().optional(),
1184
- accountId: z5.string().optional(),
1185
- secretAccessKey: z5.string().optional()
1158
+ type: z4.literal("s3"),
1159
+ accessKeyId: z4.string().optional(),
1160
+ accountId: z4.string().optional(),
1161
+ secretAccessKey: z4.string().optional()
1186
1162
  }).describe("S3-compatible object storage transport");
1187
- var EvmRpcTransportConfigZod = z5.object({
1188
- type: z5.literal("evm-rpc"),
1189
- url: z5.string().register(globalRegistry4, {
1163
+ var EvmRpcTransportConfigZod = z4.object({
1164
+ type: z4.literal("evm-rpc"),
1165
+ url: z4.string().register(globalRegistry3, {
1190
1166
  description: "EVM JSON-RPC URL",
1191
1167
  title: "transports.evm-rpc.url",
1192
1168
  type: "string"
1169
+ }),
1170
+ chainId: z4.string().optional().register(globalRegistry3, {
1171
+ description: "EVM chain ID for this RPC endpoint; auto-detected from the endpoint when omitted",
1172
+ title: "transports.evm-rpc.chainId",
1173
+ type: "string"
1193
1174
  })
1194
1175
  }).describe("EVM JSON-RPC transport");
1195
- var MemoryTransportConfigZod = z5.object({ type: z5.literal("memory") }).describe("In-process memory transport");
1196
- var TransportConfigZod = z5.discriminatedUnion("type", [
1176
+ var MemoryTransportConfigZod = z4.object({ type: z4.literal("memory") }).describe("In-process memory transport");
1177
+ var TransportConfigZod = z4.discriminatedUnion("type", [
1197
1178
  LmdbTransportConfigZod,
1198
1179
  MongoTransportConfigZod,
1199
1180
  RpcTransportConfigZod,
@@ -1202,18 +1183,18 @@ var TransportConfigZod = z5.discriminatedUnion("type", [
1202
1183
  EvmRpcTransportConfigZod,
1203
1184
  MemoryTransportConfigZod
1204
1185
  ]);
1205
- var TransportsConfigZod = z5.record(z5.string(), TransportConfigZod).default({});
1186
+ var TransportsConfigZod = z4.record(z4.string(), TransportConfigZod).default({});
1206
1187
 
1207
1188
  // src/config/DataLake/DataLake.ts
1208
- import { z as z9 } from "zod";
1189
+ import { z as z8 } from "zod";
1209
1190
 
1210
1191
  // src/config/DataLake/RestDataLakeConfig.ts
1211
- import { globalRegistry as globalRegistry6, z as z7 } from "zod";
1192
+ import { globalRegistry as globalRegistry5, z as z6 } from "zod";
1212
1193
 
1213
1194
  // src/config/DataLake/DataLakeRemoteConfig.ts
1214
- import { globalRegistry as globalRegistry5, z as z6 } from "zod";
1215
- var DataLakeDriverConfigBaseZod = z6.object({
1216
- driver: z6.string().register(globalRegistry5, {
1195
+ import { globalRegistry as globalRegistry4, z as z5 } from "zod";
1196
+ var DataLakeDriverConfigBaseZod = z5.object({
1197
+ driver: z5.string().register(globalRegistry4, {
1217
1198
  description: "Driver for the data lake",
1218
1199
  type: "string"
1219
1200
  })
@@ -1221,76 +1202,45 @@ var DataLakeDriverConfigBaseZod = z6.object({
1221
1202
 
1222
1203
  // src/config/DataLake/RestDataLakeConfig.ts
1223
1204
  var RestDataLakeConfigZod = DataLakeDriverConfigBaseZod.extend({
1224
- driver: z7.literal("rest").register(globalRegistry6, {
1205
+ driver: z6.literal("rest").register(globalRegistry5, {
1225
1206
  description: "Driver for the REST data lake",
1226
1207
  type: "string"
1227
1208
  }),
1228
- url: z7.string().register(globalRegistry6, {
1209
+ url: z6.string().register(globalRegistry5, {
1229
1210
  description: "URL for the REST data lake",
1230
1211
  type: "string"
1231
1212
  })
1232
1213
  }).describe("Configuration for the REST data lake driver");
1233
1214
 
1234
1215
  // src/config/DataLake/RouterDataLakeConfig.ts
1235
- import { globalRegistry as globalRegistry7, z as z8 } from "zod";
1236
- var RouterDataLakeConfigZod = z8.object({
1237
- driver: z8.literal("router").register(globalRegistry7, {
1216
+ import { globalRegistry as globalRegistry6, z as z7 } from "zod";
1217
+ var RouterDataLakeConfigZod = z7.object({
1218
+ driver: z7.literal("router").register(globalRegistry6, {
1238
1219
  description: "Driver for the router data lake",
1239
1220
  type: "string"
1240
1221
  }),
1241
- children: z8.array(z8.lazy(() => DataLakeConfigZod)).register(globalRegistry7, {
1222
+ children: z7.array(z7.lazy(() => DataLakeConfigZod)).register(globalRegistry6, {
1242
1223
  description: "Child data lake drivers",
1243
1224
  type: "array"
1244
1225
  })
1245
1226
  }).describe("Configuration for the router data lake driver");
1246
1227
 
1247
1228
  // src/config/DataLake/DataLake.ts
1248
- var DataLakeConfigZod = z9.lazy(() => z9.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
1249
-
1250
- // src/config/Evm.ts
1251
- import { globalRegistry as globalRegistry8, z as z10 } from "zod";
1252
- var EvmInfuraConfigZod = z10.object({
1253
- projectId: z10.string().optional().register(globalRegistry8, {
1254
- description: "Infura project ID",
1255
- title: "evm.infura.projectId",
1256
- type: "string"
1257
- }),
1258
- projectSecret: z10.string().optional().register(globalRegistry8, {
1259
- description: "Infura project secret",
1260
- title: "evm.infura.projectSecret",
1261
- type: "string"
1262
- })
1263
- });
1264
- var EvmJsonRpcConfigZod = z10.object({
1265
- url: z10.url().optional().register(globalRegistry8, {
1266
- description: "JSON-RPC URL",
1267
- title: "evm.jsonRpc.url",
1268
- type: "string"
1269
- })
1270
- });
1271
- var EvmConfigZod = z10.object({
1272
- chainId: z10.string().optional().register(globalRegistry8, {
1273
- description: "EVM chain ID",
1274
- title: "evm.chainId",
1275
- type: "string"
1276
- }),
1277
- infura: EvmInfuraConfigZod.optional().describe("Infura Provider configuration"),
1278
- jsonRpc: EvmJsonRpcConfigZod.optional().describe("JSON-RPC Provider configuration")
1279
- });
1229
+ var DataLakeConfigZod = z8.lazy(() => z8.union([RestDataLakeConfigZod, RouterDataLakeConfigZod])).describe("Configuration for a data lake");
1280
1230
 
1281
1231
  // src/config/Log.ts
1282
1232
  import { LogLevel } from "@xylabs/sdk-js";
1283
- import { globalRegistry as globalRegistry9, z as z11 } from "zod";
1233
+ import { globalRegistry as globalRegistry7, z as z9 } from "zod";
1284
1234
  var LogLevelNames = Object.keys(LogLevel);
1285
- var LogConfigZod = z11.object({
1286
- logLevel: z11.enum(LogLevelNames).default("info").register(globalRegistry9, {
1235
+ var LogConfigZod = z9.object({
1236
+ logLevel: z9.enum(LogLevelNames).default("info").register(globalRegistry7, {
1287
1237
  choices: LogLevelNames,
1288
1238
  default: "info",
1289
1239
  description: "Desired process verbosity",
1290
1240
  title: "logLevel",
1291
1241
  type: "string"
1292
1242
  }),
1293
- silent: z11.boolean().default(false).register(globalRegistry9, {
1243
+ silent: z9.boolean().default(false).register(globalRegistry7, {
1294
1244
  default: false,
1295
1245
  description: "Whether to run in silent mode",
1296
1246
  title: "silent",
@@ -1299,23 +1249,23 @@ var LogConfigZod = z11.object({
1299
1249
  });
1300
1250
 
1301
1251
  // src/config/ProviderBinding.ts
1302
- import { globalRegistry as globalRegistry10, z as z12 } from "zod";
1303
- var ProviderBindingConfigZod = z12.object({
1304
- connection: z12.string().optional().register(globalRegistry10, {
1252
+ import { globalRegistry as globalRegistry8, z as z10 } from "zod";
1253
+ var ProviderBindingConfigZod = z10.object({
1254
+ connection: z10.string().optional().register(globalRegistry8, {
1305
1255
  description: "Named connection from the top-level connections map",
1306
1256
  title: "providerBindings.connection",
1307
1257
  type: "string"
1308
1258
  }),
1309
- transport: z12.string().optional().register(globalRegistry10, {
1259
+ transport: z10.string().optional().register(globalRegistry8, {
1310
1260
  description: "Deprecated alias for connection (kept in sync during migration)",
1311
1261
  title: "providerBindings.transport",
1312
1262
  type: "string"
1313
1263
  })
1314
1264
  }).describe("Provider connection binding");
1315
- var ProviderBindingsConfigZod = z12.record(z12.string(), ProviderBindingConfigZod).default({});
1265
+ var ProviderBindingsConfigZod = z10.record(z10.string(), ProviderBindingConfigZod).default({});
1316
1266
 
1317
1267
  // src/config/Providers.ts
1318
- import z14 from "zod";
1268
+ import z12 from "zod";
1319
1269
 
1320
1270
  // src/config/Provider.ts
1321
1271
  import {
@@ -1323,55 +1273,43 @@ import {
1323
1273
  zodIsFactory,
1324
1274
  zodToFactory
1325
1275
  } from "@xylabs/sdk-js";
1326
- import { z as z13 } from "zod";
1327
- var ProviderConfigZod = z13.object({
1328
- moniker: z13.string(),
1329
- labels: z13.array(z13.string()).optional()
1276
+ import { z as z11 } from "zod";
1277
+ var ProviderConfigZod = z11.object({
1278
+ moniker: z11.string(),
1279
+ labels: z11.array(z11.string()).optional()
1330
1280
  }).describe("Configuration for a Provider");
1331
1281
  var isProviderConfig = zodIsFactory(ProviderConfigZod);
1332
1282
  var asProviderConfig = zodAsFactory(ProviderConfigZod, "asProviderConfig");
1333
1283
  var toProviderConfig = zodToFactory(ProviderConfigZod, "toProviderConfig");
1334
1284
 
1335
1285
  // src/config/Providers.ts
1336
- var ProvidersConfigZod = z14.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
1337
-
1338
- // src/config/storage/Storage.ts
1339
- import { globalRegistry as globalRegistry11, z as z15 } from "zod";
1340
- var StorageConfigZod = z15.object({
1341
- mongo: MongoConfigZod.optional().describe("Configuration for the MongoD storage driver"),
1342
- root: z15.string().optional().register(globalRegistry11, {
1343
- description: "Root directory for local storage",
1344
- title: "storage.root",
1345
- type: "string"
1346
- }),
1347
- s3: S3ConfigZod.optional().describe("Configuration for S3-compatible object storage (e.g. Cloudflare R2)")
1348
- }).describe("Storage configuration options");
1286
+ var ProvidersConfigZod = z12.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
1349
1287
 
1350
1288
  // src/config/Telemetry.ts
1351
- import { globalRegistry as globalRegistry12, z as z16 } from "zod";
1352
- var MetricsScrapeConfigZod = z16.object({
1353
- path: z16.string().default("/metrics").register(globalRegistry12, {
1289
+ import { globalRegistry as globalRegistry9, z as z13 } from "zod";
1290
+ var MetricsScrapeConfigZod = z13.object({
1291
+ path: z13.string().default("/metrics").register(globalRegistry9, {
1354
1292
  default: "/metrics",
1355
1293
  description: "Path for the metrics scrape endpoint",
1356
1294
  title: "telemetry.metrics.scrape.path",
1357
1295
  type: "string"
1358
1296
  }),
1359
- port: z16.coerce.number().int().positive().optional().register(globalRegistry12, {
1360
- description: "Port for the metrics scrape endpoint",
1297
+ port: z13.coerce.number().int().nonnegative().optional().register(globalRegistry9, {
1298
+ description: "Port for the metrics scrape endpoint (0 disables the scrape endpoint)",
1361
1299
  title: "telemetry.metrics.scrape.port",
1362
1300
  type: "number"
1363
1301
  })
1364
1302
  }).describe("Metrics scrape configuration");
1365
- var MetricsConfigZod = z16.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
1366
- var OpenTelemetryConfigZod = z16.object({
1303
+ var MetricsConfigZod = z13.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
1304
+ var OpenTelemetryConfigZod = z13.object({
1367
1305
  // OpenTelemetry options
1368
- otlpEndpoint: z16.url().optional().register(globalRegistry12, {
1306
+ otlpEndpoint: z13.url().optional().register(globalRegistry9, {
1369
1307
  description: "OTLP endpoint for exporting telemetry data",
1370
1308
  title: "telemetry.otel.otlpEndpoint",
1371
1309
  type: "string"
1372
1310
  })
1373
1311
  });
1374
- var TelemetryConfigZod = z16.object({
1312
+ var TelemetryConfigZod = z13.object({
1375
1313
  // Metrics configuration
1376
1314
  metrics: MetricsConfigZod.optional().describe("Metrics configuration"),
1377
1315
  // OpenTelemetry configuration
@@ -1380,14 +1318,14 @@ var TelemetryConfigZod = z16.object({
1380
1318
 
1381
1319
  // src/config/Validation.ts
1382
1320
  import { XyoAddressZod as XyoAddressZod2 } from "@xyo-network/sdk-js";
1383
- import { globalRegistry as globalRegistry13, z as z17 } from "zod";
1321
+ import { globalRegistry as globalRegistry10, z as z14 } from "zod";
1384
1322
 
1385
1323
  // src/primitives/block/rate/blockRate.ts
1386
- import { isDefined as isDefined7, isFalsy } from "@xylabs/sdk-js";
1324
+ import { isDefined as isDefined5, isFalsy } from "@xylabs/sdk-js";
1387
1325
  import { asXL1BlockRange } from "@xyo-network/xl1-protocol-lib";
1388
1326
 
1389
1327
  // src/primitives/block/rate/timeHelpers.ts
1390
- import { assertEx as assertEx10, isDefined as isDefined6 } from "@xylabs/sdk-js";
1328
+ import { assertEx as assertEx10, isDefined as isDefined4 } from "@xylabs/sdk-js";
1391
1329
  var rateMultipliers = {
1392
1330
  millis: 1,
1393
1331
  seconds: 1e3,
@@ -1405,7 +1343,7 @@ var timeDurations = (timeInMs) => ({
1405
1343
  weeks: timeInMs / (1e3 * 60 * 60 * 24 * 7)
1406
1344
  });
1407
1345
  var getTimeConfigInMilliseconds = (timeConfig) => {
1408
- const assertedTimeConfig = assertEx10(isDefined6(timeConfig) ? timeConfig : void 0, () => "Time configuration must be provided");
1346
+ const assertedTimeConfig = assertEx10(isDefined4(timeConfig) ? timeConfig : void 0, () => "Time configuration must be provided");
1409
1347
  let totalMilliseconds = 0;
1410
1348
  if ("years" in assertedTimeConfig) {
1411
1349
  totalMilliseconds += assertedTimeConfig.years * 31536e6;
@@ -1444,13 +1382,13 @@ var blockRate = (startBlock, endBlock, timeUnit) => {
1444
1382
  throw new Error("Time difference must be greater than 0");
1445
1383
  }
1446
1384
  const rate = heightDifference / timeDifference;
1447
- const timeUnitValue = isDefined7(timeUnit) ? timeUnit : "millis";
1448
- const returnedTimeDifference = isDefined7(timeUnit) ? timeDurations(timeDifference)[timeUnit] : timeDifference;
1385
+ const timeUnitValue = isDefined5(timeUnit) ? timeUnit : "millis";
1386
+ const returnedTimeDifference = isDefined5(timeUnit) ? timeDurations(timeDifference)[timeUnit] : timeDifference;
1449
1387
  const timePerBlock = returnedTimeDifference / heightDifference;
1450
1388
  return {
1451
1389
  range: asXL1BlockRange([startingBlock.block, endingBlock.block], true),
1452
1390
  span: heightDifference,
1453
- rate: isDefined7(timeUnit) ? rate * rateMultipliers[timeUnit] : rate,
1391
+ rate: isDefined5(timeUnit) ? rate * rateMultipliers[timeUnit] : rate,
1454
1392
  timeUnit: timeUnitValue,
1455
1393
  timeDifference: returnedTimeDifference,
1456
1394
  timePerBlock
@@ -1498,7 +1436,7 @@ var calculateStepSizeRate = async (viewer, start, stepIndex, count = 1, timeUnit
1498
1436
  // src/primitives/block/rate/timeRate.ts
1499
1437
  import {
1500
1438
  assertEx as assertEx12,
1501
- isDefined as isDefined8,
1439
+ isDefined as isDefined6,
1502
1440
  isDefinedNotNull
1503
1441
  } from "@xylabs/sdk-js";
1504
1442
  import { asXL1BlockNumber as asXL1BlockNumber7, asXL1BlockRange as asXL1BlockRange3 } from "@xyo-network/xl1-protocol-lib";
@@ -1537,7 +1475,7 @@ var findEndBlockRecursive = async (viewer, startBlock, targetTimeMs, estimatedBl
1537
1475
  }
1538
1476
  const endBlock = await viewer.blockByNumber(estimatedEndBlockNumber);
1539
1477
  const resolvedEndBlock = assertEx12(
1540
- isDefined8(endBlock?.[0]) ? endBlock[0] : void 0,
1478
+ isDefined6(endBlock?.[0]) ? endBlock[0] : void 0,
1541
1479
  () => `Could not retrieve block ${estimatedEndBlockNumber} for time rate calculation`
1542
1480
  );
1543
1481
  const endBlockEpoch = resolvedEndBlock.$epoch;
@@ -1620,24 +1558,24 @@ var DEFAULT_MIN_CANDIDATES = 1;
1620
1558
  var DEFAULT_BACKOFF_MS = 12e4;
1621
1559
 
1622
1560
  // src/config/Validation.ts
1623
- var ValidationConfigZod = z17.object({
1624
- allowedRewardRedeemers: z17.array(XyoAddressZod2).optional().register(globalRegistry13, {
1561
+ var ValidationConfigZod = z14.object({
1562
+ allowedRewardRedeemers: z14.array(XyoAddressZod2).optional().register(globalRegistry10, {
1625
1563
  description: "List of allowed reward redeemer addresses, if undefined anyone can participate",
1626
1564
  title: "allowedRewardRedeemers",
1627
1565
  type: "array"
1628
1566
  }),
1629
- allowedRewardEscrowAccountSigners: z17.array(XyoAddressZod2).optional().register(globalRegistry13, {
1567
+ allowedRewardEscrowAccountSigners: z14.array(XyoAddressZod2).optional().register(globalRegistry10, {
1630
1568
  description: "List of allowed reward escrow account signer addresses, if undefined anyone can participate",
1631
1569
  title: "allowedRewardEscrowAccountSigners",
1632
1570
  type: "array"
1633
1571
  }),
1634
- minCandidates: z17.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry13, {
1572
+ minCandidates: z14.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry10, {
1635
1573
  default: DEFAULT_MIN_CANDIDATES,
1636
1574
  description: "Minimum number of uncle candidates before selecting the best uncle",
1637
1575
  title: "validation.minCandidates",
1638
1576
  type: "number"
1639
1577
  }),
1640
- backoffMs: z17.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry13, {
1578
+ backoffMs: z14.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry10, {
1641
1579
  default: DEFAULT_BACKOFF_MS,
1642
1580
  description: "Back-off timeout in ms. If head age exceeds this, minCandidates is ignored",
1643
1581
  title: "validation.backoffMs",
@@ -1646,29 +1584,25 @@ var ValidationConfigZod = z17.object({
1646
1584
  });
1647
1585
 
1648
1586
  // src/config/Base.ts
1649
- var BaseConfigZod = z18.object({
1650
- chain: z18._default(ChainConfigZod, ChainConfigZod.parse({})).check(z18.describe("Configuration for the chain")),
1651
- dataLake: z18.optional(DataLakeConfigZod).check(z18.describe("Configuration for data lakes")),
1652
- evm: z18._default(EvmConfigZod, EvmConfigZod.parse({})).check(z18.describe("Configuration for EVM-backed services")),
1653
- log: z18._default(LogConfigZod, LogConfigZod.parse({})).check(z18.describe("Configuration for logging")),
1654
- connections: z18._default(TransportsConfigZod, TransportsConfigZod.parse({})).check(z18.describe("Named connection profiles (rpc, rest, s3, lmdb, mongo, evm-rpc)")),
1655
- providerBindings: z18._default(ProviderBindingsConfigZod, ProviderBindingsConfigZod.parse({})).check(z18.describe("Per-moniker provider connection bindings")),
1656
- providers: z18._default(ProvidersConfigZod, ProvidersConfigZod.parse([])).check(z18.describe("Configuration for providers")),
1657
- remote: z18._default(RemoteConfigZod, RemoteConfigZod.parse({})).check(z18.describe("Configuration for remote services")),
1658
- transports: z18._default(TransportsConfigZod, TransportsConfigZod.parse({})).check(z18.describe("Deprecated alias for connections (kept in sync during migration)")),
1659
- storage: z18._default(StorageConfigZod, StorageConfigZod.parse({})).check(z18.describe("Configuration for the storage")),
1660
- telemetry: z18._default(TelemetryConfigZod, TelemetryConfigZod.parse({})).check(z18.describe("Configuration for telemetry")),
1661
- validation: z18._default(ValidationConfigZod, ValidationConfigZod.parse({})).check(z18.describe("Configuration for validation"))
1587
+ var BaseConfigZod = z15.object({
1588
+ chain: z15._default(ChainConfigZod, ChainConfigZod.parse({})).check(z15.describe("Configuration for the chain")),
1589
+ dataLake: z15.optional(DataLakeConfigZod).check(z15.describe("Configuration for data lakes")),
1590
+ log: z15._default(LogConfigZod, LogConfigZod.parse({})).check(z15.describe("Configuration for logging")),
1591
+ connections: z15._default(TransportsConfigZod, TransportsConfigZod.parse({})).check(z15.describe("Named connection profiles (rpc, rest, s3, lmdb, mongo, evm-rpc)")),
1592
+ providerBindings: z15._default(ProviderBindingsConfigZod, ProviderBindingsConfigZod.parse({})).check(z15.describe("Per-moniker provider connection bindings")),
1593
+ providers: z15._default(ProvidersConfigZod, ProvidersConfigZod.parse([])).check(z15.describe("Configuration for providers")),
1594
+ telemetry: z15._default(TelemetryConfigZod, TelemetryConfigZod.parse({})).check(z15.describe("Configuration for telemetry")),
1595
+ validation: z15._default(ValidationConfigZod, ValidationConfigZod.parse({})).check(z15.describe("Configuration for validation"))
1662
1596
  });
1663
1597
 
1664
1598
  // src/config/Actor.ts
1665
- var AccountPathZod = z19.string().check(z19.regex(
1599
+ var AccountPathZod = z16.string().check(z16.regex(
1666
1600
  /^(m(\/\d+'?)+|\d+'?(\/\d+'?)*)$/,
1667
1601
  `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".`
1668
1602
  ));
1669
- var ActorConfigZod = z19.extend(BaseConfigZod, {
1670
- name: z19.string(),
1671
- accountPath: z19.optional(AccountPathZod).register(globalRegistry14, {
1603
+ var ActorConfigZod = z16.extend(BaseConfigZod, {
1604
+ name: z16.string(),
1605
+ accountPath: z16.optional(AccountPathZod).register(globalRegistry11, {
1672
1606
  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.',
1673
1607
  title: "accountPath",
1674
1608
  type: "string"
@@ -1679,22 +1613,22 @@ var asActorConfig = zodAsFactory2(ActorConfigZod, "asActorConfig");
1679
1613
  var toActorConfig = zodToFactory2(ActorConfigZod, "toActorConfig");
1680
1614
 
1681
1615
  // src/config/Actors.ts
1682
- import { z as z20 } from "zod/mini";
1683
- var ActorsConfigZod = z20._default(
1684
- z20.array(z20.looseObject(ActorConfigZod.shape)).check(z20.describe("Actor-specific configurations that override the base configuration when the actor is running")),
1616
+ import { z as z17 } from "zod/mini";
1617
+ var ActorsConfigZod = z17._default(
1618
+ z17.array(z17.looseObject(ActorConfigZod.shape)).check(z17.describe("Actor-specific configurations that override the base configuration when the actor is running")),
1685
1619
  []
1686
1620
  );
1687
1621
 
1688
1622
  // src/config/Config.ts
1689
- import { globalRegistry as globalRegistry15, z as z21 } from "zod/mini";
1690
- var ConfigZod = z21.extend(BaseConfigZod, {
1623
+ import { globalRegistry as globalRegistry12, z as z18 } from "zod/mini";
1624
+ var ConfigZod = z18.extend(BaseConfigZod, {
1691
1625
  actors: ActorsConfigZod,
1692
- healthCheckPort: z21.optional(z21.coerce.number()).register(globalRegistry15, {
1626
+ healthCheckPort: z18.optional(z18.coerce.number()).register(globalRegistry12, {
1693
1627
  description: "Port for the system-wide health, readiness, and liveness endpoints (/healthz, /livez, /readyz). Set to 0 to disable.",
1694
1628
  title: "healthCheckPort",
1695
1629
  type: "number"
1696
1630
  })
1697
- }).check(z21.describe("The complete configuration for the protocol, including global settings and actor-specific overrides"));
1631
+ }).check(z18.describe("The complete configuration for the protocol, including global settings and actor-specific overrides"));
1698
1632
 
1699
1633
  // src/summary/primitives/blocks/blocksMaxStep.ts
1700
1634
  var blocksMaxStep = 3;
@@ -1769,7 +1703,7 @@ async function blocksStepSummaryFromRange(context, semaphores, blockViewer, summ
1769
1703
  import {
1770
1704
  assertEx as assertEx15,
1771
1705
  exists,
1772
- isUndefined as isUndefined3
1706
+ isUndefined as isUndefined2
1773
1707
  } from "@xylabs/sdk-js";
1774
1708
  import { LruCacheMap as LruCacheMap2 } from "@xyo-network/xl1-driver-memory";
1775
1709
  import {
@@ -1813,9 +1747,6 @@ var ArchivistInstanceCache = class {
1813
1747
  }
1814
1748
  };
1815
1749
 
1816
- // src/Archivists/archivistRoles.ts
1817
- var CHAIN_ARCHIVIST_ROLE = "chain";
1818
-
1819
1750
  // src/Archivists/MemoryArchivistFactory.ts
1820
1751
  import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/sdk-js";
1821
1752
  var MemoryArchivistFactory = class _MemoryArchivistFactory {
@@ -1836,16 +1767,26 @@ var MemoryArchivistFactory = class _MemoryArchivistFactory {
1836
1767
  }
1837
1768
  };
1838
1769
 
1770
+ // src/Archivists/archivistFactoryRegistry.ts
1771
+ var registry = /* @__PURE__ */ new Map();
1772
+ function registerArchivistFactory(type, factory) {
1773
+ registry.set(type, factory);
1774
+ }
1775
+ function getArchivistFactory(type) {
1776
+ return registry.get(type);
1777
+ }
1778
+ registerArchivistFactory("memory", MemoryArchivistFactory);
1779
+
1780
+ // src/Archivists/archivistRoles.ts
1781
+ var CHAIN_ARCHIVIST_ROLE = "chain";
1782
+
1839
1783
  // src/Archivists/connectArchivist.ts
1840
1784
  async function connectArchivist(binding, options) {
1841
- switch (binding.config.type) {
1842
- case "memory": {
1843
- return await MemoryArchivistFactory.connect(binding.name, binding.config, options);
1844
- }
1845
- default: {
1846
- throw new Error(`connectArchivist: connection type '${binding.config.type}' is not self-provisioned \u2014 inject the archivist instead`);
1847
- }
1785
+ const factory = getArchivistFactory(binding.config.type);
1786
+ if (factory === void 0) {
1787
+ throw new Error(`connectArchivist: no archivist factory registered for connection type '${binding.config.type}'`);
1848
1788
  }
1789
+ return await factory.connect(binding.name, binding.config, options);
1849
1790
  }
1850
1791
 
1851
1792
  // src/utils/HydratedCache.ts
@@ -1938,7 +1879,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
1938
1879
  async blockByNumber(blockNumber) {
1939
1880
  return await this.spanAsync("blockByNumber", async () => {
1940
1881
  const chainContext = await this.getChainContextRead();
1941
- if (isUndefined3(chainContext.head)) {
1882
+ if (isUndefined2(chainContext.head)) {
1942
1883
  return null;
1943
1884
  }
1944
1885
  return await this.blockByNumberWithContext(chainContext, blockNumber);
@@ -1964,7 +1905,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
1964
1905
  assertEx15(limit > 0, () => "limit must be greater than 0");
1965
1906
  assertEx15(limit <= 100, () => "limit must be less than 100");
1966
1907
  const chainContext = await this.getChainContextRead();
1967
- if (isUndefined3(chainContext.head)) {
1908
+ if (isUndefined2(chainContext.head)) {
1968
1909
  return [];
1969
1910
  }
1970
1911
  const blocks = [];
@@ -1987,7 +1928,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
1987
1928
  () => `blocksByStep does not support step levels above ${blocksMaxStep} (requested ${stepLevel})`
1988
1929
  );
1989
1930
  const chainContext = await this.getChainContextRead();
1990
- if (isUndefined3(chainContext.head)) {
1931
+ if (isUndefined2(chainContext.head)) {
1991
1932
  return [];
1992
1933
  }
1993
1934
  const start = stepIndex * size;