@ensnode/ensnode-sdk 0.0.0-next-20260429174842 → 0.0.0-next-20260429191816
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +237 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -37
- package/dist/index.d.ts +115 -37
- package/dist/index.js +237 -89
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
EnsIndexerIndexingStatusResponseCodes: () => EnsIndexerIndexingStatusResponseCodes,
|
|
49
49
|
EnsNodeClient: () => EnsNodeClient,
|
|
50
50
|
ForwardResolutionProtocolStep: () => ForwardResolutionProtocolStep,
|
|
51
|
+
IndexingMetadataContextStatusCodes: () => IndexingMetadataContextStatusCodes,
|
|
51
52
|
IndexingStatusResponseCodes: () => IndexingStatusResponseCodes,
|
|
52
53
|
LruCache: () => LruCache,
|
|
53
54
|
NFTMintStatuses: () => NFTMintStatuses,
|
|
@@ -86,6 +87,8 @@ __export(index_exports, {
|
|
|
86
87
|
buildEnsNodeStackInfo: () => buildEnsNodeStackInfo,
|
|
87
88
|
buildEnsRainbowClientLabelSet: () => buildEnsRainbowClientLabelSet,
|
|
88
89
|
buildIndexedBlockranges: () => buildIndexedBlockranges,
|
|
90
|
+
buildIndexingMetadataContextInitialized: () => buildIndexingMetadataContextInitialized,
|
|
91
|
+
buildIndexingMetadataContextUninitialized: () => buildIndexingMetadataContextUninitialized,
|
|
89
92
|
buildLabelSetId: () => buildLabelSetId,
|
|
90
93
|
buildLabelSetVersion: () => buildLabelSetVersion,
|
|
91
94
|
buildOmnichainIndexingStatusSnapshot: () => buildOmnichainIndexingStatusSnapshot,
|
|
@@ -122,6 +125,7 @@ __export(index_exports, {
|
|
|
122
125
|
deserializeEnsIndexerStackInfo: () => deserializeEnsIndexerStackInfo,
|
|
123
126
|
deserializeEnsNodeStackInfo: () => deserializeEnsNodeStackInfo,
|
|
124
127
|
deserializeErrorResponse: () => deserializeErrorResponse2,
|
|
128
|
+
deserializeIndexingMetadataContext: () => deserializeIndexingMetadataContext,
|
|
125
129
|
deserializeIndexingStatusResponse: () => deserializeIndexingStatusResponse,
|
|
126
130
|
deserializeOmnichainIndexingStatusSnapshot: () => deserializeOmnichainIndexingStatusSnapshot,
|
|
127
131
|
deserializePriceDai: () => deserializePriceDai,
|
|
@@ -228,6 +232,8 @@ __export(index_exports, {
|
|
|
228
232
|
serializeEnsIndexerStackInfo: () => serializeEnsIndexerStackInfo,
|
|
229
233
|
serializeEnsNodeStackInfo: () => serializeEnsNodeStackInfo,
|
|
230
234
|
serializeIndexedChainIds: () => serializeIndexedChainIds,
|
|
235
|
+
serializeIndexingMetadataContext: () => serializeIndexingMetadataContext,
|
|
236
|
+
serializeIndexingMetadataContextInitialized: () => serializeIndexingMetadataContextInitialized,
|
|
231
237
|
serializeIndexingStatusResponse: () => serializeIndexingStatusResponse,
|
|
232
238
|
serializeNameToken: () => serializeNameToken,
|
|
233
239
|
serializeNameTokensResponse: () => serializeNameTokensResponse,
|
|
@@ -256,6 +262,7 @@ __export(index_exports, {
|
|
|
256
262
|
validateEnsIndexerStackInfo: () => validateEnsIndexerStackInfo,
|
|
257
263
|
validateEnsIndexerVersionInfo: () => validateEnsIndexerVersionInfo,
|
|
258
264
|
validateEnsNodeStackInfo: () => validateEnsNodeStackInfo,
|
|
265
|
+
validateIndexingMetadataContextInitialized: () => validateIndexingMetadataContextInitialized,
|
|
259
266
|
validateOmnichainIndexingStatusSnapshot: () => validateOmnichainIndexingStatusSnapshot,
|
|
260
267
|
validateRealtimeIndexingStatusProjection: () => validateRealtimeIndexingStatusProjection,
|
|
261
268
|
validateSupportedLabelSetAndVersion: () => validateSupportedLabelSetAndVersion
|
|
@@ -4093,41 +4100,8 @@ var EnsNodeClient = class _EnsNodeClient {
|
|
|
4093
4100
|
}
|
|
4094
4101
|
};
|
|
4095
4102
|
|
|
4096
|
-
// src/
|
|
4097
|
-
var
|
|
4098
|
-
|
|
4099
|
-
// src/identity/types.ts
|
|
4100
|
-
var ResolutionStatusIds = {
|
|
4101
|
-
/**
|
|
4102
|
-
* Represents that the `Identity` is not resolved yet.
|
|
4103
|
-
*/
|
|
4104
|
-
Unresolved: "unresolved",
|
|
4105
|
-
/**
|
|
4106
|
-
* Represents that resolution of the `Identity` resulted in a named identity.
|
|
4107
|
-
*/
|
|
4108
|
-
Named: "named",
|
|
4109
|
-
/**
|
|
4110
|
-
* Represents that resolution of the `Identity` resulted in an unnamed identity.
|
|
4111
|
-
*/
|
|
4112
|
-
Unnamed: "unnamed",
|
|
4113
|
-
/**
|
|
4114
|
-
* Represents that attempted resolution of the `Identity` resulted in an error
|
|
4115
|
-
* and therefore it is unknown if the `Identity` resolves to a named or unnamed identity.
|
|
4116
|
-
*/
|
|
4117
|
-
Unknown: "unknown"
|
|
4118
|
-
};
|
|
4119
|
-
|
|
4120
|
-
// src/identity/identity.ts
|
|
4121
|
-
function buildUnresolvedIdentity(address, namespaceId, chainId) {
|
|
4122
|
-
return {
|
|
4123
|
-
resolutionStatus: ResolutionStatusIds.Unresolved,
|
|
4124
|
-
chainId: chainId ?? (0, import_datasources6.getENSRootChainId)(namespaceId),
|
|
4125
|
-
address
|
|
4126
|
-
};
|
|
4127
|
-
}
|
|
4128
|
-
function isResolvedIdentity(identity) {
|
|
4129
|
-
return identity.resolutionStatus !== ResolutionStatusIds.Unresolved;
|
|
4130
|
-
}
|
|
4103
|
+
// src/ensnode/metadata/deserialize/indexing-metadata-context.ts
|
|
4104
|
+
var import_v446 = require("zod/v4");
|
|
4131
4105
|
|
|
4132
4106
|
// src/indexing-status/deserialize/chain-indexing-status-snapshot.ts
|
|
4133
4107
|
var import_v439 = require("zod/v4");
|
|
@@ -4180,6 +4154,221 @@ ${(0, import_v441.prettifyError)(parsed.error)}
|
|
|
4180
4154
|
return parsed.data;
|
|
4181
4155
|
}
|
|
4182
4156
|
|
|
4157
|
+
// src/stack-info/validate/ensindexer-stack-info.ts
|
|
4158
|
+
var import_v442 = require("zod/v4");
|
|
4159
|
+
function validateEnsIndexerStackInfo(maybeStackInfo, valueLabel) {
|
|
4160
|
+
const parsed = makeEnsIndexerStackInfoSchema(valueLabel).safeParse(maybeStackInfo);
|
|
4161
|
+
if (parsed.error) {
|
|
4162
|
+
throw new Error(`Cannot validate EnsIndexerStackInfo:
|
|
4163
|
+
${(0, import_v442.prettifyError)(parsed.error)}
|
|
4164
|
+
`);
|
|
4165
|
+
}
|
|
4166
|
+
return parsed.data;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
// src/stack-info/ensindexer-stack-info.ts
|
|
4170
|
+
function buildEnsIndexerStackInfo(ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig) {
|
|
4171
|
+
return validateEnsIndexerStackInfo({
|
|
4172
|
+
ensDb: ensDbPublicConfig,
|
|
4173
|
+
ensIndexer: ensIndexerPublicConfig,
|
|
4174
|
+
ensRainbow: ensRainbowPublicConfig
|
|
4175
|
+
});
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
// src/stack-info/validate/ensnode-stack-info.ts
|
|
4179
|
+
var import_v443 = require("zod/v4");
|
|
4180
|
+
function validateEnsNodeStackInfo(maybeStackInfo, valueLabel) {
|
|
4181
|
+
const parsed = makeEnsNodeStackInfoSchema(valueLabel).safeParse(maybeStackInfo);
|
|
4182
|
+
if (parsed.error) {
|
|
4183
|
+
throw new Error(`Cannot validate EnsNodeStackInfo:
|
|
4184
|
+
${(0, import_v443.prettifyError)(parsed.error)}
|
|
4185
|
+
`);
|
|
4186
|
+
}
|
|
4187
|
+
return parsed.data;
|
|
4188
|
+
}
|
|
4189
|
+
|
|
4190
|
+
// src/stack-info/ensnode-stack-info.ts
|
|
4191
|
+
function buildEnsNodeStackInfo(ensApiPublicConfig, ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig) {
|
|
4192
|
+
return validateEnsNodeStackInfo({
|
|
4193
|
+
...buildEnsIndexerStackInfo(ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig),
|
|
4194
|
+
ensApi: ensApiPublicConfig
|
|
4195
|
+
});
|
|
4196
|
+
}
|
|
4197
|
+
|
|
4198
|
+
// src/ensnode/metadata/validate/indexing-metadata-context.ts
|
|
4199
|
+
var import_v445 = require("zod/v4");
|
|
4200
|
+
|
|
4201
|
+
// src/ensnode/metadata/zod-schemas/indexing-metadata-context.ts
|
|
4202
|
+
var import_v444 = require("zod/v4");
|
|
4203
|
+
var makeSerializedIndexingMetadataContextUninitializedSchema = (valueLabel) => {
|
|
4204
|
+
const label = valueLabel ?? "SerializedIndexingMetadataContextUninitialized";
|
|
4205
|
+
return import_v444.z.object({
|
|
4206
|
+
statusCode: import_v444.z.literal(IndexingMetadataContextStatusCodes.Uninitialized, {
|
|
4207
|
+
error: `${label} must have status code ${IndexingMetadataContextStatusCodes.Uninitialized}`
|
|
4208
|
+
})
|
|
4209
|
+
});
|
|
4210
|
+
};
|
|
4211
|
+
var makeSerializedIndexingMetadataContextInitializedSchema = (valueLabel) => {
|
|
4212
|
+
const label = valueLabel ?? "SerializedIndexingMetadataContextInitialized";
|
|
4213
|
+
return import_v444.z.object({
|
|
4214
|
+
statusCode: import_v444.z.literal(IndexingMetadataContextStatusCodes.Initialized, {
|
|
4215
|
+
error: `${label} must have status code ${IndexingMetadataContextStatusCodes.Initialized}`
|
|
4216
|
+
}),
|
|
4217
|
+
indexingStatus: makeSerializedCrossChainIndexingStatusSnapshotSchema(`${label}.indexingStatus`),
|
|
4218
|
+
stackInfo: makeSerializedEnsIndexerStackInfoSchema(`${label}.stackInfo`)
|
|
4219
|
+
});
|
|
4220
|
+
};
|
|
4221
|
+
var makeSerializedIndexingMetadataContextSchema = (valueLabel) => {
|
|
4222
|
+
const label = valueLabel ?? "SerializedIndexingMetadataContext";
|
|
4223
|
+
return import_v444.z.discriminatedUnion("statusCode", [
|
|
4224
|
+
makeSerializedIndexingMetadataContextUninitializedSchema(label),
|
|
4225
|
+
makeSerializedIndexingMetadataContextInitializedSchema(label)
|
|
4226
|
+
]);
|
|
4227
|
+
};
|
|
4228
|
+
var makeIndexingMetadataContextUninitializedSchema = makeSerializedIndexingMetadataContextUninitializedSchema;
|
|
4229
|
+
var makeIndexingMetadataContextInitializedSchema = (valueLabel) => {
|
|
4230
|
+
const label = valueLabel ?? "IndexingMetadataContextInitialized";
|
|
4231
|
+
return import_v444.z.object({
|
|
4232
|
+
statusCode: import_v444.z.literal(IndexingMetadataContextStatusCodes.Initialized, {
|
|
4233
|
+
error: `${label} must have status code ${IndexingMetadataContextStatusCodes.Initialized}`
|
|
4234
|
+
}),
|
|
4235
|
+
indexingStatus: makeCrossChainIndexingStatusSnapshotSchema(`${label}.indexingStatus`),
|
|
4236
|
+
stackInfo: makeEnsIndexerStackInfoSchema(`${label}.stackInfo`)
|
|
4237
|
+
});
|
|
4238
|
+
};
|
|
4239
|
+
var makeIndexingMetadataContextSchema = (valueLabel) => {
|
|
4240
|
+
const label = valueLabel ?? "IndexingMetadataContext";
|
|
4241
|
+
return import_v444.z.discriminatedUnion("statusCode", [
|
|
4242
|
+
makeIndexingMetadataContextUninitializedSchema(label),
|
|
4243
|
+
makeIndexingMetadataContextInitializedSchema(label)
|
|
4244
|
+
]);
|
|
4245
|
+
};
|
|
4246
|
+
|
|
4247
|
+
// src/ensnode/metadata/validate/indexing-metadata-context.ts
|
|
4248
|
+
function validateIndexingMetadataContextInitialized(maybeIndexingMetadataContext, valueLabel) {
|
|
4249
|
+
const label = valueLabel ?? "IndexingMetadataContextInitialized";
|
|
4250
|
+
const result = makeIndexingMetadataContextInitializedSchema(label).safeParse(
|
|
4251
|
+
maybeIndexingMetadataContext
|
|
4252
|
+
);
|
|
4253
|
+
if (result.error) {
|
|
4254
|
+
throw new Error(`Cannot validate ${label}:
|
|
4255
|
+
${(0, import_v445.prettifyError)(result.error)}
|
|
4256
|
+
`);
|
|
4257
|
+
}
|
|
4258
|
+
return result.data;
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
// src/ensnode/metadata/indexing-metadata-context.ts
|
|
4262
|
+
var IndexingMetadataContextStatusCodes = {
|
|
4263
|
+
/**
|
|
4264
|
+
* Represents that no indexing metadata context has been initialized
|
|
4265
|
+
* for the ENSIndexer Schema Name in the ENSNode Metadata table in ENSDb.
|
|
4266
|
+
*/
|
|
4267
|
+
Uninitialized: "uninitialized",
|
|
4268
|
+
/**
|
|
4269
|
+
* Represents that the indexing metadata context has been initialized
|
|
4270
|
+
* for the ENSIndexer Schema Name in the ENSNode Metadata table in ENSDb.
|
|
4271
|
+
*/
|
|
4272
|
+
Initialized: "initialized"
|
|
4273
|
+
};
|
|
4274
|
+
function buildIndexingMetadataContextUninitialized() {
|
|
4275
|
+
return {
|
|
4276
|
+
statusCode: IndexingMetadataContextStatusCodes.Uninitialized
|
|
4277
|
+
};
|
|
4278
|
+
}
|
|
4279
|
+
function buildIndexingMetadataContextInitialized(indexingStatus, stackInfo) {
|
|
4280
|
+
return validateIndexingMetadataContextInitialized({
|
|
4281
|
+
statusCode: IndexingMetadataContextStatusCodes.Initialized,
|
|
4282
|
+
indexingStatus,
|
|
4283
|
+
stackInfo
|
|
4284
|
+
});
|
|
4285
|
+
}
|
|
4286
|
+
|
|
4287
|
+
// src/ensnode/metadata/deserialize/indexing-metadata-context.ts
|
|
4288
|
+
function buildUnvalidatedIndexingMetadataContextInitialized(serializedIndexingMetadataContext) {
|
|
4289
|
+
return {
|
|
4290
|
+
statusCode: serializedIndexingMetadataContext.statusCode,
|
|
4291
|
+
indexingStatus: buildUnvalidatedCrossChainIndexingStatusSnapshot(
|
|
4292
|
+
serializedIndexingMetadataContext.indexingStatus
|
|
4293
|
+
),
|
|
4294
|
+
stackInfo: buildUnvalidatedEnsIndexerStackInfo(serializedIndexingMetadataContext.stackInfo)
|
|
4295
|
+
};
|
|
4296
|
+
}
|
|
4297
|
+
function buildUnvalidatedIndexingMetadataContext(serializedIndexingMetadataContext) {
|
|
4298
|
+
switch (serializedIndexingMetadataContext.statusCode) {
|
|
4299
|
+
case IndexingMetadataContextStatusCodes.Uninitialized:
|
|
4300
|
+
return serializedIndexingMetadataContext;
|
|
4301
|
+
case IndexingMetadataContextStatusCodes.Initialized:
|
|
4302
|
+
return buildUnvalidatedIndexingMetadataContextInitialized(serializedIndexingMetadataContext);
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
function deserializeIndexingMetadataContext(serializedIndexingMetadataContext, valueLabel) {
|
|
4306
|
+
const label = valueLabel ?? "IndexingMetadataContext";
|
|
4307
|
+
const parsed = makeSerializedIndexingMetadataContextSchema(label).transform(buildUnvalidatedIndexingMetadataContext).pipe(makeIndexingMetadataContextSchema(label)).safeParse(serializedIndexingMetadataContext);
|
|
4308
|
+
if (parsed.error) {
|
|
4309
|
+
throw new Error(
|
|
4310
|
+
`Cannot deserialize IndexingMetadataContext:
|
|
4311
|
+
${(0, import_v446.prettifyError)(parsed.error)}
|
|
4312
|
+
`
|
|
4313
|
+
);
|
|
4314
|
+
}
|
|
4315
|
+
return parsed.data;
|
|
4316
|
+
}
|
|
4317
|
+
|
|
4318
|
+
// src/ensnode/metadata/serialize/indexing-metadata-context.ts
|
|
4319
|
+
function serializeIndexingMetadataContextInitialized(context) {
|
|
4320
|
+
const { statusCode, indexingStatus, stackInfo } = context;
|
|
4321
|
+
return {
|
|
4322
|
+
statusCode,
|
|
4323
|
+
indexingStatus: serializeCrossChainIndexingStatusSnapshot(indexingStatus),
|
|
4324
|
+
stackInfo: serializeEnsIndexerStackInfo(stackInfo)
|
|
4325
|
+
};
|
|
4326
|
+
}
|
|
4327
|
+
function serializeIndexingMetadataContext(context) {
|
|
4328
|
+
switch (context.statusCode) {
|
|
4329
|
+
case IndexingMetadataContextStatusCodes.Uninitialized:
|
|
4330
|
+
return context;
|
|
4331
|
+
case IndexingMetadataContextStatusCodes.Initialized:
|
|
4332
|
+
return serializeIndexingMetadataContextInitialized(context);
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4335
|
+
|
|
4336
|
+
// src/identity/identity.ts
|
|
4337
|
+
var import_datasources6 = require("@ensnode/datasources");
|
|
4338
|
+
|
|
4339
|
+
// src/identity/types.ts
|
|
4340
|
+
var ResolutionStatusIds = {
|
|
4341
|
+
/**
|
|
4342
|
+
* Represents that the `Identity` is not resolved yet.
|
|
4343
|
+
*/
|
|
4344
|
+
Unresolved: "unresolved",
|
|
4345
|
+
/**
|
|
4346
|
+
* Represents that resolution of the `Identity` resulted in a named identity.
|
|
4347
|
+
*/
|
|
4348
|
+
Named: "named",
|
|
4349
|
+
/**
|
|
4350
|
+
* Represents that resolution of the `Identity` resulted in an unnamed identity.
|
|
4351
|
+
*/
|
|
4352
|
+
Unnamed: "unnamed",
|
|
4353
|
+
/**
|
|
4354
|
+
* Represents that attempted resolution of the `Identity` resulted in an error
|
|
4355
|
+
* and therefore it is unknown if the `Identity` resolves to a named or unnamed identity.
|
|
4356
|
+
*/
|
|
4357
|
+
Unknown: "unknown"
|
|
4358
|
+
};
|
|
4359
|
+
|
|
4360
|
+
// src/identity/identity.ts
|
|
4361
|
+
function buildUnresolvedIdentity(address, namespaceId, chainId) {
|
|
4362
|
+
return {
|
|
4363
|
+
resolutionStatus: ResolutionStatusIds.Unresolved,
|
|
4364
|
+
chainId: chainId ?? (0, import_datasources6.getENSRootChainId)(namespaceId),
|
|
4365
|
+
address
|
|
4366
|
+
};
|
|
4367
|
+
}
|
|
4368
|
+
function isResolvedIdentity(identity) {
|
|
4369
|
+
return identity.resolutionStatus !== ResolutionStatusIds.Unresolved;
|
|
4370
|
+
}
|
|
4371
|
+
|
|
4183
4372
|
// src/omnigraph-api/prerequisites.ts
|
|
4184
4373
|
function hasOmnigraphApiConfigSupport(config) {
|
|
4185
4374
|
const supported = config.plugins.includes("ensv2" /* ENSv2 */);
|
|
@@ -4277,13 +4466,13 @@ var import_getUnixTime2 = require("date-fns/getUnixTime");
|
|
|
4277
4466
|
var import_getUnixTime = require("date-fns/getUnixTime");
|
|
4278
4467
|
|
|
4279
4468
|
// src/shared/deserialize.ts
|
|
4280
|
-
var
|
|
4469
|
+
var import_v447 = __toESM(require("zod/v4"), 1);
|
|
4281
4470
|
function deserializeChainId(maybeChainId, valueLabel) {
|
|
4282
4471
|
const schema = makeChainIdStringSchema(valueLabel);
|
|
4283
4472
|
const parsed = schema.safeParse(maybeChainId);
|
|
4284
4473
|
if (parsed.error) {
|
|
4285
4474
|
throw new Error(`Cannot deserialize ChainId:
|
|
4286
|
-
${(0,
|
|
4475
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4287
4476
|
`);
|
|
4288
4477
|
}
|
|
4289
4478
|
return parsed.data;
|
|
@@ -4293,7 +4482,7 @@ function deserializeDatetime(maybeDatetime, valueLabel) {
|
|
|
4293
4482
|
const parsed = schema.safeParse(maybeDatetime);
|
|
4294
4483
|
if (parsed.error) {
|
|
4295
4484
|
throw new Error(`Cannot deserialize Datetime:
|
|
4296
|
-
${(0,
|
|
4485
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4297
4486
|
`);
|
|
4298
4487
|
}
|
|
4299
4488
|
return parsed.data;
|
|
@@ -4303,7 +4492,7 @@ function deserializeUnixTimestamp(maybeTimestamp, valueLabel) {
|
|
|
4303
4492
|
const parsed = schema.safeParse(maybeTimestamp);
|
|
4304
4493
|
if (parsed.error) {
|
|
4305
4494
|
throw new Error(`Cannot deserialize Unix Timestamp:
|
|
4306
|
-
${(0,
|
|
4495
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4307
4496
|
`);
|
|
4308
4497
|
}
|
|
4309
4498
|
return parsed.data;
|
|
@@ -4313,7 +4502,7 @@ function deserializeUrl(maybeUrl, valueLabel) {
|
|
|
4313
4502
|
const parsed = schema.safeParse(maybeUrl);
|
|
4314
4503
|
if (parsed.error) {
|
|
4315
4504
|
throw new Error(`Cannot deserialize URL:
|
|
4316
|
-
${(0,
|
|
4505
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4317
4506
|
`);
|
|
4318
4507
|
}
|
|
4319
4508
|
return parsed.data;
|
|
@@ -4323,7 +4512,7 @@ function deserializeBlockNumber(maybeBlockNumber, valueLabel) {
|
|
|
4323
4512
|
const parsed = schema.safeParse(maybeBlockNumber);
|
|
4324
4513
|
if (parsed.error) {
|
|
4325
4514
|
throw new Error(`Cannot deserialize BlockNumber:
|
|
4326
|
-
${(0,
|
|
4515
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4327
4516
|
`);
|
|
4328
4517
|
}
|
|
4329
4518
|
return parsed.data;
|
|
@@ -4333,17 +4522,17 @@ function deserializeBlockRef(maybeBlockRef, valueLabel) {
|
|
|
4333
4522
|
const parsed = schema.safeParse(maybeBlockRef);
|
|
4334
4523
|
if (parsed.error) {
|
|
4335
4524
|
throw new Error(`Cannot deserialize BlockRef:
|
|
4336
|
-
${(0,
|
|
4525
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4337
4526
|
`);
|
|
4338
4527
|
}
|
|
4339
4528
|
return parsed.data;
|
|
4340
4529
|
}
|
|
4341
4530
|
function deserializeDuration(maybeDuration, valueLabel) {
|
|
4342
|
-
const schema =
|
|
4531
|
+
const schema = import_v447.default.coerce.number().pipe(makeDurationSchema(valueLabel));
|
|
4343
4532
|
const parsed = schema.safeParse(maybeDuration);
|
|
4344
4533
|
if (parsed.error) {
|
|
4345
4534
|
throw new RangeError(`Cannot deserialize Duration:
|
|
4346
|
-
${(0,
|
|
4535
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4347
4536
|
`);
|
|
4348
4537
|
}
|
|
4349
4538
|
return parsed.data;
|
|
@@ -4353,7 +4542,7 @@ function parseAccountId(maybeAccountId, valueLabel) {
|
|
|
4353
4542
|
const parsed = schema.safeParse(maybeAccountId);
|
|
4354
4543
|
if (parsed.error) {
|
|
4355
4544
|
throw new RangeError(`Cannot deserialize AccountId:
|
|
4356
|
-
${(0,
|
|
4545
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4357
4546
|
`);
|
|
4358
4547
|
}
|
|
4359
4548
|
return parsed.data;
|
|
@@ -4363,7 +4552,7 @@ function deserializePriceEth(maybePrice, valueLabel) {
|
|
|
4363
4552
|
const parsed = schema.safeParse(maybePrice);
|
|
4364
4553
|
if (parsed.error) {
|
|
4365
4554
|
throw new Error(`Cannot deserialize PriceEth:
|
|
4366
|
-
${(0,
|
|
4555
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4367
4556
|
`);
|
|
4368
4557
|
}
|
|
4369
4558
|
return parsed.data;
|
|
@@ -4373,7 +4562,7 @@ function deserializePriceUsdc(maybePrice, valueLabel) {
|
|
|
4373
4562
|
const parsed = schema.safeParse(maybePrice);
|
|
4374
4563
|
if (parsed.error) {
|
|
4375
4564
|
throw new Error(`Cannot deserialize PriceUsdc:
|
|
4376
|
-
${(0,
|
|
4565
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4377
4566
|
`);
|
|
4378
4567
|
}
|
|
4379
4568
|
return parsed.data;
|
|
@@ -4383,7 +4572,7 @@ function deserializePriceDai(maybePrice, valueLabel) {
|
|
|
4383
4572
|
const parsed = schema.safeParse(maybePrice);
|
|
4384
4573
|
if (parsed.error) {
|
|
4385
4574
|
throw new Error(`Cannot deserialize PriceDai:
|
|
4386
|
-
${(0,
|
|
4575
|
+
${(0, import_v447.prettifyError)(parsed.error)}
|
|
4387
4576
|
`);
|
|
4388
4577
|
}
|
|
4389
4578
|
return parsed.data;
|
|
@@ -4827,47 +5016,6 @@ function isWebSocketProtocol(url) {
|
|
|
4827
5016
|
return ["ws:", "wss:"].includes(url.protocol);
|
|
4828
5017
|
}
|
|
4829
5018
|
|
|
4830
|
-
// src/stack-info/validate/ensindexer-stack-info.ts
|
|
4831
|
-
var import_v443 = require("zod/v4");
|
|
4832
|
-
function validateEnsIndexerStackInfo(maybeStackInfo, valueLabel) {
|
|
4833
|
-
const parsed = makeEnsIndexerStackInfoSchema(valueLabel).safeParse(maybeStackInfo);
|
|
4834
|
-
if (parsed.error) {
|
|
4835
|
-
throw new Error(`Cannot validate EnsIndexerStackInfo:
|
|
4836
|
-
${(0, import_v443.prettifyError)(parsed.error)}
|
|
4837
|
-
`);
|
|
4838
|
-
}
|
|
4839
|
-
return parsed.data;
|
|
4840
|
-
}
|
|
4841
|
-
|
|
4842
|
-
// src/stack-info/ensindexer-stack-info.ts
|
|
4843
|
-
function buildEnsIndexerStackInfo(ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig) {
|
|
4844
|
-
return validateEnsIndexerStackInfo({
|
|
4845
|
-
ensDb: ensDbPublicConfig,
|
|
4846
|
-
ensIndexer: ensIndexerPublicConfig,
|
|
4847
|
-
ensRainbow: ensRainbowPublicConfig
|
|
4848
|
-
});
|
|
4849
|
-
}
|
|
4850
|
-
|
|
4851
|
-
// src/stack-info/validate/ensnode-stack-info.ts
|
|
4852
|
-
var import_v444 = require("zod/v4");
|
|
4853
|
-
function validateEnsNodeStackInfo(maybeStackInfo, valueLabel) {
|
|
4854
|
-
const parsed = makeEnsNodeStackInfoSchema(valueLabel).safeParse(maybeStackInfo);
|
|
4855
|
-
if (parsed.error) {
|
|
4856
|
-
throw new Error(`Cannot validate EnsNodeStackInfo:
|
|
4857
|
-
${(0, import_v444.prettifyError)(parsed.error)}
|
|
4858
|
-
`);
|
|
4859
|
-
}
|
|
4860
|
-
return parsed.data;
|
|
4861
|
-
}
|
|
4862
|
-
|
|
4863
|
-
// src/stack-info/ensnode-stack-info.ts
|
|
4864
|
-
function buildEnsNodeStackInfo(ensApiPublicConfig, ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig) {
|
|
4865
|
-
return validateEnsNodeStackInfo({
|
|
4866
|
-
...buildEnsIndexerStackInfo(ensDbPublicConfig, ensIndexerPublicConfig, ensRainbowPublicConfig),
|
|
4867
|
-
ensApi: ensApiPublicConfig
|
|
4868
|
-
});
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4871
5019
|
// src/subgraph-api/prerequisites.ts
|
|
4872
5020
|
function hasSubgraphApiConfigSupport(config) {
|
|
4873
5021
|
const supported = config.plugins.includes("subgraph" /* Subgraph */);
|