@secondlayer/shared 15.6.1 → 17.0.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.
Files changed (64) hide show
  1. package/dist/src/archive/range-digest.d.ts +2 -36
  2. package/dist/src/archive/semantic-digest-builder.d.ts +2 -36
  3. package/dist/src/classify/index.js +1 -4
  4. package/dist/src/classify/index.js.map +3 -3
  5. package/dist/src/coverage/index.d.ts +2 -36
  6. package/dist/src/crypto/secondlayer-webhook.js +1 -4
  7. package/dist/src/crypto/secondlayer-webhook.js.map +3 -3
  8. package/dist/src/db/index.d.ts +8 -152
  9. package/dist/src/db/index.js +3 -70
  10. package/dist/src/db/index.js.map +6 -6
  11. package/dist/src/db/queries/chain-reorgs.d.ts +2 -36
  12. package/dist/src/db/queries/chain-reorgs.js +3 -70
  13. package/dist/src/db/queries/chain-reorgs.js.map +6 -6
  14. package/dist/src/db/queries/contracts.d.ts +2 -36
  15. package/dist/src/db/queries/contracts.js.map +2 -2
  16. package/dist/src/db/queries/instance.d.ts +2 -36
  17. package/dist/src/db/queries/instance.js +1 -4
  18. package/dist/src/db/queries/instance.js.map +3 -3
  19. package/dist/src/db/queries/integrity.d.ts +2 -36
  20. package/dist/src/db/queries/integrity.js +1 -4
  21. package/dist/src/db/queries/integrity.js.map +3 -3
  22. package/dist/src/db/queries/subgraph-gaps.d.ts +2 -36
  23. package/dist/src/db/queries/subgraph-operations.d.ts +2 -36
  24. package/dist/src/db/queries/subgraphs.d.ts +2 -36
  25. package/dist/src/db/queries/sync-scope.d.ts +2 -36
  26. package/dist/src/db/queries/webhook-replays.d.ts +2 -36
  27. package/dist/src/db/queries/webhooks.d.ts +2 -36
  28. package/dist/src/db/schema.d.ts +3 -37
  29. package/dist/src/db/schema.js.map +2 -2
  30. package/dist/src/email/index.js +1 -4
  31. package/dist/src/email/index.js.map +3 -3
  32. package/dist/src/env.d.ts +2 -8
  33. package/dist/src/env.js +1 -5
  34. package/dist/src/env.js.map +3 -3
  35. package/dist/src/index-http.d.ts +1 -0
  36. package/dist/src/index-http.js.map +2 -2
  37. package/dist/src/index.d.ts +13 -164
  38. package/dist/src/index.js +6 -81
  39. package/dist/src/index.js.map +8 -8
  40. package/dist/src/insights/index.d.ts +2 -36
  41. package/dist/src/insights/index.js +1 -4
  42. package/dist/src/insights/index.js.map +3 -3
  43. package/dist/src/leader.js +3 -70
  44. package/dist/src/leader.js.map +6 -6
  45. package/dist/src/logger.js +1 -4
  46. package/dist/src/logger.js.map +3 -3
  47. package/dist/src/node/local-client.d.ts +2 -36
  48. package/dist/src/node/tx-summary.js +1 -4
  49. package/dist/src/node/tx-summary.js.map +3 -3
  50. package/dist/src/queue/listener.js +3 -70
  51. package/dist/src/queue/listener.js.map +6 -6
  52. package/dist/src/runtime/index.js +1 -2
  53. package/dist/src/runtime/index.js.map +3 -3
  54. package/dist/src/schemas/chain-triggers.js +2 -8
  55. package/dist/src/schemas/chain-triggers.js.map +3 -3
  56. package/dist/src/schemas/index.d.ts +1 -2
  57. package/dist/src/schemas/index.js +4 -11
  58. package/dist/src/schemas/index.js.map +4 -4
  59. package/dist/src/schemas/webhooks.d.ts +1 -2
  60. package/dist/src/schemas/webhooks.js +4 -11
  61. package/dist/src/schemas/webhooks.js.map +4 -4
  62. package/migrations/0205_sbtc_deposit_recipient.ts +75 -0
  63. package/migrations/0206_drop_pox4_calls.ts +32 -0
  64. package/package.json +2 -2
@@ -720,41 +720,6 @@ interface ChainReorgsTable {
720
720
  new_canonical_event_index: number;
721
721
  created_at: Generated<Date>;
722
722
  }
