Creates a Codama root node from multiple Anchor IDLs.
This function takes an array of Anchor IDL objects and converts them into a single Codama root node that can be used with Codama visitors for code generation and AST transformation.
An array of Anchor IDL objects to convert
A Codama root node containing all programs from the IDLs
If no IDL files are provided
If no program nodes could be created
import { rootNodeFromAnchorIdls } from "@macalinao/codama-nodes-from-anchor-x";import { visit } from "codama";const idls = [idl1, idl2, idl3];const root = rootNodeFromAnchorIdls(idls);// Use with Codama visitorsvisit(root, myVisitor); Copy
import { rootNodeFromAnchorIdls } from "@macalinao/codama-nodes-from-anchor-x";import { visit } from "codama";const idls = [idl1, idl2, idl3];const root = rootNodeFromAnchorIdls(idls);// Use with Codama visitorsvisit(root, myVisitor);
Creates a Codama root node from multiple Anchor IDLs.
This function takes an array of Anchor IDL objects and converts them into a single Codama root node that can be used with Codama visitors for code generation and AST transformation.