codama-idl / codama

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

Allow PdaValueNode to inline their own PdaNode definition #43

Closed lorisleiva closed 4 months ago

lorisleiva commented 4 months ago

As discussed in PR #42, this PR allows PdaValueNodes to define their own PdaNode instead of requiring a top-level PdaNode to exist on the program.

Renderers have been updated such that, when coming across a PdaValueNode with an inlined PdaNode, it won't try to import a generated PDA function but instead, will derive the PDA in situ.

Both JavaScript renderers have been updated. The Rust renderer currently doesn't use this information which is why this PR doesn't contain any changes in the Rust renderer.

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 596519d1e8a01bd2ebbe32dfde1f3f09e55a21b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages | Name | Type | | ---------------------------- | ----- | | @kinobi-so/renderers-js-umi | Patch | | @kinobi-so/renderers-js | Patch | | @kinobi-so/node-types | Patch | | @kinobi-so/visitors | Patch | | @kinobi-so/nodes | Patch | | @kinobi-so/renderers | Patch | | @kinobi-so/errors | Patch | | kinobi | Patch | | @kinobi-so/nodes-from-anchor | Patch | | @kinobi-so/renderers-core | Patch | | @kinobi-so/renderers-rust | Patch | | @kinobi-so/validators | Patch | | @kinobi-so/visitors-core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR