@secondlayer/shared 7.9.0 → 7.10.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.
@@ -1,4 +1,22 @@
1
1
  import { ColumnType, Generated, Insertable, Selectable, Updateable } from "kysely";
2
+ /**
3
+ * Coverage-kernel constraints. SQL CHECKs in migration 0116 must stay
4
+ * identical — property tests treat this file as the spec.
5
+ */
6
+ declare const STAGE_KINDS: readonly ["raw", "decode", "subgraph", "queue"];
7
+ type StageKind = (typeof STAGE_KINDS)[number];
8
+ declare const NATIVE_CLOCKS: readonly ["block", "cursor", "queue"];
9
+ type NativeClock = (typeof NATIVE_CLOCKS)[number];
10
+ declare const REPAIR_MODES: readonly ["range_safe", "full_reindex", "archive_replay", "none"];
11
+ type RepairMode = (typeof REPAIR_MODES)[number];
12
+ declare const RUN_STATUSES: readonly ["pending", "running", "complete", "syncing", "lagging", "gap", "stale", "failed", "unverified_import", "unanchored", "source_unavailable", "out_of_scope", "disabled", "halted"];
13
+ type RunStatus = (typeof RUN_STATUSES)[number];
14
+ declare const FAILURE_UNITS: readonly ["block", "range", "cursor", "queue"];
15
+ type FailureUnit = (typeof FAILURE_UNITS)[number];
16
+ declare const FAILURE_CLASSES: readonly ["omission", "version", "digest_mismatch", "crash", "reorg", "source_gap", "handler", "timeout", "unknown"];
17
+ type FailureClass = (typeof FAILURE_CLASSES)[number];
18
+ declare const RETRY_STATES: readonly ["open", "retrying", "halted", "resolved"];
19
+ type RetryState = (typeof RETRY_STATES)[number];
2
20
  interface BlocksTable {
3
21
  height: number;
4
22
  hash: string;
@@ -726,6 +744,72 @@ interface ObserverJournalTable {
726
744
  error: string | null;
727
745
  processed_at: Date | null;
728
746
  }
747
+ /** Declared coverage stage. Identity is the `id` string (`raw`, `decode:stx`, …). */
748
+ interface StageRegistryTable {
749
+ id: string;
750
+ kind: StageKind;
751
+ depends_on: string | null;
752
+ native_clock: NativeClock;
753
+ producer_version: string;
754
+ repair_mode: RepairMode;
755
+ enabled: Generated<boolean>;
756
+ created_at: Generated<Date>;
757
+ }
758
+ /** One versioned sweep of a stage. */
759
+ interface StageRunsTable {
760
+ id: Generated<string>;
761
+ stage_id: string;
762
+ code_hash: string;
763
+ config_hash: string;
764
+ handler_hash: string | null;
765
+ target_height: number | null;
766
+ target_cursor: string | null;
767
+ status: RunStatus;
768
+ complete_through: number | null;
769
+ started_at: Generated<Date>;
770
+ finished_at: Date | null;
771
+ }
772
+ /** Per-block acknowledgement. Unique on (stage, height, hash). */
773
+ interface StageBlockReceiptsTable {
774
+ id: Generated<string>;
775
+ stage_id: string;
776
+ run_id: string | null;
777
+ block_height: number;
778
+ block_hash: string;
779
+ input_count: number;
780
+ input_digest: string;
781
+ effect_digest: string;
782
+ finalized: Generated<boolean>;
783
+ compacted_at: Date | null;
784
+ created_at: Generated<Date>;
785
+ }
786
+ /** Compacted finalized range. Only sealed after receipts in the range finalize. */
787
+ interface CoverageSegmentsTable {
788
+ id: Generated<string>;
789
+ stage_id: string;
790
+ from_height: number;
791
+ to_height: number;
792
+ chain_digest: string;
793
+ input_digest: string;
794
+ output_digest: string;
795
+ sealed_at: Generated<Date>;
796
+ }
797
+ /** Exact unit or range that failed, plus retry/retention state. */
798
+ interface StageFailuresTable {
799
+ id: Generated<string>;
800
+ stage_id: string;
801
+ run_id: string | null;
802
+ unit_kind: FailureUnit;
803
+ from_height: number | null;
804
+ to_height: number | null;
805
+ class: FailureClass;
806
+ retry_state: RetryState;
807
+ retry_count: Generated<number>;
808
+ last_error: string | null;
809
+ created_at: Generated<Date>;
810
+ resolved_at: Date | null;
811
+ retain_until: Generated<Date>;
812
+ }
729
813
  interface Database {
730
814
  blocks: BlocksTable;
731
815
  transactions: TransactionsTable;
@@ -791,6 +875,11 @@ interface Database {
791
875
  chain_read_cache: ChainReadCacheTable;
792
876
  pending_fork_blocks: PendingForkBlocksTable;
793
877
  observer_journal: ObserverJournalTable;
878
+ stage_registry: StageRegistryTable;
879
+ stage_runs: StageRunsTable;
880
+ stage_block_receipts: StageBlockReceiptsTable;
881
+ coverage_segments: CoverageSegmentsTable;
882
+ stage_failures: StageFailuresTable;
794
883
  }
795
884
  /** Prepaid x402 credit — one running USD-micros balance per payer principal. */
796
885
  interface X402BalancesTable {
@@ -2032,6 +2121,11 @@ declare const TABLE_TO_DB: {
2032
2121
  chain_read_cache: string
2033
2122
  pending_fork_blocks: string
2034
2123
  observer_journal: string
2124
+ stage_registry: string
2125
+ stage_runs: string
2126
+ stage_block_receipts: string
2127
+ coverage_segments: string
2128
+ stage_failures: string
2035
2129
  decoded_events: string
2036
2130
  decoder_checkpoints: string
2037
2131
  pox4_calls: string
@@ -2893,6 +2987,10 @@ type StreamsCursor = {
2893
2987
  declare const EMPTY_RANGE_EVENT_INDEX_SENTINEL = 2147483647;
2894
2988
  declare function encodeStreamsCursor(cursor: StreamsCursor): string;
2895
2989
  declare function decodeStreamsCursor(cursor: string): StreamsCursor;
2990
+ declare function compareStreamsCursor(a: StreamsCursor, b: StreamsCursor): number;
2991
+ declare function isEmptyRangeCursor(cursor: StreamsCursor): boolean;
2992
+ /** Exclusive end of every event that can live in `height`. */
2993
+ declare function blockEndCursor(height: number): StreamsCursor;
2896
2994
  /**
2897
2995
  * Payload for `sbtc_deposit` (topic: completed-deposit).
2898
2996
  * `sender` is the Stacks address that initiated the deposit and receives the sBTC.
@@ -3152,4 +3250,4 @@ interface ChainTestDelivery {
3152
3250
  * "Chain subscription webhook payloads" doc.
3153
3251
  */
3154
3252
  type ChainWebhookDelivery = ChainApplyDeliveryOf<"stx_transfer", ChainEventEnvelope<"stx_transfer_event", ChainStxTransferData>> | ChainApplyDeliveryOf<"stx_mint", ChainEventEnvelope<"stx_mint_event", ChainStxMintData>> | ChainApplyDeliveryOf<"stx_burn", ChainEventEnvelope<"stx_burn_event", ChainStxBurnData>> | ChainApplyDeliveryOf<"stx_lock", ChainEventEnvelope<"stx_lock_event", ChainStxLockData>> | ChainApplyDeliveryOf<"ft_transfer", ChainEventEnvelope<"ft_transfer_event", ChainFtTransferData>> | ChainApplyDeliveryOf<"ft_mint", ChainEventEnvelope<"ft_mint_event", ChainFtMintData>> | ChainApplyDeliveryOf<"ft_burn", ChainEventEnvelope<"ft_burn_event", ChainFtBurnData>> | ChainApplyDeliveryOf<"nft_transfer", ChainEventEnvelope<"nft_transfer_event", ChainNftTransferData>> | ChainApplyDeliveryOf<"nft_mint", ChainEventEnvelope<"nft_mint_event", ChainNftMintData>> | ChainApplyDeliveryOf<"nft_burn", ChainEventEnvelope<"nft_burn_event", ChainNftBurnData>> | ChainApplyDeliveryOf<"print_event", ChainEventEnvelope<"contract_event", ChainPrintEventData>> | ChainApplyDeliveryOf<"contract_call", ChainTxLevelEvent> | ChainApplyDeliveryOf<"contract_deploy", ChainTxLevelEvent> | ChainApplyDeliveryOf<"sbtc_deposit", SbtcDepositEvent> | ChainApplyDeliveryOf<"sbtc_withdrawal_create", SbtcWithdrawalEvent> | ChainApplyDeliveryOf<"sbtc_withdrawal_accept", SbtcWithdrawalEvent> | ChainApplyDeliveryOf<"sbtc_withdrawal_reject", SbtcWithdrawalEvent> | ChainApplyDeliveryOf<"sbtc_withdrawal_swept_confirmed", SbtcWithdrawalSweptConfirmedEvent> | ChainReorgRollbackDelivery | ChainTestDelivery;
3155
- export { validateSubscriptionFilterForTable, sql, setMigrationRole, parseJsonb, onControlPlane, onChainPlane, logger, jsonb, isPox5DecoderEnabled, isPox4DecoderEnabled, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getMigrationRole, getErrorMessage, getEnv, getDbSplitStatus, getDb, generateSubgraphSpec, generateSubgraphOpenApi, generateSubgraphMarkdown, generateSubgraphAgentSchema, formatSubscriptionSchemaErrors, finalizedBurnHeight, encodeStreamsCursor, exports_ed25519 as ed25519, decodeStreamsCursor, exports_hmac as crypto, closeDb, assertDbSplit, applicationDatabaseUrl, X402PaymentsTable, X402BalancesTable, VersionConflictError, ValidationError, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionRequestSchema, UpdateSubscriptionRequest, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateContract, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, UpdateAccountCredits, TriggerEvaluatorStateTable, TriggerEvaluatorState, TransactionsTable, TransactionsArchiveTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantSuspendedError, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, TABLE_TO_DB, SubscriptionsTable, SubscriptionSummary, SubscriptionStatusSchema, SubscriptionStatus, SubscriptionSchemaTables, SubscriptionSchemaTable, SubscriptionSchemaColumn, SubscriptionRuntimeSchema, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionKind, SubscriptionFormatSchema, SubscriptionFormat, SubscriptionFilterSchema, SubscriptionFilterPrimitiveSchema, SubscriptionFilterPrimitive, SubscriptionFilterOperatorSchema, SubscriptionFilterOperator, SubscriptionFilterClauseSchema, SubscriptionFilterClause, SubscriptionFilter, SubscriptionDetail, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphSyncInfo, SubgraphSummary, SubgraphSpecOptions, SubgraphSpecFormat, SubgraphResourceWarning, SubgraphQueryParams, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGapsResponse, SubgraphGapRange, SubgraphGapEntry, SubgraphGap, SubgraphDetail, SubgraphAggregateResponse, SubgraphAggregateParams, SubgraphAgentSchema, Subgraph, StreamsEventType, StreamsDbEventType, StreamsCursor, SessionsTable, Session, ServiceHeartbeatsTable, SecondLayerError, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalEvent, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcSettlementsTable, SbtcEventsTable, SbtcEventTopic, SbtcDepositEvent, SUBSCRIPTION_STATUSES, SUBSCRIPTION_RUNTIMES, SUBSCRIPTION_FORMATS, SUBSCRIPTION_FILTER_OPERATORS, STREAMS_TO_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_DB_EVENT_TYPES, SOURCE_READ_TYPES, SOURCE_READ_PKS, SOURCE_READ_COLUMNS, RotateSecretResponse, ReplaySubscriptionRequestSchema, ReplaySubscriptionRequest, ReplayResult, ReindexResponse, RateLimitError, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox5EventsTable, Pox5EventTopic, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, PendingForkBlocksTable, PaymentRequiredError, ParsedUpdateSubscriptionRequest, ParsedReplaySubscriptionRequest, ParsedCreateSubscriptionRequest, OutboxStatus, ObserverJournalTable, ObserverJournalStatus, NumericAsText, NotFoundError, MigrationRole, MempoolTransactionsTable, MempoolTransaction, MagicLinksTable, MagicLink, KeyRotatedError, InstancesTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMempoolTransaction, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertContract, InsertClaimToken, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountCredits, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, IndexPrimaryKey, IndexColumnType, IndexColumn, ForbiddenError, EventsTable, EventsArchiveTable, Event, ErrorCodes, ErrorCode, Env, EMPTY_RANGE_EVENT_INDEX_SENTINEL, DeploySubgraphResponse, DeploySubgraphRequestSchema, DeploySubgraphRequest, DeliveryRow, DecoderCheckpointsTable, DecodedEventsTable, DecodedEventType2 as DecodedEventType, DeadRow, DeadLetterEventsTable, DbSplitStatus, DbReadRow, DbPlane, DatabaseError, Database, DEFAULT_BTC_CONFIRMATIONS, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DB_TO_STREAMS_EVENT_TYPE, CreateSubscriptionResponse, CreateSubscriptionRequestSchema, CreateSubscriptionRequest, ContractsTable, Contract, ClaimTokensTable, ClaimToken, ChainWebhookEnvelope, ChainWebhookDelivery, ChainTxLevelEvent, ChainTestDelivery, ChainStxTransferData, ChainStxMintData, ChainStxLockData, ChainStxBurnData, ChainReorgsTable, ChainReorgRollbackEnvelope, ChainReorgRollbackDelivery, ChainReorgOrphanedEntry, ChainReadCacheTable, ChainPrintEventData, ChainNftTransferData, ChainNftMintData, ChainNftBurnData, ChainFtTransferData, ChainFtMintData, ChainFtBurnData, ChainEventEnvelope, ChainApplyEnvelopeOf, ChainApplyEnvelope, ChainApplyDeliveryOf, CODE_TO_STATUS, CHAIN_TRIGGER_TYPES, CHAIN_TRIGGER_FIELDS, ByoBreakingChangeDetails, BurnBlockRewardsTable, BurnBlockRewardSlotsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, AuthorizationError, AuthenticationError, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountCreditsTable, AccountCredits, AccountAgentRunsTable, AccountAgentRun, Account };
3253
+ export { validateSubscriptionFilterForTable, sql, setMigrationRole, parseJsonb, onControlPlane, onChainPlane, logger, jsonb, isPox5DecoderEnabled, isPox4DecoderEnabled, isEmptyRangeCursor, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getMigrationRole, getErrorMessage, getEnv, getDbSplitStatus, getDb, generateSubgraphSpec, generateSubgraphOpenApi, generateSubgraphMarkdown, generateSubgraphAgentSchema, formatSubscriptionSchemaErrors, finalizedBurnHeight, encodeStreamsCursor, exports_ed25519 as ed25519, decodeStreamsCursor, exports_hmac as crypto, compareStreamsCursor, closeDb, blockEndCursor, assertDbSplit, applicationDatabaseUrl, X402PaymentsTable, X402BalancesTable, VersionConflictError, ValidationError, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionRequestSchema, UpdateSubscriptionRequest, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateContract, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, UpdateAccountCredits, TriggerEvaluatorStateTable, TriggerEvaluatorState, TransactionsTable, TransactionsArchiveTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantSuspendedError, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, TABLE_TO_DB, SubscriptionsTable, SubscriptionSummary, SubscriptionStatusSchema, SubscriptionStatus, SubscriptionSchemaTables, SubscriptionSchemaTable, SubscriptionSchemaColumn, SubscriptionRuntimeSchema, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionKind, SubscriptionFormatSchema, SubscriptionFormat, SubscriptionFilterSchema, SubscriptionFilterPrimitiveSchema, SubscriptionFilterPrimitive, SubscriptionFilterOperatorSchema, SubscriptionFilterOperator, SubscriptionFilterClauseSchema, SubscriptionFilterClause, SubscriptionFilter, SubscriptionDetail, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphSyncInfo, SubgraphSummary, SubgraphSpecOptions, SubgraphSpecFormat, SubgraphResourceWarning, SubgraphQueryParams, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGapsResponse, SubgraphGapRange, SubgraphGapEntry, SubgraphGap, SubgraphDetail, SubgraphAggregateResponse, SubgraphAggregateParams, SubgraphAgentSchema, Subgraph, StreamsEventType, StreamsDbEventType, StreamsCursor, StageRunsTable, StageRegistryTable, StageKind, StageFailuresTable, StageBlockReceiptsTable, SessionsTable, Session, ServiceHeartbeatsTable, SecondLayerError, SbtcWithdrawalSweptConfirmedEvent, SbtcWithdrawalEvent, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcSettlementsTable, SbtcEventsTable, SbtcEventTopic, SbtcDepositEvent, SUBSCRIPTION_STATUSES, SUBSCRIPTION_RUNTIMES, SUBSCRIPTION_FORMATS, SUBSCRIPTION_FILTER_OPERATORS, STREAMS_TO_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_DB_EVENT_TYPES, SOURCE_READ_TYPES, SOURCE_READ_PKS, SOURCE_READ_COLUMNS, RunStatus, RotateSecretResponse, RetryState, ReplaySubscriptionRequestSchema, ReplaySubscriptionRequest, ReplayResult, RepairMode, ReindexResponse, RateLimitError, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox5EventsTable, Pox5EventTopic, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, PendingForkBlocksTable, PaymentRequiredError, ParsedUpdateSubscriptionRequest, ParsedReplaySubscriptionRequest, ParsedCreateSubscriptionRequest, OutboxStatus, ObserverJournalTable, ObserverJournalStatus, NumericAsText, NotFoundError, NativeClock, MigrationRole, MempoolTransactionsTable, MempoolTransaction, MagicLinksTable, MagicLink, KeyRotatedError, InstancesTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMempoolTransaction, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertContract, InsertClaimToken, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountCredits, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, IndexPrimaryKey, IndexColumnType, IndexColumn, ForbiddenError, FailureUnit, FailureClass, EventsTable, EventsArchiveTable, Event, ErrorCodes, ErrorCode, Env, EMPTY_RANGE_EVENT_INDEX_SENTINEL, DeploySubgraphResponse, DeploySubgraphRequestSchema, DeploySubgraphRequest, DeliveryRow, DecoderCheckpointsTable, DecodedEventsTable, DecodedEventType2 as DecodedEventType, DeadRow, DeadLetterEventsTable, DbSplitStatus, DbReadRow, DbPlane, DatabaseError, Database, DEFAULT_BTC_CONFIRMATIONS, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DB_TO_STREAMS_EVENT_TYPE, CreateSubscriptionResponse, CreateSubscriptionRequestSchema, CreateSubscriptionRequest, CoverageSegmentsTable, ContractsTable, Contract, ClaimTokensTable, ClaimToken, ChainWebhookEnvelope, ChainWebhookDelivery, ChainTxLevelEvent, ChainTestDelivery, ChainStxTransferData, ChainStxMintData, ChainStxLockData, ChainStxBurnData, ChainReorgsTable, ChainReorgRollbackEnvelope, ChainReorgRollbackDelivery, ChainReorgOrphanedEntry, ChainReadCacheTable, ChainPrintEventData, ChainNftTransferData, ChainNftMintData, ChainNftBurnData, ChainFtTransferData, ChainFtMintData, ChainFtBurnData, ChainEventEnvelope, ChainApplyEnvelopeOf, ChainApplyEnvelope, ChainApplyDeliveryOf, CODE_TO_STATUS, CHAIN_TRIGGER_TYPES, CHAIN_TRIGGER_FIELDS, ByoBreakingChangeDetails, BurnBlockRewardsTable, BurnBlockRewardSlotsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, AuthorizationError, AuthenticationError, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountCreditsTable, AccountCredits, AccountAgentRunsTable, AccountAgentRun, Account };
package/dist/src/index.js CHANGED
@@ -721,6 +721,11 @@ var TABLE_TO_DB = {
721
721
  chain_read_cache: "source",
722
722
  pending_fork_blocks: "source",
723
723
  observer_journal: "source",
724
+ stage_registry: "source",
725
+ stage_runs: "source",
726
+ stage_block_receipts: "source",
727
+ coverage_segments: "source",
728
+ stage_failures: "source",
724
729
  decoded_events: "source",
725
730
  decoder_checkpoints: "source",
726
731
  pox4_calls: "source",
@@ -2040,6 +2045,24 @@ function decodeStreamsCursor(cursor) {
2040
2045
  }
2041
2046
  return decoded;
2042
2047
  }
2048
+ function compareStreamsCursor(a, b) {
2049
+ if (a.block_height !== b.block_height) {
2050
+ return a.block_height < b.block_height ? -1 : 1;
2051
+ }
2052
+ if (a.event_index !== b.event_index) {
2053
+ return a.event_index < b.event_index ? -1 : 1;
2054
+ }
2055
+ return 0;
2056
+ }
2057
+ function isEmptyRangeCursor(cursor) {
2058
+ return cursor.event_index === EMPTY_RANGE_EVENT_INDEX_SENTINEL;
2059
+ }
2060
+ function blockEndCursor(height) {
2061
+ return {
2062
+ block_height: height,
2063
+ event_index: EMPTY_RANGE_EVENT_INDEX_SENTINEL
2064
+ };
2065
+ }
2043
2066
  export {
2044
2067
  validateSubscriptionFilterForTable,
2045
2068
  sql2 as sql,
@@ -2051,6 +2074,7 @@ export {
2051
2074
  jsonb,
2052
2075
  isPox5DecoderEnabled,
2053
2076
  isPox4DecoderEnabled,
2077
+ isEmptyRangeCursor,
2054
2078
  getTargetDb,
2055
2079
  getSourceDb,
2056
2080
  getRawClientFor,
@@ -2070,7 +2094,9 @@ export {
2070
2094
  exports_ed25519 as ed25519,
2071
2095
  decodeStreamsCursor,
2072
2096
  exports_hmac as crypto,
2097
+ compareStreamsCursor,
2073
2098
  closeDb,
2099
+ blockEndCursor,
2074
2100
  assertDbSplit,
2075
2101
  applicationDatabaseUrl,
2076
2102
  VersionConflictError,
@@ -2117,5 +2143,5 @@ export {
2117
2143
  AuthenticationError
2118
2144
  };
2119
2145
 
2120
- //# debugId=A31131AE8723A14F64756E2164756E21
2146
+ //# debugId=231D0EA60821FC7764756E2164756E21
2121
2147
  //# sourceMappingURL=index.js.map