@ensnode/ensnode-sdk 0.0.0-next-20260504081842 → 0.0.0-next-20260505165615
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 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4760,7 +4760,6 @@ var TtlCache = class {
|
|
|
4760
4760
|
};
|
|
4761
4761
|
|
|
4762
4762
|
// src/shared/config/indexed-blockranges.ts
|
|
4763
|
-
var import_viem9 = require("viem");
|
|
4764
4763
|
var import_datasources8 = require("@ensnode/datasources");
|
|
4765
4764
|
function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
4766
4765
|
const indexedBlockranges = /* @__PURE__ */ new Map();
|
|
@@ -4771,7 +4770,6 @@ function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
|
4771
4770
|
const datasourceChainId = datasource.chain.id;
|
|
4772
4771
|
const datasourceContracts = Object.values(datasource.contracts);
|
|
4773
4772
|
for (const datasourceContract of datasourceContracts) {
|
|
4774
|
-
if (datasourceContract.address === import_viem9.zeroAddress) continue;
|
|
4775
4773
|
const currentChainIndexedBlockrange = indexedBlockranges.get(datasourceChainId);
|
|
4776
4774
|
const contractIndexedBlockrange = buildBlockNumberRange(
|
|
4777
4775
|
datasourceContract.startBlock,
|
|
@@ -4791,12 +4789,12 @@ function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
|
4791
4789
|
}
|
|
4792
4790
|
|
|
4793
4791
|
// src/shared/interpretation/interpret-address.ts
|
|
4794
|
-
var
|
|
4795
|
-
var interpretAddress = (owner) => (0,
|
|
4792
|
+
var import_viem9 = require("viem");
|
|
4793
|
+
var interpretAddress = (owner) => (0, import_viem9.isAddressEqual)(import_viem9.zeroAddress, owner) ? null : owner;
|
|
4796
4794
|
|
|
4797
4795
|
// src/shared/interpretation/interpret-record-values.ts
|
|
4798
4796
|
var import_enssdk9 = require("enssdk");
|
|
4799
|
-
var
|
|
4797
|
+
var import_viem10 = require("viem");
|
|
4800
4798
|
|
|
4801
4799
|
// src/shared/null-bytes.ts
|
|
4802
4800
|
var hasNullByte = (value) => value.indexOf("\0") !== -1;
|
|
@@ -4812,8 +4810,8 @@ function interpretAddressRecordValue(value) {
|
|
|
4812
4810
|
if (hasNullByte(value)) return null;
|
|
4813
4811
|
if (value === "") return null;
|
|
4814
4812
|
if (value === "0x") return null;
|
|
4815
|
-
if (!(0,
|
|
4816
|
-
if ((0,
|
|
4813
|
+
if (!(0, import_viem10.isAddress)(value, { strict: false })) return value;
|
|
4814
|
+
if ((0, import_viem10.isAddressEqual)(value, import_viem10.zeroAddress)) return null;
|
|
4817
4815
|
return (0, import_enssdk9.toNormalizedAddress)(value);
|
|
4818
4816
|
}
|
|
4819
4817
|
function interpretTextRecordKey(key) {
|
|
@@ -4828,17 +4826,17 @@ function interpretTextRecordValue(value) {
|
|
|
4828
4826
|
}
|
|
4829
4827
|
|
|
4830
4828
|
// src/shared/interpretation/interpret-resolver-values.ts
|
|
4831
|
-
var
|
|
4829
|
+
var import_viem11 = require("viem");
|
|
4832
4830
|
function interpretContenthashValue(value) {
|
|
4833
|
-
if ((0,
|
|
4831
|
+
if ((0, import_viem11.size)(value) === 0) return null;
|
|
4834
4832
|
return value;
|
|
4835
4833
|
}
|
|
4836
4834
|
function interpretPubkeyValue(x, y) {
|
|
4837
|
-
if (x ===
|
|
4835
|
+
if (x === import_viem11.zeroHash && y === import_viem11.zeroHash) return null;
|
|
4838
4836
|
return { x, y };
|
|
4839
4837
|
}
|
|
4840
4838
|
function interpretDnszonehashValue(value) {
|
|
4841
|
-
if ((0,
|
|
4839
|
+
if ((0, import_viem11.size)(value) === 0) return null;
|
|
4842
4840
|
return value;
|
|
4843
4841
|
}
|
|
4844
4842
|
|
|
@@ -4900,20 +4898,28 @@ var getContractsByManagedName = (namespace) => {
|
|
|
4900
4898
|
registry: ensRootRegistry,
|
|
4901
4899
|
contracts: [
|
|
4902
4900
|
getDatasourceContract(namespace, import_datasources9.DatasourceNames.ENSRoot, "BaseRegistrar"),
|
|
4903
|
-
getDatasourceContract(namespace, import_datasources9.DatasourceNames.ENSRoot, "LegacyEthRegistrarController"),
|
|
4904
|
-
getDatasourceContract(namespace, import_datasources9.DatasourceNames.ENSRoot, "WrappedEthRegistrarController"),
|
|
4905
4901
|
getDatasourceContract(
|
|
4906
4902
|
namespace,
|
|
4907
4903
|
import_datasources9.DatasourceNames.ENSRoot,
|
|
4908
4904
|
"UnwrappedEthRegistrarController"
|
|
4909
4905
|
),
|
|
4910
|
-
|
|
4906
|
+
maybeGetDatasourceContract(
|
|
4907
|
+
namespace,
|
|
4908
|
+
import_datasources9.DatasourceNames.ENSRoot,
|
|
4909
|
+
"LegacyEthRegistrarController"
|
|
4910
|
+
),
|
|
4911
|
+
maybeGetDatasourceContract(
|
|
4912
|
+
namespace,
|
|
4913
|
+
import_datasources9.DatasourceNames.ENSRoot,
|
|
4914
|
+
"WrappedEthRegistrarController"
|
|
4915
|
+
),
|
|
4916
|
+
maybeGetDatasourceContract(
|
|
4911
4917
|
namespace,
|
|
4912
4918
|
import_datasources9.DatasourceNames.ENSRoot,
|
|
4913
4919
|
"UniversalRegistrarRenewalWithReferrer"
|
|
4914
4920
|
),
|
|
4915
4921
|
ethnamesNameWrapper
|
|
4916
|
-
]
|
|
4922
|
+
].filter((c) => !!c)
|
|
4917
4923
|
},
|
|
4918
4924
|
...basenamesRegistry && {
|
|
4919
4925
|
"base.eth": {
|