-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
I am trying to generate Vixen parser using the following code:
const path = require("node:path");
const { rootNode } = require("@codama/nodes");
const { rootNodeFromAnchor } = require("@codama/nodes-from-anchor");
const { readJson } = require("@codama/renderers-core");
const { visit } = require("@codama/visitors-core");
const { renderVisitor } = require("@codama/renderers-vixen-parser");
const projectName = "pump-amm-parser";
const idl = readJson(path.join(__dirname, "pump_amm_anchor.json"));
// Use the appropriate node constructor based on your IDL type:
const node = rootNodeFromAnchor(idl); // for Anchor/Shank idls
//const node = rootNode(idl.program); // for Codama idls
visit(
node,
renderVisitor({
projectFolder: __dirname,
projectName,
}),
);
But I am getting this error: Defined type optionBool is not a struct or enum
I am using the IDL from here:
https://solscan.io/account/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA#programIdl
Metadata
Metadata
Assignees
Labels
No labels