-
Notifications
You must be signed in to change notification settings - Fork 3
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
clients: Add client generation #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one nit.
It doesn't need to be done in this PR, but what do you think about introducing a feature like idl
and gating all shank usage on that flag?
That way, users of the crate don't have to pull in shank, and even better, it should make it easier to swap to codama macros in the future with less disruptive breakage.
Good point! We could add
This is enough to not pull in |
I'm not sure I see how it works without a feature (unless you mean using the implicit |
Hmmm, you are right. The IDL generation works without having a feature, but you will need it to be able to have the validation when you add them to your struct/enum types. I will add the |
This did not work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the tiny nit, then this can go in!
Problem
Currently, the stake program does not include annotation to generate an IDL. This prevents using Codama to generate clients.
Solution
Use
Shank
to annotate the program and generate clients.Note: Majority of source files under the
clients
folder are auto-generated.