/** * Dependency-graph utilities for the deploy framework: topological layering (which steps * can run together) and a pretty-printer for the resulting plan. */ /** * Group `nodes` into dependency layers (Kahn's algorithm). Each layer contains nodes whose * dependencies all sit in earlier layers, so a layer's nodes are mutually independent and * may run in parallel. Dependencies pointing outside `nodes` (e.g. already-satisfied work) * are treated as satisfied. Throws on a cycle. */ export declare function topologicalLayers(nodes: string[], dependencies: Map): string[][]; /** * Like {@link topologicalLayers}, but nodes for which `floatLate(node)` is true are scheduled as * LATE as their dependents allow (ALAP) instead of as early as possible. Used to push batchable * actions into the latest layer they can share, so same-account actions in adjacent layers coalesce * into one tx. Fixed nodes (e.g. contract publishes, which unblock dependents and don't batch) keep * their earliest layer; the relative order — and so the critical-path length — is unchanged. Throws * on a cycle (via {@link topologicalLayers}). */ export declare function scheduleLayers(nodes: string[], dependencies: Map, floatLate: (node: string) => boolean): string[][]; /** One node in the printed plan. */ export interface PlanRow { /** e.g. "goCoin" */ name: string; /** short tag, e.g. "Token · publishes class" */ tag?: string; /** dependency names to show as `← a, b` */ dependencies?: string[]; } /** * Render a titled flat list of plan rows (no layer grouping). Use for the declared-contracts * overview, whose `← ...` arrows are constructor-arg references — not an execution order. */ export declare function formatList(title: string, rows: PlanRow[]): string; /** * Render a titled, layer-grouped section of the plan as an indented tree. Each layer's txs are * submitted in parallel. */ export declare function formatLayers(title: string, layers: PlanRow[][]): string; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXBsb3kvZ3JhcGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBRUg7Ozs7O0dBS0c7QUFDSCx3QkFBZ0IsaUJBQWlCLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxFQUFFLFlBQVksRUFBRSxHQUFHLENBQUMsTUFBTSxFQUFFLE1BQU0sRUF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