@secondlayer/sdk 14.5.1 → 15.0.1

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.ts CHANGED
@@ -4,7 +4,17 @@ import { InstanceDiagnosis, PublicStatus } from "@secondlayer/shared/archive/ins
4
4
  /** Structural `/public/status` payload. Extra fields are ignored by diagnosis. */
5
5
  type InstanceStatus = PublicStatus;
6
6
  type InstanceClient = {
7
+ /**
8
+ * Get the instance's public status report.
9
+ *
10
+ * Reads `GET /public/status`: the overall status, chain tip, chain integrity, and the state of each service and decoder.
11
+ */
7
12
  status(): Promise<InstanceStatus>;
13
+ /**
14
+ * Turn the status report into a verdict with next steps.
15
+ *
16
+ * Resolves to a `state` (`healthy`, `empty-index`, or `degraded`), the API's own `overall` status, and a list of issues, each with the commands that resolve it. A fresh instance with no blocks indexed reads as `empty-index`, not broken.
17
+ */
8
18
  diagnose(): Promise<InstanceDiagnosis>;
9
19
  };
10
20
  type ArchiveVerifyInput = {
@@ -107,33 +117,83 @@ type ArchiveLoadOptions = {
107
117
  insecure?: boolean;
108
118
  };
109
119
  type ArchiveClient = {
120
+ /**
121
+ * Load the latest signed archive manifest.
122
+ *
123
+ * Reads `<archive>/latest.json` unless `against` names another manifest URL. The manifest's ed25519 signature is checked against the archive signing key, and a missing or invalid one throws `ArchiveSignatureError`. `insecure: true` skips the check; `signature.verified` on the result says whether it held.
124
+ */
110
125
  latest(against?: string, opts?: ArchiveLoadOptions): Promise<LoadedArchive>;
126
+ /**
127
+ * Load an archive manifest from a URL.
128
+ *
129
+ * Takes http(s) URLs only; a local path throws a `ValidationError` and stays on the CLI. The signature check is the same as {@link latest}.
130
+ */
111
131
  load(against: string, opts?: ArchiveLoadOptions): Promise<LoadedArchive>;
132
+ /**
133
+ * Get the archive's current operational state.
134
+ *
135
+ * Reads the public `status.json`: `fresh`, `lagging`, `stale`, `gap`, `failed-audit`, or `source-unavailable`, plus how far the last signed publish reaches.
136
+ */
112
137
  status(): Promise<ArchiveStatus>;
138
+ /**
139
+ * List a loaded archive's partitions, optionally filtered.
140
+ *
141
+ * Runs locally on the manifest you already loaded and makes no request. Filter by `dataset` (`blocks`, `transactions`, or `events`) and a block range.
142
+ */
113
143
  partitions(ref: LoadedArchive, filter?: {
114
144
  dataset?: ArchiveDataset;
115
145
  fromBlock?: number;
116
146
  toBlock?: number;
117
147
  }): ArchivePartition[];
148
+ /**
149
+ * Price a fetch against your balance before you pay for it.
150
+ *
151
+ * Nothing is charged. `flow` is `bootstrap` or `repair`. The quote has the bundle count, the price in USD, the free repair allowance applied, your balance, and `sufficient`. Needs an account key (`sk-sl_*`), not an instance token.
152
+ */
118
153
  quote(input: {
119
154
  paths: string[];
120
155
  flow: ArchiveFlow;
121
156
  }): Promise<ArchiveQuote>;
157
+ /**
158
+ * Get presigned download URLs for archive partitions.
159
+ *
160
+ * Draws credits per partition bundle; your first six repair bundles each month are free. Lists longer than 64 paths go out in batches of 64. Each URL is short-lived (`expiresAt`); pass it to {@link download}. An empty balance throws `InsufficientArchiveCreditsError` with the shortfall. Needs an account key (`sk-sl_*`).
161
+ */
122
162
  fetch(input: {
123
163
  paths: string[];
124
164
  flow: ArchiveFlow;
125
165
  }): Promise<ArchiveFetchResult>;
166
+ /**
167
+ * Download a partition's bytes and verify them.
168
+ *
169
+ * The sha256 is checked against the manifest, and a mismatch throws `ArchiveSignatureError`. On the official archive host you must pass the presigned `url` from {@link fetch}, or it throws a `ValidationError`; any other host downloads straight from its archive tree.
170
+ */
126
171
  download(partition: ArchivePartition, opts?: {
127
172
  url?: string;
128
173
  }): Promise<Uint8Array>;
129
174
  credits: {
175
+ /**
176
+ * Get your archive credit balance.
177
+ *
178
+ * Returns `creditsUsdMicros` (millionths of a dollar, as a string) and your auto-refill setting. Needs an account key (`sk-sl_*`).
179
+ */
130
180
  balance(): Promise<ArchiveCreditsBalance>;
181
+ /**
182
+ * Start a card checkout for a credit pack.
183
+ *
184
+ * `pack` is the dollar amount: 10, 25, 50, or 100. Resolves to the checkout `url`. Needs no account key.
185
+ */
131
186
  checkout(input: {
132
187
  email: string;
133
188
  pack: 10 | 25 | 50 | 100;
134
189
  }): Promise<{
135
190
  url: string;
136
191
  }>;
192
+ /**
193
+ * Set or turn off automatic credit refill.
194
+ *
195
+ * Pass `belowUsd` and `packUsd` to buy a pack whenever the balance drops below the threshold, or `{ off: true }` to stop. Needs an account key (`sk-sl_*`).
196
+ */
137
197
  refill(input: {
138
198
  belowUsd: number;
139
199
  packUsd: 10 | 25 | 50 | 100;
@@ -147,6 +207,11 @@ type ArchiveClient = {
147
207
  };
148
208
  /** Hosted archive client plus instance `verify`. `status()` is still the public archive tree. */
149
209
  type SecondLayerArchive = ArchiveClient & {
210
+ /**
211
+ * Check your instance's data against a signed archive.
212
+ *
213
+ * Runs `POST /v1/archive/verify` on your instance: read-only, and it compares raw identity digests only (the deep semantic check is CLI-only). Resolves to `clean`, `diverged`, or `unanchored`; a failed signature is `unanchored`, never `clean`. Narrow the check with `fromBlock` and `toBlock`. Verification is free.
214
+ */
150
215
  verify(input: ArchiveVerifyInput): Promise<ArchiveVerifyResult>;
151
216
  };
152
217
  type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
@@ -311,8 +376,10 @@ declare class Contracts extends BaseClient {
311
376
  /** Find contracts conforming to `trait`. `trait` is required (server 400s without it). */
312
377
  list(params: ContractsListParams): Promise<ContractsEnvelope>;
313
378
  /**
314
- * Fetch a single contract from the registry by id (the prod-safe ABI source).
315
- * Pass `{ includeAbi: true }` for the full ABI blob. Resolves null on 404.
379
+ * Get one contract from the registry by id, or `null`.
380
+ *
381
+ * The prod-safe ABI source. Pass `{ includeAbi: true }` for the full ABI
382
+ * blob. Resolves to `null` on 404.
316
383
  */
317
384
  get(contractId: string, opts?: {
318
385
  includeAbi?: boolean;
@@ -552,7 +619,7 @@ type StreamsTip = {
552
619
  /** Oldest seekable cursor (`<oldest_seekable_height>:0`); `null` = unlimited. */
553
620
  oldest_cursor?: string | null;
554
621
  };
555
- /** `chain=bitcoin` tip (plan 059) — no `burn_block_height`/retention fields,
622
+ /** `chain=bitcoin` tip — no `burn_block_height`/retention fields,
556
623
  * since Bitcoin has no burn chain of its own and Runes reads have no
557
624
  * retention ladder. Returned by `tip({ chain: "bitcoin" })`. */
558
625
  type StreamsBitcoinTip = {
@@ -568,7 +635,7 @@ type StreamsCanonicalBlock = {
568
635
  burn_block_hash: string | null;
569
636
  is_canonical: true;
570
637
  };
571
- /** `chain=bitcoin` canonical block (plan 059) — no burn-chain fields. */
638
+ /** `chain=bitcoin` canonical block — no burn-chain fields. */
572
639
  type StreamsBitcoinCanonicalBlock = {
573
640
  block_height: number;
574
641
  block_hash: string;
@@ -651,8 +718,8 @@ type StreamsEventsListParamsCommon = {
651
718
  toHeight?: number;
652
719
  limit?: number;
653
720
  };
654
- /** `chain: "stacks"` (default, omit `chain` entirely) — unchanged since
655
- * before plan 059. */
721
+ /** `chain: "stacks"` (default, omit `chain` entirely) — unchanged since before Runes events
722
+ * were added. */
656
723
  type StreamsEventsStacksListParams = StreamsEventsListParamsCommon & {
657
724
  chain?: "stacks";
658
725
  /** `vm` reads ordinal. Omit for Streams 1.0. */
@@ -672,7 +739,7 @@ type StreamsEventsStacksListParams = StreamsEventsListParamsCommon & {
672
739
  filters?: StreamsFilterMap;
673
740
  };
674
741
  /**
675
- * `chain: "bitcoin"` (plan 059) — Runes events, own cursor space. `types` is
742
+ * `chain: "bitcoin"` — Runes events, own cursor space. `types` is
676
743
  * restricted to {@link RuneEventType} at the type level, so e.g.
677
744
  * `{ chain: "bitcoin", types: ["ft_transfer"] }` is a compile error rather
678
745
  * than a silent 400 at request time. `contractId`/`sender`/`recipient`/
@@ -710,7 +777,7 @@ type StreamsEventsStreamStacksParams = StreamsEventsStreamCommon & {
710
777
  /** Labelled filter groups; see {@link StreamsEventsListParams.filters}. */
711
778
  filters?: StreamsFilterMap;
712
779
  };
713
- /** `chain: "bitcoin"` (plan 059/061) — Runes events, tailed the same way as
780
+ /** `chain: "bitcoin"` — Runes events, tailed the same way as
714
781
  * the Stacks default. `types` is restricted to {@link RuneEventType} at the
715
782
  * type level, matching {@link StreamsEventsBitcoinListParams}.
716
783
  * `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters` don't exist
@@ -768,7 +835,7 @@ type StreamsEventsSubscribeStacksParams = StreamsEventsSubscribeCommon & {
768
835
  */
769
836
  onEvent: (event: StreamsEvent) => void | Promise<void>;
770
837
  };
771
- /** `chain: "bitcoin"` (plan 059/061) — Runes events pushed live, on their own
838
+ /** `chain: "bitcoin"` — Runes events pushed live, on their own
772
839
  * cursor space. `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters`
773
840
  * don't exist on this branch — they're Stacks-only. */
774
841
  type StreamsEventsSubscribeBitcoinParams = StreamsEventsSubscribeCommon & {
@@ -978,7 +1045,7 @@ type StreamsEventsConsumeParams<
978
1045
  wake?: () => Promise<void>;
979
1046
  };
980
1047
  /**
981
- * `chain: "bitcoin"` (plan 059/061) — the checkpointed sweep over Runes
1048
+ * `chain: "bitcoin"` — the checkpointed sweep over Runes
982
1049
  * events. A separate, simpler type from {@link StreamsEventsConsumeParams}
983
1050
  * rather than a widened union member: `filters`/`on`/`decoded` are Stacks-only
984
1051
  * concepts (labelled OR-groups and Index-shaped projection have no Runes
@@ -1056,7 +1123,7 @@ type StreamsConsumeStacksParams = StreamsConsumeCommon & {
1056
1123
  * event echoes the labels it matched. */
1057
1124
  filters?: StreamsFilterMap;
1058
1125
  };
1059
- /** `chain: "bitcoin"` (plan 059/061) — Runes batches, own cursor space.
1126
+ /** `chain: "bitcoin"` — Runes batches, own cursor space.
1060
1127
  * `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters` don't exist
1061
1128
  * on this branch — they're Stacks-only. */
1062
1129
  type StreamsConsumeBitcoinParams = StreamsConsumeCommon & {
@@ -1160,38 +1227,43 @@ type StreamsDumps = {
1160
1227
  };
1161
1228
  type StreamsClient = {
1162
1229
  /**
1163
- * Follow Streams as an async iterator of page batches.
1230
+ * Read Streams page by page as an async iterator.
1231
+ *
1232
+ * Yields one {@link StreamsBatch} per events page, so each yield is exactly
1233
+ * one API call. Empty pages are skipped; at the tip the iterator polls again
1234
+ * every `intervalMs` (default 2000) until `signal` aborts.
1164
1235
  *
1165
- * Yields one {@link StreamsBatch} per `GET /v1/streams/events` page — the
1166
- * existing envelope (`events`, `next_cursor` → `cursor`, `tip`, `reorgs`)
1167
- * with zero extra API calls. Batches are chosen over per-block groupings
1168
- * because the envelope is page-keyed, so every yield is exactly one fetch.
1169
- * Empty pages are skipped; at the tip the iterator re-polls every
1170
- * `intervalMs` (default 2000) until aborted via `signal`.
1236
+ * Reorgs appear on `batch.reorgs`, but the cursor is not rewound for you.
1237
+ * Use `events.consume` with `onReorg` when you need rollback.
1171
1238
  *
1172
- * Reorgs are surfaced on the batch (`batch.reorgs`) but the cursor is not
1173
- * rewound automatically — use `events.consume` with `onReorg` for managed
1174
- * rollback semantics.
1239
+ * A literal `types` array narrows every batch's event union to those types.
1240
+ * `chain: "bitcoin"` batches carry Runes rows only, on the bitcoin tip shape.
1175
1241
  */
1176
- /** `chain: "bitcoin"` — batches carry Runes rows only, on the bitcoin tip
1177
- * shape (plan 059/061). */
1178
1242
  consume(params: StreamsConsumeBitcoinParams): AsyncIterableIterator<StreamsBatch<RuneStreamsEvent, StreamsBitcoinTip>>;
1179
- /** Narrowing overload: a literal `types` array narrows every batch's
1180
- * event union to exactly those members. */
1181
1243
  consume<const T extends readonly StreamsEventType[]>(params: StreamsConsumeStacksParams & {
1182
1244
  types: T;
1183
1245
  }): AsyncIterableIterator<StreamsBatch<StreamsEventOfTypes<T>>>;
1184
1246
  consume(params?: StreamsConsumeParams): AsyncIterableIterator<StreamsBatch>;
1185
1247
  events: {
1186
- /** `clock: "vm"` pages carry vm rows only (a parallel vocabulary,
1187
- * `event_index` = `ordinal`). Never `StreamsEvent`. Stacks-only —
1188
- * `chain: "bitcoin"` has no `clock`. */
1248
+ /**
1249
+ * Read one page of chain events and the next cursor.
1250
+ *
1251
+ * Narrow with `types`, `notTypes`, `contractId`, `sender`, `recipient`,
1252
+ * `assetIdentifier`, `fromHeight`/`toHeight`, or labelled `filters`.
1253
+ * Filters match exactly, and an event type without a given field never
1254
+ * matches it. Pass `next_cursor` back as `cursor` to continue. The
1255
+ * envelope also carries the `tip` and any `reorgs`. To write the events
1256
+ * somewhere with a checkpoint, use `events.consume` instead.
1257
+ *
1258
+ * A literal `types` array narrows every row to those event types.
1259
+ * `clock: "vm"` pages carry vm rows only (a parallel vocabulary,
1260
+ * `event_index` = `ordinal`), never `StreamsEvent`; it is Stacks only.
1261
+ * `chain: "bitcoin"` pages carry Runes rows only, on the bitcoin tip shape,
1262
+ * and filter by `rune` or `address`.
1263
+ */
1189
1264
  list(params: StreamsEventsStacksListParams & {
1190
1265
  clock: "vm";
1191
1266
  }): Promise<StreamsEventsEnvelope<VmStreamsEvent>>;
1192
- /** Narrowing overload, matching `consume`. Classic clock only —
1193
- * `clock: "vm"` is overload 1, and a general `StreamsEventsListParams`
1194
- * variable (clock unresolved) is the wire-union fallback. */
1195
1267
  list<const T extends readonly StreamsEventType[]>(params: Omit<StreamsEventsStacksListParams, "clock" | "types" | "notTypes"> & {
1196
1268
  types: T;
1197
1269
  notTypes?: readonly StreamsEventType[];
@@ -1202,27 +1274,35 @@ type StreamsClient = {
1202
1274
  notTypes?: readonly StreamsEventType[];
1203
1275
  clock?: "classic";
1204
1276
  }): Promise<StreamsEventsEnvelope>;
1205
- /** `chain: "bitcoin"` pages carry Runes rows only, on the bitcoin tip
1206
- * shape (plan 059). */
1207
1277
  list(params: StreamsEventsBitcoinListParams): Promise<StreamsEventsEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1208
- /** Unresolved `chain`/`clock` on a general params variable: the wire union. */
1209
1278
  list(params: StreamsEventsListParams): Promise<StreamsEventsEnvelope<StreamsWireEvent>>;
1210
- /** `chain: "bitcoin"` — Runes events for one transaction. */
1279
+ /**
1280
+ * Read every event a transaction emitted.
1281
+ *
1282
+ * Returns the events and the `tip`, with no `next_cursor`: one transaction
1283
+ * is one response.
1284
+ *
1285
+ * `chain: "bitcoin"` returns the Runes events for one Bitcoin transaction.
1286
+ */
1211
1287
  byTxId(txId: string, opts: {
1212
1288
  chain: "bitcoin";
1213
1289
  }): Promise<StreamsEventsListEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1214
1290
  byTxId(txId: string): Promise<StreamsEventsListEnvelope>;
1215
1291
  /**
1216
- * Pull pages from Streams and call `onBatch` after each page.
1292
+ * Run a checkpointed indexer that rewinds on reorgs.
1217
1293
  *
1218
- * Use `consume` for indexers and ETL jobs that own checkpointing. Return
1219
- * the checkpoint cursor from `onBatch`. Default `mode: "tail"` keeps
1220
- * polling when caught up; `mode: "bounded"` exits on the first empty page.
1221
- * The consumer also exits when `maxPages`, `maxEmptyPolls`, or `signal`
1222
- * stops it.
1294
+ * Write your rows in `onBatch` and commit `ctx.cursor` in the same
1295
+ * transaction; resume with `fromCursor`. Reorgs at or below your checkpoint
1296
+ * call `onReorg`, then the loop re-reads from the fork point. Delivery is
1297
+ * at-least-once, so keep writes idempotent. With a `sink`, the checkpoint
1298
+ * and rollback are handled for you. `mode: "tail"` (default) keeps polling
1299
+ * at the tip; `mode: "bounded"` returns on the first empty page. It also
1300
+ * stops on `maxPages`, `maxEmptyPolls`, or `signal`. Pass `finalizedOnly`
1301
+ * to skip reorg handling entirely.
1302
+ *
1303
+ * `chain: "bitcoin"` sweeps Runes events; see
1304
+ * {@link StreamsEventsConsumeBitcoinParams}.
1223
1305
  */
1224
- /** `chain: "bitcoin"` — the checkpointed sweep over Runes events; see
1225
- * {@link StreamsEventsConsumeBitcoinParams}. */
1226
1306
  consume<TTx = never>(params: StreamsEventsConsumeBitcoinParams<TTx> & {
1227
1307
  sink?: ConsumerSink<TTx>;
1228
1308
  }): Promise<StreamsEventsConsumeResult>;
@@ -1234,46 +1314,66 @@ type StreamsClient = {
1234
1314
  sink?: ConsumerSink<TTx>;
1235
1315
  }): Promise<StreamsEventsConsumeResult>;
1236
1316
  /**
1237
- * Backfill from bulk dumps, then continue live from the dump→live seam in
1238
- * one call. Iterates finalized dump files (via `onDumpFile`) in block
1239
- * order, then tails live from the manifest's `latest_finalized_cursor`
1240
- * (exclusive input → no gap or duplicate at the seam). Requires
1241
- * `dumpsBaseUrl`.
1317
+ * Backfill from bulk dumps, then continue live in one call.
1318
+ *
1319
+ * Hands each finalized dump file to `onDumpFile` in block order, then tails
1320
+ * live from the manifest's `latest_finalized_cursor`, with no gap or
1321
+ * duplicate at the seam. A file that straddles `from` is delivered whole,
1322
+ * so skip the rows at or below it. Requires `dumpsBaseUrl`.
1242
1323
  */
1243
1324
  replay(params: StreamsEventsReplayParams): Promise<StreamsEventsConsumeResult>;
1244
1325
  /**
1245
- * Follow Streams as an async iterator.
1326
+ * Read events one at a time as an async iterator.
1246
1327
  *
1247
- * Use `stream` for live processors and watch-style apps. It tails
1248
- * indefinitely by default and stops when its `AbortSignal`, `maxPages`, or
1249
- * `maxEmptyPolls` stops it.
1328
+ * For live processors and watch-style apps that keep their own state. It
1329
+ * tails indefinitely and stops when `signal`, `maxPages`, or
1330
+ * `maxEmptyPolls` ends it. There is no checkpoint or reorg handling; use
1331
+ * `events.consume` for that.
1332
+ *
1333
+ * A literal `types` array narrows every event to those types.
1334
+ * `chain: "bitcoin"` yields Runes events only.
1250
1335
  */
1251
- /** `chain: "bitcoin"` — Runes events only (plan 059/061). */
1252
1336
  stream(params: StreamsEventsStreamBitcoinParams): AsyncIterable<RuneStreamsEvent>;
1253
- /** Narrowing overload, matching `consume`. */
1254
1337
  stream<const T extends readonly StreamsEventType[]>(params: StreamsEventsStreamStacksParams & {
1255
1338
  types: T;
1256
1339
  }): AsyncIterable<StreamsEventOfTypes<T>>;
1257
1340
  stream(params?: StreamsEventsStreamParams): AsyncIterable<StreamsEvent>;
1258
1341
  /**
1259
- * Subscribe to the real-time SSE push surface. Calls `onEvent` for each new
1260
- * canonical event as the server pushes it (chain cadence, not poll-bounded),
1261
- * and verifies each frame's inline ed25519 signature when the client was
1262
- * created with `verify`. Returns an unsubscribe function whose `done`
1263
- * settles when the loop ends. Not reorg-aware: an event delivered then
1264
- * orphaned is never retracted. Durable writers use `consume()`.
1342
+ * Get each new event pushed to `onEvent` as it lands.
1343
+ *
1344
+ * Reconnects from the last handled cursor after a transport error, and
1345
+ * verifies each frame's ed25519 signature when the client has `verify` on.
1346
+ * Returns an unsubscribe function whose `done` promise settles when the
1347
+ * loop ends. Not reorg-aware: an event delivered and then orphaned is never
1348
+ * retracted. Durable writers use `events.consume`.
1349
+ *
1350
+ * `chain: "bitcoin"` delivers Runes rows to `onEvent`.
1265
1351
  */
1266
- /** `chain: "bitcoin"` — `onEvent` receives Runes rows (plan 059/061). */
1267
1352
  subscribe(params: StreamsEventsSubscribeBitcoinParams): StreamsSubscription;
1268
1353
  subscribe(params: StreamsEventsSubscribeStacksParams): StreamsSubscription;
1269
1354
  };
1270
1355
  blocks: {
1356
+ /**
1357
+ * Read every event in one block, by height or hash.
1358
+ *
1359
+ * Returns the events and the `tip`, with no `next_cursor`.
1360
+ *
1361
+ * `chain: "bitcoin"` returns the Runes events in one Bitcoin block.
1362
+ */
1271
1363
  events(heightOrHash: number | string, opts: {
1272
1364
  chain: "bitcoin";
1273
1365
  }): Promise<StreamsEventsListEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1274
1366
  events(heightOrHash: number | string): Promise<StreamsEventsListEnvelope>;
1275
1367
  };
1276
1368
  reorgs: {
1369
+ /**
1370
+ * List chain reorgs since a cursor.
1371
+ *
1372
+ * `since` is required. Each reorg gives its `fork_point_height` and the
1373
+ * orphaned range. Page with `next_since`.
1374
+ *
1375
+ * `chain: "bitcoin"` lists Bitcoin reorgs, on their own cursor space.
1376
+ */
1277
1377
  list(params: StreamsReorgsListParams & {
1278
1378
  chain: "bitcoin";
1279
1379
  }): Promise<StreamsReorgsListEnvelope>;
@@ -1281,10 +1381,27 @@ type StreamsClient = {
1281
1381
  };
1282
1382
  /** Bulk parquet dumps. Requires `dumpsBaseUrl` on the client. */
1283
1383
  dumps: StreamsDumps;
1384
+ /**
1385
+ * Get the canonical block at a height.
1386
+ *
1387
+ * Returns the block hash and, on Stacks, the burn block it anchors to.
1388
+ *
1389
+ * `chain: "bitcoin"` returns the Bitcoin block, without burn-chain fields.
1390
+ */
1284
1391
  canonical(height: number, opts: {
1285
1392
  chain: "bitcoin";
1286
1393
  }): Promise<StreamsBitcoinCanonicalBlock>;
1287
1394
  canonical(height: number): Promise<StreamsCanonicalBlock>;
1395
+ /**
1396
+ * Get the current chain tip.
1397
+ *
1398
+ * Returns the tip height and hash, `finalized_height`, and `lag_seconds`. On
1399
+ * Stacks it also reports the oldest height your tier can seek; older reads
1400
+ * come from the bulk dumps.
1401
+ *
1402
+ * `chain: "bitcoin"` returns the Bitcoin tip, without burn-chain or retention
1403
+ * fields.
1404
+ */
1288
1405
  tip(opts: {
1289
1406
  chain: "bitcoin";
1290
1407
  }): Promise<StreamsBitcoinTip>;
@@ -2320,15 +2437,27 @@ type SbtcDepositsConsumeParams<TTx = never> = Omit<SbtcDepositsListParams, "curs
2320
2437
  * events, scoreboard). The only productized decoded sBTC peg feed on Stacks. */
2321
2438
  interface SbtcResource {
2322
2439
  deposits: {
2323
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2324
- * requested columns plus {@link SbtcDepositAlwaysFields}. */
2440
+ /**
2441
+ * Read one page of completed sBTC deposits.
2442
+ *
2443
+ * Filter by `sender`, `bitcoinTxid`, and a height range. `confirmed: true` keeps only deposits past the finality boundary. `fields` returns only those columns and narrows the row type; `cursor` and `block_height` always come back.
2444
+ */
2325
2445
  list<const F extends keyof IndexSbtcDeposit & string>(params: SbtcDepositsListParams & {
2326
2446
  fields: readonly F[];
2327
2447
  }): Promise<SbtcDepositsEnvelope<SbtcDepositFields<F>>>;
2328
2448
  list(params?: SbtcDepositsListParams): Promise<SbtcDepositsEnvelope>;
2449
+ /**
2450
+ * Iterate every completed sBTC deposit, paging for you.
2451
+ *
2452
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2453
+ */
2329
2454
  walk(params?: SbtcDepositsWalkParams): AsyncIterable<IndexSbtcDeposit>;
2330
- /** Checkpointed sweep of completed deposits — append-only, so safe to
2331
- * mirror. See {@link IndexConsumeOptions}. */
2455
+ /**
2456
+ * Run a checkpointed, reorg-aware indexer over completed deposits.
2457
+ *
2458
+ * Deposits are append-only, so they are safe to mirror. See
2459
+ * {@link IndexConsumeOptions}.
2460
+ */
2332
2461
  consume<TTx = never>(params: SbtcDepositsConsumeParams<TTx> & {
2333
2462
  sink?: ConsumerSink<TTx>;
2334
2463
  }): Promise<{
@@ -2340,21 +2469,43 @@ interface SbtcResource {
2340
2469
  get(bitcoinTxid: string): Promise<SbtcDepositEnvelope | null>;
2341
2470
  };
2342
2471
  withdrawals: {
2343
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2344
- * requested columns plus {@link SbtcWithdrawalAlwaysFields}. */
2472
+ /**
2473
+ * Read one page of sBTC withdrawals, each with its current status.
2474
+ *
2475
+ * Filter by `status` (`REQUESTED`, `ACCEPTED`, `REJECTED`), `sender`, `requestId`, `settlementConfirmed`, and a height range. A row changes as the peg-out moves along, which is why withdrawals have no `consume`. `fields` returns only those columns and narrows the row type; `cursor` and `request_id` always come back.
2476
+ */
2345
2477
  list<const F extends keyof IndexSbtcWithdrawal & string>(params: SbtcWithdrawalsListParams & {
2346
2478
  fields: readonly F[];
2347
2479
  }): Promise<SbtcWithdrawalsEnvelope<SbtcWithdrawalFields<F>>>;
2348
2480
  list(params?: SbtcWithdrawalsListParams): Promise<SbtcWithdrawalsEnvelope>;
2481
+ /**
2482
+ * Iterate every sBTC withdrawal, paging for you.
2483
+ *
2484
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2485
+ */
2349
2486
  walk(params?: SbtcWithdrawalsWalkParams): AsyncIterable<IndexSbtcWithdrawal>;
2350
2487
  /** Fetch a withdrawal's full lifecycle by request id; 404 → null. */
2351
2488
  get(requestId: number): Promise<SbtcWithdrawalEnvelope | null>;
2352
2489
  };
2353
2490
  events: {
2491
+ /**
2492
+ * Read one page of the raw sBTC peg event log.
2493
+ *
2494
+ * Filter by `topic`, `sender`, `requestId`, `bitcoinTxid`, and a height range. `confirmed: true` keeps only events past the finality boundary.
2495
+ */
2354
2496
  list(params?: SbtcEventsListParams): Promise<SbtcEventsEnvelope>;
2497
+ /**
2498
+ * Iterate every sBTC peg event, paging for you.
2499
+ *
2500
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2501
+ */
2355
2502
  walk(params?: SbtcEventsWalkParams): AsyncIterable<IndexSbtcEvent>;
2356
- /** Checkpointed sweep of the raw peg event log — append-only across all
2357
- * six topics. See {@link IndexConsumeOptions}. */
2503
+ /**
2504
+ * Run a checkpointed, reorg-aware indexer over the raw peg event log.
2505
+ *
2506
+ * The log is append-only across all six topics. See
2507
+ * {@link IndexConsumeOptions}.
2508
+ */
2358
2509
  consume<TTx = never>(params: SbtcEventsConsumeParams<TTx> & {
2359
2510
  sink?: ConsumerSink<TTx>;
2360
2511
  }): Promise<{
@@ -2363,7 +2514,11 @@ interface SbtcResource {
2363
2514
  emptyPolls: number;
2364
2515
  }>;
2365
2516
  };
2366
- /** The peg scoreboard — a single all-time aggregate (no pagination). */
2517
+ /**
2518
+ * Get the all-time sBTC peg scoreboard.
2519
+ *
2520
+ * A single aggregate, with no pagination.
2521
+ */
2367
2522
  summary(): Promise<SbtcSummaryEnvelope>;
2368
2523
  }
2369
2524
  /** One pox-5 reward cycle, exact to the node. */
@@ -2444,10 +2599,24 @@ type PoxCyclesWalkParams = Omit<PoxCyclesListParams, "limit"> & WalkOptions;
2444
2599
  /** `index.pox` — reward cycles of the current PoX (PoX-5). */
2445
2600
  interface PoxResource {
2446
2601
  cycles: {
2602
+ /**
2603
+ * Read one page of PoX reward cycles, newest first.
2604
+ *
2605
+ * `cursor` is a `reward_cycle` number, and the page returns the cycles below it. `next_cursor` is the next cycle number to page from, or `null` at the end. This reports the current PoX (PoX-5); PoX-4 history is not served here, so read `stacking` for it.
2606
+ */
2447
2607
  list(params?: PoxCyclesListParams): Promise<PoxCyclesEnvelope>;
2608
+ /**
2609
+ * Iterate every reward cycle, paging for you.
2610
+ *
2611
+ * Takes the same filters as `list` (it pages by reward cycle number). Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2612
+ */
2448
2613
  walk(params?: PoxCyclesWalkParams): AsyncIterable<IndexPoxCycle>;
2449
- /** Fetch one reward cycle by number; 404 (unknown cycle, or below pox-5's
2450
- * first reward cycle 141 — final PoX-4 history, not served here) → null. */
2614
+ /**
2615
+ * Get one reward cycle by number, or `null`.
2616
+ *
2617
+ * Resolves to `null` on 404: an unknown cycle, or one below pox-5's first
2618
+ * reward cycle (141), whose PoX-4 history is final and not served here.
2619
+ */
2451
2620
  get(rewardCycle: number): Promise<PoxCycleEnvelope | null>;
2452
2621
  };
2453
2622
  }
@@ -2522,15 +2691,27 @@ type Pox5EventsConsumeParams<TTx = never> = Omit<Pox5EventsListParams, "cursor"
2522
2691
  * epoch 4.0 hard fork onward (PoX-4's `index.stacking` stream ends there). */
2523
2692
  interface Pox5Resource {
2524
2693
  events: {
2525
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2526
- * requested columns plus {@link Pox5EventAlwaysFields}. */
2694
+ /**
2695
+ * Read one page of decoded PoX-5 staking events.
2696
+ *
2697
+ * Filter by `topic`, `staker`, `signer`, `signerManager`, `bondIndex`, `rewardCycle`, and a height range. `confirmed: true` keeps only rows past the finality boundary. `fields` returns only those columns and narrows the row type; `cursor`, `block_height`, and `topic` always come back.
2698
+ */
2527
2699
  list<const F extends keyof IndexPox5Event & string>(params: Pox5EventsListParams & {
2528
2700
  fields: readonly F[];
2529
2701
  }): Promise<Pox5EventsEnvelope<Pox5EventFields<F>>>;
2530
2702
  list(params?: Pox5EventsListParams): Promise<Pox5EventsEnvelope>;
2703
+ /**
2704
+ * Iterate every PoX-5 event, paging for you.
2705
+ *
2706
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2707
+ */
2531
2708
  walk(params?: Pox5EventsWalkParams): AsyncIterable<IndexPox5Event>;
2532
- /** Checkpointed sweep of the pox-5 print log — append-only across all
2533
- * 19 topics. See {@link IndexConsumeOptions}. */
2709
+ /**
2710
+ * Run a checkpointed, reorg-aware indexer over PoX-5 events.
2711
+ *
2712
+ * The pox-5 print log is append-only across all 19 topics. See
2713
+ * {@link IndexConsumeOptions}.
2714
+ */
2534
2715
  consume<TTx = never>(params: Pox5EventsConsumeParams<TTx> & {
2535
2716
  sink?: ConsumerSink<TTx>;
2536
2717
  }): Promise<{
@@ -2708,14 +2889,28 @@ interface RunesResource {
2708
2889
  /** The rune catalog. `search` prefix-matches the name; `sort` is etch
2709
2890
  * order (default) or busiest-first. */
2710
2891
  list(params?: RunesListParams): Promise<RunesEnvelope>;
2711
- /** One rune's full entry by id or name; `null` on 404 (no such rune, or
2712
- * Runes isn't configured on this instance). */
2892
+ /**
2893
+ * Get one rune by id or name, or `null`.
2894
+ *
2895
+ * Resolves to `null` on 404: no such rune, or Runes isn't configured on
2896
+ * this instance.
2897
+ */
2713
2898
  get(rune: RuneRef): Promise<RuneEnvelope | null>;
2714
2899
  /** Current per-outpoint rune balances by address or outpoint. */
2715
2900
  balances(params: RuneBalancesListParams): Promise<RuneBalancesEnvelope>;
2716
2901
  /** Etch/mint/transfer/burn events, cursor `<block_height>:<event_index>`. */
2717
2902
  activity: {
2903
+ /**
2904
+ * Read one page of Rune etch, mint, transfer, and burn events.
2905
+ *
2906
+ * Filter by `rune` (an id or a name), `address`, `kind`, `txid`, and a height range. The cursor is `<block_height>:<event_index>`, and the envelope's tip is a Bitcoin tip. `notes` says so when Runes is not configured on the instance.
2907
+ */
2718
2908
  list(params?: RuneActivityListParams): Promise<RuneActivityEnvelope>;
2909
+ /**
2910
+ * Iterate every Rune event, paging for you.
2911
+ *
2912
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2913
+ */
2719
2914
  walk(params?: RuneActivityWalkParams): AsyncIterable<IndexRuneEvent>;
2720
2915
  };
2721
2916
  }
@@ -2733,15 +2928,20 @@ interface FtTransfersResource {
2733
2928
  fields: readonly F[];
2734
2929
  }): Promise<FtTransfersEnvelope<FtTransferFields<F>>>;
2735
2930
  (params?: FtTransfersListParams): Promise<FtTransfersEnvelope>;
2736
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2737
- * requested columns plus {@link FtTransferAlwaysFields}. */
2931
+ /**
2932
+ * Read one page of fungible-token transfers, plus the cursor for the next.
2933
+ *
2934
+ * Filter by `contractId`, `assetIdentifier`, `sender`, `recipient`, and a height range. Filters are equality only: there is no amount filter. Pass `next_cursor` back as `cursor` to continue. `fields` returns only those columns and narrows the row type; `cursor`, `block_height`, and `event_type` always come back. `reorgs` on the envelope lists forks that overlap the page.
2935
+ */
2738
2936
  list<const F extends keyof FtTransfer & string>(params: FtTransfersListParams & {
2739
2937
  fields: readonly F[];
2740
2938
  }): Promise<FtTransfersEnvelope<FtTransferFields<F>>>;
2741
2939
  list(params?: FtTransfersListParams): Promise<FtTransfersEnvelope>;
2742
- /** Narrowing overload, matching `list`: `walk` forwards `fields` to the
2743
- * wire, so without this the yielded rows are stripped while the type
2744
- * still promises every column. */
2940
+ /**
2941
+ * Iterate every fungible-token transfer, paging for you.
2942
+ *
2943
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2944
+ */
2745
2945
  walk<const F extends keyof FtTransfer & string>(params: FtTransfersWalkParams & {
2746
2946
  fields: readonly F[];
2747
2947
  }): AsyncIterable<FtTransferFields<F>>;
@@ -2755,13 +2955,20 @@ interface NftTransfersResource {
2755
2955
  fields: readonly F[];
2756
2956
  }): Promise<NftTransfersEnvelope<NftTransferFields<F>>>;
2757
2957
  (params?: NftTransfersListParams): Promise<NftTransfersEnvelope>;
2758
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2759
- * requested columns plus {@link NftTransferAlwaysFields}. */
2958
+ /**
2959
+ * Read one page of NFT transfers, plus the cursor for the next.
2960
+ *
2961
+ * Filter by `contractId`, `assetIdentifier`, `sender`, `recipient`, and a height range. Pass `next_cursor` back as `cursor` to continue. `fields` returns only those columns and narrows the row type; `cursor`, `block_height`, and `event_type` always come back.
2962
+ */
2760
2963
  list<const F extends keyof NftTransfer & string>(params: NftTransfersListParams & {
2761
2964
  fields: readonly F[];
2762
2965
  }): Promise<NftTransfersEnvelope<NftTransferFields<F>>>;
2763
2966
  list(params?: NftTransfersListParams): Promise<NftTransfersEnvelope>;
2764
- /** Narrowing overload, matching `list` (see {@link FtTransfersResource}). */
2967
+ /**
2968
+ * Iterate every NFT transfer, paging for you.
2969
+ *
2970
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
2971
+ */
2765
2972
  walk<const F extends keyof NftTransfer & string>(params: NftTransfersWalkParams & {
2766
2973
  fields: readonly F[];
2767
2974
  }): AsyncIterable<NftTransferFields<F>>;
@@ -2778,9 +2985,11 @@ interface IndexEventsResource {
2778
2985
  fields: readonly F[];
2779
2986
  }): Promise<EventsEnvelope<T, IndexEventFields<T, F>>>;
2780
2987
  <T extends IndexEventType>(params: EventsListParams<T>): Promise<EventsEnvelope<T>>;
2781
- /** Narrowing overload: `fields` shrinks the returned row type to exactly
2782
- * the requested columns plus {@link IndexAlwaysFields}. `const F` means no
2783
- * `as const` at the call site. */
2988
+ /**
2989
+ * Read one page of decoded events of one type.
2990
+ *
2991
+ * `eventType` is required: a decoded type (`ft_transfer`, `print`, ...) or a VM type (`nested_contract_call`, `map_set`, ...), and a literal narrows the row type. Scope with `contractId` (one id or up to 20) or `trait`, never both, plus `assetIdentifier`, `sender`, `recipient`, `functionName`, `caller`, `map`, `varName`, `txId`, and a height range. `txContext: true` joins the submitting transaction onto each event. `fields` returns only those columns and narrows the row type; it saves wire bytes but does not change what you are billed, since rows are metered, not columns.
2992
+ */
2784
2993
  list<
2785
2994
  T extends IndexEventType,
2786
2995
  const F extends keyof IndexEventOf<T> & string
@@ -2788,9 +2997,11 @@ interface IndexEventsResource {
2788
2997
  fields: readonly F[];
2789
2998
  }): Promise<EventsEnvelope<T, IndexEventFields<T, F>>>;
2790
2999
  list<T extends IndexEventType>(params: EventsListParams<T>): Promise<EventsEnvelope<T>>;
2791
- /** Narrowing overload, matching `list`: `walk` forwards `fields` to the
2792
- * wire, so without this the yielded rows are stripped while the type
2793
- * still promises every column. */
3000
+ /**
3001
+ * Iterate every decoded event of one type, paging for you.
3002
+ *
3003
+ * Takes the same filters as `list`, including `eventType`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3004
+ */
2794
3005
  walk<
2795
3006
  T extends IndexEventType,
2796
3007
  const F extends keyof IndexEventOf<T> & string
@@ -2798,6 +3009,11 @@ interface IndexEventsResource {
2798
3009
  fields: readonly F[];
2799
3010
  }): AsyncIterable<IndexEventFields<T, F>>;
2800
3011
  walk<T extends IndexEventType>(params: EventsWalkParams<T>): AsyncIterable<IndexEventOf<T>>;
3012
+ /**
3013
+ * Run a checkpointed, reorg-aware indexer over decoded events.
3014
+ *
3015
+ * Write your rows in `onBatch` and commit `ctx.cursor` in the same transaction; resume with `fromCursor`. Without `fromCursor` or `fromHeight` the API serves only its recent default window, so pass `fromHeight: 0` for a full backfill. A reorg at or below your checkpoint calls `onReorg`, then the loop re-reads from the fork point. Delivery is at-least-once, so keep writes idempotent. With a `sink`, the checkpoint and rollback are handled for you. `finalizedOnly` holds delivery to finalized rows, so no reorg handling is needed. `mode: "tail"` (default) keeps polling at the tip; `mode: "bounded"` returns on the first empty page. Resolves to `{ cursor, pages, emptyPolls }`.
3016
+ */
2801
3017
  consume<
2802
3018
  T extends IndexEventType,
2803
3019
  TTx = never
@@ -2826,15 +3042,19 @@ type IndexDiscovery = {
2826
3042
  declare class Index extends BaseClient {
2827
3043
  constructor(options?: Partial<SecondLayerOptions>);
2828
3044
  /**
2829
- * Index discovery doc — the live vocabulary: every endpoint, each event type's
2830
- * columns, allowed/equality filters, and required-non-null fields. Read this to
2831
- * learn what's queryable (and which types accept `trait`) instead of hardcoding.
3045
+ * Get the live vocabulary of what Index can query.
3046
+ *
3047
+ * The discovery doc lists every endpoint and each event type's columns,
3048
+ * allowed and equality filters, and required-non-null fields. Read it to
3049
+ * learn what's queryable (and which types accept `trait`) instead of
3050
+ * hardcoding.
2832
3051
  */
2833
3052
  discover(): Promise<IndexDiscovery>;
2834
3053
  /**
2835
- * Empirical per-topic print payload schema for a contract — what topics it
2836
- * emits and each field's observed Clarity/TS/column types. Anonymous read;
2837
- * 404 → null.
3054
+ * Get the print payload schema a contract actually emits.
3055
+ *
3056
+ * Lists the topics it emits and each field's observed Clarity, TS, and
3057
+ * column types. Anonymous read; resolves to `null` on 404.
2838
3058
  */
2839
3059
  printSchema(contractId: string): Promise<PrintSchemaResponse | null>;
2840
3060
  /** Callable: `index.ftTransfers(params)` ≡ `index.ftTransfers.list(params)`. */
@@ -2845,8 +3065,23 @@ declare class Index extends BaseClient {
2845
3065
  * Callable: `index.events(params)` ≡ `index.events.list(params)`. */
2846
3066
  readonly events: IndexEventsResource;
2847
3067
  readonly contractCalls: {
3068
+ /**
3069
+ * Read one page of decoded contract calls.
3070
+ *
3071
+ * Filter by `contractId` (one id or up to 20) or `trait`, never both, plus `functionName`, `sender`, and a height range. Each row has the function name, arguments, result, and status. Pass `next_cursor` back as `cursor` to continue.
3072
+ */
2848
3073
  list: (params?: ContractCallsListParams) => Promise<ContractCallsEnvelope>;
3074
+ /**
3075
+ * Iterate every decoded contract call, paging for you.
3076
+ *
3077
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3078
+ */
2849
3079
  walk: (params?: ContractCallsWalkParams) => AsyncIterable<IndexContractCall>;
3080
+ /**
3081
+ * Run a checkpointed, reorg-aware indexer over contract calls.
3082
+ *
3083
+ * Write your rows in `onBatch` and commit `ctx.cursor` in the same transaction; resume with `fromCursor`. Without `fromCursor` or `fromHeight` the API serves only its recent default window, so pass `fromHeight: 0` for a full backfill. A reorg at or below your checkpoint calls `onReorg`, then the loop re-reads from the fork point. Delivery is at-least-once, so keep writes idempotent. With a `sink`, the checkpoint and rollback are handled for you. `finalizedOnly` holds delivery to finalized rows, so no reorg handling is needed. `mode: "tail"` (default) keeps polling at the tip; `mode: "bounded"` returns on the first empty page. Resolves to `{ cursor, pages, emptyPolls }`. Calls already carry `sender` and `function_name`, so there is no `txContext`.
3084
+ */
2850
3085
  consume: <TTx = never>(params: ContractCallsConsumeParams<TTx> & {
2851
3086
  sink?: ConsumerSink<TTx>;
2852
3087
  }) => Promise<{
@@ -2857,49 +3092,125 @@ declare class Index extends BaseClient {
2857
3092
  };
2858
3093
  /** Canonical block-hash map — sync only the current canonical chain. */
2859
3094
  readonly canonical: {
3095
+ /**
3096
+ * Read one page of the canonical block-hash map.
3097
+ *
3098
+ * Each row is a block's hash, its parent hash, and its burn-chain anchor. Compare it with your own tables to confirm you follow the current chain.
3099
+ */
2860
3100
  list: (params?: CanonicalListParams) => Promise<CanonicalEnvelope>;
3101
+ /**
3102
+ * Iterate every canonical block hash, paging for you.
3103
+ *
3104
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3105
+ */
2861
3106
  walk: (params?: CanonicalWalkParams) => AsyncIterable<IndexCanonicalBlock>;
2862
3107
  };
2863
3108
  /** Exact MARF writes per canonical block (`/v1/index/state-writes`). */
2864
3109
  readonly stateWrites: {
3110
+ /**
3111
+ * Read one page of the contract-state writes each block committed.
3112
+ *
3113
+ * Rows are the exact key and value writes, in the node's write order (`ordinal`), so you can see which key a transaction changed when events alone do not show it. Filter by `blockHeight` (excludes `fromHeight` and `toHeight`) or `contractId`. `txContext: true` joins the writing transaction. Rows exist only from the height your node first subscribed to state writes.
3114
+ */
2865
3115
  list: (params?: StateWritesListParams) => Promise<StateWritesEnvelope>;
3116
+ /**
3117
+ * Iterate every state write, paging for you.
3118
+ *
3119
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3120
+ */
2866
3121
  walk: (params?: StateWritesWalkParams) => AsyncIterable<IndexStateWrite>;
2867
3122
  };
2868
3123
  /** Canonical blocks: paginated `list`/`walk`, plus `get` by height or hash
2869
3124
  * (resolves to null on 404). */
2870
3125
  readonly blocks: {
3126
+ /**
3127
+ * Read one page of canonical blocks.
3128
+ *
3129
+ * Each block has its hash, parent hash, burn-chain anchor, and `block_time`. Filter by a height range.
3130
+ */
2871
3131
  list: (params?: BlocksListParams) => Promise<BlocksEnvelope>;
3132
+ /**
3133
+ * Iterate every canonical block, paging for you.
3134
+ *
3135
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3136
+ */
2872
3137
  walk: (params?: BlocksWalkParams) => AsyncIterable<IndexBlock>;
3138
+ /**
3139
+ * Get one block by height or hash, or `null`.
3140
+ *
3141
+ * Resolves to `null` when no such block exists (404).
3142
+ */
2873
3143
  get: (ref: string | number) => Promise<BlockEnvelope | null>;
2874
3144
  };
2875
3145
  /** Full transaction documents: paginated `list`/`walk`, plus `get` by tx_id
2876
3146
  * (resolves to null on 404). */
2877
3147
  readonly transactions: {
2878
- /** Narrowing overload: `fields` shrinks the row type to exactly the
2879
- * requested columns plus {@link TransactionAlwaysFields}. Declared as
2880
- * an overloaded call signature because an arrow property cannot carry
2881
- * overloads. */
3148
+ /**
3149
+ * Read one page of full transaction documents.
3150
+ *
3151
+ * Filter by `type`, `sender`, `contractId`, and a height range. Each document has the decoded post conditions and the payload for its `tx_type`; enrichment fields are null when the raw transaction cannot be decoded. `fields` returns only those columns and narrows the row type; `cursor`, `block_height`, and `tx_id` always come back.
3152
+ */
2882
3153
  list: {
2883
3154
  <const F extends keyof IndexTransaction & string>(params: TransactionsListParams & {
2884
3155
  fields: readonly F[];
2885
3156
  }): Promise<TransactionsEnvelope<TransactionFields<F>>>;
2886
3157
  (params?: TransactionsListParams): Promise<TransactionsEnvelope>;
2887
3158
  };
3159
+ /**
3160
+ * Iterate every transaction document, paging for you.
3161
+ *
3162
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3163
+ */
2888
3164
  walk: (params?: TransactionsWalkParams) => AsyncIterable<IndexTransaction>;
3165
+ /**
3166
+ * Get one transaction by id, or `null`.
3167
+ *
3168
+ * Resolves to `null` when the transaction is not found (404).
3169
+ */
2889
3170
  get: (txId: string) => Promise<TransactionEnvelope | null>;
3171
+ /**
3172
+ * Get a transaction's inclusion proof, or `null`.
3173
+ *
3174
+ * The proof is the raw transaction, the Nakamoto block header, and the merkle path. Check it yourself with `verifyTransactionProof`; nothing in it needs to be trusted. Resolves to `null` on 404. A 503 (`PROOF_TX_SET_INCOMPLETE` or `PROOF_NODE_UNAVAILABLE`) throws an `ApiError`: the proof cannot be assembled on this deployment right now.
3175
+ */
2890
3176
  getProof: (txId: string) => Promise<TransactionProof | null>;
2891
3177
  };
2892
3178
  /** Decoded PoX-4 stacking actions. Empty (with a `notes` hint) when the
2893
3179
  * platform's PoX-4 decoder is disabled. */
2894
3180
  readonly stacking: {
3181
+ /**
3182
+ * Read one page of decoded PoX-4 stacking actions.
3183
+ *
3184
+ * One row per stacking contract call. Filter by `functionName`, `stacker`, `caller`, and a height range. The feed is empty, with a `notes` hint, when the instance's PoX-4 decoder is disabled. For the current PoX, use `pox5.events` and `pox.cycles`.
3185
+ */
2895
3186
  list: (params?: StackingListParams) => Promise<StackingEnvelope>;
3187
+ /**
3188
+ * Iterate every PoX-4 stacking action, paging for you.
3189
+ *
3190
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3191
+ */
2896
3192
  walk: (params?: StackingWalkParams) => AsyncIterable<IndexStackingAction>;
2897
3193
  };
2898
3194
  /** Pending (unconfirmed) transactions: paginated `list`/`walk`, plus `get` by
2899
3195
  * tx_id (resolves to null when the tx has confirmed or dropped). */
2900
3196
  readonly mempool: {
3197
+ /**
3198
+ * Read one page of pending, unconfirmed transactions.
3199
+ *
3200
+ * Filter by `sender`, `type`, `contractId`, and `functionName`. There is no height filter: rows carry `received_at` and a sequence cursor instead of a block position.
3201
+ */
2901
3202
  list: (params?: MempoolListParams) => Promise<MempoolEnvelope>;
3203
+ /**
3204
+ * Iterate every pending transaction, paging for you.
3205
+ *
3206
+ * Takes the same filters as `list`. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. `batchSize` defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting `signal` rejects the iterator.
3207
+ */
2902
3208
  walk: (params?: MempoolWalkParams) => AsyncIterable<IndexMempoolTransaction>;
3209
+ /**
3210
+ * Get one pending transaction, or `null`.
3211
+ *
3212
+ * Resolves to `null` once the transaction has confirmed or dropped.
3213
+ */
2903
3214
  get: (txId: string) => Promise<MempoolTransactionEnvelope | null>;
2904
3215
  };
2905
3216
  /** Decoded sBTC peg surface — the only productized decoded sBTC peg feed on
@@ -3011,6 +3322,7 @@ interface SubgraphOperationStatus {
3011
3322
  /** /v1 cursor envelope for subgraph table reads. */
3012
3323
  interface SubgraphRowsEnvelope<T = unknown> {
3013
3324
  rows: T[];
3325
+ /** Set on every page that returned rows; `null` only on an empty page. */
3014
3326
  next_cursor: string | null;
3015
3327
  tip: {
3016
3328
  block_height: number;
@@ -3029,26 +3341,54 @@ interface BundleSubgraphResponse {
3029
3341
  bundleSize: number;
3030
3342
  }
3031
3343
  declare class Subgraphs extends BaseClient {
3344
+ /**
3345
+ * List the subgraphs deployed to this instance.
3346
+ *
3347
+ * Each summary has the status, the last processed block against the chain tip, progress, `gapCount`, and an `integrity` flag.
3348
+ */
3032
3349
  list(): Promise<{
3033
3350
  data: SubgraphSummary[];
3034
3351
  }>;
3035
3352
  /**
3036
- * The subgraph's current state — health, sync position, tables. The verify
3037
- * step after a deploy, reindex, or backfill: poll it until `sync` catches
3038
- * the tip.
3353
+ * Get a subgraph's health, sync position, and tables.
3354
+ *
3355
+ * The verify step after a deploy, reindex, or backfill: poll it until
3356
+ * `sync` catches the tip.
3039
3357
  */
3040
3358
  status(name: string): Promise<SubgraphDetail>;
3359
+ /**
3360
+ * Get a subgraph's OpenAPI spec.
3361
+ *
3362
+ * Describes the REST routes generated for each table. Pass `serverUrl` to set the server the spec advertises.
3363
+ */
3041
3364
  openapi(name: string, options?: SubgraphSpecOptions): Promise<Record<string, unknown>>;
3365
+ /**
3366
+ * Get a subgraph's schema as JSON, shaped for agents.
3367
+ *
3368
+ * Per table: the endpoints, columns, indexes, which fields are sortable, selectable, searchable, or filterable, and a ready example query. Pass `serverUrl` to set the server the endpoints use.
3369
+ */
3042
3370
  schema(name: string, options?: SubgraphSpecOptions): Promise<SubgraphAgentSchema>;
3371
+ /**
3372
+ * Get a subgraph's generated API docs as Markdown text.
3373
+ *
3374
+ * Pass `serverUrl` to set the server the examples use.
3375
+ */
3043
3376
  markdown(name: string, options?: SubgraphSpecOptions): Promise<string>;
3044
3377
  /**
3045
- * Reindex always drops and rebuilds the whole subgraph, so it takes no
3378
+ * Rebuild a subgraph from scratch.
3379
+ *
3380
+ * A reindex always drops and rebuilds the whole subgraph, so it takes no
3046
3381
  * block range; the API rejects one with `REINDEX_RANGE_NOT_SUPPORTED`.
3047
3382
  * Use {@link backfill} to process a specific range. While a reindex or
3048
3383
  * backfill is already running the API answers 409 with code
3049
3384
  * `OPERATION_IN_PROGRESS`; poll {@link operations} until it finishes.
3050
3385
  */
3051
3386
  reindex(name: string): Promise<ReindexResponse>;
3387
+ /**
3388
+ * Stop a running reindex or backfill.
3389
+ *
3390
+ * Requests the cancel and resolves with the `operationId` and a `cancel_requested` status. Poll {@link getOperation} until `status` is terminal. Throws a 404 with code `NO_OPERATION` when nothing is running.
3391
+ */
3052
3392
  stop(name: string): Promise<{
3053
3393
  message: string;
3054
3394
  operationId?: string;
@@ -3060,20 +3400,34 @@ declare class Subgraphs extends BaseClient {
3060
3400
  fromBlock: number;
3061
3401
  toBlock: number;
3062
3402
  }): Promise<ReindexResponse>;
3403
+ /**
3404
+ * List the block ranges a subgraph is missing.
3405
+ *
3406
+ * Each gap has its `start`, `end`, `size`, `reason`, and when it was detected and resolved. `resolved` filters to resolved or open gaps; page with `limit` and `offset`. `meta` reports the total gap count and total missing blocks.
3407
+ */
3063
3408
  gaps(name: string, opts?: {
3064
3409
  limit?: number;
3065
3410
  offset?: number;
3066
3411
  resolved?: boolean;
3067
3412
  }): Promise<SubgraphGapsResponse>;
3413
+ /**
3414
+ * Delete a subgraph and its tables.
3415
+ *
3416
+ * Permanent. The API cancels any running reindex or backfill first, waits up to 5 seconds for it to stop, then drops the subgraph's tables and registry entry. `force: true` is sent as `?force=true`.
3417
+ */
3068
3418
  delete(name: string, options?: {
3069
3419
  force?: boolean;
3070
3420
  }): Promise<{
3071
3421
  message: string;
3072
3422
  }>;
3073
3423
  /**
3074
- * Open /v1 read: cursor-paginated rows. Anon works on an open instance;
3075
- * pass an apiKey on the client where reads are closed. Resume with the
3076
- * returned `next_cursor`.
3424
+ * Read a table's rows, one cursor page at a time.
3425
+ *
3426
+ * Anon works on an open instance; pass an apiKey on the client where reads
3427
+ * are closed. `next_cursor` is set
3428
+ * on every page that returned rows and is `null` only on an empty page, so a
3429
+ * poller tails with `cursor = page.next_cursor ?? cursor`. A paging loop
3430
+ * ends on an empty page (or one shorter than `limit`).
3077
3431
  */
3078
3432
  rows<T = unknown>(name: string, table: string, params?: Omit<SubgraphQueryParams, "offset"> & {
3079
3433
  cursor?: string;
@@ -3082,13 +3436,20 @@ declare class Subgraphs extends BaseClient {
3082
3436
  operations(name: string): Promise<{
3083
3437
  operations: SubgraphOperationStatus[];
3084
3438
  }>;
3085
- /** Status of a single operation (poll the `operationId` returned by
3086
- * reindex/backfill/stop until `status` is terminal). */
3439
+ /** Get the status of one reindex, backfill, or stop operation.
3440
+ *
3441
+ * Poll the `operationId` returned by `reindex`, `backfill`, or `stop`
3442
+ * until `status` is terminal. */
3087
3443
  getOperation(name: string, operationId: string): Promise<SubgraphOperationStatus>;
3088
3444
  /** Create or update a subgraph. A deploy that needs a rebuild queues one;
3089
3445
  * if a reindex or backfill is already running the API answers 409 with
3090
3446
  * code `OPERATION_IN_PROGRESS` (an `ApiError`, not a dedicated class). */
3091
3447
  deploy(data: DeploySubgraphRequest): Promise<DeploySubgraphResponse>;
3448
+ /**
3449
+ * Get a deployed subgraph's source.
3450
+ *
3451
+ * Returns `sourceCode`, the bundled `handlerCode` the runtime executes, and the `pin` hash of what you deployed. `handlerCode` and `pin` are `null` for local deploys. A subgraph deployed before source was captured returns `sourceCode: null` and `readOnly: true` with a `reason`; redeploy it to capture the source.
3452
+ */
3092
3453
  getSource(name: string): Promise<SubgraphSource>;
3093
3454
  /**
3094
3455
  * Bundle a TypeScript subgraph source on the server. Used by the web chat
@@ -3097,13 +3458,15 @@ declare class Subgraphs extends BaseClient {
3097
3458
  bundle(data: {
3098
3459
  code: string;
3099
3460
  }): Promise<BundleSubgraphResponse>;
3100
- /** Open /v1 read: exact row count for a filtered set. Same auth posture as
3101
- * {@link rows}. */
3461
+ /** Count the rows in a table that match a filter.
3462
+ *
3463
+ * The count is exact. Same auth posture as {@link rows}. */
3102
3464
  count(name: string, table: string, params?: Pick<SubgraphQueryParams, "filters">): Promise<{
3103
3465
  count: number;
3104
3466
  }>;
3105
- /** Open /v1 read: scalar aggregates over a filtered set. Same auth posture
3106
- * as {@link rows}. */
3467
+ /** Compute scalar aggregates over a table's matching rows.
3468
+ *
3469
+ * Same auth posture as {@link rows}. */
3107
3470
  aggregate(name: string, table: string, params?: SubgraphAggregateParams): Promise<SubgraphAggregateResponse>;
3108
3471
  /**
3109
3472
  * Returns a typed client for a subgraph defined with `defineSubgraph()`.
@@ -3115,7 +3478,8 @@ declare class Subgraphs extends BaseClient {
3115
3478
  * const client = sl.subgraphs.typed(mySubgraph)
3116
3479
  * const page = await client.transfers.findMany({ where: { sender: 'SP...' } })
3117
3480
  * // page.rows: InferTableRow<typeof mySubgraph.schema.transfers>[]
3118
- * // page.nextCursor: string | null — pass back as `cursor` to resume
3481
+ * // page.nextCursor: set whenever rows came back, null on an empty page.
3482
+ * // Tail new rows: cursor = page.nextCursor ?? cursor
3119
3483
  * ```
3120
3484
  */
3121
3485
  typed<T extends {
@@ -3132,40 +3496,96 @@ declare class Subgraphs extends BaseClient {
3132
3496
  private createTableClient;
3133
3497
  }
3134
3498
  import { CreateWebhookRequest, CreateWebhookResponse, DeadRow, DeliveryRow, ReplayResult, RotateSecretResponse, UpdateWebhookRequest, WebhookActivity, WebhookDeliveryDetail, WebhookDetail, WebhookSummary, WebhookTestResult } from "@secondlayer/shared/schemas/webhooks";
3135
- import { ChainTrigger, ChainTriggerType, CreateWebhookRequest as CreateWebhookRequest2, CreateWebhookResponse as CreateWebhookResponse2, DeadRow as DeadRow2, DeliveryRow as DeliveryRow2, ReplayResult as ReplayResult2, RotateSecretResponse as RotateSecretResponse2, WebhookActivity as WebhookActivity2, WebhookActivityHour, WebhookAuth, WebhookDeliveryDetail as WebhookDeliveryDetail2, WebhookDetail as WebhookDetail2, WebhookFormat, WebhookKind, WebhookRuntime, WebhookStatus, WebhookSummary as WebhookSummary2, WebhookTestResult as WebhookTestResult2, UpdateWebhookRequest as UpdateWebhookRequest2 } from "@secondlayer/shared/schemas/webhooks";
3499
+ import { ChainTrigger, ChainTriggerType, CreateWebhookRequest as CreateWebhookRequest2, CreateWebhookResponse as CreateWebhookResponse2, DeadRow as DeadRow2, DeliveryRow as DeliveryRow2, ReplayResult as ReplayResult2, RotateSecretResponse as RotateSecretResponse2, WebhookActivity as WebhookActivity2, WebhookActivityHour, WebhookAuth, WebhookDeliveryDetail as WebhookDeliveryDetail2, WebhookDetail as WebhookDetail2, WebhookFormat, WebhookKind, WebhookStatus, WebhookSummary as WebhookSummary2, WebhookTestResult as WebhookTestResult2, UpdateWebhookRequest as UpdateWebhookRequest2 } from "@secondlayer/shared/schemas/webhooks";
3136
3500
  import { trigger } from "@secondlayer/shared/schemas/webhooks";
3137
3501
  declare class Webhooks extends BaseClient {
3502
+ /**
3503
+ * List your webhooks.
3504
+ *
3505
+ * Each summary has the status, format, URL, last delivery and last success, and the circuit breaker state (`circuitFailures`, `circuitOpenedAt`).
3506
+ */
3138
3507
  list(): Promise<{
3139
3508
  data: WebhookSummary[];
3140
3509
  }>;
3510
+ /**
3511
+ * Get one webhook's full configuration.
3512
+ *
3513
+ * Adds the triggers, the receiver's auth (redacted to header names and whether a secret is set), the retry and timeout limits, `lastError`, and a `warning` when this instance's trigger evaluator is not running.
3514
+ */
3141
3515
  get(id: string): Promise<WebhookDetail>;
3516
+ /**
3517
+ * Create a webhook that POSTs chain events to your URL.
3518
+ *
3519
+ * Takes a `name`, a `url`, and `triggers` built with `trigger.*`; each trigger is validated before anything is provisioned, and an invalid one is a 400. The signing secret comes back once in `signingSecret`, so store it. A webhook starts at the chain tip and never backfills: use {@link replay} for history. Hosted accounts cap `maxRetries` at 7 and `timeoutMs` at 30000.
3520
+ */
3142
3521
  create(input: CreateWebhookRequest): Promise<CreateWebhookResponse>;
3522
+ /**
3523
+ * Change a webhook's name, URL, format, auth, or delivery limits.
3524
+ *
3525
+ * Send only the fields to change: `name`, `url`, `format`, `authConfig`, `maxRetries`, `timeoutMs`, `concurrency`. Triggers are not part of an update. Resolves to the updated webhook.
3526
+ */
3143
3527
  update(id: string, patch: UpdateWebhookRequest): Promise<WebhookDetail>;
3528
+ /**
3529
+ * Stop deliveries without deleting the webhook.
3530
+ *
3531
+ * Resolves to the updated webhook. {@link resume} turns it back on.
3532
+ */
3144
3533
  pause(id: string): Promise<WebhookDetail>;
3534
+ /**
3535
+ * Start delivering again after a pause.
3536
+ *
3537
+ * Also clears a circuit-breaker pause, which happens after 20 straight failed deliveries. Resolves to the updated webhook.
3538
+ */
3145
3539
  resume(id: string): Promise<WebhookDetail>;
3540
+ /**
3541
+ * Delete a webhook.
3542
+ *
3543
+ * Resolves to `{ ok: true }`. Throws a 404 when the webhook does not exist.
3544
+ */
3146
3545
  delete(id: string): Promise<{
3147
3546
  ok: true;
3148
3547
  }>;
3548
+ /**
3549
+ * Issue a new signing secret.
3550
+ *
3551
+ * The new secret comes back once in `signingSecret`. Update the receiver that calls `verifyWebhookSignature` with it: deliveries are signed with the new secret from now on.
3552
+ */
3149
3553
  rotateSecret(id: string): Promise<RotateSecretResponse>;
3150
- /** Send a one-off test webhook to the webhook's URL (built for its
3151
- * format, SSRF-guarded). Logged as a delivery row, visible via deliveries. */
3554
+ /** Send a one-off test delivery to a webhook's URL.
3555
+ *
3556
+ * Built for the webhook's format and SSRF-guarded. Logged as a delivery
3557
+ * row, visible via `deliveries`. */
3152
3558
  test(id: string): Promise<WebhookTestResult>;
3153
3559
  /** The last 100 delivery attempts, newest first. The server caps the window;
3154
3560
  * there is nothing to page. */
3155
3561
  deliveries(id: string): Promise<{
3156
3562
  data: DeliveryRow[];
3157
3563
  }>;
3158
- /** Hourly delivered/waiting/gave-up counts for the last 7 days, plus the
3159
- * current queue depth — the events chart on the detail page. */
3564
+ /** Get a webhook's hourly delivery counts for the last 7 days.
3565
+ *
3566
+ * Each hour has delivered, waiting, and gave-up counts, plus the current
3567
+ * queue depth. This is the events chart on the detail page. */
3160
3568
  activity(id: string): Promise<WebhookActivity>;
3161
- /** One delivery attempt with its outbox context (payload, response
3162
- * headers) — the delivery card on the detail page. */
3569
+ /** Get one delivery attempt with its payload and response.
3570
+ *
3571
+ * Includes the outbox context (payload, response headers). This is the
3572
+ * delivery card on the detail page. */
3163
3573
  delivery(id: string, deliveryId: string): Promise<WebhookDeliveryDetail>;
3574
+ /**
3575
+ * Re-deliver historical events over an existing webhook.
3576
+ *
3577
+ * Pass `fromBlock` and `toBlock`; the range is capped at 100,000 blocks. A replay is historical only and never moves the live cursor. It is idempotent: the same range twice is a no-op, so pass any string as `force` to re-deliver it. Replays carry `is_replay` and use the standard `chain.{type}.apply` envelope. Resolves to `replayId`, `enqueuedCount`, and `scannedCount`. A second replay while one is running is a 409. `sbtc_withdrawal_swept_confirmed` is forward-only and never replayed. Hosted accounts get 5 replays an hour.
3578
+ */
3164
3579
  replay(id: string, range: {
3165
3580
  fromBlock: number;
3166
3581
  toBlock: number;
3167
3582
  force?: string;
3168
3583
  }): Promise<ReplayResult>;
3584
+ /**
3585
+ * List the events a webhook gave up delivering.
3586
+ *
3587
+ * Returns up to 100 dead-lettered events, newest failure first. Each row's `id` is what {@link requeue} takes.
3588
+ */
3169
3589
  dead(id: string): Promise<{
3170
3590
  data: DeadRow[];
3171
3591
  }>;
@@ -3239,8 +3659,12 @@ declare class SecondLayer extends BaseClient {
3239
3659
  readonly instance: InstanceClient;
3240
3660
  constructor(options?: Partial<SecondLayerOptions>);
3241
3661
  /**
3242
- * Up to 10 public reads in one round trip (`POST /v1/batch`). Each item
3243
- * is authorized on its own; the client's bearer token applies to every item.
3662
+ * Run up to 10 public reads in one round trip (`POST /v1/batch`).
3663
+ *
3664
+ * Each item is authorized on its own; the client's bearer token applies to
3665
+ * every item. Results come back in order as `{ path, status, body }`. Only
3666
+ * paths under `/v1/index/`, `/v1/subgraphs`, `/v1/streams/`, and
3667
+ * `/v1/contracts` are allowed; anything else is a per-item 400.
3244
3668
  */
3245
3669
  batch(requests: Array<{
3246
3670
  path: string;
@@ -3253,10 +3677,12 @@ declare class SecondLayer extends BaseClient {
3253
3677
  }>;
3254
3678
  }>;
3255
3679
  /**
3256
- * Assemble a {@link ContextSnapshot}: the same orientation an MCP agent
3257
- * reads from `secondlayer://context`, available to any SDK/CLI consumer.
3258
- * Reads run concurrently; a failed read lands as `{ value: null, error }`
3259
- * on its field rather than rejecting the whole snapshot.
3680
+ * Get a one-call snapshot of your account and instance.
3681
+ *
3682
+ * Returns a {@link ContextSnapshot}: the same orientation an MCP agent reads
3683
+ * from `secondlayer://context`, available to any SDK or CLI consumer. Reads
3684
+ * run concurrently; a failed read lands as `{ value: null, error }` on its
3685
+ * field rather than rejecting the whole snapshot.
3260
3686
  */
3261
3687
  context(): Promise<ContextSnapshot>;
3262
3688
  }
@@ -3281,14 +3707,13 @@ declare function getSubgraph<T extends {
3281
3707
  schema: Record<string, unknown>;
3282
3708
  }>(def: T, options?: Partial<SecondLayerOptions> | SecondLayer | Subgraphs): InferSubgraphClient2<T>;
3283
3709
  import { SubgraphAgentSchema as SubgraphAgentSchema3, SubgraphSpecFormat as SubgraphSpecFormat2, SubgraphSpecOptions as SubgraphSpecOptions3 } from "@secondlayer/shared/subgraphs/spec";
3284
- import { SubgraphDetail as SubgraphDetail2 } from "@secondlayer/shared/schemas/subgraphs";
3285
3710
  import { DeadRow as DeadRow3, DeliveryRow as DeliveryRow3, WebhookDetail as WebhookDetail3, WebhookSummary as WebhookSummary3 } from "@secondlayer/shared/schemas/webhooks";
3286
3711
  /**
3287
3712
  * Webhook diagnosis, shared by `secondlayer webhooks doctor` and the
3288
3713
  * dashboard's webhook detail page. Moved out of the CLI (unchanged behavior)
3289
3714
  * so the web can build the same judgment without printing CLI-command text.
3290
3715
  *
3291
- * Plan 068 adds five deterministic, numbers-only detectors on top of the
3716
+ * Five deterministic, numbers-only detectors sit on top of the
3292
3717
  * existing flag checks: no model, no history beyond the deliveries window
3293
3718
  * already fetched. Thresholds are named constants below, conservative on
3294
3719
  * purpose — a wrong insight costs more trust than a missed one.
@@ -3306,7 +3731,7 @@ interface DoctorFix {
3306
3731
  /** Anchor into the docs' webhooks troubleshooting section. */
3307
3732
  docsPath?: string;
3308
3733
  }
3309
- type DoctorIssueCode = "warning" | "paused" | "last_error" | "circuit" | "dead_letters" | "subgraph_gaps" | "subgraph_catching_up" | "no_deliveries" | "receiver_rate_limited" | "receiver_down" | "receiver_rejects" | "receiver_slow" | "delivery_lag";
3734
+ type DoctorIssueCode = "warning" | "paused" | "last_error" | "circuit" | "dead_letters" | "no_deliveries" | "receiver_rate_limited" | "receiver_down" | "receiver_rejects" | "receiver_slow" | "delivery_lag";
3310
3735
  interface DoctorIssue {
3311
3736
  code: DoctorIssueCode;
3312
3737
  detail?: string;
@@ -3326,15 +3751,6 @@ interface DoctorReport {
3326
3751
  last: DeliveryRow3 | null;
3327
3752
  };
3328
3753
  deadCount: number;
3329
- subgraph: {
3330
- name: string;
3331
- status: string;
3332
- syncStatus: string;
3333
- lastProcessedBlock: number;
3334
- chainTip: number;
3335
- gapCount: number;
3336
- integrity: string;
3337
- } | null;
3338
3754
  /** CLI-facing next steps, one per issue, in the same order as `issues`. */
3339
3755
  hints: string[];
3340
3756
  issues: DoctorIssue[];
@@ -3348,7 +3764,6 @@ declare function buildDoctorReport(input: {
3348
3764
  webhook: WebhookDetail3;
3349
3765
  deliveries: DeliveryRow3[];
3350
3766
  dead: DeadRow3[];
3351
- subgraph?: SubgraphDetail2 | null;
3352
3767
  }): DoctorReport;
3353
3768
  /**
3354
3769
  * The list page's own reduced detector: computed from `WebhookSummary` alone
@@ -3795,4 +4210,4 @@ declare const Cursor: {
3795
4210
  };
3796
4211
  };
3797
4212
  import { decodeClarityValue, toJsonSafe } from "@secondlayer/shared/streams-rows";
3798
- export { ACCOUNT_KEY_ENV, ActiveSubgraphOperation, ApiError, ArchiveAuthError, ArchiveClient, ArchiveCreditsBalance, ArchiveDataset, ArchiveFetchItem, ArchiveFetchResult, ArchiveFlow, ArchiveGateNotConfiguredError, ArchiveLoadOptions, ArchiveManifest, ArchivePartition, ArchiveQuote, ArchiveSignatureError, ArchiveStatus, ArchiveVerifyInput, ArchiveVerifyRangeStatus, ArchiveVerifyResult, AuthError, BlockEnvelope, BlocksEnvelope, BlocksListParams, BlocksWalkParams, CanonicalEnvelope, CanonicalListParams, CanonicalWalkParams, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTrigger, ChainTriggerType, ChainTxLevelEvent, ChainWebhookDelivery2 as ChainWebhookDelivery, ChainWebhookEnvelope, ConsumerBatchContext, ConsumerHealth, ConsumerSink, ContextAccount, ContextField, ContextFieldError, ContextSnapshot, ContractCallsConsumeParams, ContractCallsEnvelope, ContractCallsListParams, ContractCallsWalkParams, ContractConformance, ContractSummary, Contracts, ContractsEnvelope, ContractsListParams, CreateArchiveClientOptions, CreateWebhookRequest2 as CreateWebhookRequest, CreateWebhookResponse2 as CreateWebhookResponse, Cursor, DEFAULT_REQUEST_TIMEOUT_MS, DOWN_MIN_CONSECUTIVE, DeadRow2 as DeadRow, DecodedEventColumns, DecodedEventRow, DecodedFtBurn, DecodedFtBurnPayload, DecodedFtMint, DecodedFtMintPayload, DecodedFtTransfer, DecodedFtTransferPayload, DecodedNftBurn, DecodedNftBurnPayload, DecodedNftMint, DecodedNftMintPayload, DecodedNftTransfer, DecodedNftTransferPayload, DecodedPrint, DecodedPrintPayload, DecodedPrintValue, DecodedStxBurn, DecodedStxBurnPayload, DecodedStxLock, DecodedStxLockPayload, DecodedStxMint, DecodedStxMintPayload, DecodedStxTransfer, DecodedStxTransferPayload, DeliveryRow2 as DeliveryRow, DoctorEvidence, DoctorFix, DoctorIssue, DoctorIssueCode, DoctorReport, DoctorSeverity, EtagCache, EtagEntry, EventsConsumeParams, EventsEnvelope, EventsListParams, EventsWalkParams, FetchLike2 as FetchLike, FtTransfer, FtTransferEvent, FtTransferPayload2 as FtTransferPayload, FtTransfersEnvelope, FtTransfersListParams, FtTransfersResource, FtTransfersWalkParams, INDEX_MAX_PAGE_SIZE, INSTANCE_TOKEN_ENV, Index, IndexAlwaysFields, IndexBitcoinTip, IndexBlock, IndexBtcReorg, IndexCanonicalBlock, IndexConsumeOptions, IndexContractCall, IndexDiscovery, IndexEvent, IndexEventFields, IndexEventOf, IndexEventType, IndexEventTypeFilters, IndexEventsResource, IndexFeedEnvelope, IndexFeedFetcher, IndexFeedItem, IndexFtBurn, IndexFtMint, IndexFtTransfer, IndexMapDelete, IndexMapInsert, IndexMapSet, IndexMempoolTransaction, IndexNestedContractCall, IndexNftBurn, IndexNftMint, IndexNftTransfer, IndexPostCondition, IndexPox5Event, IndexPox5EventTopic, IndexPoxCycle, IndexPoxCycleSigner, IndexPrint, IndexReorg, IndexRuneBalance, IndexRuneEntry, IndexRuneEvent, IndexRuneEventKind, IndexRuneRefSummary, IndexRuneTerms, IndexSbtcDeposit, IndexSbtcDepositDetail, IndexSbtcEvent, IndexSbtcSummary, IndexSbtcWithdrawal, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawalPhase, IndexStackingAction, IndexStateWrite, IndexStxBurn, IndexStxLock, IndexStxMint, IndexStxTransfer, IndexTip, IndexTransaction, IndexVarSet, InstanceClient, InstanceDiagnosis3 as InstanceDiagnosis, InstanceIssue, InstanceState, InstanceStatus, InsufficientArchiveCreditsError, LOCAL_API_URL, LoadedArchive, MemoryEtagCache, MempoolEnvelope, MempoolListParams, MempoolTransactionEnvelope, MempoolWalkParams, NftTransfer, NftTransferEvent, NftTransferPayload2 as NftTransferPayload, NftTransfersEnvelope, NftTransfersListParams, NftTransfersResource, NftTransfersWalkParams, Pox5EventsConsumeParams, Pox5EventsEnvelope, Pox5EventsListParams, Pox5EventsWalkParams, Pox5Resource, PoxCycleEnvelope, PoxCyclesEnvelope, PoxCyclesListParams, PoxCyclesWalkParams, PoxResource, PrintSchemaResponse, PublicStatus2 as PublicStatus, RateLimitError, ReplayResult2 as ReplayResult, RequestOptions, RewardSet2 as RewardSet, RotateSecretResponse2 as RotateSecretResponse, RuneActivityEnvelope, RuneActivityListParams, RuneActivityWalkParams, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneBalancesEnvelope, RuneBalancesListParams, RuneEnvelope, RuneEtchEntry, RuneEventPayload, RuneEventType, RuneId, RuneRef, RuneStreamsEvent, RunesEnvelope, RunesListParams, RunesResource, SbtcDepositEnvelope, SbtcDepositEvent, SbtcDepositsConsumeParams, SbtcDepositsEnvelope, SbtcDepositsListParams, SbtcDepositsWalkParams, SbtcEventTopic2 as SbtcEventTopic, SbtcEventsConsumeParams, SbtcEventsEnvelope, SbtcEventsListParams, SbtcEventsWalkParams, SbtcResource, SbtcSummaryEnvelope, SbtcWithdrawalEnvelope, SbtcWithdrawalEvent, SbtcWithdrawalStatus, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalsEnvelope, SbtcWithdrawalsListParams, SbtcWithdrawalsWalkParams, SecondLayer, SecondLayerArchive, SecondLayerError, SecondLayerErrorOptions, SecondLayerOptions, SinkTx, StackingEnvelope, StackingListParams, StackingWalkParams, StandardWebhooksHeaders2 as StandardWebhooksHeaders, StateWritesEnvelope, StateWritesListParams, StateWritesWalkParams, StreamsBatch, StreamsBatchContext, StreamsBitcoinCanonicalBlock, StreamsBitcoinTip, StreamsCanonicalBlock, StreamsClient, StreamsConsumeBitcoinParams, StreamsConsumeParams, StreamsConsumeStacksParams, StreamsDumpFile, StreamsDumps, StreamsDumpsManifest, StreamsEvent, StreamsEventPayload, StreamsEventType, StreamsEventsBitcoinListParams, StreamsEventsConsumeBitcoinParams, StreamsEventsConsumeParams, StreamsEventsConsumeResult, StreamsEventsEnvelope, StreamsEventsListEnvelope, StreamsEventsListParams, StreamsEventsStacksListParams, StreamsEventsStreamBitcoinParams, StreamsEventsStreamParams, StreamsEventsStreamStacksParams, StreamsEventsSubscribeBitcoinParams, StreamsEventsSubscribeParams, StreamsEventsSubscribeStacksParams, StreamsReorg, StreamsReorgContext, StreamsReorgsListEnvelope, StreamsReorgsListParams, StreamsServerError, StreamsSignatureError, StreamsSubscription, StreamsTip, StreamsWireEvent2 as StreamsWireEvent, SubgraphAgentSchema3 as SubgraphAgentSchema, SubgraphOperationStatus, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphSpecOptions3 as SubgraphSpecOptions, Subgraphs, TransactionEnvelope, TransactionProof, TransactionProofVerifyResult, TransactionsEnvelope, TransactionsListParams, TransactionsWalkParams, UpdateWebhookRequest2 as UpdateWebhookRequest, ValidationError, VmStreamsEvent, WalkOptions, WebhookActivity2 as WebhookActivity, WebhookActivityHour, WebhookAuth, WebhookDeliveryDetail2 as WebhookDeliveryDetail, WebhookDetail2 as WebhookDetail, WebhookFormat, WebhookHeaderInput, WebhookKind, WebhookRuntime, WebhookStatus, WebhookSummary2 as WebhookSummary, WebhookTestResult2 as WebhookTestResult, Webhooks, WithSinkTx, buildDoctorReport, buildListIssue, consumeIndexFeed, consumerHealth, contextField, createArchiveClient, createStreamsClient, decode, decodeChainWebhook, decodeClarityValue, decodeFtBurn, decodeFtMint, decodeFtTransfer, decodeNftBurn, decodeNftMint, decodeNftTransfer, decodePrint, decodeStxBurn, decodeStxLock, decodeStxMint, decodeStxTransfer, fetchRewardSet, getSubgraph, isFtBurn, isFtMint, isFtTransfer, isHostedApiUrl, isNftBurn, isNftMint, isNftTransfer, isPrint, isStxBurn, isStxLock, isStxMint, isStxTransfer, isSuccessDelivery, parseRetryAfter, resolveAccountKey, resolveApiKey, resolveBaseUrl, shutdownSignal, toJsonSafe, trigger, verifySecondlayerSignature, verify as verifyStandardWebhooksHeaders, verifyTransactionProof, verifyWebhookSignature };
4213
+ export { ACCOUNT_KEY_ENV, ActiveSubgraphOperation, ApiError, ArchiveAuthError, ArchiveClient, ArchiveCreditsBalance, ArchiveDataset, ArchiveFetchItem, ArchiveFetchResult, ArchiveFlow, ArchiveGateNotConfiguredError, ArchiveLoadOptions, ArchiveManifest, ArchivePartition, ArchiveQuote, ArchiveSignatureError, ArchiveStatus, ArchiveVerifyInput, ArchiveVerifyRangeStatus, ArchiveVerifyResult, AuthError, BlockEnvelope, BlocksEnvelope, BlocksListParams, BlocksWalkParams, CanonicalEnvelope, CanonicalListParams, CanonicalWalkParams, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTrigger, ChainTriggerType, ChainTxLevelEvent, ChainWebhookDelivery2 as ChainWebhookDelivery, ChainWebhookEnvelope, ConsumerBatchContext, ConsumerHealth, ConsumerSink, ContextAccount, ContextField, ContextFieldError, ContextSnapshot, ContractCallsConsumeParams, ContractCallsEnvelope, ContractCallsListParams, ContractCallsWalkParams, ContractConformance, ContractSummary, Contracts, ContractsEnvelope, ContractsListParams, CreateArchiveClientOptions, CreateWebhookRequest2 as CreateWebhookRequest, CreateWebhookResponse2 as CreateWebhookResponse, Cursor, DEFAULT_REQUEST_TIMEOUT_MS, DOWN_MIN_CONSECUTIVE, DeadRow2 as DeadRow, DecodedEventColumns, DecodedEventRow, DecodedFtBurn, DecodedFtBurnPayload, DecodedFtMint, DecodedFtMintPayload, DecodedFtTransfer, DecodedFtTransferPayload, DecodedNftBurn, DecodedNftBurnPayload, DecodedNftMint, DecodedNftMintPayload, DecodedNftTransfer, DecodedNftTransferPayload, DecodedPrint, DecodedPrintPayload, DecodedPrintValue, DecodedStxBurn, DecodedStxBurnPayload, DecodedStxLock, DecodedStxLockPayload, DecodedStxMint, DecodedStxMintPayload, DecodedStxTransfer, DecodedStxTransferPayload, DeliveryRow2 as DeliveryRow, DoctorEvidence, DoctorFix, DoctorIssue, DoctorIssueCode, DoctorReport, DoctorSeverity, EtagCache, EtagEntry, EventsConsumeParams, EventsEnvelope, EventsListParams, EventsWalkParams, FetchLike2 as FetchLike, FtTransfer, FtTransferEvent, FtTransferPayload2 as FtTransferPayload, FtTransfersEnvelope, FtTransfersListParams, FtTransfersResource, FtTransfersWalkParams, INDEX_MAX_PAGE_SIZE, INSTANCE_TOKEN_ENV, Index, IndexAlwaysFields, IndexBitcoinTip, IndexBlock, IndexBtcReorg, IndexCanonicalBlock, IndexConsumeOptions, IndexContractCall, IndexDiscovery, IndexEvent, IndexEventFields, IndexEventOf, IndexEventType, IndexEventTypeFilters, IndexEventsResource, IndexFeedEnvelope, IndexFeedFetcher, IndexFeedItem, IndexFtBurn, IndexFtMint, IndexFtTransfer, IndexMapDelete, IndexMapInsert, IndexMapSet, IndexMempoolTransaction, IndexNestedContractCall, IndexNftBurn, IndexNftMint, IndexNftTransfer, IndexPostCondition, IndexPox5Event, IndexPox5EventTopic, IndexPoxCycle, IndexPoxCycleSigner, IndexPrint, IndexReorg, IndexRuneBalance, IndexRuneEntry, IndexRuneEvent, IndexRuneEventKind, IndexRuneRefSummary, IndexRuneTerms, IndexSbtcDeposit, IndexSbtcDepositDetail, IndexSbtcEvent, IndexSbtcSummary, IndexSbtcWithdrawal, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawalPhase, IndexStackingAction, IndexStateWrite, IndexStxBurn, IndexStxLock, IndexStxMint, IndexStxTransfer, IndexTip, IndexTransaction, IndexVarSet, InstanceClient, InstanceDiagnosis3 as InstanceDiagnosis, InstanceIssue, InstanceState, InstanceStatus, InsufficientArchiveCreditsError, LOCAL_API_URL, LoadedArchive, MemoryEtagCache, MempoolEnvelope, MempoolListParams, MempoolTransactionEnvelope, MempoolWalkParams, NftTransfer, NftTransferEvent, NftTransferPayload2 as NftTransferPayload, NftTransfersEnvelope, NftTransfersListParams, NftTransfersResource, NftTransfersWalkParams, Pox5EventsConsumeParams, Pox5EventsEnvelope, Pox5EventsListParams, Pox5EventsWalkParams, Pox5Resource, PoxCycleEnvelope, PoxCyclesEnvelope, PoxCyclesListParams, PoxCyclesWalkParams, PoxResource, PrintSchemaResponse, PublicStatus2 as PublicStatus, RateLimitError, ReplayResult2 as ReplayResult, RequestOptions, RewardSet2 as RewardSet, RotateSecretResponse2 as RotateSecretResponse, RuneActivityEnvelope, RuneActivityListParams, RuneActivityWalkParams, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneBalancesEnvelope, RuneBalancesListParams, RuneEnvelope, RuneEtchEntry, RuneEventPayload, RuneEventType, RuneId, RuneRef, RuneStreamsEvent, RunesEnvelope, RunesListParams, RunesResource, SbtcDepositEnvelope, SbtcDepositEvent, SbtcDepositsConsumeParams, SbtcDepositsEnvelope, SbtcDepositsListParams, SbtcDepositsWalkParams, SbtcEventTopic2 as SbtcEventTopic, SbtcEventsConsumeParams, SbtcEventsEnvelope, SbtcEventsListParams, SbtcEventsWalkParams, SbtcResource, SbtcSummaryEnvelope, SbtcWithdrawalEnvelope, SbtcWithdrawalEvent, SbtcWithdrawalStatus, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalsEnvelope, SbtcWithdrawalsListParams, SbtcWithdrawalsWalkParams, SecondLayer, SecondLayerArchive, SecondLayerError, SecondLayerErrorOptions, SecondLayerOptions, SinkTx, StackingEnvelope, StackingListParams, StackingWalkParams, StandardWebhooksHeaders2 as StandardWebhooksHeaders, StateWritesEnvelope, StateWritesListParams, StateWritesWalkParams, StreamsBatch, StreamsBatchContext, StreamsBitcoinCanonicalBlock, StreamsBitcoinTip, StreamsCanonicalBlock, StreamsClient, StreamsConsumeBitcoinParams, StreamsConsumeParams, StreamsConsumeStacksParams, StreamsDumpFile, StreamsDumps, StreamsDumpsManifest, StreamsEvent, StreamsEventPayload, StreamsEventType, StreamsEventsBitcoinListParams, StreamsEventsConsumeBitcoinParams, StreamsEventsConsumeParams, StreamsEventsConsumeResult, StreamsEventsEnvelope, StreamsEventsListEnvelope, StreamsEventsListParams, StreamsEventsStacksListParams, StreamsEventsStreamBitcoinParams, StreamsEventsStreamParams, StreamsEventsStreamStacksParams, StreamsEventsSubscribeBitcoinParams, StreamsEventsSubscribeParams, StreamsEventsSubscribeStacksParams, StreamsReorg, StreamsReorgContext, StreamsReorgsListEnvelope, StreamsReorgsListParams, StreamsServerError, StreamsSignatureError, StreamsSubscription, StreamsTip, StreamsWireEvent2 as StreamsWireEvent, SubgraphAgentSchema3 as SubgraphAgentSchema, SubgraphOperationStatus, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphSpecOptions3 as SubgraphSpecOptions, Subgraphs, TransactionEnvelope, TransactionProof, TransactionProofVerifyResult, TransactionsEnvelope, TransactionsListParams, TransactionsWalkParams, UpdateWebhookRequest2 as UpdateWebhookRequest, ValidationError, VmStreamsEvent, WalkOptions, WebhookActivity2 as WebhookActivity, WebhookActivityHour, WebhookAuth, WebhookDeliveryDetail2 as WebhookDeliveryDetail, WebhookDetail2 as WebhookDetail, WebhookFormat, WebhookHeaderInput, WebhookKind, WebhookStatus, WebhookSummary2 as WebhookSummary, WebhookTestResult2 as WebhookTestResult, Webhooks, WithSinkTx, buildDoctorReport, buildListIssue, consumeIndexFeed, consumerHealth, contextField, createArchiveClient, createStreamsClient, decode, decodeChainWebhook, decodeClarityValue, decodeFtBurn, decodeFtMint, decodeFtTransfer, decodeNftBurn, decodeNftMint, decodeNftTransfer, decodePrint, decodeStxBurn, decodeStxLock, decodeStxMint, decodeStxTransfer, fetchRewardSet, getSubgraph, isFtBurn, isFtMint, isFtTransfer, isHostedApiUrl, isNftBurn, isNftMint, isNftTransfer, isPrint, isStxBurn, isStxLock, isStxMint, isStxTransfer, isSuccessDelivery, parseRetryAfter, resolveAccountKey, resolveApiKey, resolveBaseUrl, shutdownSignal, toJsonSafe, trigger, verifySecondlayerSignature, verify as verifyStandardWebhooksHeaders, verifyTransactionProof, verifyWebhookSignature };