import { Logger } from '@chimera-monorepo/utils'; import { OnchainTransaction } from './transaction'; /** * @classdesc A data structure for managing the lifecycle of a (continuously rotating) batch of transactions. */ export declare class TransactionBuffer extends Array { private readonly logger; readonly maxLength: number | undefined; readonly id: { name: string; domain: number; }; get isFull(): boolean; get nonces(): number[]; private lastShiftedTx; /** * A data structure used for management of the lifecycle of on-chain transactions. * * @param logger - Logger instance. * @param maxLength - The configured maximum number of transactions to hold in buffer. Leave undefined to disable. * @param id - Identification info to distinguish which buffer this is when logging. * @param id.name - A string name denomination. * @param id.domain - A domain number denomination. */ constructor(logger: Logger, maxLength: number | undefined, id: { name: string; domain: number; }); /** * Adds a transaction to the buffer. * @param tx - The transaction to add to the buffer. * @returns number index. */ push(tx: OnchainTransaction): number; /** * Shifts a transaction from the buffer. * @returns The last transaction in the buffer. */ shift(): OnchainTransaction | undefined; getTxByNonce(nonce: number): OnchainTransaction | undefined; private log; } //# sourceMappingURL=buffer.d.ts.map