Skip to content

Feature idea: Add a --clients-only flag that can be used to generate clients for an IDL  #119

@mcintyre94

Description

@mcintyre94

This template is useful if you have a (usually Anchor) IDL for an existing program and want to generate a client for it. But it adds a lot of unnecessary stuff for that use case, and the implementation of getAllProgramIdls doesn't work if you strip program code out. I think making this use case work out of the box would be helpful for apps transitioning to Kit before programs have an official Kit/Codama SDK .

I think useful --clients-only modifications to the template would be:

  • programs directory with just a [name].idl.json file
  • modified const [idl, ...additionalIdls] = ... in /generate-clients.mjs.njk that reads these IDLs without using Cargo/compiling anything
  • remove the programs:* and generate:idls jobs from package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions