Coda by Ian Macalinao
    Preparing search index...

    Interface CodaConfig

    Configuration for Coda code generation

    interface CodaConfig {
        docs?: { npmPackageName?: string; path?: string };
        idlPath?: string | string[];
        instructionAccountDefaultValues?: InstructionAccountDefaultRule[];
        outputDir?: string;
        rustOutputDir?: string;
        visitors?:
            | Visitor<Node | null, "rootNode">[]
            | ((context: VisitorContext) => Visitor<Node | null, "rootNode">[]);
    }
    Index

    Properties

    docs?: { npmPackageName?: string; path?: string }

    Documentation generation options.

    Type Declaration

    • OptionalnpmPackageName?: string

      NPM package name for the TypeScript client. If provided, will add an NPM badge and link to the package in the generated documentation.

      "@my-org/my-solana-client"
      
    • Optionalpath?: string

      Output directory for the generated documentation.

      "./docs"
      
    idlPath?: string | string[]

    Path to the Anchor IDL file(s). Can be:

    • A single file path: "./target/idl/program.json"
    • A glob pattern: "./idls/*.json"
    • An array of paths and/or patterns: ["./idls/*.json", "./extra/program.json"]

    Glob patterns are supported for matching multiple files. Overrides the --idl command line option.

    "./idls/*.json"
    
    instructionAccountDefaultValues?: InstructionAccountDefaultRule[]

    Default values for instruction accounts, if applicable.

    outputDir?: string

    Output directory for the generated client. Overrides the --output command line option.

    "./src/generated"
    
    rustOutputDir?: string

    Output directory for the generated Rust client.

    "./rust"
    
    visitors?:
        | Visitor<Node | null, "rootNode">[]
        | ((context: VisitorContext) => Visitor<Node | null, "rootNode">[])

    Additional root node visitors to apply to the Codama nodes before generating code. These visitors are applied in order after the initial Anchor IDL parsing. Can be either an array of visitors or a function that returns an array of visitors.