FCTGraph

FCTGraph

Properties

  • g: A directed, acyclic instance from the graphlib library.

  • chainId: A string representing the Chain ID.

Constructor

constructor(params: ConstructorOptions = { chainId: '5' })

The constructor initializes the graph and sets the chain ID.

addNodeEdge

addNodeEdge(edge: NodeEdgeData): void

This method adds a new edge to the graph.

startWith

startWith(node: IWrappedPluginInstance): void

This method sets the starting point of the graph by connecting the given node to the 'start' node.

connectNodes

connectNodes(
  nodeA: IWrappedPluginInstance,
  nodeB: IWrappedPluginInstance,
  type: NodeEdgeData['sourceHandle']
): void

This method creates a connection between two nodes.

hasNodeEdge

hasNodeEdge(source: string, target: string): boolean

This method checks if there's an edge between the source and target nodes.

hasConnectedNodes

hasConnectedNodes(
  nodeA: IWrappedPluginInstance,
  nodeB: IWrappedPluginInstance
): boolean

This method checks if two nodes are connected.

addPointer

addPointer(paramA: ParamInstance, paramB: ParamInstance): void

This method adds a pointer between two parameters.

hasPointer

hasPointer(paramA: ParamInstance, paramB: ParamInstance): boolean

This method checks if there's a pointer between two parameters.

removeNodeEdge

removeNodeEdge(source: string, target: string): void

This method removes an edge between the source and target nodes.

isReachable

isReachable(nodeId: string): boolean

This method checks if a node is reachable in the graph.

add

add<
  P extends PluginType,
  O extends WithWrappedParams<ConstructorParameters<P>['0']['initParams']>,
  R extends IWrappedPluginInstance<P>
>(
  plugin: P,
  options?: O
): R

This method adds a new plugin to the graph.

remove

remove(node: IWrappedPluginInstance): void

This method removes a node from the graph.

compile

compile(options: IFCTOptions = createFCTOptions()): Promise<any>

This method compiles the graph, prepares the plugins, and generates the batch calls.

Last updated