/** * Encodes an action failure for the redirect cookie. When the payload fits * inside the cookie limit, it is embedded directly as a signed base64url JSON * value. When it is too large, it is stored in memory and only a short signed * id is written to the cookie. * * The cookie is signed with HMAC-SHA256 to prevent forgery (A-20). * * @returns The cookie value to set on the redirect response. */ export declare function encodeActionErrorCookie(data: unknown, status: number): { value: string; storeId?: string; }; /** * Decodes a cookie value (previously produced by `encodeActionErrorCookie`) * into the failure payload. Verifies the HMAC signature first, then resolves * in-memory overflow entries and deletes them after reading. */ export declare function decodeActionErrorCookie(value: string | undefined | null): { data: unknown; status: number; } | undefined; /** Name of the cookie used to relay action errors. */ export declare const ACTION_ERROR_COOKIE = "__nix_js_action_error"; /** Builds the Set-Cookie header value that clears the error cookie. */ export declare function clearActionErrorCookieHeader(): string; /** Builds the Set-Cookie header value that sets the error cookie. */ export declare function setActionErrorCookieHeader(value: string): string;