These changes make shank generated IDL closer to Anchor format. Additionally, it renames the default_optional_accounts tag to legacy_optional_accounts_strategy. With this change, the default behaviour is to replace missing optional accounts with the program id, unless the legacy_optional_accounts_strategy attribute is used.
Finally, it includes a new attribute on the account annotation: optional_signer. This can be use instead of signer to indicate that the account is an optional signer. When optional_signer is given, isSigner will be set to false on the IDL and a new isOptionalSigner attribute will be set to true.
This PR improves the IDL output of shank:
desc
IDL field is renamed todocs
.optional
field is renamed toisOptional
.These changes make shank generated IDL closer to Anchor format. Additionally, it renames the
default_optional_accounts
tag tolegacy_optional_accounts_strategy
. With this change, the default behaviour is to replace missing optional accounts with the program id, unless thelegacy_optional_accounts_strategy
attribute is used.Finally, it includes a new attribute on the account annotation:
optional_signer
. This can be use instead ofsigner
to indicate that the account is an optional signer. Whenoptional_signer
is given,isSigner
will be set tofalse
on the IDL and a newisOptionalSigner
attribute will be set totrue
.