0

As the title states is there a crate or any mechanism to get an idl similar to what we get with anchor programs but for vanilla/bare-bones solana programs ?

2 Answers 2

1

Yes it is, but afaik there is not automated solution yet, although I believe @acheron was working on something in that vein.

A few of them are implemented and available already:

There is actually an #idl-all-the-things channel in the Anchor Discord for that purpose.

The general idea of how to come up with it is to:

  1. create a "shell" Anchor crate mirroring the structs and endpoints of the original program, like here (all currently IDL-ized vanilla programs are available here)
  2. run the idl generation on it using anchor idl parse
1

This repo might interest you. Using this you can generate IDLs for non-anchor-program.

2
  • a bit confused on how it works it seems it sometimes uses Shank but other wise it rewrites the instructions and adds comments, could you shed some light on how is it working ? Commented Jul 26, 2022 at 12:50
  • yes. please elaborate the answer here. this is effectively a "link-only" answer
    – trent.sol
    Commented Jul 26, 2022 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.