import { CreditManagerPausedError, DebtOutOfRangeError, ForbiddenTokenError, InsufficientBalanceError, InsufficientCollateralError, InsufficientPoolLiquidityError, LeverageOutOfRangeError, MarketExpiredError, QuotaAboveMaxError, QuotaInactiveError, QuotaLimitReachedError, QuotaUnchangedError, ReservePriceLimitedError } from "../../model/errors/operation-errors.js"; import { MultipleDelayedWithdrawalsError, NoDelayedRouteError, NoRecordedIntentError, UnsupportedCollateralTokenError, UnsupportedTokenPairError, WithdrawalInProgressError } from "../../model/errors/prepare-errors.js"; import "../../model/index.js"; //#region src/onchain/validation/raise.d.ts /** * What the intents engine can raise: unit-check errors it runs, plus the * planning outcomes discovered mid-walk. Feeds prepare's per-method unions. * * Not a catch-all of every SDK error — pool paused/sunset is `checkOperation`'s, * a malformed transaction is `previewOperation`'s, not the engine's. **/ export type IntentValidationError = CreditManagerPausedError | MarketExpiredError | InsufficientPoolLiquidityError | DebtOutOfRangeError | LeverageOutOfRangeError | InsufficientCollateralError | ReservePriceLimitedError | ForbiddenTokenError | QuotaLimitReachedError | QuotaInactiveError | QuotaUnchangedError | QuotaAboveMaxError | InsufficientBalanceError | UnsupportedCollateralTokenError | UnsupportedTokenPairError | NoDelayedRouteError | MultipleDelayedWithdrawalsError | WithdrawalInProgressError | NoRecordedIntentError; /** * Engine-internal throw: planners and guards raise one error object, and the * service boundary turns it into {@link SDKError}. **/ export declare class IntentPreviewError extends Error { readonly error: IntentValidationError; constructor(error: IntentValidationError, message?: string); /** The same wrap the checks hand out, with an optional engine-side sentence. */ static of(error: IntentValidationError, message?: string): IntentPreviewError; } /** * Throws the first error a check found, with the sentence the engine logs for * it. An empty array is a pass. * * Returns normally when there is nothing to raise, so it cannot narrow a type * the way a bare `throw` does — a site that guards a value for the code below * it keeps throwing directly. **/ export declare function raise(errors: readonly IntentValidationError[], message: string): void; //#endregion