codama-idl / codama

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

Consider moving account data to defined types and linking it using a `DefinedTypeLinkNode` #68

Open lorisleiva opened 3 months ago

lorisleiva commented 3 months ago

This is a proposal that needs further discussion before implementing.


Similarly to how AccountNodes link to PdaNodes using PdaLinkNodes, we could extract the account data to a defined type like the new Anchor spec does.

This assumes this issue is implemented first: #66.

The issue with this approach is that DefinedTypeLinkNode can point to external data structures (hooked or custom package). Meaning we would loose all information about the account data on the IDL.