import { Order } from '../order/types';
import { EventName } from '../types';
import { RedisClientType } from 'redis';
interface SiftResult {
    order: Order | undefined;
    isFirstTime: boolean;
}
interface SieveOrder {
    order: Order;
    event: EventName;
    sift: Partial<Record<EventName, boolean>>;
    createdTimestamp: number;
}
export interface SieveAttestation {
    attestation: {
        signature: string;
        messagePayloadHash: string;
        messagePayload: string;
        bidWinner: string;
        order: Order;
    } | null;
    createdTimestamp: number;
    isFirstTime: boolean;
}
export declare class RedisSieve {
    static singleton: RedisSieve | null;
    readonly items: Map<string, {
        id: string;
        val: string;
        event: EventName;
        createdTimestamp: number;
    }>;
    readonly orders: Map<string, SieveOrder>;
    readonly attestations: Map<string, SieveAttestation>;
    readonly ORDERS_TTL_MS: number;
    redisClient: RedisClientType;
    private constructor();
    static getInstance(redisClient: RedisClientType, _ORDERS_TTL_MS?: number): RedisSieve;
    start(): Promise<void>;
    addItem(id: string, event: EventName, txHash: string): Promise<boolean>;
    hasItem(id: string): boolean;
    getOrderRedisKey(orderId: string, event: EventName): string;
    addOrder(order: Order, eventName: EventName): Promise<boolean>;
    addAttestation(orderId: string, attestation: {
        signature: string;
        messagePayloadHash: string;
        messagePayload: string;
        bidWinner: string;
        order: Order;
    }): void;
    getAttestation(orderId: string): SieveAttestation;
    siftId(orderId: string, event: EventName): SiftResult;
    private clearOrders;
}
export {};
//# sourceMappingURL=sieve.redis.d.ts.map