@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
@@ -486,41 +486,6 @@ interface ChainReorgsTable {
486
486
  new_canonical_event_index: number;
487
487
  created_at: Generated<Date>;
488
488
  }
489
- 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";
490
- interface Pox4CallsTable {
491
- cursor: string;
492
- block_height: number;
493
- block_time: Date;
494
- burn_block_height: number;
495
- tx_id: string;
496
- tx_index: number;
497
- function_name: Pox4FunctionName;
498
- caller: string;
499
- stacker: string | null;
500
- delegate_to: string | null;
501
- amount_ustx: string | null;
502
- lock_period: number | null;
503
- pox_addr_version: number | null;
504
- pox_addr_hashbytes: string | null;
505
- pox_addr_btc: string | null;
506
- start_cycle: number | null;
507
- end_cycle: number | null;
508
- signer_key: string | null;
509
- signer_signature: string | null;
510
- auth_id: string | null;
511
- max_amount: string | null;
512
- reward_cycle: number | null;
513
- aggregated_amount_ustx: string | null;
514
- aggregated_signer_index: number | null;
515
- auth_period: number | null;
516
- auth_topic: string | null;
517
- auth_allowed: boolean | null;
518
- result_ok: boolean;
519
- result_raw: string;
520
- canonical: Generated<boolean>;
521
- source_cursor: string;
522
- created_at: Generated<Date>;
523
- }
524
489
  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";
