@secondlayer/subgraphs 6.1.2 → 6.2.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.
@@ -2,7 +2,7 @@
2
2
  import { createHash } from "node:crypto";
3
3
  import { getTargetDb } from "@secondlayer/shared/db";
4
4
  import { getWebhook } from "@secondlayer/shared/db/queries/webhooks";
5
- import { logger as logger3 } from "@secondlayer/shared/logger";
5
+ import { logger as logger2 } from "@secondlayer/shared/logger";
6
6
  import { sql } from "kysely";
7
7
 
8
8
  // src/schema/utils.ts
@@ -337,11 +337,14 @@ class PublicApiBlockSource {
337
337
  const found = hits.filter((h) => h !== null);
338
338
  return found.length ? Math.min(...found) : null;
339
339
  }
340
- getTip() {
340
+ getTip(opts) {
341
341
  if (this.eventTypes.some((t) => VM_INDEX_EVENT_TYPES.has(t))) {
342
- return this.http.getIndexSourceTip();
342
+ return this.http.getIndexSourceTip(opts);
343
343
  }
344
- return this.http.getIndexTip();
344
+ return this.http.getIndexTip(opts);
345
+ }
346
+ getDecodedHeights() {
347
+ return this.http.getDecodedHeights();
345
348
  }
346
349
  async loadBlockRange(fromHeight, toHeight) {
347
350
  const withTx = !this.needsTransactions;
@@ -395,11 +398,6 @@ import { resolveTraitContractIds } from "@secondlayer/shared/db/queries/contract
395
398
  // src/runtime/decoder-bound.ts
396
399
  import { committedHeight } from "@secondlayer/shared";
397
400
  import { getSourceDb as getSourceDb2 } from "@secondlayer/shared/db";
398
- import {
399
- defaultInternalIndexApiKey,
400
- defaultInternalIndexBaseUrl
401
- } from "@secondlayer/shared/index-internal-auth";
402
- import { logger as logger2 } from "@secondlayer/shared/logger";
403
401
 
404
402
  // src/runtime/source-matcher.ts
405
403
  var patternCache = new Map;
@@ -1124,7 +1122,7 @@ async function replayWebhook(input) {
1124
1122
  if (rows.length < BATCH_SIZE)
1125
1123
  break;
1126
1124
  }
1127
- logger3.info("Replay enqueued", {
1125
+ logger2.info("Replay enqueued", {
1128
1126
  webhook: sub.name,
1129
1127
  replayId,
1130
1128
  scanned,
@@ -1165,7 +1163,7 @@ async function replayChainWebhook(db, sub, input, opts) {
1165
1163
  });
1166
1164
  }
1167
1165
  }
1168
- logger3.info("Chain replay enqueued", {
1166
+ logger2.info("Chain replay enqueued", {
1169
1167
  webhook: sub.name,
1170
1168
  replayId,
1171
1169
  scanned,
@@ -1182,5 +1180,5 @@ export {
1182
1180
  replayWebhook
1183
1181
  };
1184
1182
 
1185
- //# debugId=E2CDDEEBE35A718264756E2164756E21
1183
+ //# debugId=289410C8533320D864756E2164756E21
1186
1184
  //# sourceMappingURL=replay.js.map