@secondlayer/shared 6.9.0 → 6.11.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/src/db/index.d.ts +54 -1
- package/dist/src/db/queries/chain-reorgs.d.ts +53 -0
- package/dist/src/db/queries/contracts.d.ts +53 -0
- package/dist/src/db/queries/integrity.d.ts +53 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +53 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +53 -0
- package/dist/src/db/queries/subgraphs.d.ts +53 -0
- package/dist/src/db/queries/subscriptions.d.ts +53 -0
- package/dist/src/db/schema.d.ts +54 -1
- package/dist/src/index.d.ts +115 -1
- package/dist/src/index.js +89 -1
- package/dist/src/index.js.map +7 -4
- package/dist/src/node/local-client.d.ts +53 -0
- package/migrations/0066_public_l2_decoded_events.ts +4 -2
- package/migrations/0067_product_usage_counters.ts +4 -2
- package/migrations/0083_burnchain_rewards.ts +63 -0
- package/migrations/0084_reorg_archive.ts +59 -0
- package/package.json +1 -1
package/dist/src/db/index.d.ts
CHANGED
|
@@ -51,6 +51,35 @@ interface EventsTable {
|
|
|
51
51
|
data: unknown;
|
|
52
52
|
created_at: Generated<Date>;
|
|
53
53
|
}
|
|
54
|
+
interface TransactionsArchiveTable {
|
|
55
|
+
archive_id: Generated<string>;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
tx_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
sender: string;
|
|
61
|
+
status: string;
|
|
62
|
+
contract_id: string | null;
|
|
63
|
+
function_name: string | null;
|
|
64
|
+
function_args: unknown | null;
|
|
65
|
+
raw_result: string | null;
|
|
66
|
+
raw_tx: string;
|
|
67
|
+
created_at: Date;
|
|
68
|
+
orphaned_block_hash: string | null;
|
|
69
|
+
archived_at: Generated<Date>;
|
|
70
|
+
}
|
|
71
|
+
interface EventsArchiveTable {
|
|
72
|
+
archive_id: Generated<string>;
|
|
73
|
+
id: string;
|
|
74
|
+
tx_id: string;
|
|
75
|
+
block_height: number;
|
|
76
|
+
event_index: number;
|
|
77
|
+
type: string;
|
|
78
|
+
data: unknown;
|
|
79
|
+
created_at: Date;
|
|
80
|
+
orphaned_block_hash: string | null;
|
|
81
|
+
archived_at: Generated<Date>;
|
|
82
|
+
}
|
|
54
83
|
interface IndexProgressTable {
|
|
55
84
|
network: string;
|
|
56
85
|
last_indexed_block: Generated<number>;
|
|
@@ -398,6 +427,26 @@ interface Pox4SignersDailyTable {
|
|
|
398
427
|
aggregation_calls: Generated<number>;
|
|
399
428
|
updated_at: Generated<Date>;
|
|
400
429
|
}
|
|
430
|
+
interface BurnBlockRewardsTable {
|
|
431
|
+
cursor: string;
|
|
432
|
+
burn_block_height: number;
|
|
433
|
+
burn_block_hash: string;
|
|
434
|
+
reward_index: number;
|
|
435
|
+
recipient_btc: string;
|
|
436
|
+
amount_sats: string;
|
|
437
|
+
burn_amount: Generated<string>;
|
|
438
|
+
canonical: Generated<boolean>;
|
|
439
|
+
created_at: Generated<Date>;
|
|
440
|
+
}
|
|
441
|
+
interface BurnBlockRewardSlotsTable {
|
|
442
|
+
cursor: string;
|
|
443
|
+
burn_block_height: number;
|
|
444
|
+
burn_block_hash: string;
|
|
445
|
+
slot_index: number;
|
|
446
|
+
holder_btc: string;
|
|
447
|
+
canonical: Generated<boolean>;
|
|
448
|
+
created_at: Generated<Date>;
|
|
449
|
+
}
|
|
401
450
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
402
451
|
interface SbtcEventsTable {
|
|
403
452
|
cursor: string;
|
|
@@ -549,6 +598,8 @@ interface Database {
|
|
|
549
598
|
blocks: BlocksTable;
|
|
550
599
|
transactions: TransactionsTable;
|
|
551
600
|
events: EventsTable;
|
|
601
|
+
transactions_archive: TransactionsArchiveTable;
|
|
602
|
+
events_archive: EventsArchiveTable;
|
|
552
603
|
index_progress: IndexProgressTable;
|
|
553
604
|
contracts: ContractsTable;
|
|
554
605
|
subgraphs: SubgraphsTable;
|
|
@@ -586,6 +637,8 @@ interface Database {
|
|
|
586
637
|
pox4_calls: Pox4CallsTable;
|
|
587
638
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
588
639
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
640
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
641
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
589
642
|
sbtc_events: SbtcEventsTable;
|
|
590
643
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
591
644
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -847,4 +900,4 @@ declare function getRawClient(role?: "source" | "target"): ReturnType<typeof pos
|
|
|
847
900
|
declare function getRawClientFor(url: string): ReturnType<typeof postgres>;
|
|
848
901
|
/** Close all DB connection pools. Call in CLI commands to allow process exit. */
|
|
849
902
|
declare function closeDb(): Promise<void>;
|
|
850
|
-
export { sql, parseJsonb, jsonb, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getDb, closeDb, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateContract, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, ServiceHeartbeatsTable, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertContract, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, Event, DecodedEventsTable, Database, ContractsTable, Contract, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
903
|
+
export { sql, parseJsonb, jsonb, getTargetDb, getSourceDb, getRawClientFor, getRawClient, getDb, closeDb, UsageSnapshotsTable, UsageSnapshot, UsageDailyTable, UsageDaily, UpdateTransaction, UpdateTenantUsageMonthly, UpdateTenantComputeAddon, UpdateTenant, UpdateSubscriptionOutbox, UpdateSubscription, UpdateSubgraphOperation, UpdateSubgraph, UpdateProject, UpdateIndexProgress, UpdateEvent, UpdateContract, UpdateChatSession, UpdateBlock, UpdateApiKey, UpdateAccountSpendCap, TransactionsTable, TransactionsArchiveTable, Transaction, TenantsTable, TenantUsageMonthlyTable, TenantUsageMonthly, TenantStatus, TenantComputeAddonsTable, TenantComputeAddon, Tenant, TeamMembersTable, TeamMember, TeamInvitationsTable, TeamInvitation, SubscriptionsTable, SubscriptionStatus, SubscriptionRuntime, SubscriptionOutboxTable, SubscriptionOutbox, SubscriptionFormat, SubscriptionDelivery, SubscriptionDeliveriesTable, Subscription, SubgraphsTable, SubgraphUsageDailyTable, SubgraphUsageDaily, SubgraphTableSnapshotsTable, SubgraphProcessingStatsTable, SubgraphOperationsTable, SubgraphOperationStatus, SubgraphOperationKind, SubgraphOperation, SubgraphHealthSnapshotsTable, SubgraphHealthSnapshot, SubgraphGapsTable, SubgraphGap, Subgraph, SessionsTable, Session, ServiceHeartbeatsTable, SbtcTokenEventsTable, SbtcTokenEventType, SbtcSupplySnapshotsTable, SbtcEventsTable, SbtcEventTopic, ProvisioningAuditStatus, ProvisioningAuditLogTable, ProvisioningAuditLog, ProvisioningAuditEvent, ProjectsTable, Project, ProcessedStripeEventsTable, Pox4SignersDailyTable, Pox4FunctionName, Pox4CyclesDailyTable, Pox4CallsTable, OutboxStatus, MagicLinksTable, MagicLink, L2DecoderCheckpointsTable, InsertTransaction, InsertTenantUsageMonthly, InsertTenantComputeAddon, InsertTenant, InsertTeamMember, InsertTeamInvitation, InsertSubscriptionOutbox, InsertSubscriptionDelivery, InsertSubscription, InsertSubgraphUsageDaily, InsertSubgraphOperation, InsertSubgraphHealthSnapshot, InsertSubgraphGap, InsertSubgraph, InsertSession, InsertProvisioningAuditLog, InsertProject, InsertMagicLink, InsertIndexProgress, InsertEvent, InsertContract, InsertChatSession, InsertChatMessage, InsertBlock, InsertApiKey, InsertAccountSpendCap, InsertAccountInsight, InsertAccountAgentRun, InsertAccount, IndexProgressTable, IndexProgress, EventsTable, EventsArchiveTable, Event, DecodedEventsTable, Database, ContractsTable, Contract, ChatSessionsTable, ChatSession, ChatMessagesTable, ChatMessage, ChainReorgsTable, BurnBlockRewardsTable, BurnBlockRewardSlotsTable, BnsNamespacesTable, BnsNamespaceEventsTable, BnsNamespaceEventStatus, BnsNamesTable, BnsNameEventsTable, BnsNameEventTopic, BnsMarketplaceEventsTable, BnsMarketplaceAction, BlocksTable, Block, ApiKeysTable, ApiKey, AccountsTable, AccountSpendCapsTable, AccountSpendCap, AccountInsightsTable, AccountInsight, AccountAgentRunsTable, AccountAgentRun, Account };
|
|
@@ -32,6 +32,35 @@ interface EventsTable {
|
|
|
32
32
|
data: unknown;
|
|
33
33
|
created_at: Generated<Date>;
|
|
34
34
|
}
|
|
35
|
+
interface TransactionsArchiveTable {
|
|
36
|
+
archive_id: Generated<string>;
|
|
37
|
+
tx_id: string;
|
|
38
|
+
block_height: number;
|
|
39
|
+
tx_index: number;
|
|
40
|
+
type: string;
|
|
41
|
+
sender: string;
|
|
42
|
+
status: string;
|
|
43
|
+
contract_id: string | null;
|
|
44
|
+
function_name: string | null;
|
|
45
|
+
function_args: unknown | null;
|
|
46
|
+
raw_result: string | null;
|
|
47
|
+
raw_tx: string;
|
|
48
|
+
created_at: Date;
|
|
49
|
+
orphaned_block_hash: string | null;
|
|
50
|
+
archived_at: Generated<Date>;
|
|
51
|
+
}
|
|
52
|
+
interface EventsArchiveTable {
|
|
53
|
+
archive_id: Generated<string>;
|
|
54
|
+
id: string;
|
|
55
|
+
tx_id: string;
|
|
56
|
+
block_height: number;
|
|
57
|
+
event_index: number;
|
|
58
|
+
type: string;
|
|
59
|
+
data: unknown;
|
|
60
|
+
created_at: Date;
|
|
61
|
+
orphaned_block_hash: string | null;
|
|
62
|
+
archived_at: Generated<Date>;
|
|
63
|
+
}
|
|
35
64
|
interface IndexProgressTable {
|
|
36
65
|
network: string;
|
|
37
66
|
last_indexed_block: Generated<number>;
|
|
@@ -379,6 +408,26 @@ interface Pox4SignersDailyTable {
|
|
|
379
408
|
aggregation_calls: Generated<number>;
|
|
380
409
|
updated_at: Generated<Date>;
|
|
381
410
|
}
|
|
411
|
+
interface BurnBlockRewardsTable {
|
|
412
|
+
cursor: string;
|
|
413
|
+
burn_block_height: number;
|
|
414
|
+
burn_block_hash: string;
|
|
415
|
+
reward_index: number;
|
|
416
|
+
recipient_btc: string;
|
|
417
|
+
amount_sats: string;
|
|
418
|
+
burn_amount: Generated<string>;
|
|
419
|
+
canonical: Generated<boolean>;
|
|
420
|
+
created_at: Generated<Date>;
|
|
421
|
+
}
|
|
422
|
+
interface BurnBlockRewardSlotsTable {
|
|
423
|
+
cursor: string;
|
|
424
|
+
burn_block_height: number;
|
|
425
|
+
burn_block_hash: string;
|
|
426
|
+
slot_index: number;
|
|
427
|
+
holder_btc: string;
|
|
428
|
+
canonical: Generated<boolean>;
|
|
429
|
+
created_at: Generated<Date>;
|
|
430
|
+
}
|
|
382
431
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
383
432
|
interface SbtcEventsTable {
|
|
384
433
|
cursor: string;
|
|
@@ -530,6 +579,8 @@ interface Database {
|
|
|
530
579
|
blocks: BlocksTable;
|
|
531
580
|
transactions: TransactionsTable;
|
|
532
581
|
events: EventsTable;
|
|
582
|
+
transactions_archive: TransactionsArchiveTable;
|
|
583
|
+
events_archive: EventsArchiveTable;
|
|
533
584
|
index_progress: IndexProgressTable;
|
|
534
585
|
contracts: ContractsTable;
|
|
535
586
|
subgraphs: SubgraphsTable;
|
|
@@ -567,6 +618,8 @@ interface Database {
|
|
|
567
618
|
pox4_calls: Pox4CallsTable;
|
|
568
619
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
569
620
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
621
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
622
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
570
623
|
sbtc_events: SbtcEventsTable;
|
|
571
624
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
572
625
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -33,6 +33,35 @@ interface EventsTable {
|
|
|
33
33
|
data: unknown;
|
|
34
34
|
created_at: Generated<Date>;
|
|
35
35
|
}
|
|
36
|
+
interface TransactionsArchiveTable {
|
|
37
|
+
archive_id: Generated<string>;
|
|
38
|
+
tx_id: string;
|
|
39
|
+
block_height: number;
|
|
40
|
+
tx_index: number;
|
|
41
|
+
type: string;
|
|
42
|
+
sender: string;
|
|
43
|
+
status: string;
|
|
44
|
+
contract_id: string | null;
|
|
45
|
+
function_name: string | null;
|
|
46
|
+
function_args: unknown | null;
|
|
47
|
+
raw_result: string | null;
|
|
48
|
+
raw_tx: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
orphaned_block_hash: string | null;
|
|
51
|
+
archived_at: Generated<Date>;
|
|
52
|
+
}
|
|
53
|
+
interface EventsArchiveTable {
|
|
54
|
+
archive_id: Generated<string>;
|
|
55
|
+
id: string;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
event_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
data: unknown;
|
|
61
|
+
created_at: Date;
|
|
62
|
+
orphaned_block_hash: string | null;
|
|
63
|
+
archived_at: Generated<Date>;
|
|
64
|
+
}
|
|
36
65
|
interface IndexProgressTable {
|
|
37
66
|
network: string;
|
|
38
67
|
last_indexed_block: Generated<number>;
|
|
@@ -380,6 +409,26 @@ interface Pox4SignersDailyTable {
|
|
|
380
409
|
aggregation_calls: Generated<number>;
|
|
381
410
|
updated_at: Generated<Date>;
|
|
382
411
|
}
|
|
412
|
+
interface BurnBlockRewardsTable {
|
|
413
|
+
cursor: string;
|
|
414
|
+
burn_block_height: number;
|
|
415
|
+
burn_block_hash: string;
|
|
416
|
+
reward_index: number;
|
|
417
|
+
recipient_btc: string;
|
|
418
|
+
amount_sats: string;
|
|
419
|
+
burn_amount: Generated<string>;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface BurnBlockRewardSlotsTable {
|
|
424
|
+
cursor: string;
|
|
425
|
+
burn_block_height: number;
|
|
426
|
+
burn_block_hash: string;
|
|
427
|
+
slot_index: number;
|
|
428
|
+
holder_btc: string;
|
|
429
|
+
canonical: Generated<boolean>;
|
|
430
|
+
created_at: Generated<Date>;
|
|
431
|
+
}
|
|
383
432
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
384
433
|
interface SbtcEventsTable {
|
|
385
434
|
cursor: string;
|
|
@@ -531,6 +580,8 @@ interface Database {
|
|
|
531
580
|
blocks: BlocksTable;
|
|
532
581
|
transactions: TransactionsTable;
|
|
533
582
|
events: EventsTable;
|
|
583
|
+
transactions_archive: TransactionsArchiveTable;
|
|
584
|
+
events_archive: EventsArchiveTable;
|
|
534
585
|
index_progress: IndexProgressTable;
|
|
535
586
|
contracts: ContractsTable;
|
|
536
587
|
subgraphs: SubgraphsTable;
|
|
@@ -568,6 +619,8 @@ interface Database {
|
|
|
568
619
|
pox4_calls: Pox4CallsTable;
|
|
569
620
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
570
621
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
622
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
623
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
571
624
|
sbtc_events: SbtcEventsTable;
|
|
572
625
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
573
626
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -33,6 +33,35 @@ interface EventsTable {
|
|
|
33
33
|
data: unknown;
|
|
34
34
|
created_at: Generated<Date>;
|
|
35
35
|
}
|
|
36
|
+
interface TransactionsArchiveTable {
|
|
37
|
+
archive_id: Generated<string>;
|
|
38
|
+
tx_id: string;
|
|
39
|
+
block_height: number;
|
|
40
|
+
tx_index: number;
|
|
41
|
+
type: string;
|
|
42
|
+
sender: string;
|
|
43
|
+
status: string;
|
|
44
|
+
contract_id: string | null;
|
|
45
|
+
function_name: string | null;
|
|
46
|
+
function_args: unknown | null;
|
|
47
|
+
raw_result: string | null;
|
|
48
|
+
raw_tx: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
orphaned_block_hash: string | null;
|
|
51
|
+
archived_at: Generated<Date>;
|
|
52
|
+
}
|
|
53
|
+
interface EventsArchiveTable {
|
|
54
|
+
archive_id: Generated<string>;
|
|
55
|
+
id: string;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
event_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
data: unknown;
|
|
61
|
+
created_at: Date;
|
|
62
|
+
orphaned_block_hash: string | null;
|
|
63
|
+
archived_at: Generated<Date>;
|
|
64
|
+
}
|
|
36
65
|
interface IndexProgressTable {
|
|
37
66
|
network: string;
|
|
38
67
|
last_indexed_block: Generated<number>;
|
|
@@ -380,6 +409,26 @@ interface Pox4SignersDailyTable {
|
|
|
380
409
|
aggregation_calls: Generated<number>;
|
|
381
410
|
updated_at: Generated<Date>;
|
|
382
411
|
}
|
|
412
|
+
interface BurnBlockRewardsTable {
|
|
413
|
+
cursor: string;
|
|
414
|
+
burn_block_height: number;
|
|
415
|
+
burn_block_hash: string;
|
|
416
|
+
reward_index: number;
|
|
417
|
+
recipient_btc: string;
|
|
418
|
+
amount_sats: string;
|
|
419
|
+
burn_amount: Generated<string>;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface BurnBlockRewardSlotsTable {
|
|
424
|
+
cursor: string;
|
|
425
|
+
burn_block_height: number;
|
|
426
|
+
burn_block_hash: string;
|
|
427
|
+
slot_index: number;
|
|
428
|
+
holder_btc: string;
|
|
429
|
+
canonical: Generated<boolean>;
|
|
430
|
+
created_at: Generated<Date>;
|
|
431
|
+
}
|
|
383
432
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
384
433
|
interface SbtcEventsTable {
|
|
385
434
|
cursor: string;
|
|
@@ -531,6 +580,8 @@ interface Database {
|
|
|
531
580
|
blocks: BlocksTable;
|
|
532
581
|
transactions: TransactionsTable;
|
|
533
582
|
events: EventsTable;
|
|
583
|
+
transactions_archive: TransactionsArchiveTable;
|
|
584
|
+
events_archive: EventsArchiveTable;
|
|
534
585
|
index_progress: IndexProgressTable;
|
|
535
586
|
contracts: ContractsTable;
|
|
536
587
|
subgraphs: SubgraphsTable;
|
|
@@ -568,6 +619,8 @@ interface Database {
|
|
|
568
619
|
pox4_calls: Pox4CallsTable;
|
|
569
620
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
570
621
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
622
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
623
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
571
624
|
sbtc_events: SbtcEventsTable;
|
|
572
625
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
573
626
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -33,6 +33,35 @@ interface EventsTable {
|
|
|
33
33
|
data: unknown;
|
|
34
34
|
created_at: Generated<Date>;
|
|
35
35
|
}
|
|
36
|
+
interface TransactionsArchiveTable {
|
|
37
|
+
archive_id: Generated<string>;
|
|
38
|
+
tx_id: string;
|
|
39
|
+
block_height: number;
|
|
40
|
+
tx_index: number;
|
|
41
|
+
type: string;
|
|
42
|
+
sender: string;
|
|
43
|
+
status: string;
|
|
44
|
+
contract_id: string | null;
|
|
45
|
+
function_name: string | null;
|
|
46
|
+
function_args: unknown | null;
|
|
47
|
+
raw_result: string | null;
|
|
48
|
+
raw_tx: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
orphaned_block_hash: string | null;
|
|
51
|
+
archived_at: Generated<Date>;
|
|
52
|
+
}
|
|
53
|
+
interface EventsArchiveTable {
|
|
54
|
+
archive_id: Generated<string>;
|
|
55
|
+
id: string;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
event_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
data: unknown;
|
|
61
|
+
created_at: Date;
|
|
62
|
+
orphaned_block_hash: string | null;
|
|
63
|
+
archived_at: Generated<Date>;
|
|
64
|
+
}
|
|
36
65
|
interface IndexProgressTable {
|
|
37
66
|
network: string;
|
|
38
67
|
last_indexed_block: Generated<number>;
|
|
@@ -380,6 +409,26 @@ interface Pox4SignersDailyTable {
|
|
|
380
409
|
aggregation_calls: Generated<number>;
|
|
381
410
|
updated_at: Generated<Date>;
|
|
382
411
|
}
|
|
412
|
+
interface BurnBlockRewardsTable {
|
|
413
|
+
cursor: string;
|
|
414
|
+
burn_block_height: number;
|
|
415
|
+
burn_block_hash: string;
|
|
416
|
+
reward_index: number;
|
|
417
|
+
recipient_btc: string;
|
|
418
|
+
amount_sats: string;
|
|
419
|
+
burn_amount: Generated<string>;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface BurnBlockRewardSlotsTable {
|
|
424
|
+
cursor: string;
|
|
425
|
+
burn_block_height: number;
|
|
426
|
+
burn_block_hash: string;
|
|
427
|
+
slot_index: number;
|
|
428
|
+
holder_btc: string;
|
|
429
|
+
canonical: Generated<boolean>;
|
|
430
|
+
created_at: Generated<Date>;
|
|
431
|
+
}
|
|
383
432
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
384
433
|
interface SbtcEventsTable {
|
|
385
434
|
cursor: string;
|
|
@@ -531,6 +580,8 @@ interface Database {
|
|
|
531
580
|
blocks: BlocksTable;
|
|
532
581
|
transactions: TransactionsTable;
|
|
533
582
|
events: EventsTable;
|
|
583
|
+
transactions_archive: TransactionsArchiveTable;
|
|
584
|
+
events_archive: EventsArchiveTable;
|
|
534
585
|
index_progress: IndexProgressTable;
|
|
535
586
|
contracts: ContractsTable;
|
|
536
587
|
subgraphs: SubgraphsTable;
|
|
@@ -568,6 +619,8 @@ interface Database {
|
|
|
568
619
|
pox4_calls: Pox4CallsTable;
|
|
569
620
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
570
621
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
622
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
623
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
571
624
|
sbtc_events: SbtcEventsTable;
|
|
572
625
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
573
626
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -33,6 +33,35 @@ interface EventsTable {
|
|
|
33
33
|
data: unknown;
|
|
34
34
|
created_at: Generated<Date>;
|
|
35
35
|
}
|
|
36
|
+
interface TransactionsArchiveTable {
|
|
37
|
+
archive_id: Generated<string>;
|
|
38
|
+
tx_id: string;
|
|
39
|
+
block_height: number;
|
|
40
|
+
tx_index: number;
|
|
41
|
+
type: string;
|
|
42
|
+
sender: string;
|
|
43
|
+
status: string;
|
|
44
|
+
contract_id: string | null;
|
|
45
|
+
function_name: string | null;
|
|
46
|
+
function_args: unknown | null;
|
|
47
|
+
raw_result: string | null;
|
|
48
|
+
raw_tx: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
orphaned_block_hash: string | null;
|
|
51
|
+
archived_at: Generated<Date>;
|
|
52
|
+
}
|
|
53
|
+
interface EventsArchiveTable {
|
|
54
|
+
archive_id: Generated<string>;
|
|
55
|
+
id: string;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
event_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
data: unknown;
|
|
61
|
+
created_at: Date;
|
|
62
|
+
orphaned_block_hash: string | null;
|
|
63
|
+
archived_at: Generated<Date>;
|
|
64
|
+
}
|
|
36
65
|
interface IndexProgressTable {
|
|
37
66
|
network: string;
|
|
38
67
|
last_indexed_block: Generated<number>;
|
|
@@ -380,6 +409,26 @@ interface Pox4SignersDailyTable {
|
|
|
380
409
|
aggregation_calls: Generated<number>;
|
|
381
410
|
updated_at: Generated<Date>;
|
|
382
411
|
}
|
|
412
|
+
interface BurnBlockRewardsTable {
|
|
413
|
+
cursor: string;
|
|
414
|
+
burn_block_height: number;
|
|
415
|
+
burn_block_hash: string;
|
|
416
|
+
reward_index: number;
|
|
417
|
+
recipient_btc: string;
|
|
418
|
+
amount_sats: string;
|
|
419
|
+
burn_amount: Generated<string>;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface BurnBlockRewardSlotsTable {
|
|
424
|
+
cursor: string;
|
|
425
|
+
burn_block_height: number;
|
|
426
|
+
burn_block_hash: string;
|
|
427
|
+
slot_index: number;
|
|
428
|
+
holder_btc: string;
|
|
429
|
+
canonical: Generated<boolean>;
|
|
430
|
+
created_at: Generated<Date>;
|
|
431
|
+
}
|
|
383
432
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
384
433
|
interface SbtcEventsTable {
|
|
385
434
|
cursor: string;
|
|
@@ -531,6 +580,8 @@ interface Database {
|
|
|
531
580
|
blocks: BlocksTable;
|
|
532
581
|
transactions: TransactionsTable;
|
|
533
582
|
events: EventsTable;
|
|
583
|
+
transactions_archive: TransactionsArchiveTable;
|
|
584
|
+
events_archive: EventsArchiveTable;
|
|
534
585
|
index_progress: IndexProgressTable;
|
|
535
586
|
contracts: ContractsTable;
|
|
536
587
|
subgraphs: SubgraphsTable;
|
|
@@ -568,6 +619,8 @@ interface Database {
|
|
|
568
619
|
pox4_calls: Pox4CallsTable;
|
|
569
620
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
570
621
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
622
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
623
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
571
624
|
sbtc_events: SbtcEventsTable;
|
|
572
625
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
573
626
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -34,6 +34,35 @@ interface EventsTable {
|
|
|
34
34
|
data: unknown;
|
|
35
35
|
created_at: Generated<Date>;
|
|
36
36
|
}
|
|
37
|
+
interface TransactionsArchiveTable {
|
|
38
|
+
archive_id: Generated<string>;
|
|
39
|
+
tx_id: string;
|
|
40
|
+
block_height: number;
|
|
41
|
+
tx_index: number;
|
|
42
|
+
type: string;
|
|
43
|
+
sender: string;
|
|
44
|
+
status: string;
|
|
45
|
+
contract_id: string | null;
|
|
46
|
+
function_name: string | null;
|
|
47
|
+
function_args: unknown | null;
|
|
48
|
+
raw_result: string | null;
|
|
49
|
+
raw_tx: string;
|
|
50
|
+
created_at: Date;
|
|
51
|
+
orphaned_block_hash: string | null;
|
|
52
|
+
archived_at: Generated<Date>;
|
|
53
|
+
}
|
|
54
|
+
interface EventsArchiveTable {
|
|
55
|
+
archive_id: Generated<string>;
|
|
56
|
+
id: string;
|
|
57
|
+
tx_id: string;
|
|
58
|
+
block_height: number;
|
|
59
|
+
event_index: number;
|
|
60
|
+
type: string;
|
|
61
|
+
data: unknown;
|
|
62
|
+
created_at: Date;
|
|
63
|
+
orphaned_block_hash: string | null;
|
|
64
|
+
archived_at: Generated<Date>;
|
|
65
|
+
}
|
|
37
66
|
interface IndexProgressTable {
|
|
38
67
|
network: string;
|
|
39
68
|
last_indexed_block: Generated<number>;
|
|
@@ -381,6 +410,26 @@ interface Pox4SignersDailyTable {
|
|
|
381
410
|
aggregation_calls: Generated<number>;
|
|
382
411
|
updated_at: Generated<Date>;
|
|
383
412
|
}
|
|
413
|
+
interface BurnBlockRewardsTable {
|
|
414
|
+
cursor: string;
|
|
415
|
+
burn_block_height: number;
|
|
416
|
+
burn_block_hash: string;
|
|
417
|
+
reward_index: number;
|
|
418
|
+
recipient_btc: string;
|
|
419
|
+
amount_sats: string;
|
|
420
|
+
burn_amount: Generated<string>;
|
|
421
|
+
canonical: Generated<boolean>;
|
|
422
|
+
created_at: Generated<Date>;
|
|
423
|
+
}
|
|
424
|
+
interface BurnBlockRewardSlotsTable {
|
|
425
|
+
cursor: string;
|
|
426
|
+
burn_block_height: number;
|
|
427
|
+
burn_block_hash: string;
|
|
428
|
+
slot_index: number;
|
|
429
|
+
holder_btc: string;
|
|
430
|
+
canonical: Generated<boolean>;
|
|
431
|
+
created_at: Generated<Date>;
|
|
432
|
+
}
|
|
384
433
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
385
434
|
interface SbtcEventsTable {
|
|
386
435
|
cursor: string;
|
|
@@ -532,6 +581,8 @@ interface Database {
|
|
|
532
581
|
blocks: BlocksTable;
|
|
533
582
|
transactions: TransactionsTable;
|
|
534
583
|
events: EventsTable;
|
|
584
|
+
transactions_archive: TransactionsArchiveTable;
|
|
585
|
+
events_archive: EventsArchiveTable;
|
|
535
586
|
index_progress: IndexProgressTable;
|
|
536
587
|
contracts: ContractsTable;
|
|
537
588
|
subgraphs: SubgraphsTable;
|
|
@@ -569,6 +620,8 @@ interface Database {
|
|
|
569
620
|
pox4_calls: Pox4CallsTable;
|
|
570
621
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
571
622
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
623
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
624
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
572
625
|
sbtc_events: SbtcEventsTable;
|
|
573
626
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
574
627
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
@@ -33,6 +33,35 @@ interface EventsTable {
|
|
|
33
33
|
data: unknown;
|
|
34
34
|
created_at: Generated<Date>;
|
|
35
35
|
}
|
|
36
|
+
interface TransactionsArchiveTable {
|
|
37
|
+
archive_id: Generated<string>;
|
|
38
|
+
tx_id: string;
|
|
39
|
+
block_height: number;
|
|
40
|
+
tx_index: number;
|
|
41
|
+
type: string;
|
|
42
|
+
sender: string;
|
|
43
|
+
status: string;
|
|
44
|
+
contract_id: string | null;
|
|
45
|
+
function_name: string | null;
|
|
46
|
+
function_args: unknown | null;
|
|
47
|
+
raw_result: string | null;
|
|
48
|
+
raw_tx: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
orphaned_block_hash: string | null;
|
|
51
|
+
archived_at: Generated<Date>;
|
|
52
|
+
}
|
|
53
|
+
interface EventsArchiveTable {
|
|
54
|
+
archive_id: Generated<string>;
|
|
55
|
+
id: string;
|
|
56
|
+
tx_id: string;
|
|
57
|
+
block_height: number;
|
|
58
|
+
event_index: number;
|
|
59
|
+
type: string;
|
|
60
|
+
data: unknown;
|
|
61
|
+
created_at: Date;
|
|
62
|
+
orphaned_block_hash: string | null;
|
|
63
|
+
archived_at: Generated<Date>;
|
|
64
|
+
}
|
|
36
65
|
interface IndexProgressTable {
|
|
37
66
|
network: string;
|
|
38
67
|
last_indexed_block: Generated<number>;
|
|
@@ -380,6 +409,26 @@ interface Pox4SignersDailyTable {
|
|
|
380
409
|
aggregation_calls: Generated<number>;
|
|
381
410
|
updated_at: Generated<Date>;
|
|
382
411
|
}
|
|
412
|
+
interface BurnBlockRewardsTable {
|
|
413
|
+
cursor: string;
|
|
414
|
+
burn_block_height: number;
|
|
415
|
+
burn_block_hash: string;
|
|
416
|
+
reward_index: number;
|
|
417
|
+
recipient_btc: string;
|
|
418
|
+
amount_sats: string;
|
|
419
|
+
burn_amount: Generated<string>;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface BurnBlockRewardSlotsTable {
|
|
424
|
+
cursor: string;
|
|
425
|
+
burn_block_height: number;
|
|
426
|
+
burn_block_hash: string;
|
|
427
|
+
slot_index: number;
|
|
428
|
+
holder_btc: string;
|
|
429
|
+
canonical: Generated<boolean>;
|
|
430
|
+
created_at: Generated<Date>;
|
|
431
|
+
}
|
|
383
432
|
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
384
433
|
interface SbtcEventsTable {
|
|
385
434
|
cursor: string;
|
|
@@ -531,6 +580,8 @@ interface Database {
|
|
|
531
580
|
blocks: BlocksTable;
|
|
532
581
|
transactions: TransactionsTable;
|
|
533
582
|
events: EventsTable;
|
|
583
|
+
transactions_archive: TransactionsArchiveTable;
|
|
584
|
+
events_archive: EventsArchiveTable;
|
|
534
585
|
index_progress: IndexProgressTable;
|
|
535
586
|
contracts: ContractsTable;
|
|
536
587
|
subgraphs: SubgraphsTable;
|
|
@@ -568,6 +619,8 @@ interface Database {
|
|
|
568
619
|
pox4_calls: Pox4CallsTable;
|
|
569
620
|
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
570
621
|
pox4_signers_daily: Pox4SignersDailyTable;
|
|
622
|
+
burn_block_rewards: BurnBlockRewardsTable;
|
|
623
|
+
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
571
624
|
sbtc_events: SbtcEventsTable;
|
|
572
625
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
573
626
|
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|