723
- type Pox4FunctionName = "stack-stx" | "delegate-stx" | "stack-extend" | "stack-increase" | "revoke-delegate-stx" | "delegate-stack-stx" | "delegate-stack-extend" | "delegate-stack-increase" | "stack-aggregation-commit" | "stack-aggregation-commit-indexed" | "stack-aggregation-increase" | "set-signer-key-authorization";
724
- interface Pox4CallsTable {
725
- cursor: string;
726
- block_height: number;
727
- block_time: Date;
728
- burn_block_height: number;
729
- tx_id: string;
730
- tx_index: number;
731
- function_name: Pox4FunctionName;
732
- caller: string;
733
- stacker: string | null;
734
- delegate_to: string | null;
735
- amount_ustx: string | null;
736
- lock_period: number | null;
737
- pox_addr_version: number | null;
738
- pox_addr_hashbytes: string | null;
739
- pox_addr_btc: string | null;
740
- start_cycle: number | null;
741
- end_cycle: number | null;
742
- signer_key: string | null;
743
- signer_signature: string | null;
744
- auth_id: string | null;
745
- max_amount: string | null;
746
- reward_cycle: number | null;
747
- aggregated_amount_ustx: string | null;
748
- aggregated_signer_index: number | null;
749
- auth_period: number | null;
750
- auth_topic: string | null;
751
- auth_allowed: boolean | null;
752
- result_ok: boolean;
753
- result_raw: string;
754
- canonical: Generated<boolean>;
755
- source_cursor: string;
756
- created_at: Generated<Date>;
757
- }
758
723
  type Pox5EventTopic = "set-bond-admin" | "set-pause-admin" | "pause-rewards" | "setup-bond" | "add-to-allowlist" | "register-for-bond" | "update-bond-registration" | "register-signer" | "stake" | "stake-update" | "announce-l1-early-exit" | "unstake-sbtc" | "unstake" | "calculate-rewards" | "bond-distribution" | "claim-rewards" | "claim-staker-rewards-for-signer" | "grant-signer-key" | "revoke-signer-grant";
