@ensnode/ensnode-sdk 0.0.0-next-20260315095810 → 0.0.0-next-20260316155921

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.d.cts CHANGED
@@ -3564,6 +3564,14 @@ type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | Registra
3564
3564
  * Records Orders
3565
3565
  */
3566
3566
  declare const RegistrarActionsOrders: {
3567
+ /**
3568
+ * Returns registrar actions newest-first.
3569
+ *
3570
+ * Sorts by block timestamp descending. Because each action's identifier encodes
3571
+ * all ordering-relevant onchain properties, this also correctly orders actions
3572
+ * that share the same block timestamp by the chronological order in which they
3573
+ * were executed within the block.
3574
+ */
3567
3575
  readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
3568
3576
  };
3569
3577
  type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
@@ -5233,13 +5241,11 @@ declare class TtlCache<KeyType extends string, ValueType> implements Cache<KeyTy
5233
5241
  declare const uniq: <T>(arr: T[]) => T[];
5234
5242
 
5235
5243
  /**
5236
- * Build a map of indexed blockranges for each indexed chain,
5237
- * based on the ENSIndexer configuration.
5244
+ * Build a map of indexed blockranges for each indexed chain, based on the ENSIndexer configuration.
5238
5245
  *
5239
- * Useful for presenting a clear view of the indexed blockranges
5240
- * across chains.
5246
+ * Useful for presenting a clear view of the indexed blockranges across chains.
5241
5247
  */
5242
- declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsRequiredDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
5248
+ declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
5243
5249
 
5244
5250
  /**
5245
5251
  * Gets the AccountId for the contract in the specified namespace, datasource, and
package/dist/index.d.ts CHANGED
@@ -3564,6 +3564,14 @@ type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | Registra
3564
3564
  * Records Orders
3565
3565
  */
3566
3566
  declare const RegistrarActionsOrders: {
3567
+ /**
3568
+ * Returns registrar actions newest-first.
3569
+ *
3570
+ * Sorts by block timestamp descending. Because each action's identifier encodes
3571
+ * all ordering-relevant onchain properties, this also correctly orders actions
3572
+ * that share the same block timestamp by the chronological order in which they
3573
+ * were executed within the block.
3574
+ */
3567
3575
  readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
3568
3576
  };
3569
3577
  type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
@@ -5233,13 +5241,11 @@ declare class TtlCache<KeyType extends string, ValueType> implements Cache<KeyTy
5233
5241
  declare const uniq: <T>(arr: T[]) => T[];
5234
5242
 
5235
5243
  /**
5236
- * Build a map of indexed blockranges for each indexed chain,
5237
- * based on the ENSIndexer configuration.
5244
+ * Build a map of indexed blockranges for each indexed chain, based on the ENSIndexer configuration.
5238
5245
  *
5239
- * Useful for presenting a clear view of the indexed blockranges
5240
- * across chains.
5246
+ * Useful for presenting a clear view of the indexed blockranges across chains.
5241
5247
  */
5242
- declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsRequiredDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
5248
+ declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
5243
5249
 
5244
5250
  /**
5245
5251
  * Gets the AccountId for the contract in the specified namespace, datasource, and
package/dist/index.js CHANGED
@@ -2927,6 +2927,14 @@ var RegistrarActionsFilterTypes = {
2927
2927
  EndTimestamp: "endTimestamp"
2928
2928
  };
2929
2929
  var RegistrarActionsOrders = {
2930
+ /**
2931
+ * Returns registrar actions newest-first.
2932
+ *
2933
+ * Sorts by block timestamp descending. Because each action's identifier encodes
2934
+ * all ordering-relevant onchain properties, this also correctly orders actions
2935
+ * that share the same block timestamp by the chronological order in which they
2936
+ * were executed within the block.
2937
+ */
2930
2938
  LatestRegistrarActions: "orderBy[timestamp]=desc"
2931
2939
  };
2932
2940
 
@@ -4468,18 +4476,14 @@ var TtlCache = class {
4468
4476
  import {
4469
4477
  maybeGetDatasource as maybeGetDatasource5
4470
4478
  } from "@ensnode/datasources";
4471
- function buildIndexedBlockranges(namespace, pluginsRequiredDatasourceNames) {
4479
+ function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
4472
4480
  const indexedBlockranges = /* @__PURE__ */ new Map();
4473
- for (const [pluginName, requiredDatasourceNames] of pluginsRequiredDatasourceNames) {
4474
- for (const requiredDatasourceName of requiredDatasourceNames) {
4475
- const requiredDatasource = maybeGetDatasource5(namespace, requiredDatasourceName);
4476
- if (!requiredDatasource) {
4477
- throw new Error(
4478
- `Datasource ${requiredDatasourceName} required by plugin ${pluginName} is not defined in namespace ${namespace}.`
4479
- );
4480
- }
4481
- const datasourceChainId = requiredDatasource.chain.id;
4482
- const datasourceContracts = Object.values(requiredDatasource.contracts);
4481
+ for (const [, datasourceNames] of pluginsDatasourceNames) {
4482
+ for (const datasourceName of datasourceNames) {
4483
+ const datasource = maybeGetDatasource5(namespace, datasourceName);
4484
+ if (!datasource) continue;
4485
+ const datasourceChainId = datasource.chain.id;
4486
+ const datasourceContracts = Object.values(datasource.contracts);
4483
4487
  for (const datasourceContract of datasourceContracts) {
4484
4488
  const currentChainIndexedBlockrange = indexedBlockranges.get(datasourceChainId);
4485
4489
  const contractIndexedBlockrange = buildBlockNumberRange(