import { OperationPreview } from "../../model/previews.js"; import "../../model/index.js"; import { OnchainSDK } from "../OnchainSDK.js"; import { WalletFundingError } from "./bundles/checkWallet.js"; import { HealthFactorThresholds } from "./bundles/checkHealthFactors.js"; import { CreditOperationError } from "./bundles/checkCreditOperation.js"; import { PoolOperationError } from "./bundles/checkPoolOperation.js"; import { Address } from "viem"; //#region src/onchain/validation/checkOperation.d.ts export interface CheckOperationOptions extends HealthFactorThresholds { /** Block to read at; defaults to latest. Only set for testnet forks. */ blockNumber?: bigint; } export interface CheckOperationInput { sdk: OnchainSDK; preview: OperationPreview; /** The wallet that signs. Its allowances, balances and RWA standing are read on-chain. */ sender: Address; } /** {@inheritDoc checkOperation} */ export type OperationValidationError = CreditOperationError | PoolOperationError | WalletFundingError; /** * Whether a parsed operation may be signed by `sender`: protocol state first, * then what the wallet has to approve, hold or sign. * * The array is in check order, most fundamental first, so a caller with room * for one verdict reports the first entry. Approve and sign errors are picked * out by `code`, not by position. */ export declare function checkOperation(input: CheckOperationInput, options?: CheckOperationOptions): Promise; //#endregion