Skip to main content

Module codama

Module codama 

Source
Expand description

Codama IDL integration for the Anchor CLI.

  • anchor codama convert <path> translates a (post-0.30, v0.1.x spec) Anchor IDL JSON file into a Codama IDL JSON tree rooted at a rootNode. The conversion mirrors the reference TypeScript implementation shipped in @codama/nodes-from-anchor (v01/), so the output should be byte-stable against the JS toolchain modulo property ordering.
  • anchor codama generate -l <langs> -p <path> <idl> first runs the same conversion in-process, then drives @codama/cli to render clients in the requested languages (js, js-umi, rust, go).

Enums§

CodamaCommand
Language
Languages with an officially-published @codama/renderers-* package.

Functions§

auto_generate_for_workspace
Convenience entry point for the anchor build integration: reads the [clients] section of Anchor.toml, expands it into resolved (Language, output_path) targets, and runs Codama for each IDL produced by the build.
convert
entry
generate
Convert the Anchor IDL at idl_path to a Codama IDL, then drive the Codama CLI to render clients for each requested language under <base_path>/<language>.