import { AccountConfig } from "../../account.mjs"; import { PredictConfig } from "./types.mjs"; import { DeepbookPredictConfig } from "../../contracts/deepbook_predict/config-arguments.mjs"; import { DeepbookPredictMathConfig } from "../../contracts/deepbook_predict_math/config-arguments.mjs"; import { DeepbookPredictOrdersConfig } from "../../contracts/deepbook_predict_orders/config-arguments.mjs"; //#region src/predict/config/generated.d.ts /** * The flat config slice the generated bindings resolve `options.config` against, projected from * the nested public `PredictConfig`. Each generated call declares only the keys it consumes, so a * single object carrying all of them satisfies every call site. * * Typed as the intersection of the two generated interfaces on purpose: if codegen adds, drops, or * renames a config key, this file stops compiling instead of silently building a PTB against the * wrong object. * * `predictPackageId` is narrowed to `string` because codegen types package ids as optional, while * this projection always supplies one. `predictPackageIdV1` separately supplies the original * identity for existing struct tags and dynamic-field keys. The two account ids restate a narrowing * `AccountConfig` already applies, so they are redundant today; they are kept so this projection * still compiles to plain ids if that package ever widens them back. */ type GeneratedConfig = DeepbookPredictConfig & AccountConfig & { predictPackageId: string; predictPackageIdV1: string; /** The ORIGINAL account ID: type tags and derived addresses are built from it. */ accountPackageId: string; accountRegistry: string; }; declare function toGeneratedConfig(cfg: PredictConfig): GeneratedConfig; /** * {@link GeneratedConfig} plus the order-flow companion (`deepbook_predict_orders`) and the math * library: the slice the queued-order thunks and reads take. A queued order calls the companion, * which calls into Predict, so one object carries both packages' keys. `predictOrdersPackageIdV1` * is the companion's original ID, which types `OrderFlow` and the queue events. */ type OrdersGeneratedConfig = GeneratedConfig & DeepbookPredictOrdersConfig & DeepbookPredictMathConfig & { predictOrdersPackageId: string; predictOrdersPackageIdV1: string; orderDesk: string; queueRegistry: string; }; /** * Project a config that records delayed execution onto {@link OrdersGeneratedConfig}. Throws * `PredictInputError` while the config lacks the Predict upgrade, the companion package, its desk * or its queue registry: building a queued order against a guessed package would abort on chain * or, worse, address the wrong one. */ declare function toOrdersConfig(cfg: PredictConfig): OrdersGeneratedConfig; //#endregion export { GeneratedConfig, OrdersGeneratedConfig, toGeneratedConfig, toOrdersConfig }; //# sourceMappingURL=generated.d.mts.map