Skip to content
PACKAGES

evaluateSlidingWindowRateLimitTransition()

Evaluate one exact D650 sliding-window-v1 successful-consumption ledger transition.

See {@link evaluateFixedWindowRateLimitTransition} for the mandatory receipt-first durable host ordering. This calculator is synchronous, pure, host-side, and never approximates or evicts an active ledger entry to admit work.

import { evaluateSlidingWindowRateLimitTransition } from "@graphrefly/ts/rate-limit";
function evaluateSlidingWindowRateLimitTransition(value: unknown): SlidingWindowRateLimitTransition
ParameterTypeDescription
valueunknownStrict sliding-window request, policy, state, and supplied observation input.

One immutable ready transition with the exact bounded ledger nextState.

import { evaluateSlidingWindowRateLimitTransition } from "@graphrefly/ts/rate-limit";

packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts