import { Database } from 'sqlite'; import { Config } from '../../fileStores/config'; import { Logger } from '../../logger'; export declare class PoolDatabase { private readonly db; private readonly migrations; constructor(options: { db: Database; config: Config; logger: Logger; }); static init(options: { config: Config; logger: Logger; dbPath?: string; }): Promise; start(): Promise; stop(): Promise; newShare(publicAddress: string): Promise; shareCountSince(timestamp: number, publicAddress?: string): Promise; getCurrentPayoutPeriod(): Promise; rolloverPayoutPeriod(timestamp: number): Promise; newBlock(sequence: number, hash: string, reward: string): Promise; unconfirmedBlocks(): Promise; updateBlockStatus(blockId: number, main: boolean, confirmed: boolean): Promise; newTransaction(hash: string, payoutPeriodId: number): Promise; unconfirmedTransactions(): Promise; updateTransactionStatus(transactionId: number, confirmed: boolean, expired: boolean): Promise; payoutAddresses(payoutPeriodId: number): Promise<{ publicAddress: string; shareCount: number; }[]>; markSharesPaid(payoutPeriodId: number, payoutTransactionId: number, publicAddresses: string[]): Promise; markSharesUnpaid(transactionId: number): Promise; deleteUnpayableShares(payoutPeriodId: number): Promise; earliestOutstandingPayoutPeriod(): Promise; payoutPeriodShareCount(payoutPeriodId: number): Promise; pendingShareCount(publicAddress?: string): Promise; getPayoutReward(payoutPeriodId: number): Promise; payoutPeriodBlocksConfirmed(payoutPeriodId: number): Promise; } export type DatabasePayoutPeriod = { id: number; createdAt: string; start: number; end: number | null; }; export type DatabaseBlock = { id: number; createdAt: Date; blockSequence: number; blockHash: string; minerReward: bigint; confirmed: boolean; main: boolean; payoutPeriodId: number; }; export interface RawDatabaseBlock { id: number; createdAt: string; blockSequence: number; blockHash: string; minerReward: string; confirmed: number; main: number; payoutPeriodId: number; } export type DatabasePayoutTransaction = { id: number; createdAt: Date; transactionHash: string; confirmed: boolean; expired: boolean; payoutPeriodId: number; }; export interface RawDatabasePayoutTransaction { id: number; createdAt: string; transactionHash: string; confirmed: number; expired: number; payoutPeriodId: number; } //# sourceMappingURL=database.d.ts.map