codama-idl / codama

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

Add `defaultValueStrategy` to `InstructionAccountNode`? #81

Open lorisleiva opened 3 months ago

lorisleiva commented 3 months ago

Currently, InstructionArgumentNodes have a defaultValue attribute as well as a defaultValueStrategy attribute which can either be "omitted" or "optional". This means, we can decide if the default value should be overridable by the end user or if, really, this default value should never be altered.

Since InstructionAccountNodes also have a defaultValue attribute, would it make sense for them to also have the same defaultValueStrategy attribute? and "omitted" strategy would then let the renderers know that the account shouldn't even be present in the input of the instruction helper.