codama-idl / codama

Generate clients, CLIs, documentation and more from your Solana programs
MIT License
73 stars 16 forks source link

Add package that dynamically resolve IDL components #85

Open lorisleiva opened 3 months ago

lorisleiva commented 3 months ago

Currently, we only use the Codama IDL statically by generating code that can they be used by consumers to interact with the program.

We also need a dynamic version of this such that any app can dynamically interact with a program's components (accounts, instructions, types, errors, etc.) by simply providing it's Codama IDL.

This would be hugely beneficial for apps like explorer that need to access that information on demand.

This package would offer various helper functions that would always accept a Codama IDL first and then any required parameters afterwards.

For instance: