import { Context, Effect, Layer, Stream } from "effect"; import type { Abi } from "viem"; import type { ClientNotFoundError, EventWatchError } from "../core/index.js"; import type { BackfillParams, DecodedEvent, WatchParams } from "../events/index.js"; import { EventBackfill, EventStream } from "../events/index.js"; import type { StorageError } from "../platform/browser/storage/index.js"; import type { ContractEventName } from "../types/index.js"; export type StreamCursor = { chainId: number; address: string; eventName: string; lastBlockNumber: bigint; lastLogIndex: number; updatedAt: number; }; export type CursorStoreError = StorageError; export type CursorStorage = { readonly get: (key: string) => Effect.Effect; readonly set: (key: string, cursor: StreamCursor) => Effect.Effect; readonly delete: (key: string) => Effect.Effect; }; declare const CursorStore_base: Context.TagClass; export declare class CursorStore extends CursorStore_base { } export declare const InMemoryCursorStoreLive: Layer.Layer; export declare const makeCursorKey: (chainId: number, address: string, eventName: string) => string; export type CursorStreamShape = { readonly watchWithCursor: >(params: WatchParams & { cursorKey: string; }) => Effect.Effect, EventWatchError | StorageError>, ClientNotFoundError | StorageError>; readonly syncWithCursor: >(params: BackfillParams & { cursorKey: string; }) => Effect.Effect, EventWatchError | StorageError>, ClientNotFoundError | StorageError>; }; declare const CursorStream_base: Context.TagClass; export declare class CursorStream extends CursorStream_base { } export declare const CursorStreamLive: Layer.Layer; export {}; //# sourceMappingURL=cursor.d.ts.map