Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Codama IDL type #85

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Add Codama IDL type #85

merged 2 commits into from
Oct 31, 2024

Conversation

febo
Copy link
Contributor

@febo febo commented Oct 30, 2024

This PR adds a new IdlType variant to represent Codama IDLs on the include-idl crate.

The way the IDL is stored was also refactored to include its type in a separate section:

  • .idl.type: type of the IDL (bytes of "anchor" or "codama")
  • .idl.data: compressed data of the IDL file

The CLI was updated to retrieve the IDL under the standard section headers:

$ include-idl-cli parse ../programs/.bin/asset_program.so`

Program IDL (codama)
============================
{"additionalPrograms":[],"kind":"rootNode","program":{"accounts":[{"data":
{"fields":[{"docs":[],"kind":"structFieldTypeNode","name":"discriminator","type":
{"kind":"definedTypeLinkNode","name":"discriminator"}},{"docs":[],"kind"
...

@febo febo marked this pull request as ready for review October 30, 2024 16:27
@febo febo merged commit a5a95ea into main Oct 31, 2024
16 of 19 checks passed
@febo febo deleted the febo/codama-idl-type branch October 31, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants