import { DurableObject as CloudflareDurableObject } from 'cloudflare:workers'; import * as Funding from './internal/funding/index.js'; import * as Metrics from './Metrics.js'; import * as Store from './internal/Store.js'; type State = ConstructorParameters[0]; type Environment = ConstructorParameters[1]; /** Durable Object class that exposes a Tempo API store over Cloudflare RPC. */ export declare class DurableObject extends CloudflareDurableObject { #private; constructor(ctx: State, env: Environment); /** Deletes a key. */ delete(key: string): Promise; /** Deletes a key only when its value matches `expected`. */ deleteIf(key: string, expected: null | string): Promise; /** Gets a string value. Returns `null` for missing or expired keys. */ get(key: string): Promise; /** * Increments an integer counter and returns the new value. * * The helper's get + put fallback runs inside the object, so the caller * pays one RPC round trip instead of a serial get + put, and the counter * cannot race: the object is single-threaded and its input gate holds * other events while the storage operations are in flight. */ increment(key: string, options?: Store.Store.PutOptions): Promise; /** Lists keys. */ list(options?: Parameters[0]): Promise<{ keys: readonly { name: string; }[]; }>; /** Writes a string value, optionally with a time-to-live. */ put(key: string, value: string, options?: Store.Store.PutOptions): Promise; /** * Atomically compares-and-swaps a value. * * The compare and write run on the object's single thread behind its input * gate, so concurrent callers cannot interleave between them. */ swap(key: string, expected: null | string, next: string, options?: Store.Store.PutOptions): Promise; } type FundingSourceConfiguration = { chainId: string; rpcUrls: readonly string[]; tokenAddress: string; }; type FundingSourceRoute = Funding.SourceObservation.Route; type FundingSourceRegisterOptions = FundingSourceConfiguration & { route: FundingSourceRoute; }; type FundingSourceSyncOptions = FundingSourceConfiguration & { routes: readonly FundingSourceRoute[]; }; /** Cloudflare Durable Object that detects EVM funding deposits before provider indexing. */ export declare class FundingSourceObserver extends CloudflareDurableObject { #private; /** Durable Object storage and alarm context. */ protected context: State; /** Cloudflare bindings used by the observer. */ protected environment: environment; constructor(ctx: State, env: environment); /** Registers one newly created deposit address and starts source observation. */ register(options: FundingSourceRegisterOptions): Promise; /** Replaces the active routes from the database and repairs alarm scheduling. */ sync(options: FundingSourceSyncOptions): Promise; /** Scans confirmed source blocks and persists newly observed deposits. */ alarm(): Promise; /** Reports one source-observer failure. */ protected capture(cause: unknown): void; /** Creates the operational metric sink used by one alarm invocation. */ protected createMetrics(): Metrics.Metrics; } export declare namespace FundingSourceObserver { /** Cloudflare bindings and deployment metadata used by the observer. */ type Environment = { /** Deployment environment included in operational metrics. */ ENVIRONMENT?: string | undefined; /** Queue that receives deposit-address reconciliation work. */ FUNDING_RECONCILIATION_QUEUE: { /** Enqueues one chain-detected address for reconciliation. */ send(message: Funding.Provider.Webhook.receive.Dispatchable): Promise; }; /** Authoritative Postgres connection exposed through Hyperdrive. */ HYPERDRIVE: { /** PostgreSQL connection string supplied by the Hyperdrive binding. */ connectionString: string; }; }; } export {}; //# sourceMappingURL=cloudflare.d.ts.map