import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; import { NonSpecificConstruction, NonSpecificAction, NonSpecificActionGroup, NextNodeNoNextMint, NonSpecificConstructionFilledUnserializable, _NonSpecificActionFilled } from "./interfaces"; export declare const _checkThatAllHitInActionGroup: (group: NonSpecificActionGroup) => boolean; export declare const getInDegrees: (graph: number[][][]) => number[]; /** * Get a sort on the graph. This should be DFS based as we want * to go down "legs" of the tree 1 at a time * * The algorithm works by using DFS and only following the dfs if * the amount of times a node is hit equals its in degree */ export declare const topologicalSort: (graph: number[][][], inDegrees: number[], init: number[]) => number[]; /** * Convert a set of action datas to an adjacency list */ export declare const _convertToDoubleAdjacencyList: (actionDatasFormatted: NonSpecificConstruction["actionDatas"], actionIdxToId: string[], initActions: string[]) => { graph: number[][][]; initActions: number[]; }; /** * Return a list of the hit order where the outer list corresponds to * the order of transactions and the inner list corresponds to the actions * grouped into an instruction * * Every action idx is in reference to 1 FLAT list of actions. This algorithm works * on the assumption that every vertex is only every visited once and that the input graph is a DAG * * * @return actionIdxToId - a list of strings where the string at id index i corresponds to action of the same id * @return order - The order hit with the outer group being for action/ action group and the inner one being the order for internal actions. Order maps from * call order index -> action index * @return initActionIdxs - the initial action index's which get hit * * NOTE: this returns an unknown result for cyclic graphs */ export declare const buildSeqListOfActionCalls: (actionDatas: NonSpecificConstruction["actionDatas"], initActions: string[], numberOfInputTokens: number) => { order: number[][]; initActionIdxs: number[]; actionIdxToId: string[]; inDegrees: number[]; nextNodes: NextNodeNoNextMint[][][]; }; export declare const createInnerActionId: (actionGroupId: string, actionId: string) => string; export declare const prettyPrintActionId: (id: string) => string; export declare const getNonSpecificActionDataFromId: (id: string, actionDatas: NonSpecificConstruction["actionDatas"], actionDatasIdsFormatted?: boolean) => NonSpecificAction; export declare const updateNonSpecificActionDataFromId: (id: string, construction: NonSpecificConstruction | NonSpecificConstructionFilledUnserializable, update: NonSpecificAction | _NonSpecificActionFilled, actionDatasIdsFormatted?: boolean) => void;