@secondlayer/shared 11.5.1 → 11.6.1
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/archive/range-digest.d.ts +2 -84
- package/dist/src/archive/semantic-digest-builder.d.ts +2 -84
- package/dist/src/coverage/index.d.ts +2 -84
- package/dist/src/db/index.d.ts +6 -94
- package/dist/src/db/index.js +1 -7
- package/dist/src/db/index.js.map +5 -5
- package/dist/src/db/queries/chain-reorgs.d.ts +2 -84
- package/dist/src/db/queries/chain-reorgs.js +1 -7
- package/dist/src/db/queries/chain-reorgs.js.map +5 -5
- package/dist/src/db/queries/contracts.d.ts +2 -84
- package/dist/src/db/queries/instance.d.ts +2 -84
- package/dist/src/db/queries/integrity.d.ts +2 -84
- package/dist/src/db/queries/subgraph-gaps.d.ts +2 -84
- package/dist/src/db/queries/subgraph-operations.d.ts +2 -84
- package/dist/src/db/queries/subgraphs.d.ts +2 -84
- package/dist/src/db/queries/subgraphs.js +2 -4
- package/dist/src/db/queries/subgraphs.js.map +3 -3
- package/dist/src/db/queries/sync-scope.d.ts +2 -84
- package/dist/src/db/queries/webhooks.d.ts +2 -84
- package/dist/src/db/schema.d.ts +3 -85
- package/dist/src/index.d.ts +6 -94
- package/dist/src/index.js +1 -7
- package/dist/src/index.js.map +5 -5
- package/dist/src/node/local-client.d.ts +2 -84
- package/migrations/0128_drop_x402.ts +21 -0
- package/migrations/0129_drop_subgraphs_database_url_enc.ts +24 -0
- package/migrations/0130_drop_empty_unused_tables.ts +26 -0
- package/package.json +2 -2
- package/dist/src/constants.d.ts +0 -2
- package/dist/src/constants.js +0 -24
- package/dist/src/constants.js.map +0 -10
|
@@ -137,7 +137,6 @@ interface SubgraphsTable {
|
|
|
137
137
|
expires_at: Date | null;
|
|
138
138
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
139
139
|
sparse_probe_targets: unknown | null;
|
|
140
|
-
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
141
140
|
sandbox_workers: Generated<boolean>;
|
|
142
141
|
created_at: Generated<Date>;
|
|
143
142
|
updated_at: Generated<Date>;
|
|
@@ -233,7 +232,7 @@ interface AccountsTable {
|
|
|
233
232
|
email: string | null;
|
|
234
233
|
/** True for anonymous self-serve accounts until claimed via magic link. */
|
|
235
234
|
ghost: Generated<boolean>;
|
|
236
|
-
/** Stacks principal owning a wallet-ghost account
|
|
235
|
+
/** Stacks principal owning a wallet-ghost account. */
|
|
237
236
|
wallet_principal: string | null;
|
|
238
237
|
display_name: string | null;
|
|
239
238
|
bio: string | null;
|
|
@@ -295,14 +294,6 @@ interface SubgraphProcessingStatsTable {
|
|
|
295
294
|
is_catchup: Generated<boolean>;
|
|
296
295
|
created_at: Generated<Date>;
|
|
297
296
|
}
|
|
298
|
-
interface SubgraphTableSnapshotsTable {
|
|
299
|
-
id: Generated<string>;
|
|
300
|
-
subgraph_name: string;
|
|
301
|
-
api_key_id: string | null;
|
|
302
|
-
table_name: string;
|
|
303
|
-
row_count: number | null;
|
|
304
|
-
created_at: Generated<Date>;
|
|
305
|
-
}
|
|
306
297
|
interface SubgraphHealthSnapshotsTable {
|
|
307
298
|
id: Generated<string>;
|
|
308
299
|
subgraph_id: string;
|
|
@@ -392,26 +383,6 @@ interface Pox4CallsTable {
|
|
|
392
383
|
source_cursor: string;
|
|
393
384
|
created_at: Generated<Date>;
|
|
394
385
|
}
|
|
395
|
-
interface Pox4CyclesDailyTable {
|
|
396
|
-
date: string;
|
|
397
|
-
reward_cycle: number;
|
|
398
|
-
total_stacked_ustx: Generated<string>;
|
|
399
|
-
solo_stackers: Generated<number>;
|
|
400
|
-
delegated_principals: Generated<number>;
|
|
401
|
-
unique_pools: Generated<number>;
|
|
402
|
-
unique_signers: Generated<number>;
|
|
403
|
-
calls_today: Generated<number>;
|
|
404
|
-
updated_at: Generated<Date>;
|
|
405
|
-
}
|
|
406
|
-
interface Pox4SignersDailyTable {
|
|
407
|
-
date: string;
|
|
408
|
-
reward_cycle: number;
|
|
409
|
-
signer_key: string;
|
|
410
|
-
weight_ustx: Generated<string>;
|
|
411
|
-
stacker_count: Generated<number>;
|
|
412
|
-
aggregation_calls: Generated<number>;
|
|
413
|
-
updated_at: Generated<Date>;
|
|
414
|
-
}
|
|
415
386
|
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";
|
|
416
387
|
interface Pox5EventsTable {
|
|
417
388
|
cursor: string;
|
|
@@ -529,17 +500,6 @@ interface SbtcSettlementsTable {
|
|
|
529
500
|
confirmed_at: Date | null;
|
|
530
501
|
updated_at: Generated<Date>;
|
|
531
502
|
}
|
|
532
|
-
interface SbtcSupplySnapshotsTable {
|
|
533
|
-
date: string;
|
|
534
|
-
total_supply: Generated<string>;
|
|
535
|
-
mints_today: Generated<string>;
|
|
536
|
-
burns_today: Generated<string>;
|
|
537
|
-
deposit_count: Generated<number>;
|
|
538
|
-
withdrawal_create_count: Generated<number>;
|
|
539
|
-
withdrawal_accept_count: Generated<number>;
|
|
540
|
-
withdrawal_reject_count: Generated<number>;
|
|
541
|
-
updated_at: Generated<Date>;
|
|
542
|
-
}
|
|
543
503
|
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
544
504
|
interface BnsNameEventsTable {
|
|
545
505
|
cursor: string;
|
|
@@ -781,7 +741,6 @@ interface Database {
|
|
|
781
741
|
play_provisions: PlayProvisionsTable;
|
|
782
742
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
783
743
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
784
|
-
subgraph_table_snapshots: SubgraphTableSnapshotsTable;
|
|
785
744
|
subgraph_gaps: SubgraphGapsTable;
|
|
786
745
|
subgraph_violations: SubgraphViolationsTable;
|
|
787
746
|
subgraph_operations: SubgraphOperationsTable;
|
|
@@ -797,23 +756,18 @@ interface Database {
|
|
|
797
756
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
798
757
|
chain_reorgs: ChainReorgsTable;
|
|
799
758
|
pox4_calls: Pox4CallsTable;
|
|
800
|
-
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
801
|
-
pox4_signers_daily: Pox4SignersDailyTable;
|
|
802
759
|
pox5_events: Pox5EventsTable;
|
|
803
760
|
burn_block_rewards: BurnBlockRewardsTable;
|
|
804
761
|
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
805
762
|
sbtc_events: SbtcEventsTable;
|
|
806
763
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
807
764
|
sbtc_settlements: SbtcSettlementsTable;
|
|
808
|
-
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
809
765
|
bns_name_events: BnsNameEventsTable;
|
|
810
766
|
bns_namespace_events: BnsNamespaceEventsTable;
|
|
811
767
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
812
768
|
bns_names: BnsNamesTable;
|
|
813
769
|
bns_namespaces: BnsNamespacesTable;
|
|
814
770
|
service_heartbeats: ServiceHeartbeatsTable;
|
|
815
|
-
x402_payments: X402PaymentsTable;
|
|
816
|
-
x402_balances: X402BalancesTable;
|
|
817
771
|
chain_read_cache: ChainReadCacheTable;
|
|
818
772
|
pending_fork_blocks: PendingForkBlocksTable;
|
|
819
773
|
observer_journal: ObserverJournalTable;
|
|
@@ -825,46 +779,10 @@ interface Database {
|
|
|
825
779
|
stage_failures: StageFailuresTable;
|
|
826
780
|
archive_fetches: ArchiveFetchesTable;
|
|
827
781
|
}
|
|
828
|
-
/** Prepaid x402 credit — one running USD-micros balance per payer principal. */
|
|
829
|
-
interface X402BalancesTable {
|
|
830
|
-
principal: string;
|
|
831
|
-
balance_usd_micros: Generated<string | number | bigint>;
|
|
832
|
-
/** Month bucket ("YYYY-MM") the spend counter applies to. */
|
|
833
|
-
spent_month: string | null;
|
|
834
|
-
spent_month_usd_micros: Generated<string | number | bigint>;
|
|
835
|
-
updated_at: Generated<Date>;
|
|
836
|
-
}
|
|
837
782
|
interface ServiceHeartbeatsTable {
|
|
838
783
|
name: string;
|
|
839
784
|
updated_at: Generated<Date>;
|
|
840
785
|
}
|
|
841
|
-
/** x402 pay-per-request ledger (control plane). One row per settled payment,
|
|
842
|
-
* keyed by challenge nonce + settled txid. `state` tracks confirmed-tier
|
|
843
|
-
* settlement and post-serve reorg reversal. */
|
|
844
|
-
interface X402PaymentsTable {
|
|
845
|
-
id: Generated<string>;
|
|
846
|
-
nonce: string;
|
|
847
|
-
txid: string;
|
|
848
|
-
asset: string;
|
|
849
|
-
amount: string;
|
|
850
|
-
payer: string;
|
|
851
|
-
surface: string;
|
|
852
|
-
state: Generated<"pending" | "confirmed" | "reverted">;
|
|
853
|
-
created_at: Generated<Date>;
|
|
854
|
-
updated_at: Generated<Date>;
|
|
855
|
-
/** "payment" = per-call settle; "deposit" = prepaid balance top-up. */
|
|
856
|
-
kind: Generated<string>;
|
|
857
|
-
/** Linked claimed account once the paying wallet is attached (continuity). */
|
|
858
|
-
account_id: string | null;
|
|
859
|
-
/** USD-micros to credit on confirmation, for deposit rows the reconciler
|
|
860
|
-
* settles asynchronously. NULL for per-call settles (credit nothing). */
|
|
861
|
-
credit_usd_micros: string | null;
|
|
862
|
-
/** Idempotency key: stamped exactly once when this row's credit is applied.
|
|
863
|
-
* NULL means never credited (or not a credit-bearing row). Pre-migration
|
|
864
|
-
* non-pending deposit rows are backfilled to a non-null sentinel so the
|
|
865
|
-
* reconciler's heal path can never double-credit them. */
|
|
866
|
-
credited_at: Generated<Date> | null;
|
|
867
|
-
}
|
|
868
786
|
interface AccountSpendCapsTable {
|
|
869
787
|
account_id: string;
|
|
870
788
|
monthly_cap_cents: number | null;
|
|
@@ -875,7 +793,7 @@ interface AccountSpendCapsTable {
|
|
|
875
793
|
frozen_at: Date | null;
|
|
876
794
|
updated_at: Generated<Date>;
|
|
877
795
|
}
|
|
878
|
-
/** Prepaid dev credits — card-funded balance per account
|
|
796
|
+
/** Prepaid dev credits — card-funded balance per account. */
|
|
879
797
|
interface AccountCreditsTable {
|
|
880
798
|
account_id: string;
|
|
881
799
|
balance_usd_micros: Generated<string | number | bigint>;
|
|
@@ -137,7 +137,6 @@ interface SubgraphsTable {
|
|
|
137
137
|
expires_at: Date | null;
|
|
138
138
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
139
139
|
sparse_probe_targets: unknown | null;
|
|
140
|
-
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
141
140
|
sandbox_workers: Generated<boolean>;
|
|
142
141
|
created_at: Generated<Date>;
|
|
143
142
|
updated_at: Generated<Date>;
|
|
@@ -233,7 +232,7 @@ interface AccountsTable {
|
|
|
233
232
|
email: string | null;
|
|
234
233
|
/** True for anonymous self-serve accounts until claimed via magic link. */
|
|
235
234
|
ghost: Generated<boolean>;
|
|
236
|
-
/** Stacks principal owning a wallet-ghost account
|
|
235
|
+
/** Stacks principal owning a wallet-ghost account. */
|
|
237
236
|
wallet_principal: string | null;
|
|
238
237
|
display_name: string | null;
|
|
239
238
|
bio: string | null;
|
|
@@ -295,14 +294,6 @@ interface SubgraphProcessingStatsTable {
|
|
|
295
294
|
is_catchup: Generated<boolean>;
|
|
296
295
|
created_at: Generated<Date>;
|
|
297
296
|
}
|
|
298
|
-
interface SubgraphTableSnapshotsTable {
|
|
299
|
-
id: Generated<string>;
|
|
300
|
-
subgraph_name: string;
|
|
301
|
-
api_key_id: string | null;
|
|
302
|
-
table_name: string;
|
|
303
|
-
row_count: number | null;
|
|
304
|
-
created_at: Generated<Date>;
|
|
305
|
-
}
|
|
306
297
|
interface SubgraphHealthSnapshotsTable {
|
|
307
298
|
id: Generated<string>;
|
|
308
299
|
subgraph_id: string;
|
|
@@ -392,26 +383,6 @@ interface Pox4CallsTable {
|
|
|
392
383
|
source_cursor: string;
|
|
393
384
|
created_at: Generated<Date>;
|
|
394
385
|
}
|
|
395
|
-
interface Pox4CyclesDailyTable {
|
|
396
|
-
date: string;
|
|
397
|
-
reward_cycle: number;
|
|
398
|
-
total_stacked_ustx: Generated<string>;
|
|
399
|
-
solo_stackers: Generated<number>;
|
|
400
|
-
delegated_principals: Generated<number>;
|
|
401
|
-
unique_pools: Generated<number>;
|
|
402
|
-
unique_signers: Generated<number>;
|
|
403
|
-
calls_today: Generated<number>;
|
|
404
|
-
updated_at: Generated<Date>;
|
|
405
|
-
}
|
|
406
|
-
interface Pox4SignersDailyTable {
|
|
407
|
-
date: string;
|
|
408
|
-
reward_cycle: number;
|
|
409
|
-
signer_key: string;
|
|
410
|
-
weight_ustx: Generated<string>;
|
|
411
|
-
stacker_count: Generated<number>;
|
|
412
|
-
aggregation_calls: Generated<number>;
|
|
413
|
-
updated_at: Generated<Date>;
|
|
414
|
-
}
|
|
415
386
|
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";
|
|
416
387
|
interface Pox5EventsTable {
|
|
417
388
|
cursor: string;
|
|
@@ -529,17 +500,6 @@ interface SbtcSettlementsTable {
|
|
|
529
500
|
confirmed_at: Date | null;
|
|
530
501
|
updated_at: Generated<Date>;
|
|
531
502
|
}
|
|
532
|
-
interface SbtcSupplySnapshotsTable {
|
|
533
|
-
date: string;
|
|
534
|
-
total_supply: Generated<string>;
|
|
535
|
-
mints_today: Generated<string>;
|
|
536
|
-
burns_today: Generated<string>;
|
|
537
|
-
deposit_count: Generated<number>;
|
|
538
|
-
withdrawal_create_count: Generated<number>;
|
|
539
|
-
withdrawal_accept_count: Generated<number>;
|
|
540
|
-
withdrawal_reject_count: Generated<number>;
|
|
541
|
-
updated_at: Generated<Date>;
|
|
542
|
-
}
|
|
543
503
|
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
544
504
|
interface BnsNameEventsTable {
|
|
545
505
|
cursor: string;
|
|
@@ -781,7 +741,6 @@ interface Database {
|
|
|
781
741
|
play_provisions: PlayProvisionsTable;
|
|
782
742
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
783
743
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
784
|
-
subgraph_table_snapshots: SubgraphTableSnapshotsTable;
|
|
785
744
|
subgraph_gaps: SubgraphGapsTable;
|
|
786
745
|
subgraph_violations: SubgraphViolationsTable;
|
|
787
746
|
subgraph_operations: SubgraphOperationsTable;
|
|
@@ -797,23 +756,18 @@ interface Database {
|
|
|
797
756
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
798
757
|
chain_reorgs: ChainReorgsTable;
|
|
799
758
|
pox4_calls: Pox4CallsTable;
|
|
800
|
-
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
801
|
-
pox4_signers_daily: Pox4SignersDailyTable;
|
|
802
759
|
pox5_events: Pox5EventsTable;
|
|
803
760
|
burn_block_rewards: BurnBlockRewardsTable;
|
|
804
761
|
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
805
762
|
sbtc_events: SbtcEventsTable;
|
|
806
763
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
807
764
|
sbtc_settlements: SbtcSettlementsTable;
|
|
808
|
-
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
809
765
|
bns_name_events: BnsNameEventsTable;
|
|
810
766
|
bns_namespace_events: BnsNamespaceEventsTable;
|
|
811
767
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
812
768
|
bns_names: BnsNamesTable;
|
|
813
769
|
bns_namespaces: BnsNamespacesTable;
|
|
814
770
|
service_heartbeats: ServiceHeartbeatsTable;
|
|
815
|
-
x402_payments: X402PaymentsTable;
|
|
816
|
-
x402_balances: X402BalancesTable;
|
|
817
771
|
chain_read_cache: ChainReadCacheTable;
|
|
818
772
|
pending_fork_blocks: PendingForkBlocksTable;
|
|
819
773
|
observer_journal: ObserverJournalTable;
|
|
@@ -825,46 +779,10 @@ interface Database {
|
|
|
825
779
|
stage_failures: StageFailuresTable;
|
|
826
780
|
archive_fetches: ArchiveFetchesTable;
|
|
827
781
|
}
|
|
828
|
-
/** Prepaid x402 credit — one running USD-micros balance per payer principal. */
|
|
829
|
-
interface X402BalancesTable {
|
|
830
|
-
principal: string;
|
|
831
|
-
balance_usd_micros: Generated<string | number | bigint>;
|
|
832
|
-
/** Month bucket ("YYYY-MM") the spend counter applies to. */
|
|
833
|
-
spent_month: string | null;
|
|
834
|
-
spent_month_usd_micros: Generated<string | number | bigint>;
|
|
835
|
-
updated_at: Generated<Date>;
|
|
836
|
-
}
|
|
837
782
|
interface ServiceHeartbeatsTable {
|
|
838
783
|
name: string;
|
|
839
784
|
updated_at: Generated<Date>;
|
|
840
785
|
}
|
|
841
|
-
/** x402 pay-per-request ledger (control plane). One row per settled payment,
|
|
842
|
-
* keyed by challenge nonce + settled txid. `state` tracks confirmed-tier
|
|
843
|
-
* settlement and post-serve reorg reversal. */
|
|
844
|
-
interface X402PaymentsTable {
|
|
845
|
-
id: Generated<string>;
|
|
846
|
-
nonce: string;
|
|
847
|
-
txid: string;
|
|
848
|
-
asset: string;
|
|
849
|
-
amount: string;
|
|
850
|
-
payer: string;
|
|
851
|
-
surface: string;
|
|
852
|
-
state: Generated<"pending" | "confirmed" | "reverted">;
|
|
853
|
-
created_at: Generated<Date>;
|
|
854
|
-
updated_at: Generated<Date>;
|
|
855
|
-
/** "payment" = per-call settle; "deposit" = prepaid balance top-up. */
|
|
856
|
-
kind: Generated<string>;
|
|
857
|
-
/** Linked claimed account once the paying wallet is attached (continuity). */
|
|
858
|
-
account_id: string | null;
|
|
859
|
-
/** USD-micros to credit on confirmation, for deposit rows the reconciler
|
|
860
|
-
* settles asynchronously. NULL for per-call settles (credit nothing). */
|
|
861
|
-
credit_usd_micros: string | null;
|
|
862
|
-
/** Idempotency key: stamped exactly once when this row's credit is applied.
|
|
863
|
-
* NULL means never credited (or not a credit-bearing row). Pre-migration
|
|
864
|
-
* non-pending deposit rows are backfilled to a non-null sentinel so the
|
|
865
|
-
* reconciler's heal path can never double-credit them. */
|
|
866
|
-
credited_at: Generated<Date> | null;
|
|
867
|
-
}
|
|
868
786
|
interface AccountSpendCapsTable {
|
|
869
787
|
account_id: string;
|
|
870
788
|
monthly_cap_cents: number | null;
|
|
@@ -875,7 +793,7 @@ interface AccountSpendCapsTable {
|
|
|
875
793
|
frozen_at: Date | null;
|
|
876
794
|
updated_at: Generated<Date>;
|
|
877
795
|
}
|
|
878
|
-
/** Prepaid dev credits — card-funded balance per account
|
|
796
|
+
/** Prepaid dev credits — card-funded balance per account. */
|
|
879
797
|
interface AccountCreditsTable {
|
|
880
798
|
account_id: string;
|
|
881
799
|
balance_usd_micros: Generated<string | number | bigint>;
|
|
@@ -137,7 +137,6 @@ interface SubgraphsTable {
|
|
|
137
137
|
expires_at: Date | null;
|
|
138
138
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
139
139
|
sparse_probe_targets: unknown | null;
|
|
140
|
-
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
141
140
|
sandbox_workers: Generated<boolean>;
|
|
142
141
|
created_at: Generated<Date>;
|
|
143
142
|
updated_at: Generated<Date>;
|
|
@@ -233,7 +232,7 @@ interface AccountsTable {
|
|
|
233
232
|
email: string | null;
|
|
234
233
|
/** True for anonymous self-serve accounts until claimed via magic link. */
|
|
235
234
|
ghost: Generated<boolean>;
|
|
236
|
-
/** Stacks principal owning a wallet-ghost account
|
|
235
|
+
/** Stacks principal owning a wallet-ghost account. */
|
|
237
236
|
wallet_principal: string | null;
|
|
238
237
|
display_name: string | null;
|
|
239
238
|
bio: string | null;
|
|
@@ -295,14 +294,6 @@ interface SubgraphProcessingStatsTable {
|
|
|
295
294
|
is_catchup: Generated<boolean>;
|
|
296
295
|
created_at: Generated<Date>;
|
|
297
296
|
}
|
|
298
|
-
interface SubgraphTableSnapshotsTable {
|
|
299
|
-
id: Generated<string>;
|
|
300
|
-
subgraph_name: string;
|
|
301
|
-
api_key_id: string | null;
|
|
302
|
-
table_name: string;
|
|
303
|
-
row_count: number | null;
|
|
304
|
-
created_at: Generated<Date>;
|
|
305
|
-
}
|
|
306
297
|
interface SubgraphHealthSnapshotsTable {
|
|
307
298
|
id: Generated<string>;
|
|
308
299
|
subgraph_id: string;
|
|
@@ -392,26 +383,6 @@ interface Pox4CallsTable {
|
|
|
392
383
|
source_cursor: string;
|
|
393
384
|
created_at: Generated<Date>;
|
|
394
385
|
}
|
|
395
|
-
interface Pox4CyclesDailyTable {
|
|
396
|
-
date: string;
|
|
397
|
-
reward_cycle: number;
|
|
398
|
-
total_stacked_ustx: Generated<string>;
|
|
399
|
-
solo_stackers: Generated<number>;
|
|
400
|
-
delegated_principals: Generated<number>;
|
|
401
|
-
unique_pools: Generated<number>;
|
|
402
|
-
unique_signers: Generated<number>;
|
|
403
|
-
calls_today: Generated<number>;
|
|
404
|
-
updated_at: Generated<Date>;
|
|
405
|
-
}
|
|
406
|
-
interface Pox4SignersDailyTable {
|
|
407
|
-
date: string;
|
|
408
|
-
reward_cycle: number;
|
|
409
|
-
signer_key: string;
|
|
410
|
-
weight_ustx: Generated<string>;
|
|
411
|
-
stacker_count: Generated<number>;
|
|
412
|
-
aggregation_calls: Generated<number>;
|
|
413
|
-
updated_at: Generated<Date>;
|
|
414
|
-
}
|
|
415
386
|
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";
|
|
416
387
|
interface Pox5EventsTable {
|
|
417
388
|
cursor: string;
|
|
@@ -529,17 +500,6 @@ interface SbtcSettlementsTable {
|
|
|
529
500
|
confirmed_at: Date | null;
|
|
530
501
|
updated_at: Generated<Date>;
|
|
531
502
|
}
|
|
532
|
-
interface SbtcSupplySnapshotsTable {
|
|
533
|
-
date: string;
|
|
534
|
-
total_supply: Generated<string>;
|
|
535
|
-
mints_today: Generated<string>;
|
|
536
|
-
burns_today: Generated<string>;
|
|
537
|
-
deposit_count: Generated<number>;
|
|
538
|
-
withdrawal_create_count: Generated<number>;
|
|
539
|
-
withdrawal_accept_count: Generated<number>;
|
|
540
|
-
withdrawal_reject_count: Generated<number>;
|
|
541
|
-
updated_at: Generated<Date>;
|
|
542
|
-
}
|
|
543
503
|
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
544
504
|
interface BnsNameEventsTable {
|
|
545
505
|
cursor: string;
|
|
@@ -781,7 +741,6 @@ interface Database {
|
|
|
781
741
|
play_provisions: PlayProvisionsTable;
|
|
782
742
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
783
743
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
784
|
-
subgraph_table_snapshots: SubgraphTableSnapshotsTable;
|
|
785
744
|
subgraph_gaps: SubgraphGapsTable;
|
|
786
745
|
subgraph_violations: SubgraphViolationsTable;
|
|
787
746
|
subgraph_operations: SubgraphOperationsTable;
|
|
@@ -797,23 +756,18 @@ interface Database {
|
|
|
797
756
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
798
757
|
chain_reorgs: ChainReorgsTable;
|
|
799
758
|
pox4_calls: Pox4CallsTable;
|
|
800
|
-
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
801
|
-
pox4_signers_daily: Pox4SignersDailyTable;
|
|
802
759
|
pox5_events: Pox5EventsTable;
|
|
803
760
|
burn_block_rewards: BurnBlockRewardsTable;
|
|
804
761
|
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
805
762
|
sbtc_events: SbtcEventsTable;
|
|
806
763
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
807
764
|
sbtc_settlements: SbtcSettlementsTable;
|
|
808
|
-
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
809
765
|
bns_name_events: BnsNameEventsTable;
|
|
810
766
|
bns_namespace_events: BnsNamespaceEventsTable;
|
|
811
767
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
812
768
|
bns_names: BnsNamesTable;
|
|
813
769
|
bns_namespaces: BnsNamespacesTable;
|
|
814
770
|
service_heartbeats: ServiceHeartbeatsTable;
|
|
815
|
-
x402_payments: X402PaymentsTable;
|
|
816
|
-
x402_balances: X402BalancesTable;
|
|
817
771
|
chain_read_cache: ChainReadCacheTable;
|
|
818
772
|
pending_fork_blocks: PendingForkBlocksTable;
|
|
819
773
|
observer_journal: ObserverJournalTable;
|
|
@@ -825,46 +779,10 @@ interface Database {
|
|
|
825
779
|
stage_failures: StageFailuresTable;
|
|
826
780
|
archive_fetches: ArchiveFetchesTable;
|
|
827
781
|
}
|
|
828
|
-
/** Prepaid x402 credit — one running USD-micros balance per payer principal. */
|
|
829
|
-
interface X402BalancesTable {
|
|
830
|
-
principal: string;
|
|
831
|
-
balance_usd_micros: Generated<string | number | bigint>;
|
|
832
|
-
/** Month bucket ("YYYY-MM") the spend counter applies to. */
|
|
833
|
-
spent_month: string | null;
|
|
834
|
-
spent_month_usd_micros: Generated<string | number | bigint>;
|
|
835
|
-
updated_at: Generated<Date>;
|
|
836
|
-
}
|
|
837
782
|
interface ServiceHeartbeatsTable {
|
|
838
783
|
name: string;
|
|
839
784
|
updated_at: Generated<Date>;
|
|
840
785
|
}
|
|
841
|
-
/** x402 pay-per-request ledger (control plane). One row per settled payment,
|
|
842
|
-
* keyed by challenge nonce + settled txid. `state` tracks confirmed-tier
|
|
843
|
-
* settlement and post-serve reorg reversal. */
|
|
844
|
-
interface X402PaymentsTable {
|
|
845
|
-
id: Generated<string>;
|
|
846
|
-
nonce: string;
|
|
847
|
-
txid: string;
|
|
848
|
-
asset: string;
|
|
849
|
-
amount: string;
|
|
850
|
-
payer: string;
|
|
851
|
-
surface: string;
|
|
852
|
-
state: Generated<"pending" | "confirmed" | "reverted">;
|
|
853
|
-
created_at: Generated<Date>;
|
|
854
|
-
updated_at: Generated<Date>;
|
|
855
|
-
/** "payment" = per-call settle; "deposit" = prepaid balance top-up. */
|
|
856
|
-
kind: Generated<string>;
|
|
857
|
-
/** Linked claimed account once the paying wallet is attached (continuity). */
|
|
858
|
-
account_id: string | null;
|
|
859
|
-
/** USD-micros to credit on confirmation, for deposit rows the reconciler
|
|
860
|
-
* settles asynchronously. NULL for per-call settles (credit nothing). */
|
|
861
|
-
credit_usd_micros: string | null;
|
|
862
|
-
/** Idempotency key: stamped exactly once when this row's credit is applied.
|
|
863
|
-
* NULL means never credited (or not a credit-bearing row). Pre-migration
|
|
864
|
-
* non-pending deposit rows are backfilled to a non-null sentinel so the
|
|
865
|
-
* reconciler's heal path can never double-credit them. */
|
|
866
|
-
credited_at: Generated<Date> | null;
|
|
867
|
-
}
|
|
868
786
|
interface AccountSpendCapsTable {
|
|
869
787
|
account_id: string;
|
|
870
788
|
monthly_cap_cents: number | null;
|
|
@@ -875,7 +793,7 @@ interface AccountSpendCapsTable {
|
|
|
875
793
|
frozen_at: Date | null;
|
|
876
794
|
updated_at: Generated<Date>;
|
|
877
795
|
}
|
|
878
|
-
/** Prepaid dev credits — card-funded balance per account
|
|
796
|
+
/** Prepaid dev credits — card-funded balance per account. */
|
|
879
797
|
interface AccountCreditsTable {
|
|
880
798
|
account_id: string;
|
|
881
799
|
balance_usd_micros: Generated<string | number | bigint>;
|
|
@@ -137,7 +137,6 @@ interface SubgraphsTable {
|
|
|
137
137
|
expires_at: Date | null;
|
|
138
138
|
/** (event type, contract) probe pairs persisted at deploy for weight classification. */
|
|
139
139
|
sparse_probe_targets: unknown | null;
|
|
140
|
-
database_url_enc: ColumnType<Buffer | null, Buffer | null | undefined, Buffer | null>;
|
|
141
140
|
sandbox_workers: Generated<boolean>;
|
|
142
141
|
created_at: Generated<Date>;
|
|
143
142
|
updated_at: Generated<Date>;
|
|
@@ -233,7 +232,7 @@ interface AccountsTable {
|
|
|
233
232
|
email: string | null;
|
|
234
233
|
/** True for anonymous self-serve accounts until claimed via magic link. */
|
|
235
234
|
ghost: Generated<boolean>;
|
|
236
|
-
/** Stacks principal owning a wallet-ghost account
|
|
235
|
+
/** Stacks principal owning a wallet-ghost account. */
|
|
237
236
|
wallet_principal: string | null;
|
|
238
237
|
display_name: string | null;
|
|
239
238
|
bio: string | null;
|
|
@@ -295,14 +294,6 @@ interface SubgraphProcessingStatsTable {
|
|
|
295
294
|
is_catchup: Generated<boolean>;
|
|
296
295
|
created_at: Generated<Date>;
|
|
297
296
|
}
|
|
298
|
-
interface SubgraphTableSnapshotsTable {
|
|
299
|
-
id: Generated<string>;
|
|
300
|
-
subgraph_name: string;
|
|
301
|
-
api_key_id: string | null;
|
|
302
|
-
table_name: string;
|
|
303
|
-
row_count: number | null;
|
|
304
|
-
created_at: Generated<Date>;
|
|
305
|
-
}
|
|
306
297
|
interface SubgraphHealthSnapshotsTable {
|
|
307
298
|
id: Generated<string>;
|
|
308
299
|
subgraph_id: string;
|
|
@@ -392,26 +383,6 @@ interface Pox4CallsTable {
|
|
|
392
383
|
source_cursor: string;
|
|
393
384
|
created_at: Generated<Date>;
|
|
394
385
|
}
|
|
395
|
-
interface Pox4CyclesDailyTable {
|
|
396
|
-
date: string;
|
|
397
|
-
reward_cycle: number;
|
|
398
|
-
total_stacked_ustx: Generated<string>;
|
|
399
|
-
solo_stackers: Generated<number>;
|
|
400
|
-
delegated_principals: Generated<number>;
|
|
401
|
-
unique_pools: Generated<number>;
|
|
402
|
-
unique_signers: Generated<number>;
|
|
403
|
-
calls_today: Generated<number>;
|
|
404
|
-
updated_at: Generated<Date>;
|
|
405
|
-
}
|
|
406
|
-
interface Pox4SignersDailyTable {
|
|
407
|
-
date: string;
|
|
408
|
-
reward_cycle: number;
|
|
409
|
-
signer_key: string;
|
|
410
|
-
weight_ustx: Generated<string>;
|
|
411
|
-
stacker_count: Generated<number>;
|
|
412
|
-
aggregation_calls: Generated<number>;
|
|
413
|
-
updated_at: Generated<Date>;
|
|
414
|
-
}
|
|
415
386
|
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";
|
|
416
387
|
interface Pox5EventsTable {
|
|
417
388
|
cursor: string;
|
|
@@ -529,17 +500,6 @@ interface SbtcSettlementsTable {
|
|
|
529
500
|
confirmed_at: Date | null;
|
|
530
501
|
updated_at: Generated<Date>;
|
|
531
502
|
}
|
|
532
|
-
interface SbtcSupplySnapshotsTable {
|
|
533
|
-
date: string;
|
|
534
|
-
total_supply: Generated<string>;
|
|
535
|
-
mints_today: Generated<string>;
|
|
536
|
-
burns_today: Generated<string>;
|
|
537
|
-
deposit_count: Generated<number>;
|
|
538
|
-
withdrawal_create_count: Generated<number>;
|
|
539
|
-
withdrawal_accept_count: Generated<number>;
|
|
540
|
-
withdrawal_reject_count: Generated<number>;
|
|
541
|
-
updated_at: Generated<Date>;
|
|
542
|
-
}
|
|
543
503
|
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
544
504
|
interface BnsNameEventsTable {
|
|
545
505
|
cursor: string;
|
|
@@ -781,7 +741,6 @@ interface Database {
|
|
|
781
741
|
play_provisions: PlayProvisionsTable;
|
|
782
742
|
subgraph_health_snapshots: SubgraphHealthSnapshotsTable;
|
|
783
743
|
subgraph_processing_stats: SubgraphProcessingStatsTable;
|
|
784
|
-
subgraph_table_snapshots: SubgraphTableSnapshotsTable;
|
|
785
744
|
subgraph_gaps: SubgraphGapsTable;
|
|
786
745
|
subgraph_violations: SubgraphViolationsTable;
|
|
787
746
|
subgraph_operations: SubgraphOperationsTable;
|
|
@@ -797,23 +756,18 @@ interface Database {
|
|
|
797
756
|
decoder_checkpoints: DecoderCheckpointsTable;
|
|
798
757
|
chain_reorgs: ChainReorgsTable;
|
|
799
758
|
pox4_calls: Pox4CallsTable;
|
|
800
|
-
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
801
|
-
pox4_signers_daily: Pox4SignersDailyTable;
|
|
802
759
|
pox5_events: Pox5EventsTable;
|
|
803
760
|
burn_block_rewards: BurnBlockRewardsTable;
|
|
804
761
|
burn_block_reward_slots: BurnBlockRewardSlotsTable;
|
|
805
762
|
sbtc_events: SbtcEventsTable;
|
|
806
763
|
sbtc_token_events: SbtcTokenEventsTable;
|
|
807
764
|
sbtc_settlements: SbtcSettlementsTable;
|
|
808
|
-
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
809
765
|
bns_name_events: BnsNameEventsTable;
|
|
810
766
|
bns_namespace_events: BnsNamespaceEventsTable;
|
|
811
767
|
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
812
768
|
bns_names: BnsNamesTable;
|
|
813
769
|
bns_namespaces: BnsNamespacesTable;
|
|
814
770
|
service_heartbeats: ServiceHeartbeatsTable;
|
|
815
|
-
x402_payments: X402PaymentsTable;
|
|
816
|
-
x402_balances: X402BalancesTable;
|
|
817
771
|
chain_read_cache: ChainReadCacheTable;
|
|
818
772
|
pending_fork_blocks: PendingForkBlocksTable;
|
|
819
773
|
observer_journal: ObserverJournalTable;
|
|
@@ -825,46 +779,10 @@ interface Database {
|
|
|
825
779
|
stage_failures: StageFailuresTable;
|
|
826
780
|
archive_fetches: ArchiveFetchesTable;
|
|
827
781
|
}
|
|
828
|
-
/** Prepaid x402 credit — one running USD-micros balance per payer principal. */
|
|
829
|
-
interface X402BalancesTable {
|
|
830
|
-
principal: string;
|
|
831
|
-
balance_usd_micros: Generated<string | number | bigint>;
|
|
832
|
-
/** Month bucket ("YYYY-MM") the spend counter applies to. */
|
|
833
|
-
spent_month: string | null;
|
|
834
|
-
spent_month_usd_micros: Generated<string | number | bigint>;
|
|
835
|
-
updated_at: Generated<Date>;
|
|
836
|
-
}
|
|
837
782
|
interface ServiceHeartbeatsTable {
|
|
838
783
|
name: string;
|
|
839
784
|
updated_at: Generated<Date>;
|
|
840
785
|
}
|
|
841
|
-
/** x402 pay-per-request ledger (control plane). One row per settled payment,
|
|
842
|
-
* keyed by challenge nonce + settled txid. `state` tracks confirmed-tier
|
|
843
|
-
* settlement and post-serve reorg reversal. */
|
|
844
|
-
interface X402PaymentsTable {
|
|
845
|
-
id: Generated<string>;
|
|
846
|
-
nonce: string;
|
|
847
|
-
txid: string;
|
|
848
|
-
asset: string;
|
|
849
|
-
amount: string;
|
|
850
|
-
payer: string;
|
|
851
|
-
surface: string;
|
|
852
|
-
state: Generated<"pending" | "confirmed" | "reverted">;
|
|
853
|
-
created_at: Generated<Date>;
|
|
854
|
-
updated_at: Generated<Date>;
|
|
855
|
-
/** "payment" = per-call settle; "deposit" = prepaid balance top-up. */
|
|
856
|
-
kind: Generated<string>;
|
|
857
|
-
/** Linked claimed account once the paying wallet is attached (continuity). */
|
|
858
|
-
account_id: string | null;
|
|
859
|
-
/** USD-micros to credit on confirmation, for deposit rows the reconciler
|
|
860
|
-
* settles asynchronously. NULL for per-call settles (credit nothing). */
|
|
861
|
-
credit_usd_micros: string | null;
|
|
862
|
-
/** Idempotency key: stamped exactly once when this row's credit is applied.
|
|
863
|
-
* NULL means never credited (or not a credit-bearing row). Pre-migration
|
|
864
|
-
* non-pending deposit rows are backfilled to a non-null sentinel so the
|
|
865
|
-
* reconciler's heal path can never double-credit them. */
|
|
866
|
-
credited_at: Generated<Date> | null;
|
|
867
|
-
}
|
|
868
786
|
interface AccountSpendCapsTable {
|
|
869
787
|
account_id: string;
|
|
870
788
|
monthly_cap_cents: number | null;
|
|
@@ -875,7 +793,7 @@ interface AccountSpendCapsTable {
|
|
|
875
793
|
frozen_at: Date | null;
|
|
876
794
|
updated_at: Generated<Date>;
|
|
877
795
|
}
|
|
878
|
-
/** Prepaid dev credits — card-funded balance per account
|
|
796
|
+
/** Prepaid dev credits — card-funded balance per account. */
|
|
879
797
|
interface AccountCreditsTable {
|
|
880
798
|
account_id: string;
|
|
881
799
|
balance_usd_micros: Generated<string | number | bigint>;
|