@ensnode/ensnode-sdk 0.0.0-next-20260213092129 → 0.0.0-next-20260216074158
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 +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +105 -105
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -651,7 +661,7 @@ var makePositiveIntegerSchema = (valueLabel = "Value") => makeIntegerSchema(valu
|
|
|
651
661
|
var makeNonNegativeIntegerSchema = (valueLabel = "Value") => makeIntegerSchema(valueLabel).nonnegative({
|
|
652
662
|
error: `${valueLabel} must be a non-negative integer (>=0).`
|
|
653
663
|
});
|
|
654
|
-
var makeDurationSchema = (valueLabel = "Value") => import_v4.z.
|
|
664
|
+
var makeDurationSchema = (valueLabel = "Value") => import_v4.z.number({
|
|
655
665
|
error: `${valueLabel} must be a number.`
|
|
656
666
|
}).pipe(makeNonNegativeIntegerSchema(valueLabel));
|
|
657
667
|
var makeChainIdSchema = (valueLabel = "Chain ID") => makePositiveIntegerSchema(valueLabel).transform((val) => val);
|
|
@@ -1323,7 +1333,7 @@ var import_v411 = require("zod/v4");
|
|
|
1323
1333
|
var import_v410 = require("zod/v4");
|
|
1324
1334
|
|
|
1325
1335
|
// src/shared/deserialize.ts
|
|
1326
|
-
var import_v49 = require("zod/v4");
|
|
1336
|
+
var import_v49 = __toESM(require("zod/v4"), 1);
|
|
1327
1337
|
function deserializeChainId(maybeChainId, valueLabel) {
|
|
1328
1338
|
const schema = makeChainIdStringSchema(valueLabel);
|
|
1329
1339
|
const parsed = schema.safeParse(maybeChainId);
|
|
@@ -1395,7 +1405,7 @@ ${(0, import_v49.prettifyError)(parsed.error)}
|
|
|
1395
1405
|
return parsed.data;
|
|
1396
1406
|
}
|
|
1397
1407
|
function deserializeDuration(maybeDuration, valueLabel) {
|
|
1398
|
-
const schema = makeDurationSchema(valueLabel);
|
|
1408
|
+
const schema = import_v49.default.coerce.number().pipe(makeDurationSchema(valueLabel));
|
|
1399
1409
|
const parsed = schema.safeParse(maybeDuration);
|
|
1400
1410
|
if (parsed.error) {
|
|
1401
1411
|
throw new RangeError(`Cannot deserialize Duration:
|