Coda

Automated TypeScript client generation for Solana programs

~/my-solana-project
~/my-solana-project main
coda generate

⠋ Searching for IDL files...
Found IDL at ./idls/my_program.json
Parsing Anchor IDL...
Building AST from 12 instructions
Applying visitor transformations
Generating TypeScript client...

✓ Client generated successfullyat ./src/generated

~/my-solana-project main
ls -la ./src/generated
total 24
drwxr-xr-x 8 user staff 256 Aug 22 10:02 .
drwxr-xr-x 5 user staff 160 Aug 22 10:02 ..
drwxr-xr-x 4 user staff 128 Aug 22 10:02 accounts
drwxr-xr-x 3 user staff 96 Aug 22 10:02 errors
-rw-r--r-- 1 user staff 1024 Aug 22 10:02 index.ts
drwxr-xr-x 6 user staff 192 Aug 22 10:02 instructions
drwxr-xr-x 3 user staff 96 Aug 22 10:02 pdas
drwxr-xr-x 5 user staff 160 Aug 22 10:02 types

~/my-solana-project main
_

Zero Configuration

Works out of the box with standard Anchor projects. No setup required.

Type Safety

Full TypeScript types for every instruction, account, and error.

Automatic Sync

Regenerate anytime your IDL changes. Client stays in perfect sync.

From IDL to TypeScript in Seconds

Your Anchor IDL

{
  "instructions": [{
    "name": "transfer",
    "accounts": [
      { "name": "source", "isMut": true },
      { "name": "destination", "isMut": true },
      { "name": "authority", "isSigner": true }
    ],
    "args": [
      { "name": "amount", "type": "u64" }
    ]
  }]
}

Generated TypeScript

import { createTransferInstruction } from "./generated";

const instruction = createTransferInstruction({
  source: sourceAccount,
  destination: destAccount,
  authority: signer,
  amount: 1000n
});

// Full type safety and autocomplete ✨