@secondlayer/sdk 13.1.0 → 13.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.
package/dist/index.d.ts CHANGED
@@ -523,8 +523,8 @@ type WithSinkTx<TTx> = [TTx] extends [never] ? unknown : {
523
523
  tx: TTx;
524
524
  };
525
525
  import { VmEventType } from "@secondlayer/shared";
526
- import { StreamsEvent, StreamsEventType, StreamsWireEvent, VmStreamsEvent } from "@secondlayer/shared/streams-rows";
527
- import { StreamsWireEvent as StreamsWireEvent2, StreamsEventPayload } from "@secondlayer/shared/streams-rows";
526
+ import { RuneEventType, RuneStreamsEvent, StreamsEvent, StreamsEventType, StreamsWireEvent, VmStreamsEvent } from "@secondlayer/shared/streams-rows";
527
+ import { StreamsWireEvent as StreamsWireEvent2, RuneEtchEntry, RuneEventPayload, StreamsEventPayload } from "@secondlayer/shared/streams-rows";
528
528
  type StreamsTip = {
529
529
  block_height: number;
530
530
  block_hash: string;
@@ -544,6 +544,15 @@ type StreamsTip = {
544
544
  /** Oldest seekable cursor (`<oldest_seekable_height>:0`); `null` = unlimited. */
545
545
  oldest_cursor?: string | null;
546
546
  };
547
+ /** `chain=bitcoin` tip (plan 059) — no `burn_block_height`/retention fields,
548
+ * since Bitcoin has no burn chain of its own and Runes reads have no
549
+ * retention ladder. Returned by `tip({ chain: "bitcoin" })`. */
550
+ type StreamsBitcoinTip = {
551
+ block_height: number;
552
+ block_hash: string;
553
+ finalized_height: number;
554
+ lag_seconds: number;
555
+ };
547
556
  type StreamsCanonicalBlock = {
548
557
  block_height: number;
549
558
  block_hash: string;
@@ -551,6 +560,12 @@ type StreamsCanonicalBlock = {
551
560
  burn_block_hash: string | null;
552
561
  is_canonical: true;
553
562
  };
563
+ /** `chain=bitcoin` canonical block (plan 059) — no burn-chain fields. */
564
+ type StreamsBitcoinCanonicalBlock = {
565
+ block_height: number;
566
+ block_hash: string;
567
+ is_canonical: true;
568
+ };
554
569
  type StreamsReorg = {
555
570
  detected_at: string;
556
571
  fork_point_height: number;
@@ -566,13 +581,19 @@ type StreamsReorg = {
566
581
  */
567
582
  new_canonical_tip: string;
568
583
  };
569
- type StreamsEventsEnvelope<TEvent = StreamsEvent> = {
584
+ type StreamsEventsEnvelope<
585
+ TEvent = StreamsEvent,
586
+ TTip = StreamsTip
587
+ > = {
570
588
  events: TEvent[];
571
589
  next_cursor: string | null;
572
- tip: StreamsTip;
590
+ tip: TTip;
573
591
  reorgs: StreamsReorg[];
574
592
  };
575
- type StreamsEventsListEnvelope = Omit<StreamsEventsEnvelope, "next_cursor">;
593
+ type StreamsEventsListEnvelope<
594
+ TEvent = StreamsEvent,
595
+ TTip = StreamsTip
596
+ > = Omit<StreamsEventsEnvelope<TEvent, TTip>, "next_cursor">;
576
597
  /** The StreamsEvent union narrowed to a `types` selection — what a
577
598
  * const-generic `types: ["ft_transfer"]` buys at the type level. */
578
599
  type StreamsEventOfTypes<T extends readonly StreamsEventType[]> = Extract<StreamsEvent, {
@@ -616,10 +637,16 @@ type StreamsEventForFilter<
616
637
  }> : Extract<StreamsEvent, {
617
638
  event_type: T;
618
639
  }> : D extends true ? IndexEvent : StreamsEvent;
619
- type StreamsEventsListParams = {
640
+ type StreamsEventsListParamsCommon = {
620
641
  cursor?: string | null;
621
642
  fromHeight?: number;
622
643
  toHeight?: number;
644
+ limit?: number;
645
+ };
646
+ /** `chain: "stacks"` (default, omit `chain` entirely) — unchanged since
647
+ * before plan 059. */
648
+ type StreamsEventsStacksListParams = StreamsEventsListParamsCommon & {
649
+ chain?: "stacks";
623
650
  /** `vm` reads ordinal. Omit for Streams 1.0. */
624
651
  clock?: "classic" | "vm";
625
652
  types?: readonly (StreamsEventType | VmEventType)[];
@@ -635,27 +662,37 @@ type StreamsEventsListParams = {
635
662
  * unrelated concerns share one page, one cursor, one checkpoint.
636
663
  */
637
664
  filters?: StreamsFilterMap;
638
- limit?: number;
639
665
  };
640
- type StreamsEventsStreamParams = {
666
+ /**
667
+ * `chain: "bitcoin"` (plan 059) — Runes events, own cursor space. `types` is
668
+ * restricted to {@link RuneEventType} at the type level, so e.g.
669
+ * `{ chain: "bitcoin", types: ["ft_transfer"] }` is a compile error rather
670
+ * than a silent 400 at request time. `contractId`/`sender`/`recipient`/
671
+ * `assetIdentifier`/`filters`/`clock` don't exist on this branch — they're
672
+ * Stacks-only (the server 400s on them too).
673
+ */
674
+ type StreamsEventsBitcoinListParams = StreamsEventsListParamsCommon & {
675
+ chain: "bitcoin";
676
+ types?: readonly RuneEventType[];
677
+ notTypes?: readonly RuneEventType[];
678
+ /** A RuneRef: an id (`840000:3`) or a name (`DOG•GO•TO•THE•MOON`). */
679
+ rune?: string;
680
+ /** A mainnet address. */
681
+ address?: string;
682
+ };
683
+ type StreamsEventsListParams = StreamsEventsStacksListParams | StreamsEventsBitcoinListParams;
684
+ type StreamsEventsStreamCommon = {
641
685
  fromCursor?: string | null;
642
- types?: readonly StreamsEventType[];
643
- notTypes?: readonly StreamsEventType[];
644
- contractId?: StreamsFilterValue;
645
- sender?: StreamsFilterValue;
646
- recipient?: StreamsFilterValue;
647
- assetIdentifier?: string;
648
- /** Labelled filter groups; see {@link StreamsEventsListParams.filters}. */
649
- filters?: StreamsFilterMap;
650
686
  batchSize?: number;
651
687
  emptyBackoffMs?: number;
652
688
  maxPages?: number;
653
689
  maxEmptyPolls?: number;
654
690
  signal?: AbortSignal;
655
691
  };
656
- type StreamsEventsSubscribeParams = {
657
- /** Resume strictly after this cursor; omit to live-tail from the tip. */
658
- fromCursor?: string | null;
692
+ /** `chain: "stacks"` (default, omit `chain` entirely) — matches
693
+ * {@link StreamsEventsStacksListParams}. */
694
+ type StreamsEventsStreamStacksParams = StreamsEventsStreamCommon & {
695
+ chain?: "stacks";
659
696
  types?: readonly StreamsEventType[];
660
697
  notTypes?: readonly StreamsEventType[];
661
698
  contractId?: StreamsFilterValue;
@@ -664,15 +701,28 @@ type StreamsEventsSubscribeParams = {
664
701
  assetIdentifier?: string;
665
702
  /** Labelled filter groups; see {@link StreamsEventsListParams.filters}. */
666
703
  filters?: StreamsFilterMap;
704
+ };
705
+ /** `chain: "bitcoin"` (plan 059/061) — Runes events, tailed the same way as
706
+ * the Stacks default. `types` is restricted to {@link RuneEventType} at the
707
+ * type level, matching {@link StreamsEventsBitcoinListParams}.
708
+ * `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters` don't exist
709
+ * on this branch — they're Stacks-only. */
710
+ type StreamsEventsStreamBitcoinParams = StreamsEventsStreamCommon & {
711
+ chain: "bitcoin";
712
+ types?: readonly RuneEventType[];
713
+ notTypes?: readonly RuneEventType[];
714
+ /** A RuneRef: an id (`840000:3`) or a name (`DOG•GO•TO•THE•MOON`). */
715
+ rune?: string;
716
+ /** A mainnet address. */
717
+ address?: string;
718
+ };
719
+ type StreamsEventsStreamParams = StreamsEventsStreamStacksParams | StreamsEventsStreamBitcoinParams;
720
+ type StreamsEventsSubscribeCommon = {
721
+ /** Resume strictly after this cursor; omit to live-tail from the tip. */
722
+ fromCursor?: string | null;
667
723
  /** Abort to unsubscribe (the returned function does the same). */
668
724
  signal?: AbortSignal;
669
725
  /**
670
- * Called for each pushed event, in order. The resume cursor advances only
671
- * after this resolves, so a handler that throws sees the same event again
672
- * on reconnect (at-least-once). Key durable writes by `cursor`.
673
- */
674
- onEvent: (event: StreamsEvent) => void | Promise<void>;
675
- /**
676
726
  * Called on every failure. Transport errors (dropped socket, 5xx, 429, a
677
727
  * stale connection, a throwing handler) reconnect from the last handled
678
728
  * cursor with exponential backoff. Errors that a retry cannot fix (401,
@@ -692,6 +742,38 @@ type StreamsEventsSubscribeParams = {
692
742
  */
693
743
  staleAfterMs?: number;
694
744
  };
745
+ /** `chain: "stacks"` (default, omit `chain` entirely). */
746
+ type StreamsEventsSubscribeStacksParams = StreamsEventsSubscribeCommon & {
747
+ chain?: "stacks";
748
+ types?: readonly StreamsEventType[];
749
+ notTypes?: readonly StreamsEventType[];
750
+ contractId?: StreamsFilterValue;
751
+ sender?: StreamsFilterValue;
752
+ recipient?: StreamsFilterValue;
753
+ assetIdentifier?: string;
754
+ /** Labelled filter groups; see {@link StreamsEventsListParams.filters}. */
755
+ filters?: StreamsFilterMap;
756
+ /**
757
+ * Called for each pushed event, in order. The resume cursor advances only
758
+ * after this resolves, so a handler that throws sees the same event again
759
+ * on reconnect (at-least-once). Key durable writes by `cursor`.
760
+ */
761
+ onEvent: (event: StreamsEvent) => void | Promise<void>;
762
+ };
763
+ /** `chain: "bitcoin"` (plan 059/061) — Runes events pushed live, on their own
764
+ * cursor space. `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters`
765
+ * don't exist on this branch — they're Stacks-only. */
766
+ type StreamsEventsSubscribeBitcoinParams = StreamsEventsSubscribeCommon & {
767
+ chain: "bitcoin";
768
+ types?: readonly RuneEventType[];
769
+ notTypes?: readonly RuneEventType[];
770
+ /** A RuneRef: an id (`840000:3`) or a name (`DOG•GO•TO•THE•MOON`). */
771
+ rune?: string;
772
+ /** A mainnet address. */
773
+ address?: string;
774
+ onEvent: (event: RuneStreamsEvent) => void | Promise<void>;
775
+ };
776
+ type StreamsEventsSubscribeParams = StreamsEventsSubscribeStacksParams | StreamsEventsSubscribeBitcoinParams;
695
777
  /**
696
778
  * Handle for a live subscription: call it to unsubscribe. `done` resolves
697
779
  * after unsubscribe (or the signal aborting) and rejects with the error that
@@ -776,6 +858,10 @@ type StreamsEventsConsumeParams<
776
858
  D extends boolean = false,
777
859
  F extends StreamsFilterMap = Record<never, never>
778
860
  > = {
861
+ /** `chain: "stacks"` (default, omit `chain` entirely) — the bitcoin branch
862
+ * is {@link StreamsEventsConsumeBitcoinParams}, a separate overload with
863
+ * no `filters`/`on`/`decoded` (Stacks-only concepts). */
864
+ chain?: "stacks";
779
865
  fromCursor?: string | null;
780
866
  /**
781
867
  * Deliver events pre-decoded as the flat, `event_type`-discriminated rows
@@ -884,22 +970,74 @@ type StreamsEventsConsumeParams<
884
970
  wake?: () => Promise<void>;
885
971
  };
886
972
  /**
973
+ * `chain: "bitcoin"` (plan 059/061) — the checkpointed sweep over Runes
974
+ * events. A separate, simpler type from {@link StreamsEventsConsumeParams}
975
+ * rather than a widened union member: `filters`/`on`/`decoded` are Stacks-only
976
+ * concepts (labelled OR-groups and Index-shaped projection have no Runes
977
+ * equivalent yet), so `onBatch` is the only way in and is required. Reorg
978
+ * rewind still works the same way (bitcoin reorgs carry the same
979
+ * `fork_point_height` + `new_canonical_tip` shape as Stacks ones).
980
+ */
981
+ type StreamsEventsConsumeBitcoinParams<TTx = never> = {
982
+ chain: "bitcoin";
983
+ fromCursor?: string | null;
984
+ sink?: ConsumerSink<TTx>;
985
+ onProgress?: (ctx: ConsumerBatchContext) => void;
986
+ mode?: "tail" | "bounded";
987
+ finalizedOnly?: boolean;
988
+ types?: readonly RuneEventType[];
989
+ notTypes?: readonly RuneEventType[];
990
+ /** A RuneRef: an id (`840000:3`) or a name (`DOG•GO•TO•THE•MOON`). */
991
+ rune?: string;
992
+ /** A mainnet address. */
993
+ address?: string;
994
+ batchSize?: number;
995
+ onBatch: (events: RuneStreamsEvent[], envelope: StreamsEventsEnvelope<RuneStreamsEvent, StreamsBitcoinTip>, ctx: StreamsBatchContext & WithSinkTx<TTx>) => void | string | null | undefined | Promise<void> | Promise<string | null | undefined>;
996
+ onReorg?: (reorg: StreamsReorg, ctx: StreamsReorgContext) => Promise<void> | void;
997
+ maxRollbackDepth?: number;
998
+ retryCount?: number;
999
+ retryDelay?: number;
1000
+ onError?: (err: unknown, ctx: {
1001
+ attempt: number;
1002
+ retriesLeft: number;
1003
+ delayMs: number;
1004
+ }) => void;
1005
+ emptyBackoffMs?: number;
1006
+ maxPages?: number;
1007
+ maxEmptyPolls?: number;
1008
+ signal?: AbortSignal;
1009
+ wake?: () => Promise<void>;
1010
+ };
1011
+ /**
887
1012
  * One yielded page from {@link StreamsClient.consume} — the
888
1013
  * `GET /v1/streams/events` envelope verbatim, with `next_cursor` renamed to
889
1014
  * `cursor` (the checkpoint to persist and resume from).
890
1015
  */
891
- type StreamsBatch<TEvent = StreamsEvent> = {
1016
+ type StreamsBatch<
1017
+ TEvent = StreamsEvent,
1018
+ TTip = StreamsTip
1019
+ > = {
892
1020
  /** Canonical events of this page, in cursor order. */
893
1021
  events: TEvent[];
894
1022
  /** Checkpoint after this page — pass back as `consume({ cursor })` to resume. */
895
1023
  cursor: string | null;
896
- tip: StreamsTip;
1024
+ tip: TTip;
897
1025
  /** Chain reorgs reported alongside this page; empty when none. */
898
1026
  reorgs: StreamsReorg[];
899
1027
  };
900
- type StreamsConsumeParams = {
1028
+ type StreamsConsumeCommon = {
901
1029
  /** Resume strictly after this cursor; omit to start from the oldest seekable page. */
902
1030
  cursor?: string | null;
1031
+ /** Events per page (the `limit` query param). Default 100. */
1032
+ batchSize?: number;
1033
+ /** Poll interval while caught up at the tip, in ms. Default 2000. */
1034
+ intervalMs?: number;
1035
+ /** Abort to end the iteration. */
1036
+ signal?: AbortSignal;
1037
+ };
1038
+ /** `chain: "stacks"` (default, omit `chain` entirely). */
1039
+ type StreamsConsumeStacksParams = StreamsConsumeCommon & {
1040
+ chain?: "stacks";
903
1041
  types?: readonly StreamsEventType[];
904
1042
  notTypes?: readonly StreamsEventType[];
905
1043
  contractId?: StreamsFilterValue;
@@ -909,13 +1047,20 @@ type StreamsConsumeParams = {
909
1047
  /** Labelled OR-groups — same semantics as `events.consume`; each returned
910
1048
  * event echoes the labels it matched. */
911
1049
  filters?: StreamsFilterMap;
912
- /** Events per page (the `limit` query param). Default 100. */
913
- batchSize?: number;
914
- /** Poll interval while caught up at the tip, in ms. Default 2000. */
915
- intervalMs?: number;
916
- /** Abort to end the iteration. */
917
- signal?: AbortSignal;
918
1050
  };
1051
+ /** `chain: "bitcoin"` (plan 059/061) — Runes batches, own cursor space.
1052
+ * `contractId`/`sender`/`recipient`/`assetIdentifier`/`filters` don't exist
1053
+ * on this branch — they're Stacks-only. */
1054
+ type StreamsConsumeBitcoinParams = StreamsConsumeCommon & {
1055
+ chain: "bitcoin";
1056
+ types?: readonly RuneEventType[];
1057
+ notTypes?: readonly RuneEventType[];
1058
+ /** A RuneRef: an id (`840000:3`) or a name (`DOG•GO•TO•THE•MOON`). */
1059
+ rune?: string;
1060
+ /** A mainnet address. */
1061
+ address?: string;
1062
+ };
1063
+ type StreamsConsumeParams = StreamsConsumeStacksParams | StreamsConsumeBitcoinParams;
919
1064
  type StreamsEventsConsumeResult = {
920
1065
  cursor: string | null;
921
1066
  pages: number;
@@ -1020,33 +1165,44 @@ type StreamsClient = {
1020
1165
  * rewound automatically — use `events.consume` with `onReorg` for managed
1021
1166
  * rollback semantics.
1022
1167
  */
1168
+ /** `chain: "bitcoin"` — batches carry Runes rows only, on the bitcoin tip
1169
+ * shape (plan 059/061). */
1170
+ consume(params: StreamsConsumeBitcoinParams): AsyncIterableIterator<StreamsBatch<RuneStreamsEvent, StreamsBitcoinTip>>;
1023
1171
  /** Narrowing overload: a literal `types` array narrows every batch's
1024
1172
  * event union to exactly those members. */
1025
- consume<const T extends readonly StreamsEventType[]>(params: StreamsConsumeParams & {
1173
+ consume<const T extends readonly StreamsEventType[]>(params: StreamsConsumeStacksParams & {
1026
1174
  types: T;
1027
1175
  }): AsyncIterableIterator<StreamsBatch<StreamsEventOfTypes<T>>>;
1028
1176
  consume(params?: StreamsConsumeParams): AsyncIterableIterator<StreamsBatch>;
1029
1177
  events: {
1030
1178
  /** `clock: "vm"` pages carry vm rows only (a parallel vocabulary,
1031
- * `event_index` = `ordinal`). Never `StreamsEvent`. */
1032
- list(params: StreamsEventsListParams & {
1179
+ * `event_index` = `ordinal`). Never `StreamsEvent`. Stacks-only —
1180
+ * `chain: "bitcoin"` has no `clock`. */
1181
+ list(params: StreamsEventsStacksListParams & {
1033
1182
  clock: "vm";
1034
1183
  }): Promise<StreamsEventsEnvelope<VmStreamsEvent>>;
1035
1184
  /** Narrowing overload, matching `consume`. Classic clock only —
1036
1185
  * `clock: "vm"` is overload 1, and a general `StreamsEventsListParams`
1037
1186
  * variable (clock unresolved) is the wire-union fallback. */
1038
- list<const T extends readonly StreamsEventType[]>(params: Omit<StreamsEventsListParams, "clock" | "types" | "notTypes"> & {
1187
+ list<const T extends readonly StreamsEventType[]>(params: Omit<StreamsEventsStacksListParams, "clock" | "types" | "notTypes"> & {
1039
1188
  types: T;
1040
1189
  notTypes?: readonly StreamsEventType[];
1041
1190
  clock?: "classic";
1042
1191
  }): Promise<StreamsEventsEnvelope<StreamsEventOfTypes<T>>>;
1043
- list(params?: Omit<StreamsEventsListParams, "clock" | "types" | "notTypes"> & {
1192
+ list(params?: Omit<StreamsEventsStacksListParams, "clock" | "types" | "notTypes"> & {
1044
1193
  types?: readonly StreamsEventType[];
1045
1194
  notTypes?: readonly StreamsEventType[];
1046
1195
  clock?: "classic";
1047
1196
  }): Promise<StreamsEventsEnvelope>;
1048
- /** Unresolved `clock` on a general params variable: the wire union. */
1197
+ /** `chain: "bitcoin"` pages carry Runes rows only, on the bitcoin tip
1198
+ * shape (plan 059). */
1199
+ list(params: StreamsEventsBitcoinListParams): Promise<StreamsEventsEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1200
+ /** Unresolved `chain`/`clock` on a general params variable: the wire union. */
1049
1201
  list(params: StreamsEventsListParams): Promise<StreamsEventsEnvelope<StreamsWireEvent>>;
1202
+ /** `chain: "bitcoin"` — Runes events for one transaction. */
1203
+ byTxId(txId: string, opts: {
1204
+ chain: "bitcoin";
1205
+ }): Promise<StreamsEventsListEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1050
1206
  byTxId(txId: string): Promise<StreamsEventsListEnvelope>;
1051
1207
  /**
1052
1208
  * Pull pages from Streams and call `onBatch` after each page.
@@ -1057,6 +1213,11 @@ type StreamsClient = {
1057
1213
  * The consumer also exits when `maxPages`, `maxEmptyPolls`, or `signal`
1058
1214
  * stops it.
1059
1215
  */
1216
+ /** `chain: "bitcoin"` — the checkpointed sweep over Runes events; see
1217
+ * {@link StreamsEventsConsumeBitcoinParams}. */
1218
+ consume<TTx = never>(params: StreamsEventsConsumeBitcoinParams<TTx> & {
1219
+ sink?: ConsumerSink<TTx>;
1220
+ }): Promise<StreamsEventsConsumeResult>;
1060
1221
  consume<
1061
1222
  const F extends StreamsFilterMap = Record<never, never>,
1062
1223
  TTx = never,
@@ -1079,8 +1240,10 @@ type StreamsClient = {
1079
1240
  * indefinitely by default and stops when its `AbortSignal`, `maxPages`, or
1080
1241
  * `maxEmptyPolls` stops it.
1081
1242
  */
1243
+ /** `chain: "bitcoin"` — Runes events only (plan 059/061). */
1244
+ stream(params: StreamsEventsStreamBitcoinParams): AsyncIterable<RuneStreamsEvent>;
1082
1245
  /** Narrowing overload, matching `consume`. */
1083
- stream<const T extends readonly StreamsEventType[]>(params: StreamsEventsStreamParams & {
1246
+ stream<const T extends readonly StreamsEventType[]>(params: StreamsEventsStreamStacksParams & {
1084
1247
  types: T;
1085
1248
  }): AsyncIterable<StreamsEventOfTypes<T>>;
1086
1249
  stream(params?: StreamsEventsStreamParams): AsyncIterable<StreamsEvent>;
@@ -1092,17 +1255,31 @@ type StreamsClient = {
1092
1255
  * settles when the loop ends. Not reorg-aware: an event delivered then
1093
1256
  * orphaned is never retracted. Durable writers use `consume()`.
1094
1257
  */
1095
- subscribe(params: StreamsEventsSubscribeParams): StreamsSubscription;
1258
+ /** `chain: "bitcoin"` — `onEvent` receives Runes rows (plan 059/061). */
1259
+ subscribe(params: StreamsEventsSubscribeBitcoinParams): StreamsSubscription;
1260
+ subscribe(params: StreamsEventsSubscribeStacksParams): StreamsSubscription;
1096
1261
  };
1097
1262
  blocks: {
1263
+ events(heightOrHash: number | string, opts: {
1264
+ chain: "bitcoin";
1265
+ }): Promise<StreamsEventsListEnvelope<RuneStreamsEvent, StreamsBitcoinTip>>;
1098
1266
  events(heightOrHash: number | string): Promise<StreamsEventsListEnvelope>;
1099
1267
  };
1100
1268
  reorgs: {
1269
+ list(params: StreamsReorgsListParams & {
1270
+ chain: "bitcoin";
1271
+ }): Promise<StreamsReorgsListEnvelope>;
1101
1272
  list(params: StreamsReorgsListParams): Promise<StreamsReorgsListEnvelope>;
1102
1273
  };
1103
1274
  /** Bulk parquet dumps. Requires `dumpsBaseUrl` on the client. */
1104
1275
  dumps: StreamsDumps;
1276
+ canonical(height: number, opts: {
1277
+ chain: "bitcoin";
1278
+ }): Promise<StreamsBitcoinCanonicalBlock>;
1105
1279
  canonical(height: number): Promise<StreamsCanonicalBlock>;
1280
+ tip(opts: {
1281
+ chain: "bitcoin";
1282
+ }): Promise<StreamsBitcoinTip>;
1106
1283
  tip(): Promise<StreamsTip>;
1107
1284
  };
1108
1285
  type Sleep = (ms: number, signal?: AbortSignal) => Promise<void>;
@@ -2275,6 +2452,185 @@ interface Pox5Resource {
2275
2452
  }>;
2276
2453
  };
2277
2454
  }
2455
+ /** A rune's `<block>:<tx>` id — the etch transaction's position, e.g. `840000:3`. */
2456
+ type RuneId = `${number}:${number}`;
2457
+ /**
2458
+ * A rune reference accepted by every Runes call: an id ({@link RuneId}) or a
2459
+ * name, with or without spacers, in any case — `DOG•GO•TO•THE•MOON`,
2460
+ * `dog.go.to.the.moon` and `doggotothemoon` all resolve to the same rune.
2461
+ * Typing every rune name is a no (178k runes and growing — a generated union
2462
+ * would be huge and stale on day one); `list({ search })` covers discovery.
2463
+ */
2464
+ type RuneRef = RuneId | (string & {});
2465
+ /** The Bitcoin chain tip a Runes read was served against — a separate clock
2466
+ * from the Stacks {@link IndexTip}: Runes ingest tracks Bitcoin blocks, not
2467
+ * Stacks ones. */
2468
+ type IndexBitcoinTip = {
2469
+ block_height: number;
2470
+ finalized_height: number;
2471
+ lag_seconds: number;
2472
+ };
2473
+ /** A Bitcoin fork the Runes indexer rolled back. Rows in
2474
+ * `[orphaned_from, orphaned_to]` were replaced; undo anything you committed
2475
+ * from them. Block-level only — a Bitcoin reorg has no Stacks-style
2476
+ * event_index component. */
2477
+ type IndexBtcReorg = {
2478
+ id: string;
2479
+ detected_at: string;
2480
+ fork_point_height: number;
2481
+ old_hash: string;
2482
+ new_hash: string;
2483
+ orphaned_from: number;
2484
+ orphaned_to: number;
2485
+ new_tip_height: number;
2486
+ };
2487
+ /** The rune identity bundle every Runes response embeds, so a client never
2488
+ * needs a second lookup just to show a name next to an event or a balance. */
2489
+ type IndexRuneRefSummary = {
2490
+ id: string;
2491
+ /** Spacers stripped, uppercase. */
2492
+ name: string;
2493
+ /** As etched, spacers (`•`) included. */
2494
+ spaced_name: string;
2495
+ symbol: string | null;
2496
+ divisibility: number;
2497
+ };
2498
+ /** Mint terms, or `null` for a premine-only rune that was never mintable. */
2499
+ type IndexRuneTerms = {
2500
+ amount: string | null;
2501
+ cap: string | null;
2502
+ height_start: string | null;
2503
+ height_end: string | null;
2504
+ offset_start: string | null;
2505
+ offset_end: string | null;
2506
+ };
2507
+ /** One etched rune's full entry: identity, premine/mint/burn counters,
2508
+ * computed supply, and mint terms. */
2509
+ type IndexRuneEntry = IndexRuneRefSummary & {
2510
+ /** Etch sequence number (u128 decimal string) — 0 is genesis. */
2511
+ number: string;
2512
+ /** Premined amount, u128 decimal string. Never `Number()`. */
2513
+ premine: string;
2514
+ /** Computed: `premine + mints × terms.amount` (0 with no terms). u128
2515
+ * decimal string. */
2516
+ supply: string;
2517
+ burned: string;
2518
+ mints: string;
2519
+ turbo: boolean;
2520
+ etching_txid: string;
2521
+ etched_height: number;
2522
+ etched_tx_index: number;
2523
+ terms: IndexRuneTerms | null;
2524
+ };
2525
+ type RunesEnvelope<TRow = IndexRuneEntry> = {
2526
+ runes: TRow[];
2527
+ next_cursor: string | null;
2528
+ tip: IndexBitcoinTip;
2529
+ /** Always empty: `list` reads a reorg-corrected snapshot table, not an
2530
+ * append-only log — there is no stale page to reconcile. */
2531
+ reorgs: IndexBtcReorg[];
2532
+ /** Present only when Runes data is not configured on this instance. */
2533
+ notes?: string;
2534
+ };
2535
+ type RunesListParams = {
2536
+ /** Name prefix, spacers and case ignored (`dog` matches `DOG•GO•TO•THE•MOON`). */
2537
+ search?: string;
2538
+ /** `number` (etch order, oldest first — default) or `mints` (busiest first). */
2539
+ sort?: "number" | "mints";
2540
+ cursor?: string | null;
2541
+ limit?: number;
2542
+ };
2543
+ type RuneEnvelope = {
2544
+ rune: IndexRuneEntry;
2545
+ tip: IndexBitcoinTip;
2546
+ };
2547
+ type IndexRuneEventKind = "rune_etch" | "rune_mint" | "rune_transfer" | "rune_burn";
2548
+ /** One etch/mint/transfer/burn event, with the rune's identity embedded so an
2549
+ * activity feed never needs a second lookup to show a name. */
2550
+ type IndexRuneEvent = {
2551
+ cursor: string;
2552
+ block_height: number;
2553
+ tx_index: number;
2554
+ txid: string;
2555
+ event_index: number;
2556
+ kind: IndexRuneEventKind;
2557
+ /** u128 decimal string. Never `Number()`. */
2558
+ amount: string;
2559
+ vout: number | null;
2560
+ /** The output's mainnet address. Only ever set on a `rune_transfer` event. */
2561
+ address: string | null;
2562
+ rune: IndexRuneRefSummary;
2563
+ };
2564
+ type RuneActivityEnvelope<TRow = IndexRuneEvent> = {
2565
+ events: TRow[];
2566
+ next_cursor: string | null;
2567
+ tip: IndexBitcoinTip;
2568
+ reorgs: IndexBtcReorg[];
2569
+ notes?: string;
2570
+ };
2571
+ type RuneActivityListParams = {
2572
+ cursor?: string | null;
2573
+ fromCursor?: string | null;
2574
+ fromHeight?: number;
2575
+ toHeight?: number;
2576
+ limit?: number;
2577
+ rune?: RuneRef;
2578
+ address?: string;
2579
+ kind?: readonly IndexRuneEventKind[];
2580
+ txid?: string;
2581
+ };
2582
+ type RuneActivityWalkParams = Omit<RuneActivityListParams, "limit"> & WalkOptions;
2583
+ /** A rune's balance on one unspent output, with the rune's identity embedded. */
2584
+ type IndexRuneBalance = {
2585
+ rune: IndexRuneRefSummary;
2586
+ /** The output's mainnet address, or `null` for a non-standard script. */
2587
+ address: string | null;
2588
+ txid: string;
2589
+ vout: number;
2590
+ /** u128 decimal string. Never `Number()`. */
2591
+ amount: string;
2592
+ };
2593
+ type RuneBalancesEnvelope<TRow = IndexRuneBalance> = {
2594
+ balances: TRow[];
2595
+ next_cursor: string | null;
2596
+ tip: IndexBitcoinTip;
2597
+ /** Always empty — see {@link RunesEnvelope.reorgs}. */
2598
+ reorgs: IndexBtcReorg[];
2599
+ notes?: string;
2600
+ };
2601
+ /** Exactly one of `address`/`outpoint` is required — enforced at the type
2602
+ * level, not just at runtime. */
2603
+ type RuneBalancesListParams = ({
2604
+ address: string;
2605
+ outpoint?: never;
2606
+ } | {
2607
+ outpoint: string;
2608
+ address?: never;
2609
+ }) & {
2610
+ /** Narrows the result to one rune. */
2611
+ rune?: RuneRef;
2612
+ cursor?: string | null;
2613
+ limit?: number;
2614
+ };
2615
+ /** `index.runes` — the rune catalog, activity log, and balances. Runes is
2616
+ * more data on the existing Index plane, not a new product. Not configured
2617
+ * on hosted yet; every feed's `notes` says so when it isn't. Self-host with
2618
+ * the `bitcoin` compose profile has data today. */
2619
+ interface RunesResource {
2620
+ /** The rune catalog. `search` prefix-matches the name; `sort` is etch
2621
+ * order (default) or busiest-first. */
2622
+ list(params?: RunesListParams): Promise<RunesEnvelope>;
2623
+ /** One rune's full entry by id or name; `null` on 404 (no such rune, or
2624
+ * Runes isn't configured on this instance). */
2625
+ get(rune: RuneRef): Promise<RuneEnvelope | null>;
2626
+ /** Current per-outpoint rune balances by address or outpoint. */
2627
+ balances(params: RuneBalancesListParams): Promise<RuneBalancesEnvelope>;
2628
+ /** Etch/mint/transfer/burn events, cursor `<block_height>:<event_index>`. */
2629
+ activity: {
2630
+ list(params?: RuneActivityListParams): Promise<RuneActivityEnvelope>;
2631
+ walk(params?: RuneActivityWalkParams): AsyncIterable<IndexRuneEvent>;
2632
+ };
2633
+ }
2278
2634
  /**
2279
2635
  * `index.ftTransfers` — callable shorthand for `.list()`, with `.list`/`.walk`
2280
2636
  * still available: `await sl.index.ftTransfers({ contractId })`.
@@ -2462,6 +2818,9 @@ declare class Index extends BaseClient {
2462
2818
  /** Decoded PoX-5 print events (SIP-045 Bitcoin Staking) — the raw pox-5
2463
2819
  * boot-contract log, all 19 topics. Distinct from `stacking` (PoX-4 era). */
2464
2820
  readonly pox5: Pox5Resource;
2821
+ /** Rune catalog, activity and balances. Separate clock/reorg source from
2822
+ * the Stacks feeds above — see {@link RunesResource}. */
2823
+ readonly runes: RunesResource;
2465
2824
  private listFtTransfers;
2466
2825
  private listNftTransfers;
2467
2826
  /** Shared keyset-pagination loop for every `walk*` feed: seed the cursor from
@@ -2512,6 +2871,11 @@ declare class Index extends BaseClient {
2512
2871
  private listPoxCycles;
2513
2872
  private walkPoxCycles;
2514
2873
  private getPoxCycle;
2874
+ private listRunes;
2875
+ private getRune;
2876
+ private listRuneActivity;
2877
+ private walkRuneActivity;
2878
+ private listRuneBalances;
2515
2879
  }
2516
2880
  import { ReindexResponse, SubgraphAggregateParams, SubgraphAggregateResponse, SubgraphDetail, SubgraphGapsResponse, SubgraphQueryParams, SubgraphSummary } from "@secondlayer/shared/schemas";
2517
2881
  import { DeploySubgraphRequest, DeploySubgraphResponse } from "@secondlayer/shared/schemas/subgraphs";
@@ -3062,7 +3426,7 @@ declare function createArchiveClient(options?: CreateArchiveClientOptions): Arch
3062
3426
  import { ChainWebhookDelivery } from "@secondlayer/shared";
3063
3427
  import { StandardWebhooksHeaders } from "@secondlayer/shared/crypto/standard-webhooks";
3064
3428
  import { StandardWebhooksHeaders as StandardWebhooksHeaders2, verify } from "@secondlayer/shared/crypto/standard-webhooks";
3065
- import { ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery as ChainWebhookDelivery2, ChainWebhookEnvelope, SbtcDepositEvent, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent } from "@secondlayer/shared";
3429
+ import { ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery as ChainWebhookDelivery2, ChainWebhookEnvelope, RuneApplyDeliveryOf, RuneApplyEnvelope, SbtcDepositEvent, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent } from "@secondlayer/shared";
3066
3430
  type HeaderLookup = (name: string) => string | null | undefined;
3067
3431
  type WebhookHeaderInput = HeaderLookup | StandardWebhooksHeaders | Record<string, string | string[] | undefined> | {
3068
3432
  get: (name: string) => string | null;
@@ -3322,4 +3686,4 @@ declare const Cursor: {
3322
3686
  };
3323
3687
  };
3324
3688
  import { decodeClarityValue, toJsonSafe } from "@secondlayer/shared/streams-rows";
3325
- 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, IndexBlock, 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, IndexPoxFunctionCount, IndexPrint, IndexReorg, IndexSbtcDeposit, IndexSbtcDepositDetail, IndexSbtcEvent, IndexSbtcSummary, IndexSbtcWithdrawal, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawalPhase, IndexStackingAction, 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, 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, StreamsBatch, StreamsBatchContext, StreamsCanonicalBlock, StreamsClient, StreamsConsumeParams, StreamsDumpFile, StreamsDumps, StreamsDumpsManifest, StreamsEvent, StreamsEventPayload, StreamsEventType, StreamsEventsConsumeParams, StreamsEventsConsumeResult, StreamsEventsEnvelope, StreamsEventsListEnvelope, StreamsEventsListParams, StreamsEventsStreamParams, StreamsEventsSubscribeParams, 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, isNftBurn, isNftMint, isNftTransfer, isPrint, isStxBurn, isStxLock, isStxMint, isStxTransfer, isSuccessDelivery, parseRetryAfter, resolveAccountKey, resolveApiKey, resolveBaseUrl, shutdownSignal, toJsonSafe, trigger, verifySecondlayerSignature, verify as verifyStandardWebhooksHeaders, verifyTransactionProof, verifyWebhookSignature };
3689
+ 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, IndexPoxFunctionCount, IndexPrint, IndexReorg, IndexRuneBalance, IndexRuneEntry, IndexRuneEvent, IndexRuneEventKind, IndexRuneRefSummary, IndexRuneTerms, IndexSbtcDeposit, IndexSbtcDepositDetail, IndexSbtcEvent, IndexSbtcSummary, IndexSbtcWithdrawal, IndexSbtcWithdrawalDetail, IndexSbtcWithdrawalPhase, IndexStackingAction, 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, 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, isNftBurn, isNftMint, isNftTransfer, isPrint, isStxBurn, isStxLock, isStxMint, isStxTransfer, isSuccessDelivery, parseRetryAfter, resolveAccountKey, resolveApiKey, resolveBaseUrl, shutdownSignal, toJsonSafe, trigger, verifySecondlayerSignature, verify as verifyStandardWebhooksHeaders, verifyTransactionProof, verifyWebhookSignature };