@ensnode/ensnode-sdk 0.0.0-next-20260422174013 → 0.0.0-next-20260423165635
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 +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -206,6 +206,7 @@ __export(index_exports, {
|
|
|
206
206
|
priceEth: () => priceEth,
|
|
207
207
|
priceUsdc: () => priceUsdc,
|
|
208
208
|
registrarActionsFilter: () => registrarActionsFilter,
|
|
209
|
+
replaceBigInts: () => replaceBigInts,
|
|
209
210
|
scaleBigintByNumber: () => scaleBigintByNumber,
|
|
210
211
|
scalePrice: () => scalePrice,
|
|
211
212
|
serializeAssetId: () => serializeAssetId,
|
|
@@ -242,6 +243,7 @@ __export(index_exports, {
|
|
|
242
243
|
sortChainStatusesByStartBlockAsc: () => sortChainStatusesByStartBlockAsc,
|
|
243
244
|
stripNullBytes: () => stripNullBytes,
|
|
244
245
|
subtractPrice: () => subtractPrice,
|
|
246
|
+
toJson: () => toJson,
|
|
245
247
|
translateDefaultableChainIdToChainId: () => translateDefaultableChainIdToChainId,
|
|
246
248
|
uniq: () => uniq,
|
|
247
249
|
validateChainIndexingStatusSnapshot: () => validateChainIndexingStatusSnapshot,
|
|
@@ -4594,6 +4596,18 @@ function getNamespaceSpecificValue(namespace, value) {
|
|
|
4594
4596
|
return value[namespace] ?? value.default;
|
|
4595
4597
|
}
|
|
4596
4598
|
|
|
4599
|
+
// src/shared/replace-bigints.ts
|
|
4600
|
+
var replaceBigInts = (obj, replacer) => {
|
|
4601
|
+
if (typeof obj === "bigint") return replacer(obj);
|
|
4602
|
+
if (Array.isArray(obj))
|
|
4603
|
+
return obj.map((x) => replaceBigInts(x, replacer));
|
|
4604
|
+
if (obj && typeof obj === "object")
|
|
4605
|
+
return Object.fromEntries(
|
|
4606
|
+
Object.entries(obj).map(([k, v]) => [k, replaceBigInts(v, replacer)])
|
|
4607
|
+
);
|
|
4608
|
+
return obj;
|
|
4609
|
+
};
|
|
4610
|
+
|
|
4597
4611
|
// src/shared/root-registry.ts
|
|
4598
4612
|
var import_enssdk13 = require("enssdk");
|
|
4599
4613
|
var import_datasources12 = require("@ensnode/datasources");
|
|
@@ -4609,6 +4623,13 @@ var maybeGetENSv2RootRegistryId = (namespace) => {
|
|
|
4609
4623
|
return (0, import_enssdk13.makeRegistryId)(root);
|
|
4610
4624
|
};
|
|
4611
4625
|
|
|
4626
|
+
// src/shared/to-json.ts
|
|
4627
|
+
var toJson = (value, options) => JSON.stringify(
|
|
4628
|
+
value,
|
|
4629
|
+
(_key, val) => typeof val === "bigint" ? String(val) : val,
|
|
4630
|
+
options?.pretty ? 2 : void 0
|
|
4631
|
+
);
|
|
4632
|
+
|
|
4612
4633
|
// src/shared/url.ts
|
|
4613
4634
|
function isHttpProtocol(url) {
|
|
4614
4635
|
return ["http:", "https:"].includes(url.protocol);
|