@ensnode/ensnode-sdk 1.15.2 → 1.17.0
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 +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1223 -63
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +4 -4
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +1223 -63
- package/dist/internal.js.map +1 -1
- package/dist/{namespace-specific-value-BBZET9O0.d.cts → namespace-specific-value-C9XIUp1F.d.cts} +15 -2
- package/dist/{namespace-specific-value-BBZET9O0.d.ts → namespace-specific-value-C9XIUp1F.d.ts} +15 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -173,6 +173,7 @@ __export(index_exports, {
|
|
|
173
173
|
interpretAddressRecordValue: () => interpretAddressRecordValue,
|
|
174
174
|
interpretContenthashValue: () => interpretContenthashValue,
|
|
175
175
|
interpretDnszonehashValue: () => interpretDnszonehashValue,
|
|
176
|
+
interpretMetadataKey: () => interpretMetadataKey,
|
|
176
177
|
interpretNameRecordValue: () => interpretNameRecordValue,
|
|
177
178
|
interpretPubkeyValue: () => interpretPubkeyValue,
|
|
178
179
|
interpretTextRecordKey: () => interpretTextRecordKey,
|
|
@@ -641,6 +642,7 @@ var PluginName = /* @__PURE__ */ ((PluginName2) => {
|
|
|
641
642
|
PluginName2["TokenScope"] = "tokenscope";
|
|
642
643
|
PluginName2["ENSv2"] = "ensv2";
|
|
643
644
|
PluginName2["Unigraph"] = "unigraph";
|
|
645
|
+
PluginName2["EFP"] = "efp";
|
|
644
646
|
return PluginName2;
|
|
645
647
|
})(PluginName || {});
|
|
646
648
|
|
|
@@ -2061,6 +2063,7 @@ var EnsIndexerClient = class {
|
|
|
2061
2063
|
constructor(options) {
|
|
2062
2064
|
this.options = options;
|
|
2063
2065
|
}
|
|
2066
|
+
options;
|
|
2064
2067
|
getOptions() {
|
|
2065
2068
|
return Object.freeze({
|
|
2066
2069
|
url: new URL(this.options.url.href)
|
|
@@ -4427,11 +4430,11 @@ function hasBackfillCompleted(indexingStatus) {
|
|
|
4427
4430
|
|
|
4428
4431
|
// src/omnigraph-api/prerequisites.ts
|
|
4429
4432
|
function hasOmnigraphApiConfigSupport(config) {
|
|
4430
|
-
const supported = config.plugins.includes("unigraph" /* Unigraph */) || config.plugins.includes("ensv2" /* ENSv2 */);
|
|
4433
|
+
const supported = config.plugins.includes("unigraph" /* Unigraph */) || config.plugins.includes("ensv2" /* ENSv2 */) || config.plugins.includes("efp" /* EFP */);
|
|
4431
4434
|
if (supported) return { supported };
|
|
4432
4435
|
return {
|
|
4433
4436
|
supported: false,
|
|
4434
|
-
reason: `The connected ENSNode's Config must have the '${"unigraph" /* Unigraph */}'
|
|
4437
|
+
reason: `The connected ENSNode's Config must have one of the '${"unigraph" /* Unigraph */}', '${"ensv2" /* ENSv2 */}', or '${"efp" /* EFP */}' plugins enabled.`
|
|
4435
4438
|
};
|
|
4436
4439
|
}
|
|
4437
4440
|
function hasOmnigraphApiIndexingStatusSupport(indexingStatus) {
|
|
@@ -4445,7 +4448,7 @@ function isRegistrationExpired(info, now) {
|
|
|
4445
4448
|
}
|
|
4446
4449
|
function isRegistrationFullyExpired(info, now) {
|
|
4447
4450
|
if (info.expiry == null) return false;
|
|
4448
|
-
return now
|
|
4451
|
+
return now > info.expiry + (info.gracePeriod ?? 0n);
|
|
4449
4452
|
}
|
|
4450
4453
|
function isRegistrationInGracePeriod(info, now) {
|
|
4451
4454
|
if (info.expiry == null) return false;
|
|
@@ -4677,6 +4680,7 @@ var SWRCache = class {
|
|
|
4677
4680
|
}
|
|
4678
4681
|
if (options.proactivelyInitialize) this.revalidate();
|
|
4679
4682
|
}
|
|
4683
|
+
options;
|
|
4680
4684
|
cache = null;
|
|
4681
4685
|
inProgressRevalidate = null;
|
|
4682
4686
|
backgroundInterval = null;
|
|
@@ -4818,7 +4822,7 @@ var TtlCache = class {
|
|
|
4818
4822
|
|
|
4819
4823
|
// src/shared/config/indexed-blockranges.ts
|
|
4820
4824
|
var import_datasources8 = require("@ensnode/datasources");
|
|
4821
|
-
function buildIndexedBlockranges(namespace,
|
|
4825
|
+
function buildIndexedBlockranges(namespace, chainEndBlocks, pluginsDatasourceNames) {
|
|
4822
4826
|
const indexedBlockranges = /* @__PURE__ */ new Map();
|
|
4823
4827
|
for (const [, datasourceNames] of pluginsDatasourceNames) {
|
|
4824
4828
|
for (const datasourceName of datasourceNames) {
|
|
@@ -4826,14 +4830,19 @@ function buildIndexedBlockranges(namespace, globalBlockrangeEndBlock, pluginsDat
|
|
|
4826
4830
|
if (!datasource) continue;
|
|
4827
4831
|
const datasourceChainId = datasource.chain.id;
|
|
4828
4832
|
const datasourceContracts = Object.values(datasource.contracts);
|
|
4833
|
+
const chainEndBlock = chainEndBlocks.get(datasourceChainId);
|
|
4829
4834
|
for (const datasourceContract of datasourceContracts) {
|
|
4830
4835
|
const currentChainIndexedBlockrange = indexedBlockranges.get(datasourceChainId);
|
|
4831
|
-
if (typeof
|
|
4836
|
+
if (typeof chainEndBlock === "number" && datasourceContract.startBlock > chainEndBlock) {
|
|
4832
4837
|
continue;
|
|
4833
4838
|
}
|
|
4839
|
+
const effectiveEndBlock = Math.min(
|
|
4840
|
+
datasourceContract.endBlock ?? Infinity,
|
|
4841
|
+
chainEndBlock ?? Infinity
|
|
4842
|
+
);
|
|
4834
4843
|
const contractIndexedBlockrange = buildBlockNumberRange(
|
|
4835
4844
|
datasourceContract.startBlock,
|
|
4836
|
-
|
|
4845
|
+
Number.isFinite(effectiveEndBlock) ? effectiveEndBlock : void 0
|
|
4837
4846
|
);
|
|
4838
4847
|
const indexedBlockrange = currentChainIndexedBlockrange ? mergeBlockNumberRanges(currentChainIndexedBlockrange, contractIndexedBlockrange) : contractIndexedBlockrange;
|
|
4839
4848
|
if (indexedBlockrange.rangeType !== RangeTypeIds.LeftBounded && indexedBlockrange.rangeType !== RangeTypeIds.Bounded) {
|
|
@@ -4878,6 +4887,10 @@ function interpretTextRecordKey(key) {
|
|
|
4878
4887
|
if (key === "") return null;
|
|
4879
4888
|
return key;
|
|
4880
4889
|
}
|
|
4890
|
+
function interpretMetadataKey(key) {
|
|
4891
|
+
if (hasNullByte(key)) return null;
|
|
4892
|
+
return key;
|
|
4893
|
+
}
|
|
4881
4894
|
function interpretTextRecordValue(value) {
|
|
4882
4895
|
if (hasNullByte(value)) return null;
|
|
4883
4896
|
if (value === "") return null;
|