@secondlayer/shared 6.2.0 → 6.3.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/db/index.d.ts +214 -1
- package/dist/src/db/queries/account-spend-caps.d.ts +213 -0
- package/dist/src/db/queries/account-usage.d.ts +213 -0
- package/dist/src/db/queries/accounts.d.ts +213 -0
- package/dist/src/db/queries/chain-reorgs.d.ts +213 -0
- package/dist/src/db/queries/integrity.d.ts +213 -0
- package/dist/src/db/queries/projects.d.ts +213 -0
- package/dist/src/db/queries/provisioning-audit.d.ts +213 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +213 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +213 -0
- package/dist/src/db/queries/subgraphs.d.ts +213 -0
- package/dist/src/db/queries/subscriptions.d.ts +213 -0
- package/dist/src/db/queries/tenant-compute-addons.d.ts +213 -0
- package/dist/src/db/queries/tenants.d.ts +213 -0
- package/dist/src/db/queries/usage.d.ts +213 -0
- package/dist/src/db/schema.d.ts +214 -1
- package/dist/src/index.d.ts +214 -1
- package/dist/src/node/local-client.d.ts +213 -0
- package/migrations/0070_pox4_dataset.ts +128 -0
- package/migrations/0071_sbtc_dataset.ts +126 -0
- package/migrations/0072_bns_dataset.ts +177 -0
- package/migrations/0073_events_contract_id_idx.ts +27 -0
- package/package.json +2 -2
|
@@ -317,6 +317,208 @@ interface ChainReorgsTable {
|
|
|
317
317
|
new_canonical_event_index: number;
|
|
318
318
|
created_at: Generated<Date>;
|
|
319
319
|
}
|
|
320
|
+
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";
|
|
321
|
+
interface Pox4CallsTable {
|
|
322
|
+
cursor: string;
|
|
323
|
+
block_height: number;
|
|
324
|
+
block_time: Date;
|
|
325
|
+
burn_block_height: number;
|
|
326
|
+
tx_id: string;
|
|
327
|
+
tx_index: number;
|
|
328
|
+
function_name: Pox4FunctionName;
|
|
329
|
+
caller: string;
|
|
330
|
+
stacker: string | null;
|
|
331
|
+
delegate_to: string | null;
|
|
332
|
+
amount_ustx: string | null;
|
|
333
|
+
lock_period: number | null;
|
|
334
|
+
pox_addr_version: number | null;
|
|
335
|
+
pox_addr_hashbytes: string | null;
|
|
336
|
+
pox_addr_btc: string | null;
|
|
337
|
+
start_cycle: number | null;
|
|
338
|
+
end_cycle: number | null;
|
|
339
|
+
signer_key: string | null;
|
|
340
|
+
signer_signature: string | null;
|
|
341
|
+
auth_id: string | null;
|
|
342
|
+
max_amount: string | null;
|
|
343
|
+
reward_cycle: number | null;
|
|
344
|
+
aggregated_amount_ustx: string | null;
|
|
345
|
+
aggregated_signer_index: number | null;
|
|
346
|
+
auth_period: number | null;
|
|
347
|
+
auth_topic: string | null;
|
|
348
|
+
auth_allowed: boolean | null;
|
|
349
|
+
result_ok: boolean;
|
|
350
|
+
result_raw: string;
|
|
351
|
+
canonical: Generated<boolean>;
|
|
352
|
+
source_cursor: string;
|
|
353
|
+
created_at: Generated<Date>;
|
|
354
|
+
}
|
|
355
|
+
interface Pox4CyclesDailyTable {
|
|
356
|
+
date: string;
|
|
357
|
+
reward_cycle: number;
|
|
358
|
+
total_stacked_ustx: Generated<string>;
|
|
359
|
+
solo_stackers: Generated<number>;
|
|
360
|
+
delegated_principals: Generated<number>;
|
|
361
|
+
unique_pools: Generated<number>;
|
|
362
|
+
unique_signers: Generated<number>;
|
|
363
|
+
calls_today: Generated<number>;
|
|
364
|
+
updated_at: Generated<Date>;
|
|
365
|
+
}
|
|
366
|
+
interface Pox4SignersDailyTable {
|
|
367
|
+
date: string;
|
|
368
|
+
reward_cycle: number;
|
|
369
|
+
signer_key: string;
|
|
370
|
+
weight_ustx: Generated<string>;
|
|
371
|
+
stacker_count: Generated<number>;
|
|
372
|
+
aggregation_calls: Generated<number>;
|
|
373
|
+
updated_at: Generated<Date>;
|
|
374
|
+
}
|
|
375
|
+
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
376
|
+
interface SbtcEventsTable {
|
|
377
|
+
cursor: string;
|
|
378
|
+
block_height: number;
|
|
379
|
+
block_time: Date;
|
|
380
|
+
tx_id: string;
|
|
381
|
+
tx_index: number;
|
|
382
|
+
event_index: number;
|
|
383
|
+
topic: SbtcEventTopic;
|
|
384
|
+
request_id: number | null;
|
|
385
|
+
amount: string | null;
|
|
386
|
+
sender: string | null;
|
|
387
|
+
recipient_btc_version: number | null;
|
|
388
|
+
recipient_btc_hashbytes: string | null;
|
|
389
|
+
bitcoin_txid: string | null;
|
|
390
|
+
output_index: number | null;
|
|
391
|
+
sweep_txid: string | null;
|
|
392
|
+
burn_hash: string | null;
|
|
393
|
+
burn_height: number | null;
|
|
394
|
+
signer_bitmap: string | null;
|
|
395
|
+
max_fee: string | null;
|
|
396
|
+
fee: string | null;
|
|
397
|
+
block_height_at_request: number | null;
|
|
398
|
+
governance_contract_type: number | null;
|
|
399
|
+
governance_new_contract: string | null;
|
|
400
|
+
signer_aggregate_pubkey: string | null;
|
|
401
|
+
signer_threshold: number | null;
|
|
402
|
+
signer_address: string | null;
|
|
403
|
+
signer_keys_count: number | null;
|
|
404
|
+
canonical: Generated<boolean>;
|
|
405
|
+
source_cursor: string;
|
|
406
|
+
created_at: Generated<Date>;
|
|
407
|
+
}
|
|
408
|
+
type SbtcTokenEventType = "transfer" | "mint" | "burn";
|
|
409
|
+
interface SbtcTokenEventsTable {
|
|
410
|
+
cursor: string;
|
|
411
|
+
block_height: number;
|
|
412
|
+
block_time: Date;
|
|
413
|
+
tx_id: string;
|
|
414
|
+
tx_index: number;
|
|
415
|
+
event_index: number;
|
|
416
|
+
event_type: SbtcTokenEventType;
|
|
417
|
+
sender: string | null;
|
|
418
|
+
recipient: string | null;
|
|
419
|
+
amount: string;
|
|
420
|
+
memo: string | null;
|
|
421
|
+
canonical: Generated<boolean>;
|
|
422
|
+
source_cursor: string;
|
|
423
|
+
created_at: Generated<Date>;
|
|
424
|
+
}
|
|
425
|
+
interface SbtcSupplySnapshotsTable {
|
|
426
|
+
date: string;
|
|
427
|
+
total_supply: Generated<string>;
|
|
428
|
+
mints_today: Generated<string>;
|
|
429
|
+
burns_today: Generated<string>;
|
|
430
|
+
deposit_count: Generated<number>;
|
|
431
|
+
withdrawal_create_count: Generated<number>;
|
|
432
|
+
withdrawal_accept_count: Generated<number>;
|
|
433
|
+
withdrawal_reject_count: Generated<number>;
|
|
434
|
+
updated_at: Generated<Date>;
|
|
435
|
+
}
|
|
436
|
+
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
437
|
+
interface BnsNameEventsTable {
|
|
438
|
+
cursor: string;
|
|
439
|
+
block_height: number;
|
|
440
|
+
block_time: Date;
|
|
441
|
+
tx_id: string;
|
|
442
|
+
tx_index: number;
|
|
443
|
+
event_index: number;
|
|
444
|
+
topic: BnsNameEventTopic;
|
|
445
|
+
namespace: string;
|
|
446
|
+
name: string;
|
|
447
|
+
fqn: string;
|
|
448
|
+
owner: string | null;
|
|
449
|
+
bns_id: string;
|
|
450
|
+
registered_at: number | null;
|
|
451
|
+
imported_at: number | null;
|
|
452
|
+
renewal_height: number | null;
|
|
453
|
+
stx_burn: string | null;
|
|
454
|
+
preordered_by: string | null;
|
|
455
|
+
hashed_salted_fqn_preorder: string | null;
|
|
456
|
+
canonical: Generated<boolean>;
|
|
457
|
+
source_cursor: string;
|
|
458
|
+
created_at: Generated<Date>;
|
|
459
|
+
}
|
|
460
|
+
type BnsNamespaceEventStatus = "launch" | "transfer-manager" | "freeze-manager" | "update-price-manager" | "freeze-price-manager" | "turn-off-manager-transfers";
|
|
461
|
+
interface BnsNamespaceEventsTable {
|
|
462
|
+
cursor: string;
|
|
463
|
+
block_height: number;
|
|
464
|
+
block_time: Date;
|
|
465
|
+
tx_id: string;
|
|
466
|
+
tx_index: number;
|
|
467
|
+
event_index: number;
|
|
468
|
+
status: BnsNamespaceEventStatus;
|
|
469
|
+
namespace: string;
|
|
470
|
+
manager: string | null;
|
|
471
|
+
manager_frozen: boolean | null;
|
|
472
|
+
manager_transfers_disabled: boolean | null;
|
|
473
|
+
price_function: string | null;
|
|
474
|
+
price_frozen: boolean | null;
|
|
475
|
+
lifetime: number | null;
|
|
476
|
+
revealed_at: number | null;
|
|
477
|
+
launched_at: number | null;
|
|
478
|
+
canonical: Generated<boolean>;
|
|
479
|
+
source_cursor: string;
|
|
480
|
+
created_at: Generated<Date>;
|
|
481
|
+
}
|
|
482
|
+
type BnsMarketplaceAction = "list-in-ustx" | "unlist-in-ustx" | "buy-in-ustx";
|
|
483
|
+
interface BnsMarketplaceEventsTable {
|
|
484
|
+
cursor: string;
|
|
485
|
+
block_height: number;
|
|
486
|
+
block_time: Date;
|
|
487
|
+
tx_id: string;
|
|
488
|
+
tx_index: number;
|
|
489
|
+
event_index: number;
|
|
490
|
+
action: BnsMarketplaceAction;
|
|
491
|
+
bns_id: string;
|
|
492
|
+
price_ustx: string | null;
|
|
493
|
+
commission: string | null;
|
|
494
|
+
canonical: Generated<boolean>;
|
|
495
|
+
source_cursor: string;
|
|
496
|
+
created_at: Generated<Date>;
|
|
497
|
+
}
|
|
498
|
+
interface BnsNamesTable {
|
|
499
|
+
fqn: string;
|
|
500
|
+
namespace: string;
|
|
501
|
+
name: string;
|
|
502
|
+
owner: string;
|
|
503
|
+
bns_id: string;
|
|
504
|
+
registered_at: number | null;
|
|
505
|
+
renewal_height: number | null;
|
|
506
|
+
last_event_cursor: string;
|
|
507
|
+
last_event_at: Date;
|
|
508
|
+
updated_at: Generated<Date>;
|
|
509
|
+
}
|
|
510
|
+
interface BnsNamespacesTable {
|
|
511
|
+
namespace: string;
|
|
512
|
+
manager: string | null;
|
|
513
|
+
manager_frozen: Generated<boolean>;
|
|
514
|
+
price_frozen: Generated<boolean>;
|
|
515
|
+
lifetime: number | null;
|
|
516
|
+
launched_at: number | null;
|
|
517
|
+
last_event_cursor: string;
|
|
518
|
+
last_event_at: Date;
|
|
519
|
+
name_count: Generated<number>;
|
|
520
|
+
updated_at: Generated<Date>;
|
|
521
|
+
}
|
|
320
522
|
interface Database {
|
|
321
523
|
blocks: BlocksTable;
|
|
322
524
|
transactions: TransactionsTable;
|
|
@@ -355,6 +557,17 @@ interface Database {
|
|
|
355
557
|
decoded_events: DecodedEventsTable;
|
|
356
558
|
l2_decoder_checkpoints: L2DecoderCheckpointsTable;
|
|
357
559
|
chain_reorgs: ChainReorgsTable;
|
|
560
|
+
pox4_calls: Pox4CallsTable;
|
|
561
|
+
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
562
|
+
pox4_signers_daily: Pox4SignersDailyTable;
|
|
563
|
+
sbtc_events: SbtcEventsTable;
|
|
564
|
+
sbtc_token_events: SbtcTokenEventsTable;
|
|
565
|
+
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
566
|
+
bns_name_events: BnsNameEventsTable;
|
|
567
|
+
bns_namespace_events: BnsNamespaceEventsTable;
|
|
568
|
+
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
569
|
+
bns_names: BnsNamesTable;
|
|
570
|
+
bns_namespaces: BnsNamespacesTable;
|
|
358
571
|
}
|
|
359
572
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
360
573
|
interface TenantsTable {
|
|
@@ -315,6 +315,208 @@ interface ChainReorgsTable {
|
|
|
315
315
|
new_canonical_event_index: number;
|
|
316
316
|
created_at: Generated<Date>;
|
|
317
317
|
}
|
|
318
|
+
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";
|
|
319
|
+
interface Pox4CallsTable {
|
|
320
|
+
cursor: string;
|
|
321
|
+
block_height: number;
|
|
322
|
+
block_time: Date;
|
|
323
|
+
burn_block_height: number;
|
|
324
|
+
tx_id: string;
|
|
325
|
+
tx_index: number;
|
|
326
|
+
function_name: Pox4FunctionName;
|
|
327
|
+
caller: string;
|
|
328
|
+
stacker: string | null;
|
|
329
|
+
delegate_to: string | null;
|
|
330
|
+
amount_ustx: string | null;
|
|
331
|
+
lock_period: number | null;
|
|
332
|
+
pox_addr_version: number | null;
|
|
333
|
+
pox_addr_hashbytes: string | null;
|
|
334
|
+
pox_addr_btc: string | null;
|
|
335
|
+
start_cycle: number | null;
|
|
336
|
+
end_cycle: number | null;
|
|
337
|
+
signer_key: string | null;
|
|
338
|
+
signer_signature: string | null;
|
|
339
|
+
auth_id: string | null;
|
|
340
|
+
max_amount: string | null;
|
|
341
|
+
reward_cycle: number | null;
|
|
342
|
+
aggregated_amount_ustx: string | null;
|
|
343
|
+
aggregated_signer_index: number | null;
|
|
344
|
+
auth_period: number | null;
|
|
345
|
+
auth_topic: string | null;
|
|
346
|
+
auth_allowed: boolean | null;
|
|
347
|
+
result_ok: boolean;
|
|
348
|
+
result_raw: string;
|
|
349
|
+
canonical: Generated<boolean>;
|
|
350
|
+
source_cursor: string;
|
|
351
|
+
created_at: Generated<Date>;
|
|
352
|
+
}
|
|
353
|
+
interface Pox4CyclesDailyTable {
|
|
354
|
+
date: string;
|
|
355
|
+
reward_cycle: number;
|
|
356
|
+
total_stacked_ustx: Generated<string>;
|
|
357
|
+
solo_stackers: Generated<number>;
|
|
358
|
+
delegated_principals: Generated<number>;
|
|
359
|
+
unique_pools: Generated<number>;
|
|
360
|
+
unique_signers: Generated<number>;
|
|
361
|
+
calls_today: Generated<number>;
|
|
362
|
+
updated_at: Generated<Date>;
|
|
363
|
+
}
|
|
364
|
+
interface Pox4SignersDailyTable {
|
|
365
|
+
date: string;
|
|
366
|
+
reward_cycle: number;
|
|
367
|
+
signer_key: string;
|
|
368
|
+
weight_ustx: Generated<string>;
|
|
369
|
+
stacker_count: Generated<number>;
|
|
370
|
+
aggregation_calls: Generated<number>;
|
|
371
|
+
updated_at: Generated<Date>;
|
|
372
|
+
}
|
|
373
|
+
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
374
|
+
interface SbtcEventsTable {
|
|
375
|
+
cursor: string;
|
|
376
|
+
block_height: number;
|
|
377
|
+
block_time: Date;
|
|
378
|
+
tx_id: string;
|
|
379
|
+
tx_index: number;
|
|
380
|
+
event_index: number;
|
|
381
|
+
topic: SbtcEventTopic;
|
|
382
|
+
request_id: number | null;
|
|
383
|
+
amount: string | null;
|
|
384
|
+
sender: string | null;
|
|
385
|
+
recipient_btc_version: number | null;
|
|
386
|
+
recipient_btc_hashbytes: string | null;
|
|
387
|
+
bitcoin_txid: string | null;
|
|
388
|
+
output_index: number | null;
|
|
389
|
+
sweep_txid: string | null;
|
|
390
|
+
burn_hash: string | null;
|
|
391
|
+
burn_height: number | null;
|
|
392
|
+
signer_bitmap: string | null;
|
|
393
|
+
max_fee: string | null;
|
|
394
|
+
fee: string | null;
|
|
395
|
+
block_height_at_request: number | null;
|
|
396
|
+
governance_contract_type: number | null;
|
|
397
|
+
governance_new_contract: string | null;
|
|
398
|
+
signer_aggregate_pubkey: string | null;
|
|
399
|
+
signer_threshold: number | null;
|
|
400
|
+
signer_address: string | null;
|
|
401
|
+
signer_keys_count: number | null;
|
|
402
|
+
canonical: Generated<boolean>;
|
|
403
|
+
source_cursor: string;
|
|
404
|
+
created_at: Generated<Date>;
|
|
405
|
+
}
|
|
406
|
+
type SbtcTokenEventType = "transfer" | "mint" | "burn";
|
|
407
|
+
interface SbtcTokenEventsTable {
|
|
408
|
+
cursor: string;
|
|
409
|
+
block_height: number;
|
|
410
|
+
block_time: Date;
|
|
411
|
+
tx_id: string;
|
|
412
|
+
tx_index: number;
|
|
413
|
+
event_index: number;
|
|
414
|
+
event_type: SbtcTokenEventType;
|
|
415
|
+
sender: string | null;
|
|
416
|
+
recipient: string | null;
|
|
417
|
+
amount: string;
|
|
418
|
+
memo: string | null;
|
|
419
|
+
canonical: Generated<boolean>;
|
|
420
|
+
source_cursor: string;
|
|
421
|
+
created_at: Generated<Date>;
|
|
422
|
+
}
|
|
423
|
+
interface SbtcSupplySnapshotsTable {
|
|
424
|
+
date: string;
|
|
425
|
+
total_supply: Generated<string>;
|
|
426
|
+
mints_today: Generated<string>;
|
|
427
|
+
burns_today: Generated<string>;
|
|
428
|
+
deposit_count: Generated<number>;
|
|
429
|
+
withdrawal_create_count: Generated<number>;
|
|
430
|
+
withdrawal_accept_count: Generated<number>;
|
|
431
|
+
withdrawal_reject_count: Generated<number>;
|
|
432
|
+
updated_at: Generated<Date>;
|
|
433
|
+
}
|
|
434
|
+
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
435
|
+
interface BnsNameEventsTable {
|
|
436
|
+
cursor: string;
|
|
437
|
+
block_height: number;
|
|
438
|
+
block_time: Date;
|
|
439
|
+
tx_id: string;
|
|
440
|
+
tx_index: number;
|
|
441
|
+
event_index: number;
|
|
442
|
+
topic: BnsNameEventTopic;
|
|
443
|
+
namespace: string;
|
|
444
|
+
name: string;
|
|
445
|
+
fqn: string;
|
|
446
|
+
owner: string | null;
|
|
447
|
+
bns_id: string;
|
|
448
|
+
registered_at: number | null;
|
|
449
|
+
imported_at: number | null;
|
|
450
|
+
renewal_height: number | null;
|
|
451
|
+
stx_burn: string | null;
|
|
452
|
+
preordered_by: string | null;
|
|
453
|
+
hashed_salted_fqn_preorder: string | null;
|
|
454
|
+
canonical: Generated<boolean>;
|
|
455
|
+
source_cursor: string;
|
|
456
|
+
created_at: Generated<Date>;
|
|
457
|
+
}
|
|
458
|
+
type BnsNamespaceEventStatus = "launch" | "transfer-manager" | "freeze-manager" | "update-price-manager" | "freeze-price-manager" | "turn-off-manager-transfers";
|
|
459
|
+
interface BnsNamespaceEventsTable {
|
|
460
|
+
cursor: string;
|
|
461
|
+
block_height: number;
|
|
462
|
+
block_time: Date;
|
|
463
|
+
tx_id: string;
|
|
464
|
+
tx_index: number;
|
|
465
|
+
event_index: number;
|
|
466
|
+
status: BnsNamespaceEventStatus;
|
|
467
|
+
namespace: string;
|
|
468
|
+
manager: string | null;
|
|
469
|
+
manager_frozen: boolean | null;
|
|
470
|
+
manager_transfers_disabled: boolean | null;
|
|
471
|
+
price_function: string | null;
|
|
472
|
+
price_frozen: boolean | null;
|
|
473
|
+
lifetime: number | null;
|
|
474
|
+
revealed_at: number | null;
|
|
475
|
+
launched_at: number | null;
|
|
476
|
+
canonical: Generated<boolean>;
|
|
477
|
+
source_cursor: string;
|
|
478
|
+
created_at: Generated<Date>;
|
|
479
|
+
}
|
|
480
|
+
type BnsMarketplaceAction = "list-in-ustx" | "unlist-in-ustx" | "buy-in-ustx";
|
|
481
|
+
interface BnsMarketplaceEventsTable {
|
|
482
|
+
cursor: string;
|
|
483
|
+
block_height: number;
|
|
484
|
+
block_time: Date;
|
|
485
|
+
tx_id: string;
|
|
486
|
+
tx_index: number;
|
|
487
|
+
event_index: number;
|
|
488
|
+
action: BnsMarketplaceAction;
|
|
489
|
+
bns_id: string;
|
|
490
|
+
price_ustx: string | null;
|
|
491
|
+
commission: string | null;
|
|
492
|
+
canonical: Generated<boolean>;
|
|
493
|
+
source_cursor: string;
|
|
494
|
+
created_at: Generated<Date>;
|
|
495
|
+
}
|
|
496
|
+
interface BnsNamesTable {
|
|
497
|
+
fqn: string;
|
|
498
|
+
namespace: string;
|
|
499
|
+
name: string;
|
|
500
|
+
owner: string;
|
|
501
|
+
bns_id: string;
|
|
502
|
+
registered_at: number | null;
|
|
503
|
+
renewal_height: number | null;
|
|
504
|
+
last_event_cursor: string;
|
|
505
|
+
last_event_at: Date;
|
|
506
|
+
updated_at: Generated<Date>;
|
|
507
|
+
}
|
|
508
|
+
interface BnsNamespacesTable {
|
|
509
|
+
namespace: string;
|
|
510
|
+
manager: string | null;
|
|
511
|
+
manager_frozen: Generated<boolean>;
|
|
512
|
+
price_frozen: Generated<boolean>;
|
|
513
|
+
lifetime: number | null;
|
|
514
|
+
launched_at: number | null;
|
|
515
|
+
last_event_cursor: string;
|
|
516
|
+
last_event_at: Date;
|
|
517
|
+
name_count: Generated<number>;
|
|
518
|
+
updated_at: Generated<Date>;
|
|
519
|
+
}
|
|
318
520
|
interface Database {
|
|
319
521
|
blocks: BlocksTable;
|
|
320
522
|
transactions: TransactionsTable;
|
|
@@ -353,6 +555,17 @@ interface Database {
|
|
|
353
555
|
decoded_events: DecodedEventsTable;
|
|
354
556
|
l2_decoder_checkpoints: L2DecoderCheckpointsTable;
|
|
355
557
|
chain_reorgs: ChainReorgsTable;
|
|
558
|
+
pox4_calls: Pox4CallsTable;
|
|
559
|
+
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
560
|
+
pox4_signers_daily: Pox4SignersDailyTable;
|
|
561
|
+
sbtc_events: SbtcEventsTable;
|
|
562
|
+
sbtc_token_events: SbtcTokenEventsTable;
|
|
563
|
+
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
564
|
+
bns_name_events: BnsNameEventsTable;
|
|
565
|
+
bns_namespace_events: BnsNamespaceEventsTable;
|
|
566
|
+
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
567
|
+
bns_names: BnsNamesTable;
|
|
568
|
+
bns_namespaces: BnsNamespacesTable;
|
|
356
569
|
}
|
|
357
570
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
358
571
|
interface TenantsTable {
|
|
@@ -316,6 +316,208 @@ interface ChainReorgsTable {
|
|
|
316
316
|
new_canonical_event_index: number;
|
|
317
317
|
created_at: Generated<Date>;
|
|
318
318
|
}
|
|
319
|
+
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";
|
|
320
|
+
interface Pox4CallsTable {
|
|
321
|
+
cursor: string;
|
|
322
|
+
block_height: number;
|
|
323
|
+
block_time: Date;
|
|
324
|
+
burn_block_height: number;
|
|
325
|
+
tx_id: string;
|
|
326
|
+
tx_index: number;
|
|
327
|
+
function_name: Pox4FunctionName;
|
|
328
|
+
caller: string;
|
|
329
|
+
stacker: string | null;
|
|
330
|
+
delegate_to: string | null;
|
|
331
|
+
amount_ustx: string | null;
|
|
332
|
+
lock_period: number | null;
|
|
333
|
+
pox_addr_version: number | null;
|
|
334
|
+
pox_addr_hashbytes: string | null;
|
|
335
|
+
pox_addr_btc: string | null;
|
|
336
|
+
start_cycle: number | null;
|
|
337
|
+
end_cycle: number | null;
|
|
338
|
+
signer_key: string | null;
|
|
339
|
+
signer_signature: string | null;
|
|
340
|
+
auth_id: string | null;
|
|
341
|
+
max_amount: string | null;
|
|
342
|
+
reward_cycle: number | null;
|
|
343
|
+
aggregated_amount_ustx: string | null;
|
|
344
|
+
aggregated_signer_index: number | null;
|
|
345
|
+
auth_period: number | null;
|
|
346
|
+
auth_topic: string | null;
|
|
347
|
+
auth_allowed: boolean | null;
|
|
348
|
+
result_ok: boolean;
|
|
349
|
+
result_raw: string;
|
|
350
|
+
canonical: Generated<boolean>;
|
|
351
|
+
source_cursor: string;
|
|
352
|
+
created_at: Generated<Date>;
|
|
353
|
+
}
|
|
354
|
+
interface Pox4CyclesDailyTable {
|
|
355
|
+
date: string;
|
|
356
|
+
reward_cycle: number;
|
|
357
|
+
total_stacked_ustx: Generated<string>;
|
|
358
|
+
solo_stackers: Generated<number>;
|
|
359
|
+
delegated_principals: Generated<number>;
|
|
360
|
+
unique_pools: Generated<number>;
|
|
361
|
+
unique_signers: Generated<number>;
|
|
362
|
+
calls_today: Generated<number>;
|
|
363
|
+
updated_at: Generated<Date>;
|
|
364
|
+
}
|
|
365
|
+
interface Pox4SignersDailyTable {
|
|
366
|
+
date: string;
|
|
367
|
+
reward_cycle: number;
|
|
368
|
+
signer_key: string;
|
|
369
|
+
weight_ustx: Generated<string>;
|
|
370
|
+
stacker_count: Generated<number>;
|
|
371
|
+
aggregation_calls: Generated<number>;
|
|
372
|
+
updated_at: Generated<Date>;
|
|
373
|
+
}
|
|
374
|
+
type SbtcEventTopic = "completed-deposit" | "withdrawal-create" | "withdrawal-accept" | "withdrawal-reject" | "key-rotation" | "update-protocol-contract";
|
|
375
|
+
interface SbtcEventsTable {
|
|
376
|
+
cursor: string;
|
|
377
|
+
block_height: number;
|
|
378
|
+
block_time: Date;
|
|
379
|
+
tx_id: string;
|
|
380
|
+
tx_index: number;
|
|
381
|
+
event_index: number;
|
|
382
|
+
topic: SbtcEventTopic;
|
|
383
|
+
request_id: number | null;
|
|
384
|
+
amount: string | null;
|
|
385
|
+
sender: string | null;
|
|
386
|
+
recipient_btc_version: number | null;
|
|
387
|
+
recipient_btc_hashbytes: string | null;
|
|
388
|
+
bitcoin_txid: string | null;
|
|
389
|
+
output_index: number | null;
|
|
390
|
+
sweep_txid: string | null;
|
|
391
|
+
burn_hash: string | null;
|
|
392
|
+
burn_height: number | null;
|
|
393
|
+
signer_bitmap: string | null;
|
|
394
|
+
max_fee: string | null;
|
|
395
|
+
fee: string | null;
|
|
396
|
+
block_height_at_request: number | null;
|
|
397
|
+
governance_contract_type: number | null;
|
|
398
|
+
governance_new_contract: string | null;
|
|
399
|
+
signer_aggregate_pubkey: string | null;
|
|
400
|
+
signer_threshold: number | null;
|
|
401
|
+
signer_address: string | null;
|
|
402
|
+
signer_keys_count: number | null;
|
|
403
|
+
canonical: Generated<boolean>;
|
|
404
|
+
source_cursor: string;
|
|
405
|
+
created_at: Generated<Date>;
|
|
406
|
+
}
|
|
407
|
+
type SbtcTokenEventType = "transfer" | "mint" | "burn";
|
|
408
|
+
interface SbtcTokenEventsTable {
|
|
409
|
+
cursor: string;
|
|
410
|
+
block_height: number;
|
|
411
|
+
block_time: Date;
|
|
412
|
+
tx_id: string;
|
|
413
|
+
tx_index: number;
|
|
414
|
+
event_index: number;
|
|
415
|
+
event_type: SbtcTokenEventType;
|
|
416
|
+
sender: string | null;
|
|
417
|
+
recipient: string | null;
|
|
418
|
+
amount: string;
|
|
419
|
+
memo: string | null;
|
|
420
|
+
canonical: Generated<boolean>;
|
|
421
|
+
source_cursor: string;
|
|
422
|
+
created_at: Generated<Date>;
|
|
423
|
+
}
|
|
424
|
+
interface SbtcSupplySnapshotsTable {
|
|
425
|
+
date: string;
|
|
426
|
+
total_supply: Generated<string>;
|
|
427
|
+
mints_today: Generated<string>;
|
|
428
|
+
burns_today: Generated<string>;
|
|
429
|
+
deposit_count: Generated<number>;
|
|
430
|
+
withdrawal_create_count: Generated<number>;
|
|
431
|
+
withdrawal_accept_count: Generated<number>;
|
|
432
|
+
withdrawal_reject_count: Generated<number>;
|
|
433
|
+
updated_at: Generated<Date>;
|
|
434
|
+
}
|
|
435
|
+
type BnsNameEventTopic = "new-name" | "transfer-name" | "renew-name" | "burn-name" | "new-airdrop";
|
|
436
|
+
interface BnsNameEventsTable {
|
|
437
|
+
cursor: string;
|
|
438
|
+
block_height: number;
|
|
439
|
+
block_time: Date;
|
|
440
|
+
tx_id: string;
|
|
441
|
+
tx_index: number;
|
|
442
|
+
event_index: number;
|
|
443
|
+
topic: BnsNameEventTopic;
|
|
444
|
+
namespace: string;
|
|
445
|
+
name: string;
|
|
446
|
+
fqn: string;
|
|
447
|
+
owner: string | null;
|
|
448
|
+
bns_id: string;
|
|
449
|
+
registered_at: number | null;
|
|
450
|
+
imported_at: number | null;
|
|
451
|
+
renewal_height: number | null;
|
|
452
|
+
stx_burn: string | null;
|
|
453
|
+
preordered_by: string | null;
|
|
454
|
+
hashed_salted_fqn_preorder: string | null;
|
|
455
|
+
canonical: Generated<boolean>;
|
|
456
|
+
source_cursor: string;
|
|
457
|
+
created_at: Generated<Date>;
|
|
458
|
+
}
|
|
459
|
+
type BnsNamespaceEventStatus = "launch" | "transfer-manager" | "freeze-manager" | "update-price-manager" | "freeze-price-manager" | "turn-off-manager-transfers";
|
|
460
|
+
interface BnsNamespaceEventsTable {
|
|
461
|
+
cursor: string;
|
|
462
|
+
block_height: number;
|
|
463
|
+
block_time: Date;
|
|
464
|
+
tx_id: string;
|
|
465
|
+
tx_index: number;
|
|
466
|
+
event_index: number;
|
|
467
|
+
status: BnsNamespaceEventStatus;
|
|
468
|
+
namespace: string;
|
|
469
|
+
manager: string | null;
|
|
470
|
+
manager_frozen: boolean | null;
|
|
471
|
+
manager_transfers_disabled: boolean | null;
|
|
472
|
+
price_function: string | null;
|
|
473
|
+
price_frozen: boolean | null;
|
|
474
|
+
lifetime: number | null;
|
|
475
|
+
revealed_at: number | null;
|
|
476
|
+
launched_at: number | null;
|
|
477
|
+
canonical: Generated<boolean>;
|
|
478
|
+
source_cursor: string;
|
|
479
|
+
created_at: Generated<Date>;
|
|
480
|
+
}
|
|
481
|
+
type BnsMarketplaceAction = "list-in-ustx" | "unlist-in-ustx" | "buy-in-ustx";
|
|
482
|
+
interface BnsMarketplaceEventsTable {
|
|
483
|
+
cursor: string;
|
|
484
|
+
block_height: number;
|
|
485
|
+
block_time: Date;
|
|
486
|
+
tx_id: string;
|
|
487
|
+
tx_index: number;
|
|
488
|
+
event_index: number;
|
|
489
|
+
action: BnsMarketplaceAction;
|
|
490
|
+
bns_id: string;
|
|
491
|
+
price_ustx: string | null;
|
|
492
|
+
commission: string | null;
|
|
493
|
+
canonical: Generated<boolean>;
|
|
494
|
+
source_cursor: string;
|
|
495
|
+
created_at: Generated<Date>;
|
|
496
|
+
}
|
|
497
|
+
interface BnsNamesTable {
|
|
498
|
+
fqn: string;
|
|
499
|
+
namespace: string;
|
|
500
|
+
name: string;
|
|
501
|
+
owner: string;
|
|
502
|
+
bns_id: string;
|
|
503
|
+
registered_at: number | null;
|
|
504
|
+
renewal_height: number | null;
|
|
505
|
+
last_event_cursor: string;
|
|
506
|
+
last_event_at: Date;
|
|
507
|
+
updated_at: Generated<Date>;
|
|
508
|
+
}
|
|
509
|
+
interface BnsNamespacesTable {
|
|
510
|
+
namespace: string;
|
|
511
|
+
manager: string | null;
|
|
512
|
+
manager_frozen: Generated<boolean>;
|
|
513
|
+
price_frozen: Generated<boolean>;
|
|
514
|
+
lifetime: number | null;
|
|
515
|
+
launched_at: number | null;
|
|
516
|
+
last_event_cursor: string;
|
|
517
|
+
last_event_at: Date;
|
|
518
|
+
name_count: Generated<number>;
|
|
519
|
+
updated_at: Generated<Date>;
|
|
520
|
+
}
|
|
319
521
|
interface Database {
|
|
320
522
|
blocks: BlocksTable;
|
|
321
523
|
transactions: TransactionsTable;
|
|
@@ -354,6 +556,17 @@ interface Database {
|
|
|
354
556
|
decoded_events: DecodedEventsTable;
|
|
355
557
|
l2_decoder_checkpoints: L2DecoderCheckpointsTable;
|
|
356
558
|
chain_reorgs: ChainReorgsTable;
|
|
559
|
+
pox4_calls: Pox4CallsTable;
|
|
560
|
+
pox4_cycles_daily: Pox4CyclesDailyTable;
|
|
561
|
+
pox4_signers_daily: Pox4SignersDailyTable;
|
|
562
|
+
sbtc_events: SbtcEventsTable;
|
|
563
|
+
sbtc_token_events: SbtcTokenEventsTable;
|
|
564
|
+
sbtc_supply_snapshots: SbtcSupplySnapshotsTable;
|
|
565
|
+
bns_name_events: BnsNameEventsTable;
|
|
566
|
+
bns_namespace_events: BnsNamespaceEventsTable;
|
|
567
|
+
bns_marketplace_events: BnsMarketplaceEventsTable;
|
|
568
|
+
bns_names: BnsNamesTable;
|
|
569
|
+
bns_namespaces: BnsNamespacesTable;
|
|
357
570
|
}
|
|
358
571
|
type TenantStatus = "provisioning" | "active" | "limit_warning" | "paused_limit" | "suspended" | "error" | "deleted";
|
|
359
572
|
interface TenantsTable {
|