import type { Centrifuge } from '../Centrifuge.js'; import type { PoolNetwork } from '../entities/PoolNetwork.js'; import type { HexString } from '../types/index.js'; import type { MarketplaceWorkflow } from '../types/workflow.js'; import { type PoolContext, type WorkflowDefinition } from './weiroll.js'; /** A whitelisted policy entry on one chain: catalog workflow + its add-time pinned values. */ export type PolicyEntryInput = { workflow: MarketplaceWorkflow; configurableValues: Record; excludedActions?: number[]; }; export declare function applyWorkflowExclusions(workflow: MarketplaceWorkflow, excludedActions?: number[]): MarketplaceWorkflow; export declare function buildPreparedWorkflowDefinition(workflow: MarketplaceWorkflow, excludedActions?: number[]): { workflow: MarketplaceWorkflow; workflowDef: WorkflowDefinition; excludedActions: number[]; }; export declare function resolveWorkflowShareClassId(network: PoolNetwork, scId?: HexString): Promise; export declare function estimateWorkflowExecutionValue(options: { centrifuge: Centrifuge; network: PoolNetwork; workflow: MarketplaceWorkflow; workflowDef: WorkflowDefinition; }): Promise<{ runtimeValues: Record; totalValue: bigint; }>; export declare function resolveWorkflowPoolContext(options: { centrifuge: Centrifuge; network: PoolNetwork; workflowDef: WorkflowDefinition; workflow: MarketplaceWorkflow; strategist: HexString; poolEscrowAddress?: HexString; scId?: HexString; }): Promise<{ poolContext: PoolContext; resolvedScId?: HexString; }>; export declare function buildWorkflowScriptBase(options: { centrifuge: Centrifuge; network: PoolNetwork; workflow: MarketplaceWorkflow; strategist: HexString; poolEscrowAddress?: HexString; scId?: HexString; configurableValues: Record; excludedActions?: number[]; }): Promise<{ workflow: MarketplaceWorkflow; workflowDef: WorkflowDefinition; commands: HexString[]; state: HexString[]; stateBitmap: bigint; poolContext: PoolContext; resolvedScId?: HexString; }>; /** * Builds the full `OnchainPM.execute` argument set (commands/state/stateBitmap/proof) * plus the native `value` for a single added workflow. This is the same pipeline the * execute view runs for one workflow — extracted so several workflows can be built and * then batched through `OnchainPM.executeMultiple`. Runs the permission preflights * (throwing if the workflow isn't fully set up) and fills any payable runtime slots. */ /** * Build the full `OnchainPM.execute` argument set (commands/state/stateBitmap/proof) plus * native `value` for a single whitelisted policy entry. Permission preflights are NOT run * here — they live in the app; a keeper relies on `simulate`. `policy` is the strategist's * full set of entries on this chain, needed to rebuild the Merkle proof tree. */ export declare function buildWorkflowExecuteParams(options: { centrifuge: Centrifuge; network: PoolNetwork; entry: PolicyEntryInput; policy: PolicyEntryInput[]; strategist: HexString; scId?: HexString; poolEscrowAddress?: HexString; /** Already-encoded runtime values keyed by slot key. Account workflows have none. */ runtimeValues?: Record; }): Promise<{ commands: HexString[]; state: HexString[]; stateBitmap: bigint; callbacks: never[]; proof: HexString[]; value: bigint; }>; export declare function computeWorkflowScriptHash(options: { centrifuge: Centrifuge; network: PoolNetwork; workflow: MarketplaceWorkflow; strategist: HexString; poolEscrowAddress?: HexString; scId?: HexString; configurableValues: Record; excludedActions?: number[]; }): Promise<{ workflow: MarketplaceWorkflow; workflowDef: WorkflowDefinition; scriptHash: HexString; resolvedScId?: HexString; }>; /** * Compute one script hash per policy entry — the leaves of the strategist's on-chain * Merkle root. `policy` is already this-chain only (the caller filters by chain). On a * build failure for an entry with no configurable/excluded customization, falls back to * the catalog's pre-computed `workflowId`. */ export declare function computeWorkflowGroupScriptHashes(options: { centrifuge: Centrifuge; network: PoolNetwork; policy: PolicyEntryInput[]; strategist: HexString; scId?: HexString; poolEscrowAddress?: HexString; }): Promise; export declare function isWorkflowInputOptional(parameter: string): boolean; export declare function encodeWorkflowInputValue(parameter: string, rawValue: string): HexString; export declare const encodeConfigurableValue: typeof encodeWorkflowInputValue; //# sourceMappingURL=workflowExecute.d.ts.map