759
724
  interface Pox5EventsTable {
760
725
  cursor: string;
@@ -844,6 +809,8 @@ interface SbtcEventsTable {
844
809
  request_id: number | null;
845
810
  amount: string | null;
846
811
  sender: string | null;
812
+ /** Stacks principal a `completed-deposit` minted sBTC to. */
813
+ recipient: string | null;
847
814
  recipient_btc_version: number | null;
848
815
  recipient_btc_hashbytes: string | null;
849
816
  bitcoin_txid: string | null;
@@ -1170,7 +1137,6 @@ interface Database {
1170
1137
  decoded_events: DecodedEventsTable;
1171
1138
  decoder_checkpoints: DecoderCheckpointsTable;
1172
1139
  chain_reorgs: ChainReorgsTable;
1173
- pox4_calls: Pox4CallsTable;
1174
1140
  pox5_events: Pox5EventsTable;
1175
1141
  pox5_cycles: Pox5CyclesTable;
1176
1142
  pox5_cycle_signers: Pox5CycleSignersTable;
@@ -1833,13 +1799,7 @@ declare function getEnv(): Env;
1833
1799
  declare function stacksNetwork(env?: NodeJS.ProcessEnv): string;
1834
1800
  type EnvMap = NodeJS.ProcessEnv;
1835
1801
  /**
1836
- * PoX-4 stacking decoder is ON by default — `/v1/index/stacking` is part of the
1837
- * public surface, so the decoder that fills `pox4_calls` runs unless explicitly
1838
- * opted out with `POX4_DECODER_ENABLED=false` (mirrors the sBTC decoder policy).
1839
- */
1840
- declare function isPox4DecoderEnabled(env?: EnvMap): boolean;
1841
- /**
1842
- * PoX-5 print-event decoder is ON by default (mirrors pox-4/sBTC policy).
1802
+ * PoX-5 print-event decoder is ON by default (mirrors the sBTC policy).
1843
1803
  * No activation gating needed: pox-5 events cannot exist before the Epoch 4.0
1844
1804
  * hard fork (Bitcoin block 960,230), so pre-activation the decoder idles at
1845
1805
  * tip. Opt out with `POX5_DECODER_ENABLED=false`.
@@ -1914,9 +1874,8 @@ declare const SOURCE_READ_COLUMNS: {
1914
1874
  readonly decoded_events: readonly ["amount", "asset_identifier", "block_height", "canonical", "contract_id", "cursor", "event_index", "event_type", "memo", "payload", "recipient", "sender", "tx_id", "tx_index", "value"]
1915
1875
  readonly transactions: readonly ["block_height", "contract_id", "function_args", "function_name", "raw_result", "raw_tx", "sender", "status", "tx_id", "tx_index", "type"]
1916
1876
  readonly mempool_transactions: readonly ["contract_id", "function_args", "function_name", "raw_tx", "received_at", "sender", "seq", "tx_id", "type"]
1917
- readonly pox4_calls: readonly ["aggregated_amount_ustx", "aggregated_signer_index", "amount_ustx", "auth_allowed", "auth_id", "auth_period", "auth_topic", "block_height", "block_time", "burn_block_height", "caller", "canonical", "cursor", "delegate_to", "end_cycle", "function_name", "lock_period", "max_amount", "pox_addr_btc", "pox_addr_hashbytes", "pox_addr_version", "result_ok", "reward_cycle", "signer_key", "signer_signature", "source_cursor", "stacker", "start_cycle", "tx_id", "tx_index"]
1918
1877
  readonly pox5_events: readonly ["amount_sats", "amount_ustx", "block_height", "block_time", "bond_index", "canonical", "cursor", "data", "event_index", "first_reward_cycle", "is_l1_lock", "reward_cycle", "signer", "signer_key", "signer_manager", "staker", "topic", "tx_id", "tx_index", "unlock_burn_height", "unlock_cycle"]
1919
- readonly sbtc_events: readonly ["amount", "bitcoin_txid", "block_height", "block_time", "burn_hash", "burn_height", "canonical", "cursor", "event_index", "fee", "governance_contract_type", "governance_new_contract", "max_fee", "output_index", "recipient_btc_hashbytes", "recipient_btc_version", "request_id", "sender", "signer_address", "signer_aggregate_pubkey", "signer_bitmap", "signer_keys_count", "signer_threshold", "sweep_txid", "topic", "tx_id", "tx_index"]
1878
+ readonly sbtc_events: readonly ["amount", "bitcoin_txid", "block_height", "block_time", "burn_hash", "burn_height", "canonical", "cursor", "event_index", "fee", "governance_contract_type", "governance_new_contract", "max_fee", "output_index", "recipient", "recipient_btc_hashbytes", "recipient_btc_version", "request_id", "sender", "signer_address", "signer_aggregate_pubkey", "signer_bitmap", "signer_keys_count", "signer_threshold", "sweep_txid", "topic", "tx_id", "tx_index"]
1920
1879
  readonly sbtc_token_events: readonly ["amount", "block_height", "block_time", "canonical", "cursor", "event_index", "event_type", "memo", "recipient", "sender", "tx_id", "tx_index"]
1921
1880
  readonly bns_name_events: readonly ["block_height", "block_time", "bns_id", "canonical", "cursor", "event_index", "fqn", "hashed_salted_fqn_preorder", "imported_at", "name", "namespace", "owner", "preordered_by", "registered_at", "renewal_height", "stx_burn", "topic", "tx_id", "tx_index"]
1922
1881
  readonly bns_namespace_events: readonly ["block_height", "block_time", "canonical", "cursor", "event_index", "launched_at", "lifetime", "manager", "manager_frozen", "manager_transfers_disabled", "namespace", "price_frozen", "price_function", "revealed_at", "status", "tx_id", "tx_index"]
@@ -2086,117 +2045,6 @@ declare const SOURCE_READ_TYPES: {
2086
2045
  readonly type: "text"
2087
2046
  }
2088
2047
  }
2089
- readonly pox4_calls: {
2090
- readonly aggregated_amount_ustx: {
2091
- readonly type: "text"
2092
- readonly nullable: true
2093
- }
2094
- readonly aggregated_signer_index: {
2095
- readonly type: "int"
2096
- readonly nullable: true
2097
- }
2098
- readonly amount_ustx: {
2099
- readonly type: "text"
2100
- readonly nullable: true
2101
- }
2102
- readonly auth_allowed: {
2103
- readonly type: "boolean"
2104
- readonly nullable: true
2105
- }
2106
- readonly auth_id: {
2107
- readonly type: "text"
2108
- readonly nullable: true
2109
- }
2110
- readonly auth_period: {
2111
- readonly type: "int"
2112
- readonly nullable: true
2113
- }
2114
- readonly auth_topic: {
2115
- readonly type: "text"
2116
- readonly nullable: true
2117
- }
2118
- readonly block_height: {
2119
- readonly type: "int"
2120
- }
2121
- readonly block_time: {
2122
- readonly type: "timestamp"
2123
- }
2124
- readonly burn_block_height: {
2125
- readonly type: "int"
2126
- }
2127
- readonly caller: {
2128
- readonly type: "text"
2129
- }
2130
- readonly canonical: {
2131
- readonly type: "boolean"
2132
- }
2133
- readonly cursor: {
2134
- readonly type: "text"
2135
- }
2136
- readonly delegate_to: {
2137
- readonly type: "text"
2138
- readonly nullable: true
2139
- }
2140
- readonly end_cycle: {
2141
- readonly type: "int"
2142
- readonly nullable: true
2143
- }
2144
- readonly function_name: {
2145
- readonly type: "text"
2146
- }
2147
- readonly lock_period: {
2148
- readonly type: "int"
2149
- readonly nullable: true
2150
- }
2151
- readonly max_amount: {
2152
- readonly type: "text"
2153
- readonly nullable: true
2154
- }
2155
- readonly pox_addr_btc: {
2156
- readonly type: "text"
2157
- readonly nullable: true
2158
- }
2159
- readonly pox_addr_hashbytes: {
2160
- readonly type: "text"
2161
- readonly nullable: true
2162
- }
2163
- readonly pox_addr_version: {
2164
- readonly type: "int"
2165
- readonly nullable: true
2166
- }
2167
- readonly result_ok: {
2168
- readonly type: "boolean"
2169
- }
2170
- readonly reward_cycle: {
2171
- readonly type: "int"
2172
- readonly nullable: true
2173
- }
2174
- readonly signer_key: {
2175
- readonly type: "text"
2176
- readonly nullable: true
2177
- }
2178
- readonly signer_signature: {
2179
- readonly type: "text"
2180
- readonly nullable: true
2181
- }
2182
- readonly source_cursor: {
2183
- readonly type: "text"
2184
- }
2185
- readonly stacker: {
2186
- readonly type: "text"
2187
- readonly nullable: true
2188
- }
2189
- readonly start_cycle: {
2190
- readonly type: "int"
2191
- readonly nullable: true
2192
- }
2193
- readonly tx_id: {
2194
- readonly type: "text"
2195
- }
2196
- readonly tx_index: {
2197
- readonly type: "int"
2198
- }
2199
- }
2200
2048
  readonly pox5_events: {
2201
2049
  readonly amount_sats: {
2202
2050
  readonly type: "text"
@@ -2327,6 +2175,10 @@ declare const SOURCE_READ_TYPES: {
2327
2175
  readonly type: "int"
2328
2176
  readonly nullable: true
2329
2177
  }
2178
+ readonly recipient: {
2179
+ readonly type: "text"
2180
+ readonly nullable: true
2181
+ }
2330
2182
  readonly recipient_btc_hashbytes: {
2331
2183
  readonly type: "text"
2332
2184
  readonly nullable: true
@@ -2714,7 +2566,6 @@ declare const SOURCE_READ_PKS: {
2714
2566
  readonly decoded_events: readonly ["cursor"]
2715
2567
  readonly transactions: readonly ["tx_id"]
2716
2568
  readonly mempool_transactions: readonly ["seq"]
2717
- readonly pox4_calls: readonly ["cursor"]
2718
2569
  readonly pox5_events: readonly ["cursor"]
2719
2570
  readonly sbtc_events: readonly ["cursor"]
2720
2571
  readonly sbtc_token_events: readonly ["cursor"]
@@ -2820,7 +2671,6 @@ declare const TABLE_TO_DB: {
2820
2671
  stage_failures: string
2821
2672
  decoded_events: string
2822
2673
  decoder_checkpoints: string
2823
- pox4_calls: string
2824
2674
  pox5_events: string
2825
2675
  pox5_cycles: string
2826
2676
  pox5_cycle_signers: string
@@ -3398,11 +3248,10 @@ type ChainTrigger = {
3398
3248
  map?: string
3399
3249
  } & TraitScoped) | {
3400
3250
  type: "sbtc_deposit"
3401
- sender?: string
3251
+ recipient?: string
3402
3252
  minAmount?: ChainTriggerAmount
3403
3253
  maxAmount?: ChainTriggerAmount
3404
3254
  bitcoinTxid?: string
3405
- requestId?: number
3406
3255
  } | {
3407
3256
  type: "sbtc_withdrawal_create"
3408
3257
  sender?: string
@@ -3690,12 +3539,12 @@ type RuneEventPayload = {
3690
3539
  };
3691
3540
  /**
3692
3541
  * Payload for `sbtc_deposit` (topic: completed-deposit).
3693
- * `sender` is the Stacks address that initiated the deposit and receives the sBTC.
3542
+ * `recipient` is the Stacks principal the deposit minted sBTC to (a wallet or
3543
+ * contract). Deposits have no request id; `bitcoin_txid` identifies one.
3694
3544
  */
3695
3545
  interface SbtcDepositEvent {
3696
3546
  topic: "completed-deposit";
3697
- request_id: number;
3698
- sender: string | null;
3547
+ recipient: string | null;
3699
3548
  amount: string;
3700
3549
  bitcoin_txid: string | null;
3701
3550
  block_height: number;
@@ -4039,4 +3888,4 @@ declare function publicKeyPemFromPrivate(privateKeyPem: string): string;
4039
3888
  declare function ed25519KeyId(publicKeyPem: string): string;
4040
3889
  declare function signEd25519(payload: string, privateKey: KeyObject): string;
4041
3890
  declare function verifyEd25519(payload: string, signatureBase64: string, publicKey: KeyObject): boolean;
4042
- export { ABI_STATUSES, AbiStatus, Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeyExpiredError, ApiKeyRevokedError, ApiKeyStatus, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, AuthenticationError, AuthorizationError, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, CHAIN_TRIGGER_FIELDS, CHAIN_TRIGGER_TYPES, CODE_TO_STATUS, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReadCacheTable, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainReorgsTable, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery, ChainWebhookEnvelope, CliDeviceLogin, CliDeviceLoginStatus, CliDeviceLoginsTable, CliDeviceProduct, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, CreateWebhookRequest, CreateWebhookRequestSchema, CreateWebhookResponse, DB_TO_STREAMS_EVENT_TYPE, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DEFAULT_BTC_CONFIRMATIONS, Database, DatabaseError, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadReason, DeadRow, DecodedEventType2 as DecodedEventType, DecodedEventsTable, DecoderCheckpointsTable, DeliveryRow, DeploySubgraphRequest, DeploySubgraphRequestSchema, DeploySubgraphResponse, EMPTY_RANGE_EVENT_INDEX_SENTINEL, Env, ErrorCode, ErrorCodes, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, ForbiddenError, GapReason, HealthHour, HealthSnapshotPoint, HostedStackStateTable, INSIGHT_SEVERITIES, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUpdateSubscriber, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, Insight, InsightEvidence, InsightEvidenceSchema, InsightListResponse, InsightListResponseSchema, InsightMutesTable, InsightResourceKind, InsightResourceKindSchema, InsightSchema, InsightSeverity, InsightSeveritySchema, InsightsTable, InstancesTable, KeyRotatedError, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NotFoundError, NumericAsText, OBSERVER_JOURNAL_STATUSES, OauthClient, OauthClientsTable, OauthCodesTable, OauthGrant, OauthGrantsTable, OauthRefreshRetiredTable, OauthRequestStatus, OauthRequestsTable, OauthTokenKind, OauthTokensTable, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, ParsedCreateWebhookRequest, ParsedReplayWebhookRequest, ParsedUpdateWebhookRequest, PaymentRequiredError, PendingForkBlocksTable, Pox4CallsTable, Pox4FunctionName, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, PushPrefs, PushPrefsTable, PushSentTable, PushSubscription, PushSubscriptionsTable, RUNE_EVENT_TYPES, RateLimitError, ReindexResponse, RepairMode, ReplayResult, ReplayWebhookRequest, ReplayWebhookRequestSchema, RetryState, RotateSecretResponse, RunStatus, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneEventType, SEVERITY_ORDER, SOURCE_READ_COLUMNS, SOURCE_READ_PKS, SOURCE_READ_TYPES, STREAMS_CURSOR_VERSION, STREAMS_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_TO_DB_EVENT_TYPES, SUBGRAPH_STATES, SbtcDepositEvent, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent, SecondLayerError, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, StreamsCursor, StreamsCursorFeed, StreamsCursorFeedMismatchError, StreamsDbEventType, StreamsEventType, Subgraph, SubgraphAgentSchema, SubgraphAggregateParams, SubgraphAggregateResponse, SubgraphDetail, SubgraphErrorGroupsTable, SubgraphGap, SubgraphGapEntry, SubgraphGapRange, SubgraphGapsResponse, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphQueryParams, SubgraphSpecFormat, SubgraphSpecOptions, SubgraphStatus, SubgraphSummary, SubgraphSyncInfo, SubgraphSyncState, SubgraphVerification, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, TABLE_TO_DB, TenantSuspendedError, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSendsTable, UpdateSubgraph, UpdateSubgraphOperation, UpdateSubscriber, UpdateSubscribersTable, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UpdateWebhookRequest, UpdateWebhookRequestSchema, UsageLedgerRow, UsageLedgerTable, VM_EVENT_TYPES, VM_NODE_TO_STORED_TYPE2 as VM_NODE_TO_STORED_TYPE, VM_STORED_TO_NODE_TYPE, ValidationError, VersionConflictError, VmEvent, VmEventType, VmEventsArchiveTable, VmEventsTable, VmNodeEventType, WEBHOOK_FORMATS, WEBHOOK_STATUSES, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookDeliveryHoursTable, WebhookDetail, WebhookFormat, WebhookFormatSchema, WebhookIncidentAlert, WebhookIncidentAlertsTable, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookPauseReason, WebhookReplay, WebhookReplayStatus, WebhookReplaysTable, WebhookStatus, WebhookStatusSchema, WebhookSummary, WebhooksTable, applicationDatabaseUrl, assertDbSplit, blockEndCursor, bucketHourly, closeDb, closeDbOrTimeout, committedHeight, compareStreamsCursor, configuredSourceUrl, configuredTargetUrl, exports_hmac as crypto, decodeFeedCursor, decodeStreamsCursor, decodeTaggedStreamsCursor, describeDbUrl, exports_ed25519 as ed25519, encodeFeedCursor, encodeStreamsCursor, finalizedBurnHeight, formatWebhookSchemaErrors, generateSubgraphAgentSchema, generateSubgraphMarkdown, generateSubgraphOpenApi, generateSubgraphSpec, getDb, getDbSplitStatus, getEnv, getErrorMessage, getMigrationRole, getRawClient, getSourceDb, getTargetDb, isBnsDecoderEnabled, isEmptyRangeCursor, isPox4DecoderEnabled, isPox5DecoderEnabled, isSbtcDecoderEnabled, jsonb, logger, onChainPlane, onControlPlane, parseJsonb, resolveSourceUrl, resolveTargetUrl, setMigrationRole, sql, stacksNetwork, syncState };
3891
+ export { ABI_STATUSES, AbiStatus, Account, AccountBalanceAlerts, AccountBalanceAlertsTable, AccountCredits, AccountCreditsTable, AccountSpendCap, AccountSpendCapsTable, AccountsTable, ApiFailedRequest, ApiFailedRequestsTable, ApiKey, ApiKeyExpiredError, ApiKeyRevokedError, ApiKeyStatus, ApiKeysTable, ApiRequestLogRow, ApiRequestLogTable, ArchiveFetch, ArchiveFetchesTable, AuthenticationError, AuthorizationError, Block, BlocksTable, BnsMarketplaceAction, BnsMarketplaceEventsTable, BnsNameEventTopic, BnsNameEventsTable, BnsNamesTable, BnsNamespaceEventStatus, BnsNamespaceEventsTable, BnsNamespacesTable, BurnBlockRewardSlotsTable, BurnBlockRewardsTable, CHAIN_TRIGGER_FIELDS, CHAIN_TRIGGER_TYPES, CODE_TO_STATUS, ChainApplyDeliveryOf, ChainApplyEnvelope, ChainApplyEnvelopeOf, ChainEventEnvelope, ChainFtBurnData, ChainFtMintData, ChainFtTransferData, ChainNftBurnData, ChainNftMintData, ChainNftTransferData, ChainPrintEventData, ChainReadCacheTable, ChainReorgOrphanedEntry, ChainReorgRollbackDelivery, ChainReorgRollbackEnvelope, ChainReorgsTable, ChainStxBurnData, ChainStxLockData, ChainStxMintData, ChainStxTransferData, ChainTestDelivery, ChainTxLevelEvent, ChainWebhookDelivery, ChainWebhookEnvelope, CliDeviceLogin, CliDeviceLoginStatus, CliDeviceLoginsTable, CliDeviceProduct, ContactRequest, ContactRequestsTable, Contract, ContractsTable, CoverageSegmentsTable, CreateWebhookRequest, CreateWebhookRequestSchema, CreateWebhookResponse, DB_TO_STREAMS_EVENT_TYPE, DECODED_EVENT_TYPES2 as DECODED_EVENT_TYPES, DEFAULT_BTC_CONFIRMATIONS, Database, DatabaseError, DbPlane, DbReadRow, DbSplitStatus, DeadLetterEventsTable, DeadReason, DeadRow, DecodedEventType2 as DecodedEventType, DecodedEventsTable, DecoderCheckpointsTable, DeliveryRow, DeploySubgraphRequest, DeploySubgraphRequestSchema, DeploySubgraphResponse, EMPTY_RANGE_EVENT_INDEX_SENTINEL, Env, ErrorCode, ErrorCodes, Event, EventsArchiveTable, EventsTable, FailureClass, FailureUnit, FeedbackTicket, FeedbackTicketsTable, ForbiddenError, GapReason, HealthHour, HealthSnapshotPoint, HostedStackStateTable, INSIGHT_SEVERITIES, IndexColumn, IndexColumnType, IndexPrimaryKey, IndexProgress, IndexProgressTable, InsertAccount, InsertAccountBalanceAlerts, InsertAccountCredits, InsertAccountSpendCap, InsertApiFailedRequest, InsertApiKey, InsertApiRequestLogRow, InsertArchiveFetch, InsertBlock, InsertContactRequest, InsertContract, InsertEvent, InsertFeedbackTicket, InsertIndexProgress, InsertMagicLink, InsertMempoolTransaction, InsertSession, InsertStateWrite, InsertSubgraph, InsertSubgraphGap, InsertSubgraphHealthSnapshot, InsertSubgraphOperation, InsertTransaction, InsertUpdateSubscriber, InsertUsageLedgerRow, InsertVmEvent, InsertWaitlistSignup, InsertWebhook, InsertWebhookDelivery, InsertWebhookOutbox, Insight, InsightEvidence, InsightEvidenceSchema, InsightListResponse, InsightListResponseSchema, InsightMutesTable, InsightResourceKind, InsightResourceKindSchema, InsightSchema, InsightSeverity, InsightSeveritySchema, InsightsTable, InstancesTable, KeyRotatedError, MagicLink, MagicLinksTable, MempoolTransaction, MempoolTransactionsTable, MigrationRole, NativeClock, NotFoundError, NumericAsText, OBSERVER_JOURNAL_STATUSES, OauthClient, OauthClientsTable, OauthCodesTable, OauthGrant, OauthGrantsTable, OauthRefreshRetiredTable, OauthRequestStatus, OauthRequestsTable, OauthTokenKind, OauthTokensTable, ObserverJournalStatus, ObserverJournalTable, OutboxStatus, ParsedCreateWebhookRequest, ParsedReplayWebhookRequest, ParsedUpdateWebhookRequest, PaymentRequiredError, PendingForkBlocksTable, Pox5CycleSignersTable, Pox5CyclesTable, Pox5EventTopic, Pox5EventsTable, ProcessedStripeEventsTable, PushPrefs, PushPrefsTable, PushSentTable, PushSubscription, PushSubscriptionsTable, RUNE_EVENT_TYPES, RateLimitError, ReindexResponse, RepairMode, ReplayResult, ReplayWebhookRequest, ReplayWebhookRequestSchema, RetryState, RotateSecretResponse, RunStatus, RuneApplyDeliveryOf, RuneApplyEnvelope, RuneEventType, SEVERITY_ORDER, SOURCE_READ_COLUMNS, SOURCE_READ_PKS, SOURCE_READ_TYPES, STREAMS_CURSOR_VERSION, STREAMS_DB_EVENT_TYPES, STREAMS_EVENT_TYPES, STREAMS_TO_DB_EVENT_TYPES, SUBGRAPH_STATES, SbtcDepositEvent, SbtcEventTopic, SbtcEventsTable, SbtcSettlementsTable, SbtcTokenEventType, SbtcTokenEventsTable, SbtcWithdrawalEvent, SbtcWithdrawalSweptConfirmedEvent, SecondLayerError, SentinelAccount, SentinelAccountsTable, ServiceHeartbeatsTable, Session, SessionsTable, StageBlockReceiptsTable, StageFailuresTable, StageKind, StageRegistryTable, StageRunsTable, StateWrite, StateWritesArchiveTable, StateWritesTable, StreamsCursor, StreamsCursorFeed, StreamsCursorFeedMismatchError, StreamsDbEventType, StreamsEventType, Subgraph, SubgraphAgentSchema, SubgraphAggregateParams, SubgraphAggregateResponse, SubgraphDetail, SubgraphErrorGroupsTable, SubgraphGap, SubgraphGapEntry, SubgraphGapRange, SubgraphGapsResponse, SubgraphGapsTable, SubgraphHealthSnapshot, SubgraphHealthSnapshotsTable, SubgraphOperation, SubgraphOperationKind, SubgraphOperationStatus, SubgraphOperationsTable, SubgraphProcessingStatsTable, SubgraphQueryParams, SubgraphSpecFormat, SubgraphSpecOptions, SubgraphStatus, SubgraphSummary, SubgraphSyncInfo, SubgraphSyncState, SubgraphVerification, SubgraphViolationsTable, SubgraphsTable, SyncScopesTable, TABLE_TO_DB, TenantSuspendedError, Transaction, TransactionsArchiveTable, TransactionsTable, TriggerEvaluatorState, TriggerEvaluatorStateTable, UpdateAccountBalanceAlerts, UpdateAccountCredits, UpdateAccountSpendCap, UpdateApiKey, UpdateArchiveFetch, UpdateBlock, UpdateContract, UpdateEvent, UpdateIndexProgress, UpdateSendsTable, UpdateSubgraph, UpdateSubgraphOperation, UpdateSubscriber, UpdateSubscribersTable, UpdateTransaction, UpdateUsageLedgerRow, UpdateVmEvent, UpdateWebhook, UpdateWebhookOutbox, UpdateWebhookRequest, UpdateWebhookRequestSchema, UsageLedgerRow, UsageLedgerTable, VM_EVENT_TYPES, VM_NODE_TO_STORED_TYPE2 as VM_NODE_TO_STORED_TYPE, VM_STORED_TO_NODE_TYPE, ValidationError, VersionConflictError, VmEvent, VmEventType, VmEventsArchiveTable, VmEventsTable, VmNodeEventType, WEBHOOK_FORMATS, WEBHOOK_STATUSES, Waitlist, WaitlistSignup, WaitlistSignupsTable, WaitlistsTable, Webhook, WebhookDeliveriesTable, WebhookDelivery, WebhookDeliveryHoursTable, WebhookDetail, WebhookFormat, WebhookFormatSchema, WebhookIncidentAlert, WebhookIncidentAlertsTable, WebhookKind, WebhookOutbox, WebhookOutboxTable, WebhookPauseReason, WebhookReplay, WebhookReplayStatus, WebhookReplaysTable, WebhookStatus, WebhookStatusSchema, WebhookSummary, WebhooksTable, applicationDatabaseUrl, assertDbSplit, blockEndCursor, bucketHourly, closeDb, closeDbOrTimeout, committedHeight, compareStreamsCursor, configuredSourceUrl, configuredTargetUrl, exports_hmac as crypto, decodeFeedCursor, decodeStreamsCursor, decodeTaggedStreamsCursor, describeDbUrl, exports_ed25519 as ed25519, encodeFeedCursor, encodeStreamsCursor, finalizedBurnHeight, formatWebhookSchemaErrors, generateSubgraphAgentSchema, generateSubgraphMarkdown, generateSubgraphOpenApi, generateSubgraphSpec, getDb, getDbSplitStatus, getEnv, getErrorMessage, getMigrationRole, getRawClient, getSourceDb, getTargetDb, isBnsDecoderEnabled, isEmptyRangeCursor, isPox5DecoderEnabled, isSbtcDecoderEnabled, jsonb, logger, onChainPlane, onControlPlane, parseJsonb, resolveSourceUrl, resolveTargetUrl, setMigrationRole, sql, stacksNetwork, syncState };
package/dist/src/index.js CHANGED
@@ -166,9 +166,6 @@ function stacksNetwork(env = process.env) {
166
166
  function isProductionEnv() {
167
167
  return process.env["NODE_ENV"] === "production";
168
168
  }
169
- function isPox4DecoderEnabled(env = process.env) {
170
- return env.POX4_DECODER_ENABLED !== "false";
171
- }
172
169
  function isPox5DecoderEnabled(env = process.env) {
173
170
  return env.POX5_DECODER_ENABLED !== "false";
174
171
  }
@@ -381,38 +378,6 @@ var SOURCE_READ_COLUMNS = {
381
378
  "tx_id",
382
379
  "type"
383
380
  ],
384
- pox4_calls: [
385
- "aggregated_amount_ustx",
386
- "aggregated_signer_index",
387
- "amount_ustx",
388
- "auth_allowed",
389
- "auth_id",
390
- "auth_period",
391
- "auth_topic",
392
- "block_height",
393
- "block_time",
394
- "burn_block_height",
395
- "caller",
396
- "canonical",
397
- "cursor",
398
- "delegate_to",
399
- "end_cycle",
400
- "function_name",
401
- "lock_period",
402
- "max_amount",
403
- "pox_addr_btc",
404
- "pox_addr_hashbytes",
405
- "pox_addr_version",
406
- "result_ok",
407
- "reward_cycle",
408
- "signer_key",
409
- "signer_signature",
410
- "source_cursor",
411
- "stacker",
412
- "start_cycle",
413
- "tx_id",
414
- "tx_index"
415
- ],
416
381
  pox5_events: [
417
382
  "amount_sats",
418
383
  "amount_ustx",
@@ -451,6 +416,7 @@ var SOURCE_READ_COLUMNS = {
451
416
  "governance_new_contract",
452
417
  "max_fee",
453
418
  "output_index",
419
+ "recipient",
454
420
  "recipient_btc_hashbytes",
455
421
  "recipient_btc_version",
456
422
  "request_id",
@@ -624,38 +590,6 @@ var SOURCE_READ_TYPES = {
624
590
  tx_id: { type: "text" },
625
591
  type: { type: "text" }
626
592
  },
627
- pox4_calls: {
628
- aggregated_amount_ustx: { type: "text", nullable: true },
629
- aggregated_signer_index: { type: "int", nullable: true },
630
- amount_ustx: { type: "text", nullable: true },
631
- auth_allowed: { type: "boolean", nullable: true },
632
- auth_id: { type: "text", nullable: true },
633
- auth_period: { type: "int", nullable: true },
634
- auth_topic: { type: "text", nullable: true },
635
- block_height: { type: "int" },
636
- block_time: { type: "timestamp" },
637
- burn_block_height: { type: "int" },
638
- caller: { type: "text" },
639
- canonical: { type: "boolean" },
640
- cursor: { type: "text" },
641
- delegate_to: { type: "text", nullable: true },
642
- end_cycle: { type: "int", nullable: true },
643
- function_name: { type: "text" },
644
- lock_period: { type: "int", nullable: true },
645
- max_amount: { type: "text", nullable: true },
646
- pox_addr_btc: { type: "text", nullable: true },
647
- pox_addr_hashbytes: { type: "text", nullable: true },
648
- pox_addr_version: { type: "int", nullable: true },
649
- result_ok: { type: "boolean" },
650
- reward_cycle: { type: "int", nullable: true },
651
- signer_key: { type: "text", nullable: true },
652
- signer_signature: { type: "text", nullable: true },
653
- source_cursor: { type: "text" },
654
- stacker: { type: "text", nullable: true },
655
- start_cycle: { type: "int", nullable: true },
656
- tx_id: { type: "text" },
657
- tx_index: { type: "int" }
658
- },
659
593
  pox5_events: {
660
594
  amount_sats: { type: "text", nullable: true },
661
595
  amount_ustx: { type: "text", nullable: true },
@@ -694,6 +628,7 @@ var SOURCE_READ_TYPES = {
694
628
  governance_new_contract: { type: "text", nullable: true },
695
629
  max_fee: { type: "text", nullable: true },
696
630
  output_index: { type: "int", nullable: true },
631
+ recipient: { type: "text", nullable: true },
697
632
  recipient_btc_hashbytes: { type: "text", nullable: true },
698
633
  recipient_btc_version: { type: "int", nullable: true },
699
634
  request_id: { type: "int", nullable: true },
@@ -829,7 +764,6 @@ var SOURCE_READ_PKS = {
829
764
  decoded_events: ["cursor"],
830
765
  transactions: ["tx_id"],
831
766
  mempool_transactions: ["seq"],
832
- pox4_calls: ["cursor"],
833
767
  pox5_events: ["cursor"],
834
768
  sbtc_events: ["cursor"],
835
769
  sbtc_token_events: ["cursor"],
@@ -902,7 +836,6 @@ var TABLE_TO_DB = {
902
836
  stage_failures: "source",
903
837
  decoded_events: "source",
904
838
  decoder_checkpoints: "source",
905
- pox4_calls: "source",
906
839
  pox5_events: "source",
907
840
  pox5_cycles: "source",
908
841
  pox5_cycle_signers: "source",
@@ -1570,13 +1503,7 @@ var CHAIN_TRIGGER_FIELDS = {
1570
1503
  map_set: ["contractId", "map", "trait"],
1571
1504
  map_insert: ["contractId", "map", "trait"],
1572
1505
  map_delete: ["contractId", "map", "trait"],
1573
- sbtc_deposit: [
1574
- "sender",
1575
- "minAmount",
1576
- "maxAmount",
1577
- "bitcoinTxid",
1578
- "requestId"
1579
- ],
1506
+ sbtc_deposit: ["recipient", "minAmount", "maxAmount", "bitcoinTxid"],
1580
1507
  sbtc_withdrawal_create: ["sender", "minAmount", "maxAmount", "requestId"],
1581
1508
  sbtc_withdrawal_accept: ["requestId", "sweepTxid"],
1582
1509
  sbtc_withdrawal_reject: ["requestId"],
@@ -1781,11 +1708,10 @@ var ChainTriggerSchema = z4.discriminatedUnion("type", [
1781
1708
  }).strict(),
1782
1709
  z4.object({
1783
1710
  type: z4.literal("sbtc_deposit"),
1784
- sender: triggerPattern.optional(),
1711
+ recipient: triggerPattern.optional(),
1785
1712
  minAmount: triggerAmount.optional(),
1786
1713
  maxAmount: triggerAmount.optional(),
1787
- bitcoinTxid: triggerPattern.optional(),
1788
- requestId: z4.number().int().nonnegative().optional()
1714
+ bitcoinTxid: triggerPattern.optional()
1789
1715
  }).strict(),
1790
1716
  z4.object({
1791
1717
  type: z4.literal("sbtc_withdrawal_create"),
@@ -2528,7 +2454,6 @@ export {
2528
2454
  getTargetDb,
2529
2455
  isBnsDecoderEnabled,
2530
2456
  isEmptyRangeCursor,
2531
- isPox4DecoderEnabled,
2532
2457
  isPox5DecoderEnabled,
2533
2458
  isSbtcDecoderEnabled,
2534
2459
  jsonb,
@@ -2544,5 +2469,5 @@ export {
2544
2469
  syncState
2545
2470
  };
2546
2471
 
2547
- //# debugId=1EF625DDF5B5DD6864756E2164756E21
2472
+ //# debugId=1C7D1E7027A70E3164756E2164756E21
2548
2473
  //# sourceMappingURL=index.js.map