525
490
  interface Pox5EventsTable {
526
491
  cursor: string;
@@ -610,6 +575,8 @@ interface SbtcEventsTable {
610
575
  request_id: number | null;
611
576
  amount: string | null;
612
577
  sender: string | null;
578
+ /** Stacks principal a `completed-deposit` minted sBTC to. */
579
+ recipient: string | null;
613
580
  recipient_btc_version: number | null;
614
581
  recipient_btc_hashbytes: string | null;
615
582
  bitcoin_txid: string | null;
@@ -936,7 +903,6 @@ interface Database {
936
903
  decoded_events: DecodedEventsTable;
937
904
  decoder_checkpoints: DecoderCheckpointsTable;
938
905
  chain_reorgs: ChainReorgsTable;
939
- pox4_calls: Pox4CallsTable;
940
906
  pox5_events: Pox5EventsTable;
941
907
  pox5_cycles: Pox5CyclesTable;
942
908
  pox5_cycle_signers: Pox5CycleSignersTable;
@@ -63,9 +63,6 @@ function stacksNetwork(env = process.env) {
63
63
  function isProductionEnv() {
64
64
  return process.env["NODE_ENV"] === "production";
65
65
  }
66
- function isPox4DecoderEnabled(env = process.env) {
67
- return env.POX4_DECODER_ENABLED !== "false";
68
- }
69
66
  function isPox5DecoderEnabled(env = process.env) {
70
67
  return env.POX5_DECODER_ENABLED !== "false";
71
68
  }
@@ -278,38 +275,6 @@ var SOURCE_READ_COLUMNS = {
278
275
  "tx_id",
279
276
  "type"
280
277
  ],
281
- pox4_calls: [
282
- "aggregated_amount_ustx",
283
- "aggregated_signer_index",
284
- "amount_ustx",
285
- "auth_allowed",
286
- "auth_id",
287
- "auth_period",
288
- "auth_topic",
289
- "block_height",
290
- "block_time",
291
- "burn_block_height",
292
- "caller",
293
- "canonical",
294
- "cursor",
295
- "delegate_to",
296
- "end_cycle",
297
- "function_name",
298
- "lock_period",
299
- "max_amount",
300
- "pox_addr_btc",
301
- "pox_addr_hashbytes",
302
- "pox_addr_version",
303
- "result_ok",
304
- "reward_cycle",
305
- "signer_key",
306
- "signer_signature",
307
- "source_cursor",
308
- "stacker",
309
- "start_cycle",
310
- "tx_id",
311
- "tx_index"
312
- ],
313
278
  pox5_events: [
314
279
  "amount_sats",
315
280
  "amount_ustx",
@@ -348,6 +313,7 @@ var SOURCE_READ_COLUMNS = {
348
313
  "governance_new_contract",
349
314
  "max_fee",
350
315
  "output_index",
316
+ "recipient",
351
317
  "recipient_btc_hashbytes",
352
318
  "recipient_btc_version",
353
319
  "request_id",
@@ -521,38 +487,6 @@ var SOURCE_READ_TYPES = {
521
487
  tx_id: { type: "text" },
522
488
  type: { type: "text" }
523
489
  },
524
- pox4_calls: {
525
- aggregated_amount_ustx: { type: "text", nullable: true },
526
- aggregated_signer_index: { type: "int", nullable: true },
527
- amount_ustx: { type: "text", nullable: true },
528
- auth_allowed: { type: "boolean", nullable: true },
529
- auth_id: { type: "text", nullable: true },
530
- auth_period: { type: "int", nullable: true },
531
- auth_topic: { type: "text", nullable: true },
532
- block_height: { type: "int" },
533
- block_time: { type: "timestamp" },
534
- burn_block_height: { type: "int" },
535
- caller: { type: "text" },
536
- canonical: { type: "boolean" },
537
- cursor: { type: "text" },
538
- delegate_to: { type: "text", nullable: true },
539
- end_cycle: { type: "int", nullable: true },
540
- function_name: { type: "text" },
541
- lock_period: { type: "int", nullable: true },
542
- max_amount: { type: "text", nullable: true },
543
- pox_addr_btc: { type: "text", nullable: true },
544
- pox_addr_hashbytes: { type: "text", nullable: true },
545
- pox_addr_version: { type: "int", nullable: true },
546
- result_ok: { type: "boolean" },
547
- reward_cycle: { type: "int", nullable: true },
548
- signer_key: { type: "text", nullable: true },
549
- signer_signature: { type: "text", nullable: true },
550
- source_cursor: { type: "text" },
551
- stacker: { type: "text", nullable: true },
552
- start_cycle: { type: "int", nullable: true },
553
- tx_id: { type: "text" },
554
- tx_index: { type: "int" }
555
- },
556
490
  pox5_events: {
557
491
  amount_sats: { type: "text", nullable: true },
558
492
  amount_ustx: { type: "text", nullable: true },
@@ -591,6 +525,7 @@ var SOURCE_READ_TYPES = {
591
525
  governance_new_contract: { type: "text", nullable: true },
592
526
  max_fee: { type: "text", nullable: true },
593
527
  output_index: { type: "int", nullable: true },
528
+ recipient: { type: "text", nullable: true },
594
529
  recipient_btc_hashbytes: { type: "text", nullable: true },
595
530
  recipient_btc_version: { type: "int", nullable: true },
596
531
  request_id: { type: "int", nullable: true },
@@ -726,7 +661,6 @@ var SOURCE_READ_PKS = {
726
661
  decoded_events: ["cursor"],
727
662
  transactions: ["tx_id"],
728
663
  mempool_transactions: ["seq"],
729
- pox4_calls: ["cursor"],
730
664
  pox5_events: ["cursor"],
731
665
  sbtc_events: ["cursor"],
732
666
  sbtc_token_events: ["cursor"],
@@ -799,7 +733,6 @@ var TABLE_TO_DB = {
799
733
  stage_failures: "source",
800
734
  decoded_events: "source",
801
735
  decoder_checkpoints: "source",
802
- pox4_calls: "source",
803
736
  pox5_events: "source",
804
737
  pox5_cycles: "source",
805
738
  pox5_cycle_signers: "source",
@@ -1158,5 +1091,5 @@ export {
1158
1091
  readChainReorgsSince
1159
1092
  };
1160
1093
 
1161
- //# debugId=D9B6F2D9EDF2DA1A64756E2164756E21
1094
+ //# debugId=534E26A677D1E46964756E2164756E21
1162
1095
  //# sourceMappingURL=chain-reorgs.js.map