@ensnode/ensnode-sdk 0.0.0-next-20260304002121 → 0.0.0-next-20260304124544
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 +43 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +42 -18
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -301,7 +301,9 @@ __export(index_exports, {
|
|
|
301
301
|
uniq: () => uniq,
|
|
302
302
|
validateChainIndexingStatusSnapshot: () => validateChainIndexingStatusSnapshot,
|
|
303
303
|
validateCrossChainIndexingStatusSnapshot: () => validateCrossChainIndexingStatusSnapshot,
|
|
304
|
+
validateEnsIndexerPublicConfig: () => validateEnsIndexerPublicConfig,
|
|
304
305
|
validateEnsIndexerPublicConfigCompatibility: () => validateEnsIndexerPublicConfigCompatibility,
|
|
306
|
+
validateEnsIndexerVersionInfo: () => validateEnsIndexerVersionInfo,
|
|
305
307
|
validateOmnichainIndexingStatusSnapshot: () => validateOmnichainIndexingStatusSnapshot,
|
|
306
308
|
validateRealtimeIndexingStatusProjection: () => validateRealtimeIndexingStatusProjection,
|
|
307
309
|
validateSupportedLabelSetAndVersion: () => validateSupportedLabelSetAndVersion
|
|
@@ -4176,6 +4178,28 @@ function parseNonNegativeInteger(maybeNumber) {
|
|
|
4176
4178
|
return num;
|
|
4177
4179
|
}
|
|
4178
4180
|
|
|
4181
|
+
// src/ensindexer/config/validate/ensindexer-public-config.ts
|
|
4182
|
+
var import_v433 = require("zod/v4");
|
|
4183
|
+
function validateEnsIndexerPublicConfig(unvalidatedConfig) {
|
|
4184
|
+
const schema = makeEnsIndexerPublicConfigSchema();
|
|
4185
|
+
const result = schema.safeParse(unvalidatedConfig);
|
|
4186
|
+
if (!result.success) {
|
|
4187
|
+
throw new Error(`Invalid ENSIndexerPublicConfig: ${(0, import_v433.prettifyError)(result.error)}`);
|
|
4188
|
+
}
|
|
4189
|
+
return result.data;
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
// src/ensindexer/config/validate/ensindexer-version-info.ts
|
|
4193
|
+
var import_v434 = require("zod/v4");
|
|
4194
|
+
function validateEnsIndexerVersionInfo(unvalidatedVersionInfo) {
|
|
4195
|
+
const schema = makeEnsIndexerVersionInfoSchema();
|
|
4196
|
+
const result = schema.safeParse(unvalidatedVersionInfo);
|
|
4197
|
+
if (!result.success) {
|
|
4198
|
+
throw new Error(`Invalid EnsIndexerVersionInfo: ${(0, import_v434.prettifyError)(result.error)}`);
|
|
4199
|
+
}
|
|
4200
|
+
return result.data;
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4179
4203
|
// src/ensv2/ids-lib.ts
|
|
4180
4204
|
var import_viem17 = require("viem");
|
|
4181
4205
|
var makeRegistryId = (accountId) => formatAccountId(accountId);
|
|
@@ -4245,14 +4269,14 @@ function isResolvedIdentity(identity) {
|
|
|
4245
4269
|
}
|
|
4246
4270
|
|
|
4247
4271
|
// src/indexing-status/deserialize/chain-indexing-status-snapshot.ts
|
|
4248
|
-
var
|
|
4272
|
+
var import_v435 = require("zod/v4");
|
|
4249
4273
|
function deserializeChainIndexingStatusSnapshot(maybeSnapshot, valueLabel) {
|
|
4250
4274
|
const schema = makeChainIndexingStatusSnapshotSchema(valueLabel);
|
|
4251
4275
|
const parsed = schema.safeParse(maybeSnapshot);
|
|
4252
4276
|
if (parsed.error) {
|
|
4253
4277
|
throw new Error(
|
|
4254
4278
|
`Cannot deserialize into ChainIndexingStatusSnapshot:
|
|
4255
|
-
${(0,
|
|
4279
|
+
${(0, import_v435.prettifyError)(parsed.error)}
|
|
4256
4280
|
`
|
|
4257
4281
|
);
|
|
4258
4282
|
}
|
|
@@ -4270,26 +4294,26 @@ function createRealtimeIndexingStatusProjection(snapshot, now) {
|
|
|
4270
4294
|
}
|
|
4271
4295
|
|
|
4272
4296
|
// src/indexing-status/validate/chain-indexing-status-snapshot.ts
|
|
4273
|
-
var
|
|
4297
|
+
var import_v436 = require("zod/v4");
|
|
4274
4298
|
function validateChainIndexingStatusSnapshot(unvalidatedSnapshot, valueLabel) {
|
|
4275
4299
|
const schema = makeChainIndexingStatusSnapshotSchema(valueLabel);
|
|
4276
4300
|
const parsed = schema.safeParse(unvalidatedSnapshot);
|
|
4277
4301
|
if (parsed.error) {
|
|
4278
4302
|
throw new Error(`Invalid ChainIndexingStatusSnapshot:
|
|
4279
|
-
${(0,
|
|
4303
|
+
${(0, import_v436.prettifyError)(parsed.error)}
|
|
4280
4304
|
`);
|
|
4281
4305
|
}
|
|
4282
4306
|
return parsed.data;
|
|
4283
4307
|
}
|
|
4284
4308
|
|
|
4285
4309
|
// src/indexing-status/validate/realtime-indexing-status-projection.ts
|
|
4286
|
-
var
|
|
4310
|
+
var import_v437 = require("zod/v4");
|
|
4287
4311
|
function validateRealtimeIndexingStatusProjection(unvalidatedProjection, valueLabel) {
|
|
4288
4312
|
const schema = makeRealtimeIndexingStatusProjectionSchema(valueLabel);
|
|
4289
4313
|
const parsed = schema.safeParse(unvalidatedProjection);
|
|
4290
4314
|
if (parsed.error) {
|
|
4291
4315
|
throw new Error(`Invalid RealtimeIndexingStatusProjection:
|
|
4292
|
-
${(0,
|
|
4316
|
+
${(0, import_v437.prettifyError)(parsed.error)}
|
|
4293
4317
|
`);
|
|
4294
4318
|
}
|
|
4295
4319
|
return parsed.data;
|
|
@@ -4467,13 +4491,13 @@ var import_getUnixTime2 = require("date-fns/getUnixTime");
|
|
|
4467
4491
|
var import_getUnixTime = require("date-fns/getUnixTime");
|
|
4468
4492
|
|
|
4469
4493
|
// src/shared/deserialize.ts
|
|
4470
|
-
var
|
|
4494
|
+
var import_v438 = __toESM(require("zod/v4"), 1);
|
|
4471
4495
|
function deserializeChainId(maybeChainId, valueLabel) {
|
|
4472
4496
|
const schema = makeChainIdStringSchema(valueLabel);
|
|
4473
4497
|
const parsed = schema.safeParse(maybeChainId);
|
|
4474
4498
|
if (parsed.error) {
|
|
4475
4499
|
throw new Error(`Cannot deserialize ChainId:
|
|
4476
|
-
${(0,
|
|
4500
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4477
4501
|
`);
|
|
4478
4502
|
}
|
|
4479
4503
|
return parsed.data;
|
|
@@ -4483,7 +4507,7 @@ function deserializeDatetime(maybeDatetime, valueLabel) {
|
|
|
4483
4507
|
const parsed = schema.safeParse(maybeDatetime);
|
|
4484
4508
|
if (parsed.error) {
|
|
4485
4509
|
throw new Error(`Cannot deserialize Datetime:
|
|
4486
|
-
${(0,
|
|
4510
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4487
4511
|
`);
|
|
4488
4512
|
}
|
|
4489
4513
|
return parsed.data;
|
|
@@ -4493,7 +4517,7 @@ function deserializeUnixTimestamp(maybeTimestamp, valueLabel) {
|
|
|
4493
4517
|
const parsed = schema.safeParse(maybeTimestamp);
|
|
4494
4518
|
if (parsed.error) {
|
|
4495
4519
|
throw new Error(`Cannot deserialize Unix Timestamp:
|
|
4496
|
-
${(0,
|
|
4520
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4497
4521
|
`);
|
|
4498
4522
|
}
|
|
4499
4523
|
return parsed.data;
|
|
@@ -4503,7 +4527,7 @@ function deserializeUrl(maybeUrl, valueLabel) {
|
|
|
4503
4527
|
const parsed = schema.safeParse(maybeUrl);
|
|
4504
4528
|
if (parsed.error) {
|
|
4505
4529
|
throw new Error(`Cannot deserialize URL:
|
|
4506
|
-
${(0,
|
|
4530
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4507
4531
|
`);
|
|
4508
4532
|
}
|
|
4509
4533
|
return parsed.data;
|
|
@@ -4513,7 +4537,7 @@ function deserializeBlockNumber(maybeBlockNumber, valueLabel) {
|
|
|
4513
4537
|
const parsed = schema.safeParse(maybeBlockNumber);
|
|
4514
4538
|
if (parsed.error) {
|
|
4515
4539
|
throw new Error(`Cannot deserialize BlockNumber:
|
|
4516
|
-
${(0,
|
|
4540
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4517
4541
|
`);
|
|
4518
4542
|
}
|
|
4519
4543
|
return parsed.data;
|
|
@@ -4523,17 +4547,17 @@ function deserializeBlockRef(maybeBlockRef, valueLabel) {
|
|
|
4523
4547
|
const parsed = schema.safeParse(maybeBlockRef);
|
|
4524
4548
|
if (parsed.error) {
|
|
4525
4549
|
throw new Error(`Cannot deserialize BlockRef:
|
|
4526
|
-
${(0,
|
|
4550
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4527
4551
|
`);
|
|
4528
4552
|
}
|
|
4529
4553
|
return parsed.data;
|
|
4530
4554
|
}
|
|
4531
4555
|
function deserializeDuration(maybeDuration, valueLabel) {
|
|
4532
|
-
const schema =
|
|
4556
|
+
const schema = import_v438.default.coerce.number().pipe(makeDurationSchema(valueLabel));
|
|
4533
4557
|
const parsed = schema.safeParse(maybeDuration);
|
|
4534
4558
|
if (parsed.error) {
|
|
4535
4559
|
throw new RangeError(`Cannot deserialize Duration:
|
|
4536
|
-
${(0,
|
|
4560
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4537
4561
|
`);
|
|
4538
4562
|
}
|
|
4539
4563
|
return parsed.data;
|
|
@@ -4543,7 +4567,7 @@ function parseAccountId(maybeAccountId, valueLabel) {
|
|
|
4543
4567
|
const parsed = schema.safeParse(maybeAccountId);
|
|
4544
4568
|
if (parsed.error) {
|
|
4545
4569
|
throw new RangeError(`Cannot deserialize AccountId:
|
|
4546
|
-
${(0,
|
|
4570
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4547
4571
|
`);
|
|
4548
4572
|
}
|
|
4549
4573
|
return parsed.data;
|
|
@@ -4553,7 +4577,7 @@ function deserializePriceEth(maybePrice, valueLabel) {
|
|
|
4553
4577
|
const parsed = schema.safeParse(maybePrice);
|
|
4554
4578
|
if (parsed.error) {
|
|
4555
4579
|
throw new Error(`Cannot deserialize PriceEth:
|
|
4556
|
-
${(0,
|
|
4580
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4557
4581
|
`);
|
|
4558
4582
|
}
|
|
4559
4583
|
return parsed.data;
|
|
@@ -4563,7 +4587,7 @@ function deserializePriceUsdc(maybePrice, valueLabel) {
|
|
|
4563
4587
|
const parsed = schema.safeParse(maybePrice);
|
|
4564
4588
|
if (parsed.error) {
|
|
4565
4589
|
throw new Error(`Cannot deserialize PriceUsdc:
|
|
4566
|
-
${(0,
|
|
4590
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4567
4591
|
`);
|
|
4568
4592
|
}
|
|
4569
4593
|
return parsed.data;
|
|
@@ -4573,7 +4597,7 @@ function deserializePriceDai(maybePrice, valueLabel) {
|
|
|
4573
4597
|
const parsed = schema.safeParse(maybePrice);
|
|
4574
4598
|
if (parsed.error) {
|
|
4575
4599
|
throw new Error(`Cannot deserialize PriceDai:
|
|
4576
|
-
${(0,
|
|
4600
|
+
${(0, import_v438.prettifyError)(parsed.error)}
|
|
4577
4601
|
`);
|
|
4578
4602
|
}
|
|
4579
4603
|
return parsed.data;
|